@tryfinch/finch-api 6.27.0 → 6.29.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 (208) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/resources/access-tokens.d.ts +8 -0
  5. package/resources/access-tokens.d.ts.map +1 -1
  6. package/resources/access-tokens.js +8 -0
  7. package/resources/access-tokens.js.map +1 -1
  8. package/resources/access-tokens.mjs +8 -0
  9. package/resources/access-tokens.mjs.map +1 -1
  10. package/resources/hris/benefits/benefits.d.ts +73 -0
  11. package/resources/hris/benefits/benefits.d.ts.map +1 -1
  12. package/resources/hris/benefits/benefits.js +23 -0
  13. package/resources/hris/benefits/benefits.js.map +1 -1
  14. package/resources/hris/benefits/benefits.mjs +23 -0
  15. package/resources/hris/benefits/benefits.mjs.map +1 -1
  16. package/resources/hris/benefits/individuals.d.ts +35 -0
  17. package/resources/hris/benefits/individuals.d.ts.map +1 -1
  18. package/resources/hris/benefits/individuals.js +8 -0
  19. package/resources/hris/benefits/individuals.js.map +1 -1
  20. package/resources/hris/benefits/individuals.mjs +8 -0
  21. package/resources/hris/benefits/individuals.mjs.map +1 -1
  22. package/resources/hris/company/company.d.ts +15 -10
  23. package/resources/hris/company/company.d.ts.map +1 -1
  24. package/resources/hris/company/company.js +5 -0
  25. package/resources/hris/company/company.js.map +1 -1
  26. package/resources/hris/company/company.mjs +5 -0
  27. package/resources/hris/company/company.mjs.map +1 -1
  28. package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts +8 -0
  29. package/resources/hris/company/pay-statement-item/pay-statement-item.d.ts.map +1 -1
  30. package/resources/hris/company/pay-statement-item/pay-statement-item.js.map +1 -1
  31. package/resources/hris/company/pay-statement-item/pay-statement-item.mjs.map +1 -1
  32. package/resources/hris/company/pay-statement-item/rules.d.ts +30 -0
  33. package/resources/hris/company/pay-statement-item/rules.d.ts.map +1 -1
  34. package/resources/hris/company/pay-statement-item/rules.js +16 -0
  35. package/resources/hris/company/pay-statement-item/rules.js.map +1 -1
  36. package/resources/hris/company/pay-statement-item/rules.mjs +16 -0
  37. package/resources/hris/company/pay-statement-item/rules.mjs.map +1 -1
  38. package/resources/hris/directory.d.ts +16 -8
  39. package/resources/hris/directory.d.ts.map +1 -1
  40. package/resources/hris/directory.js.map +1 -1
  41. package/resources/hris/directory.mjs.map +1 -1
  42. package/resources/hris/documents.d.ts +12 -0
  43. package/resources/hris/documents.d.ts.map +1 -1
  44. package/resources/hris/documents.js +7 -0
  45. package/resources/hris/documents.js.map +1 -1
  46. package/resources/hris/documents.mjs +7 -0
  47. package/resources/hris/documents.mjs.map +1 -1
  48. package/resources/hris/employments.d.ts +122 -103
  49. package/resources/hris/employments.d.ts.map +1 -1
  50. package/resources/hris/employments.js +10 -0
  51. package/resources/hris/employments.js.map +1 -1
  52. package/resources/hris/employments.mjs +10 -0
  53. package/resources/hris/employments.mjs.map +1 -1
  54. package/resources/hris/hris.d.ts +12 -12
  55. package/resources/hris/hris.d.ts.map +1 -1
  56. package/resources/hris/individuals.d.ts +73 -56
  57. package/resources/hris/individuals.d.ts.map +1 -1
  58. package/resources/hris/individuals.js.map +1 -1
  59. package/resources/hris/individuals.mjs.map +1 -1
  60. package/resources/hris/pay-statements.d.ts +17 -1
  61. package/resources/hris/pay-statements.d.ts.map +1 -1
  62. package/resources/hris/pay-statements.js +16 -0
  63. package/resources/hris/pay-statements.js.map +1 -1
  64. package/resources/hris/pay-statements.mjs +16 -0
  65. package/resources/hris/pay-statements.mjs.map +1 -1
  66. package/resources/hris/payments.d.ts +11 -0
  67. package/resources/hris/payments.d.ts.map +1 -1
  68. package/resources/hris/payments.js +11 -0
  69. package/resources/hris/payments.js.map +1 -1
  70. package/resources/hris/payments.mjs +11 -0
  71. package/resources/hris/payments.mjs.map +1 -1
  72. package/resources/request-forwarding.d.ts +10 -0
  73. package/resources/request-forwarding.d.ts.map +1 -1
  74. package/resources/request-forwarding.js +10 -0
  75. package/resources/request-forwarding.js.map +1 -1
  76. package/resources/request-forwarding.mjs +10 -0
  77. package/resources/request-forwarding.mjs.map +1 -1
  78. package/resources/sandbox/company.d.ts +23 -0
  79. package/resources/sandbox/company.d.ts.map +1 -1
  80. package/resources/sandbox/company.js +23 -0
  81. package/resources/sandbox/company.js.map +1 -1
  82. package/resources/sandbox/company.mjs +23 -0
  83. package/resources/sandbox/company.mjs.map +1 -1
  84. package/resources/sandbox/connections/accounts.d.ts +17 -0
  85. package/resources/sandbox/connections/accounts.d.ts.map +1 -1
  86. package/resources/sandbox/connections/accounts.js +9 -0
  87. package/resources/sandbox/connections/accounts.js.map +1 -1
  88. package/resources/sandbox/connections/accounts.mjs +9 -0
  89. package/resources/sandbox/connections/accounts.mjs.map +1 -1
  90. package/resources/sandbox/connections/connections.d.ts +7 -0
  91. package/resources/sandbox/connections/connections.d.ts.map +1 -1
  92. package/resources/sandbox/connections/connections.js +7 -0
  93. package/resources/sandbox/connections/connections.js.map +1 -1
  94. package/resources/sandbox/connections/connections.mjs +7 -0
  95. package/resources/sandbox/connections/connections.mjs.map +1 -1
  96. package/resources/sandbox/directory.d.ts +7 -0
  97. package/resources/sandbox/directory.d.ts.map +1 -1
  98. package/resources/sandbox/directory.js.map +1 -1
  99. package/resources/sandbox/directory.mjs.map +1 -1
  100. package/resources/sandbox/employment.d.ts +7 -0
  101. package/resources/sandbox/employment.d.ts.map +1 -1
  102. package/resources/sandbox/employment.js.map +1 -1
  103. package/resources/sandbox/employment.mjs.map +1 -1
  104. package/resources/sandbox/individual.d.ts +7 -0
  105. package/resources/sandbox/individual.d.ts.map +1 -1
  106. package/resources/sandbox/individual.js.map +1 -1
  107. package/resources/sandbox/individual.mjs.map +1 -1
  108. package/resources/sandbox/jobs/configuration.d.ts +15 -0
  109. package/resources/sandbox/jobs/configuration.d.ts.map +1 -1
  110. package/resources/sandbox/jobs/configuration.js +15 -0
  111. package/resources/sandbox/jobs/configuration.js.map +1 -1
  112. package/resources/sandbox/jobs/configuration.mjs +15 -0
  113. package/resources/sandbox/jobs/configuration.mjs.map +1 -1
  114. package/resources/sandbox/jobs/jobs.d.ts +7 -0
  115. package/resources/sandbox/jobs/jobs.d.ts.map +1 -1
  116. package/resources/sandbox/jobs/jobs.js +7 -0
  117. package/resources/sandbox/jobs/jobs.js.map +1 -1
  118. package/resources/sandbox/jobs/jobs.mjs +7 -0
  119. package/resources/sandbox/jobs/jobs.mjs.map +1 -1
  120. package/resources/sandbox/payment.d.ts +20 -1
  121. package/resources/sandbox/payment.d.ts.map +1 -1
  122. package/resources/sandbox/payment.js.map +1 -1
  123. package/resources/sandbox/payment.mjs.map +1 -1
  124. package/resources/shared.d.ts +4 -4
  125. package/resources/shared.d.ts.map +1 -1
  126. package/src/_shims/auto/runtime-bun.ts +1 -1
  127. package/src/_shims/auto/runtime-node.ts +1 -1
  128. package/src/_shims/auto/runtime.ts +1 -1
  129. package/src/_shims/auto/types-node.ts +1 -1
  130. package/src/_shims/bun-runtime.ts +2 -2
  131. package/src/_shims/index.d.ts +3 -3
  132. package/src/_shims/index.mjs +1 -1
  133. package/src/_shims/node-runtime.ts +3 -3
  134. package/src/_shims/registry.ts +1 -1
  135. package/src/_shims/web-runtime.ts +3 -3
  136. package/src/core.ts +5 -5
  137. package/src/error.ts +1 -1
  138. package/src/index.ts +20 -20
  139. package/src/internal/qs/formats.ts +1 -1
  140. package/src/internal/qs/index.ts +3 -3
  141. package/src/internal/qs/stringify.ts +3 -3
  142. package/src/internal/qs/utils.ts +2 -2
  143. package/src/pagination.ts +3 -3
  144. package/src/resource.ts +1 -1
  145. package/src/resources/access-tokens.ts +10 -2
  146. package/src/resources/account.ts +3 -3
  147. package/src/resources/connect/connect.ts +3 -3
  148. package/src/resources/connect/index.ts +2 -2
  149. package/src/resources/connect/sessions.ts +2 -2
  150. package/src/resources/connect.ts +1 -1
  151. package/src/resources/hris/benefits/benefits.ts +91 -8
  152. package/src/resources/hris/benefits/index.ts +2 -2
  153. package/src/resources/hris/benefits/individuals.ts +40 -5
  154. package/src/resources/hris/benefits.ts +1 -1
  155. package/src/resources/hris/company/company.ts +20 -15
  156. package/src/resources/hris/company/index.ts +2 -2
  157. package/src/resources/hris/company/pay-statement-item/index.ts +2 -2
  158. package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +14 -6
  159. package/src/resources/hris/company/pay-statement-item/rules.ts +34 -4
  160. package/src/resources/hris/company/pay-statement-item.ts +1 -1
  161. package/src/resources/hris/company.ts +1 -1
  162. package/src/resources/hris/directory.ts +20 -12
  163. package/src/resources/hris/documents.ts +16 -4
  164. package/src/resources/hris/employments.ts +143 -119
  165. package/src/resources/hris/hris.ts +31 -31
  166. package/src/resources/hris/index.ts +9 -9
  167. package/src/resources/hris/individuals.ts +101 -79
  168. package/src/resources/hris/pay-statements.ts +23 -7
  169. package/src/resources/hris/payments.ts +15 -4
  170. package/src/resources/hris.ts +1 -1
  171. package/src/resources/index.ts +11 -11
  172. package/src/resources/jobs/automated.ts +3 -3
  173. package/src/resources/jobs/index.ts +3 -3
  174. package/src/resources/jobs/jobs.ts +5 -5
  175. package/src/resources/jobs/manual.ts +2 -2
  176. package/src/resources/jobs.ts +1 -1
  177. package/src/resources/payroll/index.ts +2 -2
  178. package/src/resources/payroll/pay-groups.ts +4 -4
  179. package/src/resources/payroll/payroll.ts +3 -3
  180. package/src/resources/payroll.ts +1 -1
  181. package/src/resources/providers.ts +4 -4
  182. package/src/resources/request-forwarding.ts +12 -2
  183. package/src/resources/sandbox/company.ts +26 -3
  184. package/src/resources/sandbox/connections/accounts.ts +21 -4
  185. package/src/resources/sandbox/connections/connections.ts +11 -4
  186. package/src/resources/sandbox/connections/index.ts +2 -2
  187. package/src/resources/sandbox/connections.ts +1 -1
  188. package/src/resources/sandbox/directory.ts +11 -4
  189. package/src/resources/sandbox/employment.ts +11 -4
  190. package/src/resources/sandbox/index.ts +8 -8
  191. package/src/resources/sandbox/individual.ts +11 -4
  192. package/src/resources/sandbox/jobs/configuration.ts +17 -2
  193. package/src/resources/sandbox/jobs/index.ts +2 -2
  194. package/src/resources/sandbox/jobs/jobs.ts +11 -4
  195. package/src/resources/sandbox/jobs.ts +1 -1
  196. package/src/resources/sandbox/payment.ts +25 -6
  197. package/src/resources/sandbox/sandbox.ts +15 -15
  198. package/src/resources/sandbox.ts +1 -1
  199. package/src/resources/shared.ts +4 -4
  200. package/src/resources/webhooks.ts +4 -4
  201. package/src/resources.ts +1 -1
  202. package/src/shims/node.ts +3 -3
  203. package/src/shims/web.ts +3 -3
  204. package/src/uploads.ts +4 -4
  205. package/src/version.ts +1 -1
  206. package/version.d.ts +1 -1
  207. package/version.js +1 -1
  208. package/version.mjs +1 -1
@@ -1,14 +1,14 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import * as SessionsAPI from './sessions';
3
+ import { APIResource } from "../../resource.js";
4
+ import * as SessionsAPI from "./sessions.js";
5
5
  import {
6
6
  SessionNewParams,
7
7
  SessionNewResponse,
8
8
  SessionReauthenticateParams,
9
9
  SessionReauthenticateResponse,
10
10
  Sessions,
11
- } from './sessions';
11
+ } from "./sessions.js";
12
12
 
13
13
  export class Connect extends APIResource {
14
14
  sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
@@ -1,10 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Connect } from './connect';
3
+ export { Connect } from "./connect.js";
4
4
  export {
5
5
  Sessions,
6
6
  type SessionNewResponse,
7
7
  type SessionReauthenticateResponse,
8
8
  type SessionNewParams,
9
9
  type SessionReauthenticateParams,
10
- } from './sessions';
10
+ } from "./sessions.js";
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
3
+ import { APIResource } from "../../resource.js";
4
+ import * as Core from "../../core.js";
5
5
 
6
6
  export class Sessions extends APIResource {
7
7
  /**
@@ -1,3 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export * from './connect/index';
3
+ export * from "./connect/index.js";
@@ -1,11 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../resource';
4
- import { isRequestOptions } from '../../../core';
5
- import * as Core from '../../../core';
6
- import * as BenefitsAPI from './benefits';
7
- import * as Shared from '../../shared';
8
- import * as IndividualsAPI from './individuals';
3
+ import { APIResource } from "../../../resource.js";
4
+ import { isRequestOptions } from "../../../core.js";
5
+ import * as Core from "../../../core.js";
6
+ import * as BenefitsAPI from "./benefits.js";
7
+ import * as Shared from "../../shared.js";
8
+ import * as IndividualsAPI from "./individuals.js";
9
9
  import {
10
10
  EnrolledIndividualBenefitResponse,
11
11
  IndividualBenefit,
@@ -16,8 +16,8 @@ import {
16
16
  IndividualUnenrollManyParams,
17
17
  Individuals,
18
18
  UnenrolledIndividualBenefitResponse,
19
- } from './individuals';
20
- import { SinglePage } from '../../../pagination';
19
+ } from "./individuals.js";
20
+ import { SinglePage } from "../../../pagination.js";
21
21
 
22
22
  export class Benefits extends APIResource {
23
23
  individuals: IndividualsAPI.Individuals = new IndividualsAPI.Individuals(this._client);
@@ -25,6 +25,12 @@ export class Benefits extends APIResource {
25
25
  /**
26
26
  * Creates a new company-wide deduction or contribution. Please use the
27
27
  * `/providers` endpoint to view available types for each provider.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const createCompanyBenefitsResponse =
32
+ * await client.hris.benefits.create();
33
+ * ```
28
34
  */
29
35
  create(
30
36
  body?: BenefitCreateParams,
@@ -43,6 +49,13 @@ export class Benefits extends APIResource {
43
49
 
44
50
  /**
45
51
  * Lists deductions and contributions information for a given item
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const companyBenefit = await client.hris.benefits.retrieve(
56
+ * 'benefit_id',
57
+ * );
58
+ * ```
46
59
  */
47
60
  retrieve(benefitId: string, options?: Core.RequestOptions): Core.APIPromise<CompanyBenefit> {
48
61
  return this._client.get(`/employer/benefits/${benefitId}`, options);
@@ -50,6 +63,12 @@ export class Benefits extends APIResource {
50
63
 
51
64
  /**
52
65
  * Updates an existing company-wide deduction or contribution
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const updateCompanyBenefitResponse =
70
+ * await client.hris.benefits.update('benefit_id');
71
+ * ```
53
72
  */
54
73
  update(
55
74
  benefitId: string,
@@ -70,6 +89,14 @@ export class Benefits extends APIResource {
70
89
 
71
90
  /**
72
91
  * List all company-wide deductions and contributions.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * // Automatically fetches more pages as needed.
96
+ * for await (const companyBenefit of client.hris.benefits.list()) {
97
+ * // ...
98
+ * }
99
+ * ```
73
100
  */
74
101
  list(options?: Core.RequestOptions): Core.PagePromise<CompanyBenefitsSinglePage, CompanyBenefit> {
75
102
  return this._client.getAPIList('/employer/benefits', CompanyBenefitsSinglePage, options);
@@ -77,6 +104,14 @@ export class Benefits extends APIResource {
77
104
 
78
105
  /**
79
106
  * Get deductions metadata
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * // Automatically fetches more pages as needed.
111
+ * for await (const benefitListSupportedBenefitsResponse of client.hris.benefits.listSupportedBenefits()) {
112
+ * // ...
113
+ * }
114
+ * ```
80
115
  */
81
116
  listSupportedBenefits(
82
117
  options?: Core.RequestOptions,
@@ -219,6 +254,11 @@ export interface CompanyBenefit {
219
254
  */
220
255
  benefit_id: string;
221
256
 
257
+ /**
258
+ * The company match for this benefit.
259
+ */
260
+ company_contribution: CompanyBenefit.CompanyContribution | null;
261
+
222
262
  description: string | null;
223
263
 
224
264
  /**
@@ -232,6 +272,25 @@ export interface CompanyBenefit {
232
272
  type: BenefitType | null;
233
273
  }
234
274
 
275
+ export namespace CompanyBenefit {
276
+ /**
277
+ * The company match for this benefit.
278
+ */
279
+ export interface CompanyContribution {
280
+ tiers?: Array<CompanyContribution.Tier>;
281
+
282
+ type?: 'match';
283
+ }
284
+
285
+ export namespace CompanyContribution {
286
+ export interface Tier {
287
+ match?: number;
288
+
289
+ threshold?: number;
290
+ }
291
+ }
292
+ }
293
+
235
294
  export interface CreateCompanyBenefitsResponse {
236
295
  /**
237
296
  * The id of the benefit.
@@ -338,6 +397,11 @@ export interface BenefitListSupportedBenefitsResponse {
338
397
  export type BenfitContribution = BenefitContribution | null;
339
398
 
340
399
  export interface BenefitCreateParams {
400
+ /**
401
+ * The company match for this benefit.
402
+ */
403
+ company_contribution?: BenefitCreateParams.CompanyContribution | null;
404
+
341
405
  /**
342
406
  * Name of the benefit as it appears in the provider and pay statements. Recommend
343
407
  * limiting this to <30 characters due to limitations in specific providers (e.g.
@@ -356,6 +420,25 @@ export interface BenefitCreateParams {
356
420
  type?: BenefitType | null;
357
421
  }
358
422
 
423
+ export namespace BenefitCreateParams {
424
+ /**
425
+ * The company match for this benefit.
426
+ */
427
+ export interface CompanyContribution {
428
+ tiers?: Array<CompanyContribution.Tier>;
429
+
430
+ type?: 'match';
431
+ }
432
+
433
+ export namespace CompanyContribution {
434
+ export interface Tier {
435
+ match?: number;
436
+
437
+ threshold?: number;
438
+ }
439
+ }
440
+ }
441
+
359
442
  export interface BenefitUpdateParams {
360
443
  /**
361
444
  * Updated name or description.
@@ -18,7 +18,7 @@ export {
18
18
  type BenfitContribution,
19
19
  type BenefitCreateParams,
20
20
  type BenefitUpdateParams,
21
- } from './benefits';
21
+ } from "./benefits.js";
22
22
  export {
23
23
  IndividualBenefitsSinglePage,
24
24
  Individuals,
@@ -29,4 +29,4 @@ export {
29
29
  type IndividualEnrollManyParams,
30
30
  type IndividualRetrieveManyBenefitsParams,
31
31
  type IndividualUnenrollManyParams,
32
- } from './individuals';
32
+ } from "./individuals.js";
@@ -1,10 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../resource';
4
- import { isRequestOptions } from '../../../core';
5
- import * as Core from '../../../core';
6
- import * as BenefitsAPI from './benefits';
7
- import { SinglePage } from '../../../pagination';
3
+ import { APIResource } from "../../../resource.js";
4
+ import { isRequestOptions } from "../../../core.js";
5
+ import * as Core from "../../../core.js";
6
+ import * as BenefitsAPI from "./benefits.js";
7
+ import { SinglePage } from "../../../pagination.js";
8
8
 
9
9
  export class Individuals extends APIResource {
10
10
  /**
@@ -12,6 +12,15 @@ export class Individuals extends APIResource {
12
12
  * operation. If the employee is already enrolled, the enrollment amounts will be
13
13
  * adjusted. Making the same request multiple times will not create new
14
14
  * enrollments, but will continue to set the state of the existing enrollment.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const enrolledIndividualBenefitResponse =
19
+ * await client.hris.benefits.individuals.enrollMany(
20
+ * 'benefit_id',
21
+ * [{}],
22
+ * );
23
+ * ```
15
24
  */
16
25
  enrollMany(
17
26
  benefitId: string,
@@ -35,6 +44,14 @@ export class Individuals extends APIResource {
35
44
 
36
45
  /**
37
46
  * Lists individuals currently enrolled in a given deduction.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const response =
51
+ * await client.hris.benefits.individuals.enrolledIds(
52
+ * 'benefit_id',
53
+ * );
54
+ * ```
38
55
  */
39
56
  enrolledIds(
40
57
  benefitId: string,
@@ -45,6 +62,16 @@ export class Individuals extends APIResource {
45
62
 
46
63
  /**
47
64
  * Get enrollment information for the given individuals.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * // Automatically fetches more pages as needed.
69
+ * for await (const individualBenefit of client.hris.benefits.individuals.retrieveManyBenefits(
70
+ * 'benefit_id',
71
+ * )) {
72
+ * // ...
73
+ * }
74
+ * ```
48
75
  */
49
76
  retrieveManyBenefits(
50
77
  benefitId: string,
@@ -72,6 +99,14 @@ export class Individuals extends APIResource {
72
99
 
73
100
  /**
74
101
  * Unenroll individuals from a deduction or contribution
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const unenrolledIndividualBenefitResponse =
106
+ * await client.hris.benefits.individuals.unenrollMany(
107
+ * 'benefit_id',
108
+ * );
109
+ * ```
75
110
  */
76
111
  unenrollMany(
77
112
  benefitId: string,
@@ -1,3 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export * from './benefits/index';
3
+ export * from "./benefits/index.js";
@@ -1,15 +1,15 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../resource';
4
- import * as Core from '../../../core';
5
- import * as HRISAPI from '../hris';
6
- import * as PayStatementItemAPI from './pay-statement-item/pay-statement-item';
3
+ import { APIResource } from "../../../resource.js";
4
+ import * as Core from "../../../core.js";
5
+ import * as HRISAPI from "../hris.js";
6
+ import * as PayStatementItemAPI from "./pay-statement-item/pay-statement-item.js";
7
7
  import {
8
8
  PayStatementItem,
9
9
  PayStatementItemListParams,
10
10
  PayStatementItemListResponse,
11
11
  PayStatementItemListResponsesPage,
12
- } from './pay-statement-item/pay-statement-item';
12
+ } from "./pay-statement-item/pay-statement-item.js";
13
13
 
14
14
  export class CompanyResource extends APIResource {
15
15
  payStatementItem: PayStatementItemAPI.PayStatementItem = new PayStatementItemAPI.PayStatementItem(
@@ -18,6 +18,11 @@ export class CompanyResource extends APIResource {
18
18
 
19
19
  /**
20
20
  * Read basic company data
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const company = await client.hris.company.retrieve();
25
+ * ```
21
26
  */
22
27
  retrieve(options?: Core.RequestOptions): Core.APIPromise<Company> {
23
28
  return this._client.get('/employer/company', options);
@@ -74,40 +79,40 @@ export namespace Company {
74
79
  /**
75
80
  * The name of the bank associated in the payroll/HRIS system.
76
81
  */
77
- account_name?: string | null;
82
+ account_name: string | null;
78
83
 
79
84
  /**
80
85
  * 10-12 digit number to specify the bank account
81
86
  */
82
- account_number?: string | null;
87
+ account_number: string | null;
83
88
 
84
89
  /**
85
90
  * The type of bank account.
86
91
  */
87
- account_type?: 'checking' | 'savings' | null;
92
+ account_type: 'checking' | 'savings' | null;
88
93
 
89
94
  /**
90
95
  * Name of the banking institution.
91
96
  */
92
- institution_name?: string | null;
97
+ institution_name: string | null;
93
98
 
94
99
  /**
95
100
  * A nine-digit code that's based on the U.S. Bank location where your account was
96
101
  * opened.
97
102
  */
98
- routing_number?: string | null;
103
+ routing_number: string | null;
99
104
  }
100
105
 
101
106
  export interface Department {
102
107
  /**
103
108
  * The department name.
104
109
  */
105
- name?: string | null;
110
+ name: string | null;
106
111
 
107
112
  /**
108
113
  * The parent department, if present.
109
114
  */
110
- parent?: Department.Parent | null;
115
+ parent: Department.Parent | null;
111
116
  }
112
117
 
113
118
  export namespace Department {
@@ -118,7 +123,7 @@ export namespace Company {
118
123
  /**
119
124
  * The parent department's name.
120
125
  */
121
- name?: string | null;
126
+ name: string | null;
122
127
  }
123
128
  }
124
129
 
@@ -129,12 +134,12 @@ export namespace Company {
129
134
  /**
130
135
  * The tax payer subtype of the company.
131
136
  */
132
- subtype?: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
137
+ subtype: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
133
138
 
134
139
  /**
135
140
  * The tax payer type of the company.
136
141
  */
137
- type?:
142
+ type:
138
143
  | 'llc'
139
144
  | 'lp'
140
145
  | 'corporation'
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { CompanyResource, type Company } from './company';
3
+ export { CompanyResource, type Company } from "./company.js";
4
4
  export {
5
5
  PayStatementItemListResponsesPage,
6
6
  PayStatementItem,
7
7
  type PayStatementItemListResponse,
8
8
  type PayStatementItemListParams,
9
- } from './pay-statement-item/index';
9
+ } from "./pay-statement-item/index.js";
@@ -5,7 +5,7 @@ export {
5
5
  PayStatementItem,
6
6
  type PayStatementItemListResponse,
7
7
  type PayStatementItemListParams,
8
- } from './pay-statement-item';
8
+ } from "./pay-statement-item.js";
9
9
  export {
10
10
  RuleListResponsesPage,
11
11
  Rules,
@@ -15,4 +15,4 @@ export {
15
15
  type RuleDeleteResponse,
16
16
  type RuleCreateParams,
17
17
  type RuleUpdateParams,
18
- } from './rules';
18
+ } from "./rules.js";
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../../resource';
4
- import { isRequestOptions } from '../../../../core';
5
- import * as Core from '../../../../core';
6
- import * as RulesAPI from './rules';
3
+ import { APIResource } from "../../../../resource.js";
4
+ import { isRequestOptions } from "../../../../core.js";
5
+ import * as Core from "../../../../core.js";
6
+ import * as RulesAPI from "./rules.js";
7
7
  import {
8
8
  RuleCreateParams,
9
9
  RuleCreateResponse,
@@ -13,8 +13,8 @@ import {
13
13
  RuleUpdateParams,
14
14
  RuleUpdateResponse,
15
15
  Rules,
16
- } from './rules';
17
- import { ResponsesPage } from '../../../../pagination';
16
+ } from "./rules.js";
17
+ import { ResponsesPage } from "../../../../pagination.js";
18
18
 
19
19
  export class PayStatementItem extends APIResource {
20
20
  rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
@@ -23,6 +23,14 @@ export class PayStatementItem extends APIResource {
23
23
  * **Beta:** this endpoint currently serves employers onboarded after March 4th and
24
24
  * historical support will be added soon Retrieve a list of detailed pay statement
25
25
  * items for the access token's connection account.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * // Automatically fetches more pages as needed.
30
+ * for await (const payStatementItemListResponse of client.hris.company.payStatementItem.list()) {
31
+ * // ...
32
+ * }
33
+ * ```
26
34
  */
27
35
  list(
28
36
  query?: PayStatementItemListParams,
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../../resource';
4
- import { isRequestOptions } from '../../../../core';
5
- import * as Core from '../../../../core';
6
- import { ResponsesPage } from '../../../../pagination';
3
+ import { APIResource } from "../../../../resource.js";
4
+ import { isRequestOptions } from "../../../../core.js";
5
+ import * as Core from "../../../../core.js";
6
+ import { ResponsesPage } from "../../../../pagination.js";
7
7
 
8
8
  export class Rules extends APIResource {
9
9
  /**
@@ -13,6 +13,12 @@ export class Rules extends APIResource {
13
13
  * example, pay statement items that meet certain conditions can be labeled as a
14
14
  * pre-tax 401k. This metadata can be retrieved where pay statement item
15
15
  * information is available.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const rule =
20
+ * await client.hris.company.payStatementItem.rules.create();
21
+ * ```
16
22
  */
17
23
  create(body?: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
18
24
  create(options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
@@ -29,6 +35,14 @@ export class Rules extends APIResource {
29
35
  /**
30
36
  * **Beta:** this endpoint currently serves employers onboarded after March 4th and
31
37
  * historical support will be added soon Update a rule for a pay statement item.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const rule =
42
+ * await client.hris.company.payStatementItem.rules.update(
43
+ * 'rule_id',
44
+ * );
45
+ * ```
32
46
  */
33
47
  update(
34
48
  ruleId: string,
@@ -50,6 +64,14 @@ export class Rules extends APIResource {
50
64
  /**
51
65
  * **Beta:** this endpoint currently serves employers onboarded after March 4th and
52
66
  * historical support will be added soon List all rules of a connection account.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * // Automatically fetches more pages as needed.
71
+ * for await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) {
72
+ * // ...
73
+ * }
74
+ * ```
53
75
  */
54
76
  list(options?: Core.RequestOptions): Core.PagePromise<RuleListResponsesPage, RuleListResponse> {
55
77
  return this._client.getAPIList('/employer/pay-statement-item/rule', RuleListResponsesPage, options);
@@ -58,6 +80,14 @@ export class Rules extends APIResource {
58
80
  /**
59
81
  * **Beta:** this endpoint currently serves employers onboarded after March 4th and
60
82
  * historical support will be added soon Delete a rule for a pay statement item.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const rule =
87
+ * await client.hris.company.payStatementItem.rules.delete(
88
+ * 'rule_id',
89
+ * );
90
+ * ```
61
91
  */
62
92
  delete(ruleId: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
63
93
  return this._client.delete(`/employer/pay-statement-item/rule/${ruleId}`, options);
@@ -1,3 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export * from './pay-statement-item/index';
3
+ export * from "./pay-statement-item/index.js";
@@ -1,3 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export * from './company/index';
3
+ export * from "./company/index.js";
@@ -1,13 +1,21 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import { isRequestOptions } from '../../core';
5
- import * as Core from '../../core';
6
- import { IndividualsPage, type IndividualsPageParams } from '../../pagination';
3
+ import { APIResource } from "../../resource.js";
4
+ import { isRequestOptions } from "../../core.js";
5
+ import * as Core from "../../core.js";
6
+ import { IndividualsPage, type IndividualsPageParams } from "../../pagination.js";
7
7
 
8
8
  export class Directory extends APIResource {
9
9
  /**
10
10
  * Read company directory and organization structure
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // Automatically fetches more pages as needed.
15
+ * for await (const individualInDirectory of client.hris.directory.list()) {
16
+ * // ...
17
+ * }
18
+ * ```
11
19
  */
12
20
  list(
13
21
  query?: DirectoryListParams,
@@ -34,37 +42,37 @@ export interface IndividualInDirectory {
34
42
  /**
35
43
  * A stable Finch `id` (UUID v4) for an individual in the company.
36
44
  */
37
- id?: string;
45
+ id: string;
38
46
 
39
47
  /**
40
48
  * The department object.
41
49
  */
42
- department?: IndividualInDirectory.Department | null;
50
+ department: IndividualInDirectory.Department | null;
43
51
 
44
52
  /**
45
53
  * The legal first name of the individual.
46
54
  */
47
- first_name?: string | null;
55
+ first_name: string | null;
48
56
 
49
57
  /**
50
58
  * `true` if the individual is an active employee or contractor at the company.
51
59
  */
52
- is_active?: boolean | null;
60
+ is_active: boolean | null;
53
61
 
54
62
  /**
55
63
  * The legal last name of the individual.
56
64
  */
57
- last_name?: string | null;
65
+ last_name: string | null;
58
66
 
59
67
  /**
60
68
  * The manager object.
61
69
  */
62
- manager?: IndividualInDirectory.Manager | null;
70
+ manager: IndividualInDirectory.Manager | null;
63
71
 
64
72
  /**
65
73
  * The legal middle name of the individual.
66
74
  */
67
- middle_name?: string | null;
75
+ middle_name: string | null;
68
76
  }
69
77
 
70
78
  export namespace IndividualInDirectory {
@@ -85,7 +93,7 @@ export namespace IndividualInDirectory {
85
93
  /**
86
94
  * A stable Finch `id` (UUID v4) for an individual in the company.
87
95
  */
88
- id?: string;
96
+ id: string;
89
97
  }
90
98
  }
91
99