@tryfinch/finch-api 8.2.1 → 9.0.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 (201) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/client.d.mts +4 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -3
  9. package/client.mjs.map +1 -1
  10. package/internal/request-options.d.mts +4 -0
  11. package/internal/request-options.d.mts.map +1 -1
  12. package/internal/request-options.d.ts +4 -0
  13. package/internal/request-options.d.ts.map +1 -1
  14. package/internal/request-options.js.map +1 -1
  15. package/internal/request-options.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/access-tokens.d.mts.map +1 -1
  18. package/resources/access-tokens.d.ts.map +1 -1
  19. package/resources/access-tokens.js +1 -0
  20. package/resources/access-tokens.js.map +1 -1
  21. package/resources/access-tokens.mjs +1 -0
  22. package/resources/access-tokens.mjs.map +1 -1
  23. package/resources/account.js +2 -2
  24. package/resources/account.js.map +1 -1
  25. package/resources/account.mjs +2 -2
  26. package/resources/account.mjs.map +1 -1
  27. package/resources/connect/sessions.d.mts.map +1 -1
  28. package/resources/connect/sessions.d.ts.map +1 -1
  29. package/resources/connect/sessions.js +6 -2
  30. package/resources/connect/sessions.js.map +1 -1
  31. package/resources/connect/sessions.mjs +6 -2
  32. package/resources/connect/sessions.mjs.map +1 -1
  33. package/resources/hris/benefits/benefits.d.mts.map +1 -1
  34. package/resources/hris/benefits/benefits.d.ts.map +1 -1
  35. package/resources/hris/benefits/benefits.js +18 -3
  36. package/resources/hris/benefits/benefits.js.map +1 -1
  37. package/resources/hris/benefits/benefits.mjs +18 -3
  38. package/resources/hris/benefits/benefits.mjs.map +1 -1
  39. package/resources/hris/benefits/individuals.d.mts.map +1 -1
  40. package/resources/hris/benefits/individuals.d.ts.map +1 -1
  41. package/resources/hris/benefits/individuals.js +8 -2
  42. package/resources/hris/benefits/individuals.js.map +1 -1
  43. package/resources/hris/benefits/individuals.mjs +8 -2
  44. package/resources/hris/benefits/individuals.mjs.map +1 -1
  45. package/resources/hris/company/company.js +1 -1
  46. package/resources/hris/company/company.js.map +1 -1
  47. package/resources/hris/company/company.mjs +1 -1
  48. package/resources/hris/company/company.mjs.map +1 -1
  49. package/resources/hris/company/pay-statement-item/pay-statement-item.js +1 -1
  50. package/resources/hris/company/pay-statement-item/pay-statement-item.js.map +1 -1
  51. package/resources/hris/company/pay-statement-item/pay-statement-item.mjs +1 -1
  52. package/resources/hris/company/pay-statement-item/pay-statement-item.mjs.map +1 -1
  53. package/resources/hris/company/pay-statement-item/rules.d.mts.map +1 -1
  54. package/resources/hris/company/pay-statement-item/rules.d.ts.map +1 -1
  55. package/resources/hris/company/pay-statement-item/rules.js +4 -0
  56. package/resources/hris/company/pay-statement-item/rules.js.map +1 -1
  57. package/resources/hris/company/pay-statement-item/rules.mjs +4 -0
  58. package/resources/hris/company/pay-statement-item/rules.mjs.map +1 -1
  59. package/resources/hris/directory.d.mts +9 -1
  60. package/resources/hris/directory.d.mts.map +1 -1
  61. package/resources/hris/directory.d.ts +9 -1
  62. package/resources/hris/directory.d.ts.map +1 -1
  63. package/resources/hris/directory.js +1 -0
  64. package/resources/hris/directory.js.map +1 -1
  65. package/resources/hris/directory.mjs +1 -0
  66. package/resources/hris/directory.mjs.map +1 -1
  67. package/resources/hris/documents.d.mts.map +1 -1
  68. package/resources/hris/documents.d.ts.map +1 -1
  69. package/resources/hris/documents.js +6 -2
  70. package/resources/hris/documents.js.map +1 -1
  71. package/resources/hris/documents.mjs +6 -2
  72. package/resources/hris/documents.mjs.map +1 -1
  73. package/resources/hris/employments.d.mts.map +1 -1
  74. package/resources/hris/employments.d.ts.map +1 -1
  75. package/resources/hris/employments.js +1 -0
  76. package/resources/hris/employments.js.map +1 -1
  77. package/resources/hris/employments.mjs +1 -0
  78. package/resources/hris/employments.mjs.map +1 -1
  79. package/resources/hris/individuals.d.mts.map +1 -1
  80. package/resources/hris/individuals.d.ts.map +1 -1
  81. package/resources/hris/individuals.js +1 -0
  82. package/resources/hris/individuals.js.map +1 -1
  83. package/resources/hris/individuals.mjs +1 -0
  84. package/resources/hris/individuals.mjs.map +1 -1
  85. package/resources/hris/pay-statements.d.mts.map +1 -1
  86. package/resources/hris/pay-statements.d.ts.map +1 -1
  87. package/resources/hris/pay-statements.js +1 -0
  88. package/resources/hris/pay-statements.js.map +1 -1
  89. package/resources/hris/pay-statements.mjs +1 -0
  90. package/resources/hris/pay-statements.mjs.map +1 -1
  91. package/resources/hris/payments.d.mts.map +1 -1
  92. package/resources/hris/payments.d.ts.map +1 -1
  93. package/resources/hris/payments.js +5 -1
  94. package/resources/hris/payments.js.map +1 -1
  95. package/resources/hris/payments.mjs +5 -1
  96. package/resources/hris/payments.mjs.map +1 -1
  97. package/resources/jobs/automated.js +3 -3
  98. package/resources/jobs/automated.js.map +1 -1
  99. package/resources/jobs/automated.mjs +3 -3
  100. package/resources/jobs/automated.mjs.map +1 -1
  101. package/resources/jobs/manual.js +1 -1
  102. package/resources/jobs/manual.js.map +1 -1
  103. package/resources/jobs/manual.mjs +1 -1
  104. package/resources/jobs/manual.mjs.map +1 -1
  105. package/resources/payroll/pay-groups.d.mts.map +1 -1
  106. package/resources/payroll/pay-groups.d.ts.map +1 -1
  107. package/resources/payroll/pay-groups.js +6 -1
  108. package/resources/payroll/pay-groups.js.map +1 -1
  109. package/resources/payroll/pay-groups.mjs +6 -1
  110. package/resources/payroll/pay-groups.mjs.map +1 -1
  111. package/resources/providers.d.mts.map +1 -1
  112. package/resources/providers.d.ts.map +1 -1
  113. package/resources/providers.js +4 -1
  114. package/resources/providers.js.map +1 -1
  115. package/resources/providers.mjs +4 -1
  116. package/resources/providers.mjs.map +1 -1
  117. package/resources/request-forwarding.js +1 -1
  118. package/resources/request-forwarding.js.map +1 -1
  119. package/resources/request-forwarding.mjs +1 -1
  120. package/resources/request-forwarding.mjs.map +1 -1
  121. package/resources/sandbox/company.js +1 -1
  122. package/resources/sandbox/company.js.map +1 -1
  123. package/resources/sandbox/company.mjs +1 -1
  124. package/resources/sandbox/company.mjs.map +1 -1
  125. package/resources/sandbox/connections/accounts.d.mts.map +1 -1
  126. package/resources/sandbox/connections/accounts.d.ts.map +1 -1
  127. package/resources/sandbox/connections/accounts.js +10 -2
  128. package/resources/sandbox/connections/accounts.js.map +1 -1
  129. package/resources/sandbox/connections/accounts.mjs +10 -2
  130. package/resources/sandbox/connections/accounts.mjs.map +1 -1
  131. package/resources/sandbox/connections/connections.js +1 -1
  132. package/resources/sandbox/connections/connections.js.map +1 -1
  133. package/resources/sandbox/connections/connections.mjs +1 -1
  134. package/resources/sandbox/connections/connections.mjs.map +1 -1
  135. package/resources/sandbox/directory.d.mts.map +1 -1
  136. package/resources/sandbox/directory.d.ts.map +1 -1
  137. package/resources/sandbox/directory.js +5 -1
  138. package/resources/sandbox/directory.js.map +1 -1
  139. package/resources/sandbox/directory.mjs +5 -1
  140. package/resources/sandbox/directory.mjs.map +1 -1
  141. package/resources/sandbox/employment.d.mts.map +1 -1
  142. package/resources/sandbox/employment.d.ts.map +1 -1
  143. package/resources/sandbox/employment.js +5 -1
  144. package/resources/sandbox/employment.js.map +1 -1
  145. package/resources/sandbox/employment.mjs +5 -1
  146. package/resources/sandbox/employment.mjs.map +1 -1
  147. package/resources/sandbox/individual.d.mts.map +1 -1
  148. package/resources/sandbox/individual.d.ts.map +1 -1
  149. package/resources/sandbox/individual.js +5 -1
  150. package/resources/sandbox/individual.js.map +1 -1
  151. package/resources/sandbox/individual.mjs +5 -1
  152. package/resources/sandbox/individual.mjs.map +1 -1
  153. package/resources/sandbox/jobs/configuration.d.mts.map +1 -1
  154. package/resources/sandbox/jobs/configuration.d.ts.map +1 -1
  155. package/resources/sandbox/jobs/configuration.js +6 -2
  156. package/resources/sandbox/jobs/configuration.js.map +1 -1
  157. package/resources/sandbox/jobs/configuration.mjs +6 -2
  158. package/resources/sandbox/jobs/configuration.mjs.map +1 -1
  159. package/resources/sandbox/jobs/jobs.js +1 -1
  160. package/resources/sandbox/jobs/jobs.js.map +1 -1
  161. package/resources/sandbox/jobs/jobs.mjs +1 -1
  162. package/resources/sandbox/jobs/jobs.mjs.map +1 -1
  163. package/resources/sandbox/payment.js +1 -1
  164. package/resources/sandbox/payment.js.map +1 -1
  165. package/resources/sandbox/payment.mjs +1 -1
  166. package/resources/sandbox/payment.mjs.map +1 -1
  167. package/src/client.ts +9 -3
  168. package/src/internal/request-options.ts +2 -0
  169. package/src/resources/access-tokens.ts +1 -0
  170. package/src/resources/account.ts +2 -2
  171. package/src/resources/connect/sessions.ts +6 -2
  172. package/src/resources/hris/benefits/benefits.ts +18 -3
  173. package/src/resources/hris/benefits/individuals.ts +8 -2
  174. package/src/resources/hris/company/company.ts +1 -1
  175. package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +1 -1
  176. package/src/resources/hris/company/pay-statement-item/rules.ts +4 -0
  177. package/src/resources/hris/directory.ts +12 -1
  178. package/src/resources/hris/documents.ts +6 -2
  179. package/src/resources/hris/employments.ts +1 -0
  180. package/src/resources/hris/individuals.ts +1 -0
  181. package/src/resources/hris/pay-statements.ts +1 -0
  182. package/src/resources/hris/payments.ts +5 -1
  183. package/src/resources/jobs/automated.ts +3 -3
  184. package/src/resources/jobs/manual.ts +1 -1
  185. package/src/resources/payroll/pay-groups.ts +6 -1
  186. package/src/resources/providers.ts +4 -1
  187. package/src/resources/request-forwarding.ts +1 -1
  188. package/src/resources/sandbox/company.ts +1 -1
  189. package/src/resources/sandbox/connections/accounts.ts +10 -2
  190. package/src/resources/sandbox/connections/connections.ts +1 -1
  191. package/src/resources/sandbox/directory.ts +5 -1
  192. package/src/resources/sandbox/employment.ts +5 -1
  193. package/src/resources/sandbox/individual.ts +5 -1
  194. package/src/resources/sandbox/jobs/configuration.ts +6 -2
  195. package/src/resources/sandbox/jobs/jobs.ts +1 -1
  196. package/src/resources/sandbox/payment.ts +1 -1
  197. package/src/version.ts +1 -1
  198. package/version.d.mts +1 -1
  199. package/version.d.ts +1 -1
  200. package/version.js +1 -1
  201. package/version.mjs +1 -1
@@ -18,7 +18,7 @@ export class Jobs extends APIResource {
18
18
  * ```
19
19
  */
20
20
  create(body, options) {
21
- return this._client.post('/sandbox/jobs', { body, ...options });
21
+ return this._client.post('/sandbox/jobs', { body, ...options, __security: { bearerAuth: true } });
22
22
  }
23
23
  }
24
24
  Jobs.Configuration = Configuration;
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.mjs","sourceRoot":"","sources":["../../../src/resources/sandbox/jobs/jobs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EACL,aAAa,GAId;AAID,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAenG,CAAC;IAbC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AA+BD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"jobs.mjs","sourceRoot":"","sources":["../../../src/resources/sandbox/jobs/jobs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EACL,aAAa,GAId;AAID,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAenG,CAAC;IAbC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACpG,CAAC;CACF;AA+BD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC"}
@@ -13,7 +13,7 @@ class Payment extends resource_1.APIResource {
13
13
  * ```
14
14
  */
15
15
  create(body = {}, options) {
16
- return this._client.post('/sandbox/payment', { body, ...options });
16
+ return this._client.post('/sandbox/payment', { body, ...options, __security: { bearerAuth: true } });
17
17
  }
18
18
  }
19
19
  exports.Payment = Payment;
@@ -1 +1 @@
1
- {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../src/resources/sandbox/payment.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;OAOG;IACH,MAAM,CACJ,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AAfD,0BAeC"}
1
+ {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../src/resources/sandbox/payment.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;OAOG;IACH,MAAM,CACJ,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACvG,CAAC;CACF;AAfD,0BAeC"}
@@ -10,7 +10,7 @@ export class Payment extends APIResource {
10
10
  * ```
11
11
  */
12
12
  create(body = {}, options) {
13
- return this._client.post('/sandbox/payment', { body, ...options });
13
+ return this._client.post('/sandbox/payment', { body, ...options, __security: { bearerAuth: true } });
14
14
  }
15
15
  }
16
16
  //# sourceMappingURL=payment.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.mjs","sourceRoot":"","sources":["../../src/resources/sandbox/payment.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;OAOG;IACH,MAAM,CACJ,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF"}
1
+ {"version":3,"file":"payment.mjs","sourceRoot":"","sources":["../../src/resources/sandbox/payment.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;OAOG;IACH,MAAM,CACJ,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -302,8 +302,14 @@ export class Finch {
302
302
  );
303
303
  }
304
304
 
305
- protected async authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
306
- return buildHeaders([await this.bearerAuth(opts), await this.basicAuth(opts)]);
305
+ protected async authHeaders(
306
+ opts: FinalRequestOptions,
307
+ schemes: { bearerAuth?: boolean; basicAuth?: boolean },
308
+ ): Promise<NullableHeaders | undefined> {
309
+ return buildHeaders([
310
+ schemes.bearerAuth ? await this.bearerAuth(opts) : null,
311
+ schemes.basicAuth ? await this.basicAuth(opts) : null,
312
+ ]);
307
313
  }
308
314
 
309
315
  protected async bearerAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
@@ -768,7 +774,7 @@ export class Finch {
768
774
  ...getPlatformHeaders(),
769
775
  'Finch-API-Version': '2020-09-17',
770
776
  },
771
- await this.authHeaders(options),
777
+ await this.authHeaders(options, options.__security ?? { bearerAuth: true, basicAuth: true }),
772
778
  this._options.defaultHeaders,
773
779
  bodyHeaders,
774
780
  options.headers,
@@ -75,6 +75,8 @@ export type RequestOptions = {
75
75
  */
76
76
  defaultBaseURL?: string | undefined;
77
77
 
78
+ __security?: { bearerAuth?: boolean; basicAuth?: boolean };
79
+
78
80
  __binaryResponse?: boolean | undefined;
79
81
  };
80
82
 
@@ -32,6 +32,7 @@ export class AccessTokens extends APIResource {
32
32
  body: bodyWithReplacements,
33
33
  ...options,
34
34
  headers: headersWithReplacements,
35
+ __security: {},
35
36
  });
36
37
  }
37
38
  }
@@ -10,14 +10,14 @@ export class Account extends APIResource {
10
10
  * Disconnect one or more `access_token`s from your application.
11
11
  */
12
12
  disconnect(options?: RequestOptions): APIPromise<DisconnectResponse> {
13
- return this._client.post('/disconnect', options);
13
+ return this._client.post('/disconnect', { ...options, __security: { bearerAuth: true } });
14
14
  }
15
15
 
16
16
  /**
17
17
  * Read account information associated with an `access_token`
18
18
  */
19
19
  introspect(options?: RequestOptions): APIPromise<Introspection> {
20
- return this._client.get('/introspect', options);
20
+ return this._client.get('/introspect', { ...options, __security: { bearerAuth: true } });
21
21
  }
22
22
  }
23
23
 
@@ -9,7 +9,7 @@ export class Sessions extends APIResource {
9
9
  * Create a new connect session for an employer
10
10
  */
11
11
  new(body: SessionNewParams, options?: RequestOptions): APIPromise<SessionNewResponse> {
12
- return this._client.post('/connect/sessions', { body, ...options });
12
+ return this._client.post('/connect/sessions', { body, ...options, __security: { basicAuth: true } });
13
13
  }
14
14
 
15
15
  /**
@@ -19,7 +19,11 @@ export class Sessions extends APIResource {
19
19
  body: SessionReauthenticateParams,
20
20
  options?: RequestOptions,
21
21
  ): APIPromise<SessionReauthenticateResponse> {
22
- return this._client.post('/connect/sessions/reauthenticate', { body, ...options });
22
+ return this._client.post('/connect/sessions/reauthenticate', {
23
+ body,
24
+ ...options,
25
+ __security: { basicAuth: true },
26
+ });
23
27
  }
24
28
  }
25
29
 
@@ -38,7 +38,12 @@ export class Benefits extends APIResource {
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<CreateCompanyBenefitsResponse> {
40
40
  const { entity_ids, ...body } = params ?? {};
41
- return this._client.post('/employer/benefits', { query: { entity_ids }, body, ...options });
41
+ return this._client.post('/employer/benefits', {
42
+ query: { entity_ids },
43
+ body,
44
+ ...options,
45
+ __security: { bearerAuth: true },
46
+ });
42
47
  }
43
48
 
44
49
  /**
@@ -56,7 +61,11 @@ export class Benefits extends APIResource {
56
61
  query: BenefitRetrieveParams | null | undefined = {},
57
62
  options?: RequestOptions,
58
63
  ): APIPromise<CompanyBenefit> {
59
- return this._client.get(path`/employer/benefits/${benefitID}`, { query, ...options });
64
+ return this._client.get(path`/employer/benefits/${benefitID}`, {
65
+ query,
66
+ ...options,
67
+ __security: { bearerAuth: true },
68
+ });
60
69
  }
61
70
 
62
71
  /**
@@ -78,6 +87,7 @@ export class Benefits extends APIResource {
78
87
  query: { entity_ids },
79
88
  body,
80
89
  ...options,
90
+ __security: { bearerAuth: true },
81
91
  });
82
92
  }
83
93
 
@@ -96,7 +106,11 @@ export class Benefits extends APIResource {
96
106
  query: BenefitListParams | null | undefined = {},
97
107
  options?: RequestOptions,
98
108
  ): PagePromise<CompanyBenefitsSinglePage, CompanyBenefit> {
99
- return this._client.getAPIList('/employer/benefits', SinglePage<CompanyBenefit>, { query, ...options });
109
+ return this._client.getAPIList('/employer/benefits', SinglePage<CompanyBenefit>, {
110
+ query,
111
+ ...options,
112
+ __security: { bearerAuth: true },
113
+ });
100
114
  }
101
115
 
102
116
  /**
@@ -117,6 +131,7 @@ export class Benefits extends APIResource {
117
131
  return this._client.getAPIList('/employer/benefits/meta', SinglePage<SupportedBenefit>, {
118
132
  query,
119
133
  ...options,
134
+ __security: { bearerAuth: true },
120
135
  });
121
136
  }
122
137
  }
@@ -31,6 +31,7 @@ export class Individuals extends APIResource {
31
31
  query: { entity_ids },
32
32
  body: individuals,
33
33
  ...options,
34
+ __security: { bearerAuth: true },
34
35
  });
35
36
  }
36
37
 
@@ -50,7 +51,11 @@ export class Individuals extends APIResource {
50
51
  query: IndividualEnrolledIDsParams | null | undefined = {},
51
52
  options?: RequestOptions,
52
53
  ): APIPromise<IndividualEnrolledIDsResponse> {
53
- return this._client.get(path`/employer/benefits/${benefitID}/enrolled`, { query, ...options });
54
+ return this._client.get(path`/employer/benefits/${benefitID}/enrolled`, {
55
+ query,
56
+ ...options,
57
+ __security: { bearerAuth: true },
58
+ });
54
59
  }
55
60
 
56
61
  /**
@@ -74,7 +79,7 @@ export class Individuals extends APIResource {
74
79
  return this._client.getAPIList(
75
80
  path`/employer/benefits/${benefitID}/individuals`,
76
81
  SinglePage<IndividualBenefit>,
77
- { query, ...options },
82
+ { query, ...options, __security: { bearerAuth: true } },
78
83
  );
79
84
  }
80
85
 
@@ -99,6 +104,7 @@ export class Individuals extends APIResource {
99
104
  query: { entity_ids },
100
105
  body,
101
106
  ...options,
107
+ __security: { bearerAuth: true },
102
108
  });
103
109
  }
104
110
  }
@@ -29,7 +29,7 @@ export class CompanyResource extends APIResource {
29
29
  query: CompanyRetrieveParams | null | undefined = {},
30
30
  options?: RequestOptions,
31
31
  ): APIPromise<Company> {
32
- return this._client.get('/employer/company', { query, ...options });
32
+ return this._client.get('/employer/company', { query, ...options, __security: { bearerAuth: true } });
33
33
  }
34
34
  }
35
35
 
@@ -39,7 +39,7 @@ export class PayStatementItem extends APIResource {
39
39
  return this._client.getAPIList(
40
40
  '/employer/pay-statement-item',
41
41
  ResponsesPage<PayStatementItemListResponse>,
42
- { query, ...options },
42
+ { query, ...options, __security: { bearerAuth: true } },
43
43
  );
44
44
  }
45
45
  }
@@ -28,6 +28,7 @@ export class Rules extends APIResource {
28
28
  query: { entity_ids },
29
29
  body,
30
30
  ...options,
31
+ __security: { bearerAuth: true },
31
32
  });
32
33
  }
33
34
 
@@ -52,6 +53,7 @@ export class Rules extends APIResource {
52
53
  query: { entity_ids },
53
54
  body,
54
55
  ...options,
56
+ __security: { bearerAuth: true },
55
57
  });
56
58
  }
57
59
 
@@ -73,6 +75,7 @@ export class Rules extends APIResource {
73
75
  return this._client.getAPIList('/employer/pay-statement-item/rule', ResponsesPage<RuleListResponse>, {
74
76
  query,
75
77
  ...options,
78
+ __security: { bearerAuth: true },
76
79
  });
77
80
  }
78
81
 
@@ -96,6 +99,7 @@ export class Rules extends APIResource {
96
99
  return this._client.delete(path`/employer/pay-statement-item/rule/${ruleID}`, {
97
100
  query: { entity_ids },
98
101
  ...options,
102
+ __security: { bearerAuth: true },
99
103
  });
100
104
  }
101
105
  }
@@ -23,6 +23,7 @@ export class Directory extends APIResource {
23
23
  return this._client.getAPIList('/employer/directory', IndividualsPage, {
24
24
  query,
25
25
  ...options,
26
+ __security: { bearerAuth: true },
26
27
  });
27
28
  }
28
29
 
@@ -98,11 +99,21 @@ export interface DirectoryListParams extends IndividualsPageParams {
98
99
  entity_ids?: Array<string>;
99
100
  }
100
101
 
101
- export interface DirectoryListIndividualsParams extends IndividualsPageParams {
102
+ export interface DirectoryListIndividualsParams {
102
103
  /**
103
104
  * The entity IDs to specify which entities' data to access.
104
105
  */
105
106
  entity_ids?: Array<string>;
107
+
108
+ /**
109
+ * Number of employees to return (defaults to all)
110
+ */
111
+ limit?: number;
112
+
113
+ /**
114
+ * Index to start from (defaults to 0)
115
+ */
116
+ offset?: number;
106
117
  }
107
118
 
108
119
  export declare namespace Directory {
@@ -20,7 +20,7 @@ export class Documents extends APIResource {
20
20
  query: DocumentListParams | null | undefined = {},
21
21
  options?: RequestOptions,
22
22
  ): APIPromise<DocumentListResponse> {
23
- return this._client.get('/employer/documents', { query, ...options });
23
+ return this._client.get('/employer/documents', { query, ...options, __security: { bearerAuth: true } });
24
24
  }
25
25
 
26
26
  /**
@@ -39,7 +39,11 @@ export class Documents extends APIResource {
39
39
  query: DocumentRetreiveParams | null | undefined = {},
40
40
  options?: RequestOptions,
41
41
  ): APIPromise<DocumentRetreiveResponse> {
42
- return this._client.get(path`/employer/documents/${documentID}`, { query, ...options });
42
+ return this._client.get(path`/employer/documents/${documentID}`, {
43
+ query,
44
+ ...options,
45
+ __security: { bearerAuth: true },
46
+ });
43
47
  }
44
48
  }
45
49
 
@@ -29,6 +29,7 @@ export class Employments extends APIResource {
29
29
  body,
30
30
  method: 'post',
31
31
  ...options,
32
+ __security: { bearerAuth: true },
32
33
  });
33
34
  }
34
35
  }
@@ -27,6 +27,7 @@ export class Individuals extends APIResource {
27
27
  body,
28
28
  method: 'post',
29
29
  ...options,
30
+ __security: { bearerAuth: true },
30
31
  });
31
32
  }
32
33
  }
@@ -39,6 +39,7 @@ export class PayStatements extends APIResource {
39
39
  body,
40
40
  method: 'post',
41
41
  ...options,
42
+ __security: { bearerAuth: true },
42
43
  });
43
44
  }
44
45
  }
@@ -21,7 +21,11 @@ export class Payments extends APIResource {
21
21
  * ```
22
22
  */
23
23
  list(query: PaymentListParams, options?: RequestOptions): PagePromise<PaymentsSinglePage, Payment> {
24
- return this._client.getAPIList('/employer/payment', SinglePage<Payment>, { query, ...options });
24
+ return this._client.getAPIList('/employer/payment', SinglePage<Payment>, {
25
+ query,
26
+ ...options,
27
+ __security: { bearerAuth: true },
28
+ });
25
29
  }
26
30
  }
27
31
 
@@ -23,14 +23,14 @@ export class Automated extends APIResource {
23
23
  * access to this endpoint, please contact your Finch account manager.
24
24
  */
25
25
  create(body: AutomatedCreateParams, options?: RequestOptions): APIPromise<AutomatedCreateResponse> {
26
- return this._client.post('/jobs/automated', { body, ...options });
26
+ return this._client.post('/jobs/automated', { body, ...options, __security: { bearerAuth: true } });
27
27
  }
28
28
 
29
29
  /**
30
30
  * Get an automated job by `job_id`.
31
31
  */
32
32
  retrieve(jobID: string, options?: RequestOptions): APIPromise<AutomatedAsyncJob> {
33
- return this._client.get(path`/jobs/automated/${jobID}`, options);
33
+ return this._client.get(path`/jobs/automated/${jobID}`, { ...options, __security: { bearerAuth: true } });
34
34
  }
35
35
 
36
36
  /**
@@ -42,7 +42,7 @@ export class Automated extends APIResource {
42
42
  query: AutomatedListParams | null | undefined = {},
43
43
  options?: RequestOptions,
44
44
  ): APIPromise<AutomatedListResponse> {
45
- return this._client.get('/jobs/automated', { query, ...options });
45
+ return this._client.get('/jobs/automated', { query, ...options, __security: { bearerAuth: true } });
46
46
  }
47
47
  }
48
48
 
@@ -11,7 +11,7 @@ export class Manual extends APIResource {
11
11
  * jobs including those for both automated and assisted integrations.
12
12
  */
13
13
  retrieve(jobID: string, options?: RequestOptions): APIPromise<ManualAsyncJob> {
14
- return this._client.get(path`/jobs/manual/${jobID}`, options);
14
+ return this._client.get(path`/jobs/manual/${jobID}`, { ...options, __security: { bearerAuth: true } });
15
15
  }
16
16
  }
17
17
 
@@ -15,7 +15,11 @@ export class PayGroups extends APIResource {
15
15
  query: PayGroupRetrieveParams | null | undefined = {},
16
16
  options?: RequestOptions,
17
17
  ): APIPromise<PayGroupRetrieveResponse> {
18
- return this._client.get(path`/employer/pay-groups/${payGroupID}`, { query, ...options });
18
+ return this._client.get(path`/employer/pay-groups/${payGroupID}`, {
19
+ query,
20
+ ...options,
21
+ __security: { bearerAuth: true },
22
+ });
19
23
  }
20
24
 
21
25
  /**
@@ -28,6 +32,7 @@ export class PayGroups extends APIResource {
28
32
  return this._client.getAPIList('/employer/pay-groups', SinglePage<PayGroupListResponse>, {
29
33
  query,
30
34
  ...options,
35
+ __security: { bearerAuth: true },
31
36
  });
32
37
  }
33
38
  }
@@ -9,7 +9,10 @@ export class Providers extends APIResource {
9
9
  * Return details on all available payroll and HR systems.
10
10
  */
11
11
  list(options?: RequestOptions): PagePromise<ProviderListResponsesSinglePage, ProviderListResponse> {
12
- return this._client.getAPIList('/providers', SinglePage<ProviderListResponse>, options);
12
+ return this._client.getAPIList('/providers', SinglePage<ProviderListResponse>, {
13
+ ...options,
14
+ __security: { bearerAuth: true },
15
+ });
13
16
  }
14
17
  }
15
18
 
@@ -15,7 +15,7 @@ export class RequestForwarding extends APIResource {
15
15
  body: RequestForwardingForwardParams,
16
16
  options?: RequestOptions,
17
17
  ): APIPromise<RequestForwardingForwardResponse> {
18
- return this._client.post('/forward', { body, ...options });
18
+ return this._client.post('/forward', { body, ...options, __security: { bearerAuth: true } });
19
19
  }
20
20
  }
21
21
 
@@ -33,7 +33,7 @@ export class Company extends APIResource {
33
33
  * ```
34
34
  */
35
35
  update(body: CompanyUpdateParams, options?: RequestOptions): APIPromise<CompanyUpdateResponse> {
36
- return this._client.put('/sandbox/company', { body, ...options });
36
+ return this._client.put('/sandbox/company', { body, ...options, __security: { bearerAuth: true } });
37
37
  }
38
38
  }
39
39
 
@@ -19,7 +19,11 @@ export class Accounts extends APIResource {
19
19
  * ```
20
20
  */
21
21
  create(body: AccountCreateParams, options?: RequestOptions): APIPromise<AccountCreateResponse> {
22
- return this._client.post('/sandbox/connections/accounts', { body, ...options });
22
+ return this._client.post('/sandbox/connections/accounts', {
23
+ body,
24
+ ...options,
25
+ __security: { basicAuth: true },
26
+ });
23
27
  }
24
28
 
25
29
  /**
@@ -38,7 +42,11 @@ export class Accounts extends APIResource {
38
42
  body: AccountUpdateParams | null | undefined = {},
39
43
  options?: RequestOptions,
40
44
  ): APIPromise<AccountUpdateResponse> {
41
- return this._client.put('/sandbox/connections/accounts', { body, ...options });
45
+ return this._client.put('/sandbox/connections/accounts', {
46
+ body,
47
+ ...options,
48
+ __security: { bearerAuth: true },
49
+ });
42
50
  }
43
51
  }
44
52
 
@@ -26,7 +26,7 @@ export class Connections extends APIResource {
26
26
  * ```
27
27
  */
28
28
  create(body: ConnectionCreateParams, options?: RequestOptions): APIPromise<ConnectionCreateResponse> {
29
- return this._client.post('/sandbox/connections', { body, ...options });
29
+ return this._client.post('/sandbox/connections', { body, ...options, __security: { basicAuth: true } });
30
30
  }
31
31
  }
32
32
 
@@ -19,7 +19,11 @@ export class Directory extends APIResource {
19
19
  options?: RequestOptions,
20
20
  ): APIPromise<DirectoryCreateResponse> {
21
21
  const { body } = params ?? {};
22
- return this._client.post('/sandbox/directory', { body: body, ...options });
22
+ return this._client.post('/sandbox/directory', {
23
+ body: body,
24
+ ...options,
25
+ __security: { bearerAuth: true },
26
+ });
23
27
  }
24
28
  }
25
29
 
@@ -22,7 +22,11 @@ export class Employment extends APIResource {
22
22
  body: EmploymentUpdateParams | null | undefined = {},
23
23
  options?: RequestOptions,
24
24
  ): APIPromise<EmploymentUpdateResponse> {
25
- return this._client.put(path`/sandbox/employment/${individualID}`, { body, ...options });
25
+ return this._client.put(path`/sandbox/employment/${individualID}`, {
26
+ body,
27
+ ...options,
28
+ __security: { bearerAuth: true },
29
+ });
26
30
  }
27
31
  }
28
32
 
@@ -22,7 +22,11 @@ export class Individual extends APIResource {
22
22
  body: IndividualUpdateParams | null | undefined = {},
23
23
  options?: RequestOptions,
24
24
  ): APIPromise<IndividualUpdateResponse> {
25
- return this._client.put(path`/sandbox/individual/${individualID}`, { body, ...options });
25
+ return this._client.put(path`/sandbox/individual/${individualID}`, {
26
+ body,
27
+ ...options,
28
+ __security: { bearerAuth: true },
29
+ });
26
30
  }
27
31
  }
28
32
 
@@ -15,7 +15,7 @@ export class Configuration extends APIResource {
15
15
  * ```
16
16
  */
17
17
  retrieve(options?: RequestOptions): APIPromise<ConfigurationRetrieveResponse> {
18
- return this._client.get('/sandbox/jobs/configuration', options);
18
+ return this._client.get('/sandbox/jobs/configuration', { ...options, __security: { bearerAuth: true } });
19
19
  }
20
20
 
21
21
  /**
@@ -31,7 +31,11 @@ export class Configuration extends APIResource {
31
31
  * ```
32
32
  */
33
33
  update(body: ConfigurationUpdateParams, options?: RequestOptions): APIPromise<SandboxJobConfiguration> {
34
- return this._client.put('/sandbox/jobs/configuration', { body, ...options });
34
+ return this._client.put('/sandbox/jobs/configuration', {
35
+ body,
36
+ ...options,
37
+ __security: { bearerAuth: true },
38
+ });
35
39
  }
36
40
  }
37
41
 
@@ -25,7 +25,7 @@ export class Jobs extends APIResource {
25
25
  * ```
26
26
  */
27
27
  create(body: JobCreateParams, options?: RequestOptions): APIPromise<JobCreateResponse> {
28
- return this._client.post('/sandbox/jobs', { body, ...options });
28
+ return this._client.post('/sandbox/jobs', { body, ...options, __security: { bearerAuth: true } });
29
29
  }
30
30
  }
31
31
 
@@ -17,7 +17,7 @@ export class Payment extends APIResource {
17
17
  body: PaymentCreateParams | null | undefined = {},
18
18
  options?: RequestOptions,
19
19
  ): APIPromise<PaymentCreateResponse> {
20
- return this._client.post('/sandbox/payment', { body, ...options });
20
+ return this._client.post('/sandbox/payment', { body, ...options, __security: { bearerAuth: true } });
21
21
  }
22
22
  }
23
23
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '8.2.1'; // x-release-please-version
1
+ export const VERSION = '9.0.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "8.2.1";
1
+ export declare const VERSION = "9.0.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "8.2.1";
1
+ export declare const VERSION = "9.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '8.2.1'; // x-release-please-version
4
+ exports.VERSION = '9.0.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '8.2.1'; // x-release-please-version
1
+ export const VERSION = '9.0.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map