@tryfinch/finch-api 6.27.0 → 6.28.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 (153) hide show
  1. package/CHANGELOG.md +42 -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 +16 -0
  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 +19 -0
  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/resources/access-tokens.ts +8 -0
  127. package/src/resources/hris/benefits/benefits.ts +83 -0
  128. package/src/resources/hris/benefits/individuals.ts +35 -0
  129. package/src/resources/hris/company/company.ts +15 -10
  130. package/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +8 -0
  131. package/src/resources/hris/company/pay-statement-item/rules.ts +30 -0
  132. package/src/resources/hris/directory.ts +16 -8
  133. package/src/resources/hris/documents.ts +12 -0
  134. package/src/resources/hris/employments.ts +139 -115
  135. package/src/resources/hris/hris.ts +14 -14
  136. package/src/resources/hris/individuals.ts +96 -74
  137. package/src/resources/hris/pay-statements.ts +16 -0
  138. package/src/resources/hris/payments.ts +11 -0
  139. package/src/resources/request-forwarding.ts +10 -0
  140. package/src/resources/sandbox/company.ts +23 -0
  141. package/src/resources/sandbox/connections/accounts.ts +17 -0
  142. package/src/resources/sandbox/connections/connections.ts +7 -0
  143. package/src/resources/sandbox/directory.ts +7 -0
  144. package/src/resources/sandbox/employment.ts +7 -0
  145. package/src/resources/sandbox/individual.ts +7 -0
  146. package/src/resources/sandbox/jobs/configuration.ts +15 -0
  147. package/src/resources/sandbox/jobs/jobs.ts +7 -0
  148. package/src/resources/sandbox/payment.ts +19 -0
  149. package/src/resources/shared.ts +4 -4
  150. package/src/version.ts +1 -1
  151. package/version.d.ts +1 -1
  152. package/version.js +1 -1
  153. package/version.mjs +1 -1
@@ -8,6 +8,15 @@ import * as Shared from '../../shared';
8
8
  export class Accounts extends APIResource {
9
9
  /**
10
10
  * Create a new account for an existing connection (company/provider pair)
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const account =
15
+ * await client.sandbox.connections.accounts.create({
16
+ * company_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
17
+ * provider_id: 'provider_id',
18
+ * });
19
+ * ```
11
20
  */
12
21
  create(body: AccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<AccountCreateResponse> {
13
22
  return this._client.post('/sandbox/connections/accounts', { body, ...options });
@@ -16,6 +25,14 @@ export class Accounts extends APIResource {
16
25
  /**
17
26
  * Update an existing sandbox account. Change the connection status to understand
18
27
  * how the Finch API responds.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const account =
32
+ * await client.sandbox.connections.accounts.update({
33
+ * connection_status: 'reauth',
34
+ * });
35
+ * ```
19
36
  */
20
37
  update(body?: AccountUpdateParams, options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
21
38
  update(options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
@@ -16,6 +16,13 @@ export class Connections extends APIResource {
16
16
 
17
17
  /**
18
18
  * Create a new connection (new company/provider pair) with a new account
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const connection = await client.sandbox.connections.create({
23
+ * provider_id: 'provider_id',
24
+ * });
25
+ * ```
19
26
  */
20
27
  create(
21
28
  body: ConnectionCreateParams,
@@ -8,6 +8,13 @@ import * as HRISAPI from '../hris/hris';
8
8
  export class Directory extends APIResource {
9
9
  /**
10
10
  * Add new individuals to a sandbox company
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const directories = await client.sandbox.directory.create([
15
+ * {},
16
+ * ]);
17
+ * ```
11
18
  */
12
19
  create(
13
20
  body?: DirectoryCreateParams,
@@ -8,6 +8,13 @@ import * as HRISAPI from '../hris/hris';
8
8
  export class Employment extends APIResource {
9
9
  /**
10
10
  * Update sandbox employment
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const employment = await client.sandbox.employment.update(
15
+ * 'individual_id',
16
+ * );
17
+ * ```
11
18
  */
12
19
  update(
13
20
  individualId: string,
@@ -8,6 +8,13 @@ import * as HRISAPI from '../hris/hris';
8
8
  export class Individual extends APIResource {
9
9
  /**
10
10
  * Update sandbox individual
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const individual = await client.sandbox.individual.update(
15
+ * 'individual_id',
16
+ * );
17
+ * ```
11
18
  */
12
19
  update(
13
20
  individualId: string,
@@ -6,6 +6,12 @@ import * as Core from '../../../core';
6
6
  export class Configuration extends APIResource {
7
7
  /**
8
8
  * Get configurations for sandbox jobs
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const sandboxJobConfigurations =
13
+ * await client.sandbox.jobs.configuration.retrieve();
14
+ * ```
9
15
  */
10
16
  retrieve(options?: Core.RequestOptions): Core.APIPromise<ConfigurationRetrieveResponse> {
11
17
  return this._client.get('/sandbox/jobs/configuration', options);
@@ -13,6 +19,15 @@ export class Configuration extends APIResource {
13
19
 
14
20
  /**
15
21
  * Update configurations for sandbox jobs
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const sandboxJobConfiguration =
26
+ * await client.sandbox.jobs.configuration.update({
27
+ * completion_status: 'complete',
28
+ * type: 'data_sync_all',
29
+ * });
30
+ * ```
16
31
  */
17
32
  update(
18
33
  body: ConfigurationUpdateParams,
@@ -15,6 +15,13 @@ export class Jobs extends APIResource {
15
15
 
16
16
  /**
17
17
  * Enqueue a new sandbox job
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const job = await client.sandbox.jobs.create({
22
+ * type: 'data_sync_all',
23
+ * });
24
+ * ```
18
25
  */
19
26
  create(body: JobCreateParams, options?: Core.RequestOptions): Core.APIPromise<JobCreateResponse> {
20
27
  return this._client.post('/sandbox/jobs', { body, ...options });
@@ -9,6 +9,25 @@ import * as BenefitsAPI from '../hris/benefits/benefits';
9
9
  export class Payment extends APIResource {
10
10
  /**
11
11
  * Add a new sandbox payment
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const payment = await client.sandbox.payment.create({
16
+ * pay_statements: [
17
+ * {
18
+ * individual_id: 'b2338cfb-472f-4f72-9faa-e028c083144a',
19
+ * employee_deductions: [
20
+ * {
21
+ * name: '401k test',
22
+ * type: '401k',
23
+ * amount: 2000,
24
+ * currency: 'usd',
25
+ * },
26
+ * ],
27
+ * },
28
+ * ],
29
+ * });
30
+ * ```
12
31
  */
13
32
  create(body?: PaymentCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentCreateResponse>;
14
33
  create(options?: Core.RequestOptions): Core.APIPromise<PaymentCreateResponse>;
@@ -71,12 +71,12 @@ export interface OperationSupportMatrix {
71
71
 
72
72
  export interface Paging {
73
73
  /**
74
- * The total number of elements for the entire query (not just the given page)
74
+ * The current start index of the returned list of elements
75
75
  */
76
- count?: number;
76
+ offset: number;
77
77
 
78
78
  /**
79
- * The current start index of the returned list of elements
79
+ * The total number of elements for the entire query (not just the given page)
80
80
  */
81
- offset?: number;
81
+ count?: number;
82
82
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.27.0'; // x-release-please-version
1
+ export const VERSION = '6.28.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.27.0";
1
+ export declare const VERSION = "6.28.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 = '6.27.0'; // x-release-please-version
4
+ exports.VERSION = '6.28.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.27.0'; // x-release-please-version
1
+ export const VERSION = '6.28.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map