@tryfinch/finch-api 5.14.3 → 5.16.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 (146) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +1 -1
  3. package/_shims/index.d.ts +1 -1
  4. package/_shims/registry.d.ts +1 -1
  5. package/_shims/registry.d.ts.map +1 -1
  6. package/core.d.ts +14 -12
  7. package/core.d.ts.map +1 -1
  8. package/core.js +43 -15
  9. package/core.js.map +1 -1
  10. package/core.mjs +43 -15
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +27 -1
  13. package/index.d.ts +27 -1
  14. package/index.d.ts.map +1 -1
  15. package/index.js +50 -5
  16. package/index.js.map +1 -1
  17. package/index.mjs +50 -5
  18. package/index.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/access-tokens.d.ts +23 -0
  21. package/resources/access-tokens.d.ts.map +1 -0
  22. package/resources/access-tokens.js +17 -0
  23. package/resources/access-tokens.js.map +1 -0
  24. package/resources/access-tokens.mjs +13 -0
  25. package/resources/access-tokens.mjs.map +1 -0
  26. package/resources/account.d.ts +14 -0
  27. package/resources/account.d.ts.map +1 -1
  28. package/resources/account.js.map +1 -1
  29. package/resources/account.mjs.map +1 -1
  30. package/resources/index.d.ts +2 -0
  31. package/resources/index.d.ts.map +1 -1
  32. package/resources/index.js +5 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs +2 -0
  35. package/resources/index.mjs.map +1 -1
  36. package/resources/sandbox/company.d.ts +195 -0
  37. package/resources/sandbox/company.d.ts.map +1 -0
  38. package/resources/sandbox/company.js +17 -0
  39. package/resources/sandbox/company.js.map +1 -0
  40. package/resources/sandbox/company.mjs +13 -0
  41. package/resources/sandbox/company.mjs.map +1 -0
  42. package/resources/sandbox/connections/accounts.d.ts +51 -0
  43. package/resources/sandbox/connections/accounts.d.ts.map +1 -0
  44. package/resources/sandbox/connections/accounts.js +24 -0
  45. package/resources/sandbox/connections/accounts.js.map +1 -0
  46. package/resources/sandbox/connections/accounts.mjs +20 -0
  47. package/resources/sandbox/connections/accounts.mjs.map +1 -0
  48. package/resources/sandbox/connections/connections.d.ts +39 -0
  49. package/resources/sandbox/connections/connections.d.ts.map +1 -0
  50. package/resources/sandbox/connections/connections.js +46 -0
  51. package/resources/sandbox/connections/connections.js.map +1 -0
  52. package/resources/sandbox/connections/connections.mjs +19 -0
  53. package/resources/sandbox/connections/connections.mjs.map +1 -0
  54. package/resources/sandbox/connections/index.d.ts +3 -0
  55. package/resources/sandbox/connections/index.d.ts.map +1 -0
  56. package/resources/sandbox/connections/index.js +9 -0
  57. package/resources/sandbox/connections/index.js.map +1 -0
  58. package/resources/sandbox/connections/index.mjs +4 -0
  59. package/resources/sandbox/connections/index.mjs.map +1 -0
  60. package/resources/sandbox/directory.d.ts +156 -0
  61. package/resources/sandbox/directory.d.ts.map +1 -0
  62. package/resources/sandbox/directory.js +17 -0
  63. package/resources/sandbox/directory.js.map +1 -0
  64. package/resources/sandbox/directory.mjs +13 -0
  65. package/resources/sandbox/directory.mjs.map +1 -0
  66. package/resources/sandbox/employment.d.ts +216 -0
  67. package/resources/sandbox/employment.d.ts.map +1 -0
  68. package/resources/sandbox/employment.js +18 -0
  69. package/resources/sandbox/employment.js.map +1 -0
  70. package/resources/sandbox/employment.mjs +14 -0
  71. package/resources/sandbox/employment.mjs.map +1 -0
  72. package/resources/sandbox/index.d.ts +9 -0
  73. package/resources/sandbox/index.d.ts.map +1 -0
  74. package/resources/sandbox/index.js +21 -0
  75. package/resources/sandbox/index.js.map +1 -0
  76. package/resources/sandbox/index.mjs +10 -0
  77. package/resources/sandbox/index.mjs.map +1 -0
  78. package/resources/sandbox/individual.d.ts +124 -0
  79. package/resources/sandbox/individual.d.ts.map +1 -0
  80. package/resources/sandbox/individual.js +18 -0
  81. package/resources/sandbox/individual.js.map +1 -0
  82. package/resources/sandbox/individual.mjs +14 -0
  83. package/resources/sandbox/individual.mjs.map +1 -0
  84. package/resources/sandbox/jobs/configuration.d.ts +28 -0
  85. package/resources/sandbox/jobs/configuration.d.ts.map +1 -0
  86. package/resources/sandbox/jobs/configuration.js +23 -0
  87. package/resources/sandbox/jobs/configuration.js.map +1 -0
  88. package/resources/sandbox/jobs/configuration.mjs +19 -0
  89. package/resources/sandbox/jobs/configuration.mjs.map +1 -0
  90. package/resources/sandbox/jobs/index.d.ts +3 -0
  91. package/resources/sandbox/jobs/index.d.ts.map +1 -0
  92. package/resources/sandbox/jobs/index.js +9 -0
  93. package/resources/sandbox/jobs/index.js.map +1 -0
  94. package/resources/sandbox/jobs/index.mjs +4 -0
  95. package/resources/sandbox/jobs/index.mjs.map +1 -0
  96. package/resources/sandbox/jobs/jobs.d.ts +12 -0
  97. package/resources/sandbox/jobs/jobs.d.ts.map +1 -0
  98. package/resources/sandbox/jobs/jobs.js +40 -0
  99. package/resources/sandbox/jobs/jobs.js.map +1 -0
  100. package/resources/sandbox/jobs/jobs.mjs +13 -0
  101. package/resources/sandbox/jobs/jobs.mjs.map +1 -0
  102. package/resources/sandbox/payment.d.ts +154 -0
  103. package/resources/sandbox/payment.d.ts.map +1 -0
  104. package/resources/sandbox/payment.js +18 -0
  105. package/resources/sandbox/payment.js.map +1 -0
  106. package/resources/sandbox/payment.mjs +14 -0
  107. package/resources/sandbox/payment.mjs.map +1 -0
  108. package/resources/sandbox/sandbox.d.ts +39 -0
  109. package/resources/sandbox/sandbox.d.ts.map +1 -0
  110. package/resources/sandbox/sandbox.js +58 -0
  111. package/resources/sandbox/sandbox.js.map +1 -0
  112. package/resources/sandbox/sandbox.mjs +31 -0
  113. package/resources/sandbox/sandbox.mjs.map +1 -0
  114. package/resources/shared.d.ts +1 -0
  115. package/resources/shared.d.ts.map +1 -1
  116. package/src/_shims/index.d.ts +1 -1
  117. package/src/_shims/node-runtime.ts +1 -1
  118. package/src/_shims/registry.ts +1 -1
  119. package/src/_shims/web-runtime.ts +1 -1
  120. package/src/core.ts +69 -32
  121. package/src/index.ts +76 -4
  122. package/src/lib/.keep +4 -0
  123. package/src/resources/access-tokens.ts +36 -0
  124. package/src/resources/account.ts +19 -0
  125. package/src/resources/index.ts +2 -0
  126. package/src/resources/sandbox/company.ts +252 -0
  127. package/src/resources/sandbox/connections/accounts.ts +83 -0
  128. package/src/resources/sandbox/connections/connections.ts +58 -0
  129. package/src/resources/sandbox/connections/index.ts +10 -0
  130. package/src/resources/sandbox/directory.ts +210 -0
  131. package/src/resources/sandbox/employment.ts +279 -0
  132. package/src/resources/sandbox/index.ts +10 -0
  133. package/src/resources/sandbox/individual.ts +193 -0
  134. package/src/resources/sandbox/jobs/configuration.ts +44 -0
  135. package/src/resources/sandbox/jobs/index.ts +9 -0
  136. package/src/resources/sandbox/jobs/jobs.ts +15 -0
  137. package/src/resources/sandbox/payment.ts +215 -0
  138. package/src/resources/sandbox/sandbox.ts +42 -0
  139. package/src/resources/shared.ts +8 -0
  140. package/src/uploads.ts +2 -2
  141. package/src/version.ts +1 -1
  142. package/uploads.d.ts +2 -2
  143. package/uploads.d.ts.map +1 -1
  144. package/version.d.ts +1 -1
  145. package/version.js +1 -1
  146. package/version.mjs +1 -1
@@ -0,0 +1,23 @@
1
+ import * as Core from '@tryfinch/finch-api/core';
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ import * as AccessTokensAPI from '@tryfinch/finch-api/resources/access-tokens';
4
+ export declare class AccessTokens extends APIResource {
5
+ /**
6
+ * Exchange the authorization code for an access token
7
+ */
8
+ create(body: AccessTokenCreateParams, options?: Core.RequestOptions): Core.APIPromise<CreateAccessTokenResponse>;
9
+ }
10
+ export interface CreateAccessTokenResponse {
11
+ access_token: string;
12
+ }
13
+ export interface AccessTokenCreateParams {
14
+ client_id: string;
15
+ client_secret: string;
16
+ code: string;
17
+ redirect_uri: string;
18
+ }
19
+ export declare namespace AccessTokens {
20
+ export import CreateAccessTokenResponse = AccessTokensAPI.CreateAccessTokenResponse;
21
+ export import AccessTokenCreateParams = AccessTokensAPI.AccessTokenCreateParams;
22
+ }
23
+ //# sourceMappingURL=access-tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-tokens.d.ts","sourceRoot":"","sources":["../src/resources/access-tokens.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,6CAA6C,CAAC;AAE/E,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;CAG9C;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAElB,aAAa,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,MAAM,CAAC;IAEb,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,yBAAiB,YAAY,CAAC;IAC5B,MAAM,QAAQ,yBAAyB,GAAG,eAAe,CAAC,yBAAyB,CAAC;IACpF,MAAM,QAAQ,uBAAuB,GAAG,eAAe,CAAC,uBAAuB,CAAC;CACjF"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AccessTokens = void 0;
5
+ const resource_1 = require("@tryfinch/finch-api/resource");
6
+ class AccessTokens extends resource_1.APIResource {
7
+ /**
8
+ * Exchange the authorization code for an access token
9
+ */
10
+ create(body, options) {
11
+ return this._client.post('/auth/token', { body, ...options });
12
+ }
13
+ }
14
+ exports.AccessTokens = AccessTokens;
15
+ (function (AccessTokens) {
16
+ })(AccessTokens = exports.AccessTokens || (exports.AccessTokens = {}));
17
+ //# sourceMappingURL=access-tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-tokens.js","sourceRoot":"","sources":["../src/resources/access-tokens.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,2DAA2D;AAG3D,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,MAAM,CACJ,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAVD,oCAUC;AAgBD,WAAiB,YAAY;AAG7B,CAAC,EAHgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAG5B"}
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ export class AccessTokens extends APIResource {
4
+ /**
5
+ * Exchange the authorization code for an access token
6
+ */
7
+ create(body, options) {
8
+ return this._client.post('/auth/token', { body, ...options });
9
+ }
10
+ }
11
+ (function (AccessTokens) {
12
+ })(AccessTokens || (AccessTokens = {}));
13
+ //# sourceMappingURL=access-tokens.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-tokens.mjs","sourceRoot":"","sources":["../src/resources/access-tokens.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,8BAA8B;AAG1D,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CACJ,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAgBD,WAAiB,YAAY;AAG7B,CAAC,EAHgB,YAAY,KAAZ,YAAY,QAG5B"}
@@ -1,6 +1,7 @@
1
1
  import * as Core from '@tryfinch/finch-api/core';
2
2
  import { APIResource } from '@tryfinch/finch-api/resource';
3
3
  import * as AccountAPI from '@tryfinch/finch-api/resources/account';
4
+ import * as Shared from '@tryfinch/finch-api/resources/shared';
4
5
  export declare class Account extends APIResource {
5
6
  /**
6
7
  * Disconnect an employer from your application and invalidate all `access_token`s
@@ -24,6 +25,7 @@ export interface Introspection {
24
25
  * The Finch uuid of the account used to connect this company.
25
26
  */
26
27
  account_id: string;
28
+ authentication_methods: Introspection.AuthenticationMethods;
27
29
  /**
28
30
  * The client id of the application associated with the `access_token`.
29
31
  */
@@ -63,6 +65,18 @@ export interface Introspection {
63
65
  */
64
66
  username: string;
65
67
  }
68
+ export declare namespace Introspection {
69
+ interface AuthenticationMethods {
70
+ connection_status?: AuthenticationMethods.ConnectionStatus;
71
+ type?: string;
72
+ }
73
+ namespace AuthenticationMethods {
74
+ interface ConnectionStatus {
75
+ message?: string;
76
+ status?: Shared.ConnectionStatusType;
77
+ }
78
+ }
79
+ }
66
80
  export declare namespace Account {
67
81
  export import DisconnectResponse = AccountAPI.DisconnectResponse;
68
82
  export import Introspection = AccountAPI.Introspection;
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AAEpE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAI9E;;OAEG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;CAG1E;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM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O,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAhBD,0BAgBC;AA8DD,WAAiB,OAAO;AAGxB,CAAC,EAHgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAGvB"}
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,2DAA2D;AAI3D,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;OAIG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAhBD,0BAgBC;AAgFD,WAAiB,OAAO;AAGxB,CAAC,EAHgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAGvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"account.mjs","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,8BAA8B;AAG1D,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AA8DD,WAAiB,OAAO;AAGxB,CAAC,EAHgB,OAAO,KAAP,OAAO,QAGvB"}
1
+ {"version":3,"file":"account.mjs","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,8BAA8B;AAI1D,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAgFD,WAAiB,OAAO;AAGxB,CAAC,EAHgB,OAAO,KAAP,OAAO,QAGvB"}
@@ -1,8 +1,10 @@
1
1
  export * from "./shared.js";
2
+ export { CreateAccessTokenResponse, AccessTokenCreateParams, AccessTokens } from "./access-tokens.js";
2
3
  export { DisconnectResponse, Introspection, Account } from "./account.js";
3
4
  export { Income, Location, Money, HRIS } from "./hris/hris.js";
4
5
  export { Jobs } from "./jobs/jobs.js";
5
6
  export { Provider, ProvidersSinglePage, Providers } from "./providers.js";
6
7
  export { RequestForwardingForwardResponse, RequestForwardingForwardParams, RequestForwarding, } from "./request-forwarding.js";
8
+ export { Sandbox } from "./sandbox/sandbox.js";
7
9
  export { Webhooks } from "./webhooks.js";
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.Webhooks = exports.RequestForwarding = exports.Providers = exports.ProvidersSinglePage = exports.Jobs = exports.HRIS = exports.Account = void 0;
18
+ exports.Webhooks = exports.Sandbox = exports.RequestForwarding = exports.Providers = exports.ProvidersSinglePage = exports.Jobs = exports.HRIS = exports.Account = exports.AccessTokens = void 0;
19
19
  __exportStar(require("./shared.js"), exports);
20
+ var access_tokens_1 = require("./access-tokens.js");
21
+ Object.defineProperty(exports, "AccessTokens", { enumerable: true, get: function () { return access_tokens_1.AccessTokens; } });
20
22
  var account_1 = require("./account.js");
21
23
  Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return account_1.Account; } });
22
24
  var hris_1 = require("./hris/hris.js");
@@ -28,6 +30,8 @@ Object.defineProperty(exports, "ProvidersSinglePage", { enumerable: true, get: f
28
30
  Object.defineProperty(exports, "Providers", { enumerable: true, get: function () { return providers_1.Providers; } });
29
31
  var request_forwarding_1 = require("./request-forwarding.js");
30
32
  Object.defineProperty(exports, "RequestForwarding", { enumerable: true, get: function () { return request_forwarding_1.RequestForwarding; } });
33
+ var sandbox_1 = require("./sandbox/sandbox.js");
34
+ Object.defineProperty(exports, "Sandbox", { enumerable: true, get: function () { return sandbox_1.Sandbox; } });
31
35
  var webhooks_1 = require("./webhooks.js");
32
36
  Object.defineProperty(exports, "Webhooks", { enumerable: true, get: function () { return webhooks_1.Webhooks; } });
33
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;AAErD,8CAAyB;AACzB,wCAAuE;AAA3B,kGAAA,OAAO,OAAA;AACnD,uCAA4D;AAA1B,4FAAA,IAAI,OAAA;AACtC,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,4CAAuE;AAApD,gHAAA,mBAAmB,OAAA;AAAE,sGAAA,SAAS,OAAA;AACjD,8DAI8B;AAD5B,uHAAA,iBAAiB,OAAA;AAEnB,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;AAErD,8CAAyB;AACzB,oDAAmG;AAAtC,6GAAA,YAAY,OAAA;AACzE,wCAAuE;AAA3B,kGAAA,OAAO,OAAA;AACnD,uCAA4D;AAA1B,4FAAA,IAAI,OAAA;AACtC,uCAAmC;AAA1B,4FAAA,IAAI,OAAA;AACb,4CAAuE;AAApD,gHAAA,mBAAmB,OAAA;AAAE,sGAAA,SAAS,OAAA;AACjD,8DAI8B;AAD5B,uHAAA,iBAAiB,OAAA;AAEnB,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
@@ -1,9 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
2
  export * from "./shared.mjs";
3
+ export { AccessTokens } from "./access-tokens.mjs";
3
4
  export { Account } from "./account.mjs";
4
5
  export { HRIS } from "./hris/hris.mjs";
5
6
  export { Jobs } from "./jobs/jobs.mjs";
6
7
  export { ProvidersSinglePage, Providers } from "./providers.mjs";
7
8
  export { RequestForwarding, } from "./request-forwarding.mjs";
9
+ export { Sandbox } from "./sandbox/sandbox.mjs";
8
10
  export { Webhooks } from "./webhooks.mjs";
9
11
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;;OAG9C,EAAqC,OAAO,EAAE;OAC9C,EAA2B,IAAI,EAAE;OACjC,EAAE,IAAI,EAAE;OACR,EAAY,mBAAmB,EAAE,SAAS,EAAE;OAC5C,EAGL,iBAAiB,GAClB;OACM,EAAE,QAAQ,EAAE"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;;OAG9C,EAAsD,YAAY,EAAE;OACpE,EAAqC,OAAO,EAAE;OAC9C,EAA2B,IAAI,EAAE;OACjC,EAAE,IAAI,EAAE;OACR,EAAY,mBAAmB,EAAE,SAAS,EAAE;OAC5C,EAGL,iBAAiB,GAClB;OACM,EAAE,OAAO,EAAE;OACX,EAAE,QAAQ,EAAE"}
@@ -0,0 +1,195 @@
1
+ import * as Core from '@tryfinch/finch-api/core';
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ import * as CompanyAPI from '@tryfinch/finch-api/resources/sandbox/company';
4
+ import * as HRISAPI from '@tryfinch/finch-api/resources/hris/hris';
5
+ export declare class Company extends APIResource {
6
+ /**
7
+ * Update a sandbox company's data
8
+ */
9
+ update(body: CompanyUpdateParams, options?: Core.RequestOptions): Core.APIPromise<CompanyUpdateResponse>;
10
+ }
11
+ export interface CompanyUpdateResponse {
12
+ /**
13
+ * An array of bank account objects associated with the payroll/HRIS system.
14
+ */
15
+ accounts: Array<CompanyUpdateResponse.Account> | null;
16
+ /**
17
+ * The array of company departments.
18
+ */
19
+ departments: Array<CompanyUpdateResponse.Department | null> | null;
20
+ /**
21
+ * The employer identification number.
22
+ */
23
+ ein: string | null;
24
+ /**
25
+ * The entity type object.
26
+ */
27
+ entity: CompanyUpdateResponse.Entity | null;
28
+ /**
29
+ * The legal name of the company.
30
+ */
31
+ legal_name: string | null;
32
+ locations: Array<HRISAPI.Location | null> | null;
33
+ /**
34
+ * The email of the main administrator on the account.
35
+ */
36
+ primary_email: string | null;
37
+ /**
38
+ * The phone number of the main administrator on the account. Format: `XXXXXXXXXX`
39
+ */
40
+ primary_phone_number: string | null;
41
+ }
42
+ export declare namespace CompanyUpdateResponse {
43
+ interface Account {
44
+ /**
45
+ * The name of the bank associated in the payroll/HRIS system.
46
+ */
47
+ account_name?: string | null;
48
+ /**
49
+ * 10-12 digit number to specify the bank account
50
+ */
51
+ account_number?: string | null;
52
+ /**
53
+ * The type of bank account.
54
+ */
55
+ account_type?: 'checking' | 'savings' | null;
56
+ /**
57
+ * Name of the banking institution.
58
+ */
59
+ institution_name?: string | null;
60
+ /**
61
+ * A nine-digit code that's based on the U.S. Bank location where your account was
62
+ * opened.
63
+ */
64
+ routing_number?: string | null;
65
+ }
66
+ interface Department {
67
+ /**
68
+ * The department name.
69
+ */
70
+ name?: string | null;
71
+ /**
72
+ * The parent department, if present.
73
+ */
74
+ parent?: Department.Parent | null;
75
+ }
76
+ namespace Department {
77
+ /**
78
+ * The parent department, if present.
79
+ */
80
+ interface Parent {
81
+ /**
82
+ * The parent department's name.
83
+ */
84
+ name?: string | null;
85
+ }
86
+ }
87
+ /**
88
+ * The entity type object.
89
+ */
90
+ interface Entity {
91
+ /**
92
+ * The tax payer subtype of the company.
93
+ */
94
+ subtype?: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
95
+ /**
96
+ * The tax payer type of the company.
97
+ */
98
+ type?: 'llc' | 'lp' | 'corporation' | 'sole_proprietor' | 'non_profit' | 'partnership' | 'cooperative' | null;
99
+ }
100
+ }
101
+ export interface CompanyUpdateParams {
102
+ /**
103
+ * An array of bank account objects associated with the payroll/HRIS system.
104
+ */
105
+ accounts: Array<CompanyUpdateParams.Account> | null;
106
+ /**
107
+ * The array of company departments.
108
+ */
109
+ departments: Array<CompanyUpdateParams.Department | null> | null;
110
+ /**
111
+ * The employer identification number.
112
+ */
113
+ ein: string | null;
114
+ /**
115
+ * The entity type object.
116
+ */
117
+ entity: CompanyUpdateParams.Entity | null;
118
+ /**
119
+ * The legal name of the company.
120
+ */
121
+ legal_name: string | null;
122
+ locations: Array<HRISAPI.Location | null> | null;
123
+ /**
124
+ * The email of the main administrator on the account.
125
+ */
126
+ primary_email: string | null;
127
+ /**
128
+ * The phone number of the main administrator on the account. Format: `XXXXXXXXXX`
129
+ */
130
+ primary_phone_number: string | null;
131
+ }
132
+ export declare namespace CompanyUpdateParams {
133
+ interface Account {
134
+ /**
135
+ * The name of the bank associated in the payroll/HRIS system.
136
+ */
137
+ account_name?: string | null;
138
+ /**
139
+ * 10-12 digit number to specify the bank account
140
+ */
141
+ account_number?: string | null;
142
+ /**
143
+ * The type of bank account.
144
+ */
145
+ account_type?: 'checking' | 'savings' | null;
146
+ /**
147
+ * Name of the banking institution.
148
+ */
149
+ institution_name?: string | null;
150
+ /**
151
+ * A nine-digit code that's based on the U.S. Bank location where your account was
152
+ * opened.
153
+ */
154
+ routing_number?: string | null;
155
+ }
156
+ interface Department {
157
+ /**
158
+ * The department name.
159
+ */
160
+ name?: string | null;
161
+ /**
162
+ * The parent department, if present.
163
+ */
164
+ parent?: Department.Parent | null;
165
+ }
166
+ namespace Department {
167
+ /**
168
+ * The parent department, if present.
169
+ */
170
+ interface Parent {
171
+ /**
172
+ * The parent department's name.
173
+ */
174
+ name?: string | null;
175
+ }
176
+ }
177
+ /**
178
+ * The entity type object.
179
+ */
180
+ interface Entity {
181
+ /**
182
+ * The tax payer subtype of the company.
183
+ */
184
+ subtype?: 's_corporation' | 'c_corporation' | 'b_corporation' | null;
185
+ /**
186
+ * The tax payer type of the company.
187
+ */
188
+ type?: 'llc' | 'lp' | 'corporation' | 'sole_proprietor' | 'non_profit' | 'partnership' | 'cooperative' | null;
189
+ }
190
+ }
191
+ export declare namespace Company {
192
+ export import CompanyUpdateResponse = CompanyAPI.CompanyUpdateResponse;
193
+ export import CompanyUpdateParams = CompanyAPI.CompanyUpdateParams;
194
+ }
195
+ //# sourceMappingURL=company.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.d.ts","sourceRoot":"","sources":["../../src/resources/sandbox/company.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+CAA+C,CAAC;AAC5E,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AAEnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC;CAGzG;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,qBAAqB,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M,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;KACnC;IAED,UAAiB,UAAU,CAAC;QAC1B;;WAEG;QACH,UAAiB,MAAM;YACrB;;eAEG;YACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SACtB;KACF;IAED;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,IAAI,CAAC;QAErE;;WAEG;QACH,IAAI,CAAC,EACD,KAAK,GACL,IAAI,GACJ,aAAa,GACb,iBAAiB,GACjB,YAAY,GACZ,aAAa,GACb,aAAa,GACb,IAAI,CAAC;KACV;CACF;AAED,yBAAiB,OAAO,CAAC;IACvB,MAAM,QAAQ,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC;IACvE,MAAM,QAAQ,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;CACpE"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Company = void 0;
5
+ const resource_1 = require("@tryfinch/finch-api/resource");
6
+ class Company extends resource_1.APIResource {
7
+ /**
8
+ * Update a sandbox company's data
9
+ */
10
+ update(body, options) {
11
+ return this._client.put('/sandbox/company', { body, ...options });
12
+ }
13
+ }
14
+ exports.Company = Company;
15
+ (function (Company) {
16
+ })(Company = exports.Company || (exports.Company = {}));
17
+ //# sourceMappingURL=company.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/resources/sandbox/company.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,2DAA2D;AAI3D,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AAPD,0BAOC;AA0OD,WAAiB,OAAO;AAGxB,CAAC,EAHgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAGvB"}
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ export class Company extends APIResource {
4
+ /**
5
+ * Update a sandbox company's data
6
+ */
7
+ update(body, options) {
8
+ return this._client.put('/sandbox/company', { body, ...options });
9
+ }
10
+ }
11
+ (function (Company) {
12
+ })(Company || (Company = {}));
13
+ //# sourceMappingURL=company.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.mjs","sourceRoot":"","sources":["../../src/resources/sandbox/company.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,8BAA8B;AAI1D,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AA0OD,WAAiB,OAAO;AAGxB,CAAC,EAHgB,OAAO,KAAP,OAAO,QAGvB"}
@@ -0,0 +1,51 @@
1
+ import * as Core from '@tryfinch/finch-api/core';
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ import * as AccountsAPI from '@tryfinch/finch-api/resources/sandbox/connections/accounts';
4
+ import * as Shared from '@tryfinch/finch-api/resources/shared';
5
+ export declare class Accounts extends APIResource {
6
+ /**
7
+ * Create a new account for an existing connection (company/provider pair)
8
+ */
9
+ create(body: AccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<AccountCreateResponse>;
10
+ /**
11
+ * Update an existing sandbox account. Change the connection status to understand
12
+ * how the Finch API responds.
13
+ */
14
+ update(body?: AccountUpdateParams, options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
15
+ update(options?: Core.RequestOptions): Core.APIPromise<AccountUpdateResponse>;
16
+ }
17
+ export interface AccountCreateResponse {
18
+ access_token: string;
19
+ account_id: string;
20
+ authentication_type: 'credentials' | 'api_token' | 'oauth' | 'assisted';
21
+ company_id: string;
22
+ products: Array<string>;
23
+ provider_id: string;
24
+ }
25
+ export interface AccountUpdateResponse {
26
+ account_id: string;
27
+ authentication_type: 'credentials' | 'api_token' | 'oauth' | 'assisted';
28
+ company_id: string;
29
+ products: Array<string>;
30
+ provider_id: string;
31
+ }
32
+ export interface AccountCreateParams {
33
+ company_id: string;
34
+ provider_id: string;
35
+ authentication_type?: 'credentials' | 'api_token' | 'oauth' | 'assisted';
36
+ /**
37
+ * Optional, defaults to Organization products (`company`, `directory`,
38
+ * `employment`, `individual`)
39
+ */
40
+ products?: Array<string>;
41
+ }
42
+ export interface AccountUpdateParams {
43
+ connection_status?: Shared.ConnectionStatusType;
44
+ }
45
+ export declare namespace Accounts {
46
+ export import AccountCreateResponse = AccountsAPI.AccountCreateResponse;
47
+ export import AccountUpdateResponse = AccountsAPI.AccountUpdateResponse;
48
+ export import AccountCreateParams = AccountsAPI.AccountCreateParams;
49
+ export import AccountUpdateParams = AccountsAPI.AccountUpdateParams;
50
+ }
51
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/resources/sandbox/connections/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,KAAK,WAAW,MAAM,4DAA4D,CAAC;AAC1F,OAAO,KAAK,MAAM,MAAM,sCAAsC,CAAC;AAE/D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH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AC;IACxB,MAAM,QAAQ,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;IACxE,MAAM,QAAQ,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;IACxE,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;CACrE"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Accounts = void 0;
5
+ const resource_1 = require("@tryfinch/finch-api/resource");
6
+ const core_1 = require("@tryfinch/finch-api/core");
7
+ class Accounts extends resource_1.APIResource {
8
+ /**
9
+ * Create a new account for an existing connection (company/provider pair)
10
+ */
11
+ create(body, options) {
12
+ return this._client.post('/sandbox/connections/accounts', { body, ...options });
13
+ }
14
+ update(body = {}, options) {
15
+ if ((0, core_1.isRequestOptions)(body)) {
16
+ return this.update({}, body);
17
+ }
18
+ return this._client.put('/sandbox/connections/accounts', { body, ...options });
19
+ }
20
+ }
21
+ exports.Accounts = Accounts;
22
+ (function (Accounts) {
23
+ })(Accounts = exports.Accounts || (exports.Accounts = {}));
24
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/resources/sandbox/connections/accounts.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,2DAA2D;AAC3D,mDAA4D;AAI5D,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAQD,MAAM,CACJ,OAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAvBD,4BAuBC;AA8CD,WAAiB,QAAQ;AAKzB,CAAC,EALgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKxB"}
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ import { isRequestOptions } from '@tryfinch/finch-api/core';
4
+ export class Accounts extends APIResource {
5
+ /**
6
+ * Create a new account for an existing connection (company/provider pair)
7
+ */
8
+ create(body, options) {
9
+ return this._client.post('/sandbox/connections/accounts', { body, ...options });
10
+ }
11
+ update(body = {}, options) {
12
+ if (isRequestOptions(body)) {
13
+ return this.update({}, body);
14
+ }
15
+ return this._client.put('/sandbox/connections/accounts', { body, ...options });
16
+ }
17
+ }
18
+ (function (Accounts) {
19
+ })(Accounts || (Accounts = {}));
20
+ //# sourceMappingURL=accounts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../../../src/resources/sandbox/connections/accounts.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,8BAA8B;OACnD,EAAE,gBAAgB,EAAE,MAAM,0BAA0B;AAI3D,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAQD,MAAM,CACJ,OAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AA8CD,WAAiB,QAAQ;AAKzB,CAAC,EALgB,QAAQ,KAAR,QAAQ,QAKxB"}
@@ -0,0 +1,39 @@
1
+ import * as Core from '@tryfinch/finch-api/core';
2
+ import { APIResource } from '@tryfinch/finch-api/resource';
3
+ import * as ConnectionsAPI from '@tryfinch/finch-api/resources/sandbox/connections/connections';
4
+ import * as AccountsAPI from '@tryfinch/finch-api/resources/sandbox/connections/accounts';
5
+ export declare class Connections extends APIResource {
6
+ accounts: AccountsAPI.Accounts;
7
+ /**
8
+ * Create a new connection (new company/provider pair) with a new account
9
+ */
10
+ create(body: ConnectionCreateParams, options?: Core.RequestOptions): Core.APIPromise<ConnectionCreateResponse>;
11
+ }
12
+ export interface ConnectionCreateResponse {
13
+ access_token: string;
14
+ account_id: string;
15
+ authentication_type: 'credentials' | 'api_token' | 'oauth' | 'assisted';
16
+ company_id: string;
17
+ products: Array<string>;
18
+ provider_id: string;
19
+ }
20
+ export interface ConnectionCreateParams {
21
+ provider_id: string;
22
+ authentication_type?: 'credentials' | 'api_token' | 'oauth' | 'assisted';
23
+ /**
24
+ * Optional: the size of the employer to be created with this connection. Defaults
25
+ * to 20
26
+ */
27
+ employer_size?: number;
28
+ products?: Array<string>;
29
+ }
30
+ export declare namespace Connections {
31
+ export import ConnectionCreateResponse = ConnectionsAPI.ConnectionCreateResponse;
32
+ export import ConnectionCreateParams = ConnectionsAPI.ConnectionCreateParams;
33
+ export import Accounts = AccountsAPI.Accounts;
34
+ export import AccountCreateResponse = AccountsAPI.AccountCreateResponse;
35
+ export import AccountUpdateResponse = AccountsAPI.AccountUpdateResponse;
36
+ export import AccountCreateParams = AccountsAPI.AccountCreateParams;
37
+ export import AccountUpdateParams = AccountsAPI.AccountUpdateParams;
38
+ }
39
+ //# sourceMappingURL=connections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../../src/resources/sandbox/connections/connections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,+DAA+D,CAAC;AAChG,OAAO,KAAK,WAAW,MAAM,4DAA4D,CAAC;AAE1F,qBAAa,WAAY,SAAQ,WAAW;IAC1C,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAG7C;AAED,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IAErB,UAAU,EAAE,MAAM,CAAC;IAEnB,mBAAmB,EAAE,aAAa,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;IAExE,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IAEpB,mBAAmB,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;IAEzE;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,wBAAwB,GAAG,cAAc,CAAC,wBAAwB,CAAC;IACjF,MAAM,QAAQ,sBAAsB,GAAG,cAAc,CAAC,sBAAsB,CAAC;IAC7E,MAAM,QAAQ,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC9C,MAAM,QAAQ,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;IACxE,MAAM,QAAQ,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;IACxE,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACpE,MAAM,QAAQ,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;CACrE"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.Connections = void 0;
28
+ const resource_1 = require("@tryfinch/finch-api/resource");
29
+ const AccountsAPI = __importStar(require("@tryfinch/finch-api/resources/sandbox/connections/accounts"));
30
+ class Connections extends resource_1.APIResource {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.accounts = new AccountsAPI.Accounts(this._client);
34
+ }
35
+ /**
36
+ * Create a new connection (new company/provider pair) with a new account
37
+ */
38
+ create(body, options) {
39
+ return this._client.post('/sandbox/connections', { body, ...options });
40
+ }
41
+ }
42
+ exports.Connections = Connections;
43
+ (function (Connections) {
44
+ Connections.Accounts = AccountsAPI.Accounts;
45
+ })(Connections = exports.Connections || (exports.Connections = {}));
46
+ //# sourceMappingURL=connections.js.map