increase 0.516.0 → 0.517.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 (66) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/env.js +2 -2
  11. package/internal/utils/env.js.map +1 -1
  12. package/internal/utils/env.mjs +2 -2
  13. package/internal/utils/env.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/entity-onboarding-sessions.d.mts +159 -0
  16. package/resources/entity-onboarding-sessions.d.mts.map +1 -0
  17. package/resources/entity-onboarding-sessions.d.ts +159 -0
  18. package/resources/entity-onboarding-sessions.d.ts.map +1 -0
  19. package/resources/entity-onboarding-sessions.js +71 -0
  20. package/resources/entity-onboarding-sessions.js.map +1 -0
  21. package/resources/entity-onboarding-sessions.mjs +67 -0
  22. package/resources/entity-onboarding-sessions.mjs.map +1 -0
  23. package/resources/index.d.mts +1 -0
  24. package/resources/index.d.mts.map +1 -1
  25. package/resources/index.d.ts +1 -0
  26. package/resources/index.d.ts.map +1 -1
  27. package/resources/index.js +4 -2
  28. package/resources/index.js.map +1 -1
  29. package/resources/index.mjs +1 -0
  30. package/resources/index.mjs.map +1 -1
  31. package/resources/simulations/entity-onboarding-sessions.d.mts +22 -0
  32. package/resources/simulations/entity-onboarding-sessions.d.mts.map +1 -0
  33. package/resources/simulations/entity-onboarding-sessions.d.ts +22 -0
  34. package/resources/simulations/entity-onboarding-sessions.d.ts.map +1 -0
  35. package/resources/simulations/entity-onboarding-sessions.js +27 -0
  36. package/resources/simulations/entity-onboarding-sessions.js.map +1 -0
  37. package/resources/simulations/entity-onboarding-sessions.mjs +23 -0
  38. package/resources/simulations/entity-onboarding-sessions.mjs.map +1 -0
  39. package/resources/simulations/index.d.mts +1 -0
  40. package/resources/simulations/index.d.mts.map +1 -1
  41. package/resources/simulations/index.d.ts +1 -0
  42. package/resources/simulations/index.d.ts.map +1 -1
  43. package/resources/simulations/index.js +3 -1
  44. package/resources/simulations/index.js.map +1 -1
  45. package/resources/simulations/index.mjs +1 -0
  46. package/resources/simulations/index.mjs.map +1 -1
  47. package/resources/simulations/simulations.d.mts +4 -0
  48. package/resources/simulations/simulations.d.mts.map +1 -1
  49. package/resources/simulations/simulations.d.ts +4 -0
  50. package/resources/simulations/simulations.d.ts.map +1 -1
  51. package/resources/simulations/simulations.js +4 -0
  52. package/resources/simulations/simulations.js.map +1 -1
  53. package/resources/simulations/simulations.mjs +4 -0
  54. package/resources/simulations/simulations.mjs.map +1 -1
  55. package/src/client.ts +17 -0
  56. package/src/internal/utils/env.ts +2 -2
  57. package/src/resources/entity-onboarding-sessions.ts +206 -0
  58. package/src/resources/index.ts +7 -0
  59. package/src/resources/simulations/entity-onboarding-sessions.ts +33 -0
  60. package/src/resources/simulations/index.ts +1 -0
  61. package/src/resources/simulations/simulations.ts +7 -0
  62. package/src/version.ts +1 -1
  63. package/version.d.mts +1 -1
  64. package/version.d.ts +1 -1
  65. package/version.js +1 -1
  66. package/version.mjs +1 -1
@@ -0,0 +1,206 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { Page, type PageParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class EntityOnboardingSessions extends APIResource {
10
+ /**
11
+ * Create an Entity Onboarding Session
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const entityOnboardingSession =
16
+ * await client.entityOnboardingSessions.create({
17
+ * program_id: 'program_i2v2os4mwza1oetokh9i',
18
+ * redirect_url: 'https://example.com/onboarding/session',
19
+ * });
20
+ * ```
21
+ */
22
+ create(
23
+ body: EntityOnboardingSessionCreateParams,
24
+ options?: RequestOptions,
25
+ ): APIPromise<EntityOnboardingSession> {
26
+ return this._client.post('/entity_onboarding_sessions', { body, ...options });
27
+ }
28
+
29
+ /**
30
+ * Retrieve an Entity Onboarding Session
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const entityOnboardingSession =
35
+ * await client.entityOnboardingSessions.retrieve(
36
+ * 'entity_onboarding_session_wid2ug11fsmvh3k9hymd',
37
+ * );
38
+ * ```
39
+ */
40
+ retrieve(entityOnboardingSessionID: string, options?: RequestOptions): APIPromise<EntityOnboardingSession> {
41
+ return this._client.get(path`/entity_onboarding_sessions/${entityOnboardingSessionID}`, options);
42
+ }
43
+
44
+ /**
45
+ * List Entity Onboarding Session
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * // Automatically fetches more pages as needed.
50
+ * for await (const entityOnboardingSession of client.entityOnboardingSessions.list()) {
51
+ * // ...
52
+ * }
53
+ * ```
54
+ */
55
+ list(
56
+ query: EntityOnboardingSessionListParams | null | undefined = {},
57
+ options?: RequestOptions,
58
+ ): PagePromise<EntityOnboardingSessionsPage, EntityOnboardingSession> {
59
+ return this._client.getAPIList('/entity_onboarding_sessions', Page<EntityOnboardingSession>, {
60
+ query,
61
+ ...options,
62
+ });
63
+ }
64
+
65
+ /**
66
+ * Expire an Entity Onboarding Session
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const entityOnboardingSession =
71
+ * await client.entityOnboardingSessions.expire(
72
+ * 'entity_onboarding_session_wid2ug11fsmvh3k9hymd',
73
+ * );
74
+ * ```
75
+ */
76
+ expire(entityOnboardingSessionID: string, options?: RequestOptions): APIPromise<EntityOnboardingSession> {
77
+ return this._client.post(path`/entity_onboarding_sessions/${entityOnboardingSessionID}/expire`, options);
78
+ }
79
+ }
80
+
81
+ export type EntityOnboardingSessionsPage = Page<EntityOnboardingSession>;
82
+
83
+ /**
84
+ * Entity Onboarding Sessions let your customers onboard themselves by completing
85
+ * Increase-hosted forms. Create a session and redirect your customer to the
86
+ * returned URL. When they're done, they'll be redirected back to your site. This
87
+ * API is used for [hosted onboarding](/documentation/hosted-onboarding).
88
+ */
89
+ export interface EntityOnboardingSession {
90
+ /**
91
+ * The Entity Onboarding Session's identifier.
92
+ */
93
+ id: string;
94
+
95
+ /**
96
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
97
+ * the Entity Onboarding Session was created.
98
+ */
99
+ created_at: string;
100
+
101
+ /**
102
+ * The identifier of the Entity associated with this session, if one has been
103
+ * created or was provided when creating the session.
104
+ */
105
+ entity_id: string | null;
106
+
107
+ /**
108
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
109
+ * the Entity Onboarding Session will expire.
110
+ */
111
+ expires_at: string;
112
+
113
+ /**
114
+ * The idempotency key you chose for this object. This value is unique across
115
+ * Increase and is used to ensure that a request is only processed once. Learn more
116
+ * about [idempotency](https://increase.com/documentation/idempotency-keys).
117
+ */
118
+ idempotency_key: string | null;
119
+
120
+ /**
121
+ * The identifier of the Program the Entity will be onboarded to.
122
+ */
123
+ program_id: string;
124
+
125
+ /**
126
+ * The URL to redirect to after the onboarding session is complete. Increase will
127
+ * include the query parameters `entity_onboarding_session_id` and `entity_id` when
128
+ * redirecting.
129
+ */
130
+ redirect_url: string;
131
+
132
+ /**
133
+ * The URL containing the onboarding form. You should share this link with your
134
+ * customer. Only present when the session is active.
135
+ */
136
+ session_url: string | null;
137
+
138
+ /**
139
+ * The status of the onboarding session.
140
+ *
141
+ * - `active` - The Entity Onboarding Session is active.
142
+ * - `expired` - The Entity Onboarding Session has expired.
143
+ */
144
+ status: 'active' | 'expired';
145
+
146
+ /**
147
+ * A constant representing the object's type. For this resource it will always be
148
+ * `entity_onboarding_session`.
149
+ */
150
+ type: 'entity_onboarding_session';
151
+ }
152
+
153
+ export interface EntityOnboardingSessionCreateParams {
154
+ /**
155
+ * The identifier of the Program the Entity will be onboarded to.
156
+ */
157
+ program_id: string;
158
+
159
+ /**
160
+ * The URL to redirect the customer to after they complete the onboarding form. The
161
+ * redirect will include `entity_onboarding_session_id` and `entity_id` query
162
+ * parameters.
163
+ */
164
+ redirect_url: string;
165
+
166
+ /**
167
+ * The identifier of an existing Entity to associate with the onboarding session.
168
+ * If provided, the onboarding form will display any outstanding tasks required to
169
+ * complete the Entity's onboarding.
170
+ */
171
+ entity_id?: string;
172
+
173
+ [k: string]: unknown;
174
+ }
175
+
176
+ export interface EntityOnboardingSessionListParams extends PageParams {
177
+ /**
178
+ * Filter records to the one with the specified `idempotency_key` you chose for
179
+ * that object. This value is unique across Increase and is used to ensure that a
180
+ * request is only processed once. Learn more about
181
+ * [idempotency](https://increase.com/documentation/idempotency-keys).
182
+ */
183
+ idempotency_key?: string;
184
+
185
+ status?: EntityOnboardingSessionListParams.Status;
186
+ }
187
+
188
+ export namespace EntityOnboardingSessionListParams {
189
+ export interface Status {
190
+ /**
191
+ * Filter Entity Onboarding Session for those with the specified status or
192
+ * statuses. For GET requests, this should be encoded as a comma-delimited string,
193
+ * such as `?in=one,two,three`.
194
+ */
195
+ in?: Array<'active' | 'expired'>;
196
+ }
197
+ }
198
+
199
+ export declare namespace EntityOnboardingSessions {
200
+ export {
201
+ type EntityOnboardingSession as EntityOnboardingSession,
202
+ type EntityOnboardingSessionsPage as EntityOnboardingSessionsPage,
203
+ type EntityOnboardingSessionCreateParams as EntityOnboardingSessionCreateParams,
204
+ type EntityOnboardingSessionListParams as EntityOnboardingSessionListParams,
205
+ };
206
+ }
@@ -173,6 +173,13 @@ export {
173
173
  type EntityListParams,
174
174
  type EntitiesPage,
175
175
  } from './entities';
176
+ export {
177
+ EntityOnboardingSessions,
178
+ type EntityOnboardingSession,
179
+ type EntityOnboardingSessionCreateParams,
180
+ type EntityOnboardingSessionListParams,
181
+ type EntityOnboardingSessionsPage,
182
+ } from './entity-onboarding-sessions';
176
183
  export {
177
184
  EventSubscriptions,
178
185
  type EventSubscription,
@@ -0,0 +1,33 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as EntityOnboardingSessionsAPI from '../entity-onboarding-sessions';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class EntityOnboardingSessions extends APIResource {
10
+ /**
11
+ * Simulates the submission of an
12
+ * [Entity Onboarding Session](#entity-onboarding-sessions). This session must have
13
+ * a `status` of `active`. After submission, the session will transition to
14
+ * `expired` and a new Entity will be created.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const entityOnboardingSession =
19
+ * await client.simulations.entityOnboardingSessions.submit(
20
+ * 'entity_onboarding_session_wid2ug11fsmvh3k9hymd',
21
+ * );
22
+ * ```
23
+ */
24
+ submit(
25
+ entityOnboardingSessionID: string,
26
+ options?: RequestOptions,
27
+ ): APIPromise<EntityOnboardingSessionsAPI.EntityOnboardingSession> {
28
+ return this._client.post(
29
+ path`/simulations/entity_onboarding_sessions/${entityOnboardingSessionID}/submit`,
30
+ options,
31
+ );
32
+ }
33
+ }
@@ -41,6 +41,7 @@ export {
41
41
  type DigitalWalletTokenRequestCreateResponse,
42
42
  type DigitalWalletTokenRequestCreateParams,
43
43
  } from './digital-wallet-token-requests';
44
+ export { EntityOnboardingSessions } from './entity-onboarding-sessions';
44
45
  export { Exports, type ExportCreateParams } from './exports';
45
46
  export { InboundACHTransfers, type InboundACHTransferCreateParams } from './inbound-ach-transfers';
46
47
  export {
@@ -55,6 +55,8 @@ import {
55
55
  DigitalWalletTokenRequestCreateResponse,
56
56
  DigitalWalletTokenRequests,
57
57
  } from './digital-wallet-token-requests';
58
+ import * as EntityOnboardingSessionsAPI from './entity-onboarding-sessions';
59
+ import { EntityOnboardingSessions } from './entity-onboarding-sessions';
58
60
  import * as ExportsAPI from './exports';
59
61
  import { ExportCreateParams, Exports } from './exports';
60
62
  import * as InboundACHTransfersAPI from './inbound-ach-transfers';
@@ -150,6 +152,8 @@ export class Simulations extends APIResource {
150
152
  inboundMailItems: InboundMailItemsAPI.InboundMailItems = new InboundMailItemsAPI.InboundMailItems(
151
153
  this._client,
152
154
  );
155
+ entityOnboardingSessions: EntityOnboardingSessionsAPI.EntityOnboardingSessions =
156
+ new EntityOnboardingSessionsAPI.EntityOnboardingSessions(this._client);
153
157
  programs: ProgramsAPI.Programs = new ProgramsAPI.Programs(this._client);
154
158
  accountStatements: AccountStatementsAPI.AccountStatements = new AccountStatementsAPI.AccountStatements(
155
159
  this._client,
@@ -186,6 +190,7 @@ Simulations.InboundRealTimePaymentsTransfers = InboundRealTimePaymentsTransfers;
186
190
  Simulations.InboundFednowTransfers = InboundFednowTransfers;
187
191
  Simulations.CheckDeposits = CheckDeposits;
188
192
  Simulations.InboundMailItems = InboundMailItems;
193
+ Simulations.EntityOnboardingSessions = EntityOnboardingSessions;
189
194
  Simulations.Programs = Programs;
190
195
  Simulations.AccountStatements = AccountStatements;
191
196
  Simulations.Exports = Exports;
@@ -313,6 +318,8 @@ export declare namespace Simulations {
313
318
  type InboundMailItemCreateParams as InboundMailItemCreateParams,
314
319
  };
315
320
 
321
+ export { EntityOnboardingSessions as EntityOnboardingSessions };
322
+
316
323
  export { Programs as Programs, type ProgramCreateParams as ProgramCreateParams };
317
324
 
318
325
  export {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.516.0'; // x-release-please-version
1
+ export const VERSION = '0.517.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.516.0";
1
+ export declare const VERSION = "0.517.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.516.0";
1
+ export declare const VERSION = "0.517.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 = '0.516.0'; // x-release-please-version
4
+ exports.VERSION = '0.517.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.516.0'; // x-release-please-version
1
+ export const VERSION = '0.517.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map