@atomicfi/transact-capacitor 0.0.1

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.
@@ -0,0 +1,469 @@
1
+ import type { PluginListenerHandle } from '@capacitor/core';
2
+ /**
3
+ * Task operations available in Transact.
4
+ *
5
+ * **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`
6
+ *
7
+ * **PayLink** (`scope: 'pay-link'`): `switch`, `present`
8
+ */
9
+ export declare const Operation: {
10
+ /** UserLink — Direct Deposit Switching. */
11
+ readonly DEPOSIT: "deposit";
12
+ /** UserLink — Payroll Data Verification. */
13
+ readonly VERIFY: "verify";
14
+ /** UserLink — Tax Document Access. */
15
+ readonly TAX: "tax";
16
+ /** PayLink — Payment Method Switching. */
17
+ readonly SWITCH: "switch";
18
+ /** PayLink — Bill Presentment. */
19
+ readonly PRESENT: "present";
20
+ };
21
+ /** Product scope for a Transact session. */
22
+ export declare const Scope: {
23
+ readonly USER_LINK: "user-link";
24
+ readonly PAY_LINK: "pay-link";
25
+ };
26
+ /** Convenience helpers for creating {@link TransactEnvironment} values. */
27
+ export declare const Environment: {
28
+ production: TransactEnvironment;
29
+ sandbox: TransactEnvironment;
30
+ custom: (transactPath: string, apiPath: string) => TransactEnvironment;
31
+ };
32
+ /**
33
+ * Deeplink steps for navigating to a specific point in the Transact flow.
34
+ *
35
+ * Both steps are supported by UserLink and PayLink.
36
+ */
37
+ export declare const Step: {
38
+ /** Both scopes. Deeplinks to a specific company's login screen. */
39
+ readonly LOGIN_COMPANY: "login-company";
40
+ /** Both scopes. Deeplinks to the company search screen. */
41
+ readonly SEARCH_COMPANY: "search-company";
42
+ };
43
+ /** Native presentation style for the Transact modal (iOS only). */
44
+ export declare const PresentationStyle: {
45
+ readonly FORM_SHEET: "formSheet";
46
+ readonly FULL_SCREEN: "fullScreen";
47
+ };
48
+ /** Display language for the Transact UI. */
49
+ export declare const Language: {
50
+ readonly ENGLISH: "en";
51
+ readonly SPANISH: "es";
52
+ };
53
+ /**
54
+ * UserLink-only. Views that can be handed off to the host app via SDK events
55
+ * instead of being handled inside Transact.
56
+ */
57
+ export declare const Handoff: {
58
+ readonly EXIT_PROMPT: "exit-prompt";
59
+ readonly AUTHENTICATION_SUCCESS: "authentication-success";
60
+ readonly HIGH_LATENCY: "high-latency";
61
+ };
62
+ /**
63
+ * UserLink-only. Company tags for filtering search results.
64
+ *
65
+ * Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.
66
+ */
67
+ export declare const Tag: {
68
+ readonly GIG_ECONOMY: "gig-economy";
69
+ readonly PAYROLL_PROVIDER: "payroll-provider";
70
+ readonly UNEMPLOYMENT: "unemployment";
71
+ };
72
+ /** Status values for the `onTaskStatusUpdate` event. */
73
+ export declare const TaskStatus: {
74
+ readonly PROCESSING: "processing";
75
+ readonly FAILED: "failed";
76
+ readonly COMPLETED: "completed";
77
+ };
78
+ /**
79
+ * Failure reason codes returned in the `onTaskStatusUpdate` event
80
+ * when `status` is `'failed'`.
81
+ */
82
+ export declare const FailReason: {
83
+ /** UserLink. The account is locked. */
84
+ readonly ACCOUNT_LOCKOUT: "account-lockout";
85
+ /** UserLink. Account setup is incomplete. */
86
+ readonly ACCOUNT_SETUP_INCOMPLETE: "account-setup-incomplete";
87
+ /** UserLink. Account is unusable for this operation. */
88
+ readonly ACCOUNT_UNUSABLE: "account-unusable";
89
+ /** UserLink. Automation was blocked by the payroll provider. */
90
+ readonly AUTOMATION_BLOCKED: "automation-blocked";
91
+ /** UserLink. Invalid login credentials. */
92
+ readonly BAD_CREDENTIALS: "bad-credentials";
93
+ /** UserLink. Connection error with the payroll provider. */
94
+ readonly CONNECTION_ERROR: "connection-error";
95
+ /** UserLink. The requested distribution is not supported. */
96
+ readonly DISTRIBUTION_NOT_SUPPORTED: "distribution-not-supported";
97
+ /** UserLink. Employee is enrolled in a paycard program. */
98
+ readonly ENROLLED_IN_PAYCARD: "enrolled-in-paycard";
99
+ /** UserLink. Session or token has expired. */
100
+ readonly EXPIRED: "expired";
101
+ /** UserLink. No data found for the requested operation. */
102
+ readonly NO_DATA_FOUND: "no-data-found";
103
+ /** UserLink. The operation is not supported by this employer. */
104
+ readonly PRODUCT_NOT_SUPPORTED: "product-not-supported";
105
+ /** UserLink. The routing number is not supported. */
106
+ readonly ROUTING_NUMBER_NOT_SUPPORTED: "routing-number-not-supported";
107
+ /** UserLink. The session timed out. */
108
+ readonly SESSION_TIMEOUT: "session-timeout";
109
+ /** UserLink. The payroll system is unavailable. */
110
+ readonly SYSTEM_UNAVAILABLE: "system-unavailable";
111
+ /** UserLink. A pending transaction is blocking the operation. */
112
+ readonly TRANSACTION_PENDING: "transaction-pending";
113
+ /** UserLink. Employee work status is terminated. */
114
+ readonly WORK_STATUS_TERMINATED: "work-status-terminated";
115
+ /** PayLink. The subscription is inactive. */
116
+ readonly SUBSCRIPTION_INACTIVE: "subscription-inactive";
117
+ /** PayLink. Subscription is managed by a partner provider. */
118
+ readonly SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: "subscription-managed-by-partner-provider";
119
+ /** PayLink. The payment method is locked. */
120
+ readonly PAYMENT_METHOD_LOCKED: "payment-method-locked";
121
+ /** PayLink. The payment method type is not supported. */
122
+ readonly PAYMENT_METHOD_NOT_SUPPORTED: "payment-method-not-supported";
123
+ /** PayLink. Insufficient funds on the payment method. */
124
+ readonly PAYMENT_METHOD_INSUFFICIENT_FUNDS: "payment-method-insufficient-funds";
125
+ /** PayLink. Payment method limit has been reached. */
126
+ readonly PAYMENT_METHOD_LIMIT_REACHED: "payment-method-limit-reached";
127
+ /** PayLink. The payment method was declined. */
128
+ readonly PAYMENT_METHOD_DECLINED: "payment-method-declined";
129
+ /** PayLink. The payment token has expired. */
130
+ readonly PAYMENT_TOKEN_EXPIRED: "payment-token-expired";
131
+ /** PayLink. Payment switch was unsuccessful. */
132
+ readonly PAYMENT_SWITCH_UNSUCCESSFUL: "payment-switch-unsuccessful";
133
+ /** Shared. The user's device disconnected. */
134
+ readonly DEVICE_DISCONNECTED: "device-disconnected";
135
+ /** Shared. The user abandoned the flow. */
136
+ readonly USER_ABANDON: "user-abandon";
137
+ /** Shared. An unknown failure occurred. */
138
+ readonly UNKNOWN_FAILURE: "unknown-failure";
139
+ };
140
+ /**
141
+ * PayLink-only. Strategy for providing deferred payment method data
142
+ * when Transact triggers an `onDataRequest` event.
143
+ *
144
+ * - `SDK` — Respond through the native SDK's `resolveDataRequest` method.
145
+ * - `API` — Send data via the Update User API endpoint.
146
+ */
147
+ export declare const DeferredPaymentMethodStrategy: {
148
+ readonly SDK: "sdk";
149
+ readonly API: "api";
150
+ };
151
+ export type OperationType = (typeof Operation)[keyof typeof Operation];
152
+ export type ScopeType = (typeof Scope)[keyof typeof Scope];
153
+ export type LanguageType = (typeof Language)[keyof typeof Language];
154
+ export type HandoffType = (typeof Handoff)[keyof typeof Handoff];
155
+ export type TagType = (typeof Tag)[keyof typeof Tag];
156
+ export type StepType = (typeof Step)[keyof typeof Step];
157
+ export type TaskStatusType = (typeof TaskStatus)[keyof typeof TaskStatus];
158
+ export type FailReasonType = (typeof FailReason)[keyof typeof FailReason];
159
+ export type DeferredPaymentMethodStrategyType = (typeof DeferredPaymentMethodStrategy)[keyof typeof DeferredPaymentMethodStrategy];
160
+ /**
161
+ * Top-level configuration object for a Transact session.
162
+ *
163
+ * Properties are grouped by scope compatibility:
164
+ * - **Shared** — `publicToken`, `scope`, `tasks`, `theme`, `language`, `deeplink`, `metadata`
165
+ * - **UserLink-only** — `linkedAccount`, `search`, `handoff`, `experiments`, `customer`,
166
+ * `features`, `sessionContext`, `conversionToken`, `inSdk`
167
+ * - **PayLink-only** — `deferredPaymentMethodStrategy`
168
+ */
169
+ export interface TransactConfig {
170
+ /** Required. Public token returned from AccessToken creation. */
171
+ publicToken: string;
172
+ /** Required. Product scope — `'user-link'` or `'pay-link'`. */
173
+ scope: ScopeType;
174
+ /** Required. Task operations to execute. Operations differ per scope. */
175
+ tasks: TransactTask[];
176
+ /** Shared. Visual theme customization. */
177
+ theme?: TransactTheme;
178
+ /** Shared. Display language — `'en'` or `'es'`. Defaults to `'en'`. */
179
+ language?: LanguageType;
180
+ /** Shared. Deeplink into a specific step in the Transact flow. */
181
+ deeplink?: TransactDeeplink;
182
+ /** Shared. Custom key-value pairs returned in webhook events. */
183
+ metadata?: Record<string, string>;
184
+ /** UserLink-only. Linked account ID for immediate authentication. */
185
+ linkedAccount?: string;
186
+ /** UserLink-only. Search filtering by company tags. */
187
+ search?: TransactSearch;
188
+ /** UserLink-only. Views to hand off to the host app via SDK events. */
189
+ handoff?: HandoffType[];
190
+ /** UserLink-only. Override feature flags from the Atomic Console. */
191
+ experiments?: TransactExperiments;
192
+ /** UserLink-only. Override the customer name displayed in the UI. */
193
+ customer?: TransactCustomer;
194
+ /** UserLink-only. Feature toggles. */
195
+ features?: TransactFeatures;
196
+ /** UserLink-only. Optional session context string. */
197
+ sessionContext?: string;
198
+ /** UserLink-only. Token for conversion tracking. */
199
+ conversionToken?: string;
200
+ /** UserLink-only. When `false`, removes SDK-dependent UI elements. Defaults to `true`. */
201
+ inSdk?: boolean;
202
+ /**
203
+ * PayLink-only. Strategy for providing deferred payment method data.
204
+ * - `'sdk'` — Respond via the native `resolveDataRequest` method.
205
+ * - `'api'` — Send data via the Update User API endpoint.
206
+ */
207
+ deferredPaymentMethodStrategy?: DeferredPaymentMethodStrategyType;
208
+ }
209
+ /**
210
+ * A single task in the Transact workflow.
211
+ *
212
+ * - `operation` — Shared (required). Operations differ by scope.
213
+ * - `distribution`, `onComplete`, `onFail` — **UserLink-only.**
214
+ */
215
+ export interface TransactTask {
216
+ /** Required. The task operation — see {@link Operation} for scope-specific values. */
217
+ operation: OperationType;
218
+ /** UserLink-only. Deposit distribution settings. Only meaningful with `deposit` operation. */
219
+ distribution?: TransactDistribution;
220
+ /** UserLink-only. Action on task success: `'continue'` or `'finish'`. Defaults to `'continue'`. */
221
+ onComplete?: 'continue' | 'finish';
222
+ /** UserLink-only. Action on task failure: `'continue'` or `'finish'`. Defaults to `'continue'`. */
223
+ onFail?: 'continue' | 'finish';
224
+ }
225
+ /** Visual theme customization for the Transact UI. */
226
+ export interface TransactTheme {
227
+ /** Any valid CSS color value for buttons and accent elements. */
228
+ brandColor?: string;
229
+ /** Any valid CSS background-color value for the modal overlay. */
230
+ overlayColor?: string;
231
+ /** Enable dark mode. */
232
+ dark?: boolean;
233
+ /** Set to `'inline'` to render inside a container element instead of as a modal. */
234
+ display?: string;
235
+ /** Navigation bar element visibility. */
236
+ navigationOptions?: TransactNavigationOptions;
237
+ }
238
+ /** Controls for navigation bar element visibility. */
239
+ export interface TransactNavigationOptions {
240
+ /** Whether the back button is visible. Defaults to `true`. */
241
+ showBackButton?: boolean;
242
+ /** Whether a text label appears next to the back button. Defaults to `false`. */
243
+ showBackButtonText?: boolean;
244
+ /** Whether the close/exit button is displayed. Defaults to `true`. */
245
+ showCloseButton?: boolean;
246
+ }
247
+ /**
248
+ * UserLink-only. Deposit distribution settings for the `deposit` operation.
249
+ * Enforces deposit configuration and eliminates incompatible search results.
250
+ */
251
+ export interface TransactDistribution {
252
+ /** Distribution type: `'total'`, `'fixed'`, or `'percent'`. */
253
+ type: 'total' | 'fixed' | 'percent';
254
+ /** Dollar amount (for `'fixed'`) or percentage of paycheck (for `'percent'`). */
255
+ amount?: number;
256
+ /** If `true`, the user can override the default amount. Defaults to `false`. */
257
+ canUpdate?: boolean;
258
+ }
259
+ /**
260
+ * Deeplink configuration to navigate directly to a specific step.
261
+ *
262
+ * Both `login-company` and `search-company` are supported by UserLink and PayLink.
263
+ */
264
+ export interface TransactDeeplink {
265
+ /** The step to navigate to — `'login-company'` or `'search-company'`. */
266
+ step?: StepType;
267
+ /** Company ID to deeplink into. */
268
+ companyId?: string;
269
+ }
270
+ /** UserLink-only. Search filtering by company tags. */
271
+ export interface TransactSearch {
272
+ /** Filter companies by tags. */
273
+ tags?: TagType[];
274
+ /** Exclude companies matching these tags. */
275
+ excludedTags?: TagType[];
276
+ /** Identifier for a search experience defined in the Atomic Console. */
277
+ ruleId?: string;
278
+ }
279
+ /** UserLink-only. Override feature flags from the Atomic Console. */
280
+ export interface TransactExperiments {
281
+ /** Override the Fractional Deposit feature flag value. */
282
+ fractionalDeposits?: boolean;
283
+ }
284
+ /** UserLink-only. Override the customer name displayed in the Transact UI. */
285
+ export interface TransactCustomer {
286
+ /** Customer name shown in the UI. */
287
+ name?: string;
288
+ }
289
+ /** UserLink-only. Feature toggles for the Transact session. */
290
+ export interface TransactFeatures {
291
+ /** Enable or disable fractional (decimal) deposit amounts. */
292
+ fractionalDeposits?: boolean;
293
+ /** Enable or disable custom search functionality. */
294
+ customSearch?: boolean;
295
+ }
296
+ /** Result returned when a Transact flow finishes or is closed. */
297
+ export interface TransactResult {
298
+ /** Present when the flow completed successfully. */
299
+ finished?: Record<string, any>;
300
+ /** Present when the flow was closed by the user. */
301
+ closed?: Record<string, any>;
302
+ /** Error message if the flow failed to launch. */
303
+ error?: string;
304
+ }
305
+ /** Environment configuration for connecting to Atomic services. */
306
+ export interface TransactEnvironment {
307
+ /** Environment target: `'production'`, `'sandbox'`, or `'custom'`. */
308
+ environment: 'production' | 'sandbox' | 'custom';
309
+ /** Custom Transact URL. Required when `environment` is `'custom'`. */
310
+ transactPath?: string;
311
+ /** Custom API URL. Required when `environment` is `'custom'`. */
312
+ apiPath?: string;
313
+ }
314
+ /** Options for {@link TransactPluginPlugin.presentTransact}. */
315
+ export interface PresentTransactOptions {
316
+ /** The Transact configuration. */
317
+ config: TransactConfig;
318
+ /** Environment to connect to. Defaults to production. */
319
+ environment?: TransactEnvironment;
320
+ /** iOS only. Modal presentation style. */
321
+ presentationStyle?: 'formSheet' | 'fullScreen';
322
+ }
323
+ /** Options for {@link TransactPluginPlugin.presentAction}. */
324
+ export interface PresentActionOptions {
325
+ /** Required. The action ID to present. */
326
+ id: string;
327
+ /** Environment to connect to. Defaults to production. */
328
+ environment?: TransactEnvironment;
329
+ /** Visual theme customization. */
330
+ theme?: TransactTheme;
331
+ /** Custom key-value pairs returned in webhook events. */
332
+ metadata?: Record<string, string>;
333
+ /** iOS only. Modal presentation style. */
334
+ presentationStyle?: 'formSheet' | 'fullScreen';
335
+ }
336
+ /** Response payload for resolving an `onDataRequest` event. */
337
+ export interface DataRequestResponse {
338
+ /** Payment card data. */
339
+ card?: CardData;
340
+ /** Identity data. */
341
+ identity?: IdentityData;
342
+ }
343
+ /** Payment card information for resolving data requests. */
344
+ export interface CardData {
345
+ /** Full card number. */
346
+ number: string;
347
+ /** Card expiration date. */
348
+ expiry?: string;
349
+ /** Card verification value. */
350
+ cvv?: string;
351
+ }
352
+ /** Identity information for resolving data requests. */
353
+ export interface IdentityData {
354
+ firstName?: string;
355
+ lastName?: string;
356
+ postalCode?: string;
357
+ address?: string;
358
+ address2?: string;
359
+ city?: string;
360
+ state?: string;
361
+ phone?: string;
362
+ email?: string;
363
+ }
364
+ /** Payload for the `onInteraction` event. */
365
+ export interface InteractionEvent {
366
+ /** Name of the interaction. */
367
+ name: string;
368
+ /** Interaction value. */
369
+ value: any;
370
+ }
371
+ /** Payload for the `onDataRequest` event. */
372
+ export interface DataRequestEvent {
373
+ /** Requested data fields. */
374
+ fields?: string[];
375
+ taskId?: string;
376
+ userId?: string;
377
+ identifier?: string;
378
+ taskWorkflowId?: string;
379
+ externalId?: string;
380
+ [key: string]: any;
381
+ }
382
+ /** Payload for the `onAuthStatusUpdate` event. */
383
+ export interface AuthStatusUpdateEvent {
384
+ /** Authentication status. */
385
+ status: string;
386
+ /** Company associated with the authentication. */
387
+ company: TransactCompanyEvent;
388
+ }
389
+ /** Payload for the `onTaskStatusUpdate` event. */
390
+ export interface TaskStatusUpdateEvent {
391
+ taskId: string;
392
+ product: string;
393
+ /** Current task status. */
394
+ status: TaskStatusType;
395
+ /** Reason for failure. Only present when `status` is `'failed'`. */
396
+ failReason?: FailReasonType;
397
+ /** Company associated with the task. */
398
+ company: TransactCompanyEvent;
399
+ /** UserLink — Deposit data returned on successful deposit operations. */
400
+ depositData?: DepositDataEvent;
401
+ /** PayLink — Payment method data returned on successful switch operations. */
402
+ switchData?: SwitchDataEvent;
403
+ /** Present when a task is managed by another company. */
404
+ managedBy?: {
405
+ company: TransactCompanyEvent;
406
+ };
407
+ }
408
+ /** Company information included in event payloads. */
409
+ export interface TransactCompanyEvent {
410
+ _id: string;
411
+ name: string;
412
+ branding?: {
413
+ color: string;
414
+ logo: {
415
+ url: string;
416
+ backgroundColor?: string;
417
+ };
418
+ };
419
+ }
420
+ /** UserLink — Deposit data from a successful deposit operation. */
421
+ export interface DepositDataEvent {
422
+ accountType?: string;
423
+ distributionAmount?: number;
424
+ distributionType?: string;
425
+ lastFour?: string;
426
+ routingNumber?: string;
427
+ title?: string;
428
+ }
429
+ /** PayLink — Payment method data from a successful switch operation. */
430
+ export interface SwitchDataEvent {
431
+ paymentMethod: {
432
+ type: string;
433
+ brand?: string;
434
+ expiry?: string;
435
+ lastFour?: string;
436
+ accountType?: string;
437
+ routingNumber?: string;
438
+ accountNumberLastFour?: string;
439
+ };
440
+ }
441
+ /** Payload for the `onFinish` event. */
442
+ export interface FinishEvent {
443
+ taskId?: string;
444
+ [key: string]: any;
445
+ }
446
+ /** Payload for the `onClose` event. */
447
+ export interface CloseEvent {
448
+ reason?: string;
449
+ [key: string]: any;
450
+ }
451
+ /** The Transact Capacitor plugin interface. */
452
+ export interface TransactPluginPlugin {
453
+ /** Launch a Transact flow. Resolves when the flow finishes or is closed. */
454
+ presentTransact(options: PresentTransactOptions): Promise<TransactResult>;
455
+ /** Present a specific action by ID. Resolves when the action completes or is closed. */
456
+ presentAction(options: PresentActionOptions): Promise<TransactResult>;
457
+ /** Programmatically hide the Transact overlay. */
458
+ hideTransact(): Promise<void>;
459
+ /** Respond to an `onDataRequest` event with card or identity data. */
460
+ resolveDataRequest(options: DataRequestResponse): Promise<void>;
461
+ addListener(eventName: 'onInteraction', listenerFunc: (event: InteractionEvent) => void): Promise<PluginListenerHandle>;
462
+ addListener(eventName: 'onDataRequest', listenerFunc: (event: DataRequestEvent) => void): Promise<PluginListenerHandle>;
463
+ addListener(eventName: 'onAuthStatusUpdate', listenerFunc: (event: AuthStatusUpdateEvent) => void): Promise<PluginListenerHandle>;
464
+ addListener(eventName: 'onTaskStatusUpdate', listenerFunc: (event: TaskStatusUpdateEvent) => void): Promise<PluginListenerHandle>;
465
+ addListener(eventName: 'onFinish', listenerFunc: (event: FinishEvent) => void): Promise<PluginListenerHandle>;
466
+ addListener(eventName: 'onClose', listenerFunc: (event: CloseEvent) => void): Promise<PluginListenerHandle>;
467
+ addListener(eventName: 'onLaunch', listenerFunc: () => void): Promise<PluginListenerHandle>;
468
+ removeAllListeners(): Promise<void>;
469
+ }
@@ -0,0 +1,160 @@
1
+ // ──────────────────────────────────────────────────────────────────────────────
2
+ // Constants
3
+ // ──────────────────────────────────────────────────────────────────────────────
4
+ /**
5
+ * Task operations available in Transact.
6
+ *
7
+ * **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`
8
+ *
9
+ * **PayLink** (`scope: 'pay-link'`): `switch`, `present`
10
+ */
11
+ export const Operation = {
12
+ /** UserLink — Direct Deposit Switching. */
13
+ DEPOSIT: 'deposit',
14
+ /** UserLink — Payroll Data Verification. */
15
+ VERIFY: 'verify',
16
+ /** UserLink — Tax Document Access. */
17
+ TAX: 'tax',
18
+ /** PayLink — Payment Method Switching. */
19
+ SWITCH: 'switch',
20
+ /** PayLink — Bill Presentment. */
21
+ PRESENT: 'present',
22
+ };
23
+ /** Product scope for a Transact session. */
24
+ export const Scope = {
25
+ USER_LINK: 'user-link',
26
+ PAY_LINK: 'pay-link',
27
+ };
28
+ /** Convenience helpers for creating {@link TransactEnvironment} values. */
29
+ export const Environment = {
30
+ production: { environment: 'production' },
31
+ sandbox: { environment: 'sandbox' },
32
+ custom: (transactPath, apiPath) => ({
33
+ environment: 'custom',
34
+ transactPath,
35
+ apiPath,
36
+ }),
37
+ };
38
+ /**
39
+ * Deeplink steps for navigating to a specific point in the Transact flow.
40
+ *
41
+ * Both steps are supported by UserLink and PayLink.
42
+ */
43
+ export const Step = {
44
+ /** Both scopes. Deeplinks to a specific company's login screen. */
45
+ LOGIN_COMPANY: 'login-company',
46
+ /** Both scopes. Deeplinks to the company search screen. */
47
+ SEARCH_COMPANY: 'search-company',
48
+ };
49
+ /** Native presentation style for the Transact modal (iOS only). */
50
+ export const PresentationStyle = {
51
+ FORM_SHEET: 'formSheet',
52
+ FULL_SCREEN: 'fullScreen',
53
+ };
54
+ /** Display language for the Transact UI. */
55
+ export const Language = {
56
+ ENGLISH: 'en',
57
+ SPANISH: 'es',
58
+ };
59
+ /**
60
+ * UserLink-only. Views that can be handed off to the host app via SDK events
61
+ * instead of being handled inside Transact.
62
+ */
63
+ export const Handoff = {
64
+ EXIT_PROMPT: 'exit-prompt',
65
+ AUTHENTICATION_SUCCESS: 'authentication-success',
66
+ HIGH_LATENCY: 'high-latency',
67
+ };
68
+ /**
69
+ * UserLink-only. Company tags for filtering search results.
70
+ *
71
+ * Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.
72
+ */
73
+ export const Tag = {
74
+ GIG_ECONOMY: 'gig-economy',
75
+ PAYROLL_PROVIDER: 'payroll-provider',
76
+ UNEMPLOYMENT: 'unemployment',
77
+ };
78
+ /** Status values for the `onTaskStatusUpdate` event. */
79
+ export const TaskStatus = {
80
+ PROCESSING: 'processing',
81
+ FAILED: 'failed',
82
+ COMPLETED: 'completed',
83
+ };
84
+ /**
85
+ * Failure reason codes returned in the `onTaskStatusUpdate` event
86
+ * when `status` is `'failed'`.
87
+ */
88
+ export const FailReason = {
89
+ // ── UserLink ────────────────────────────────────────────────────────────────
90
+ /** UserLink. The account is locked. */
91
+ ACCOUNT_LOCKOUT: 'account-lockout',
92
+ /** UserLink. Account setup is incomplete. */
93
+ ACCOUNT_SETUP_INCOMPLETE: 'account-setup-incomplete',
94
+ /** UserLink. Account is unusable for this operation. */
95
+ ACCOUNT_UNUSABLE: 'account-unusable',
96
+ /** UserLink. Automation was blocked by the payroll provider. */
97
+ AUTOMATION_BLOCKED: 'automation-blocked',
98
+ /** UserLink. Invalid login credentials. */
99
+ BAD_CREDENTIALS: 'bad-credentials',
100
+ /** UserLink. Connection error with the payroll provider. */
101
+ CONNECTION_ERROR: 'connection-error',
102
+ /** UserLink. The requested distribution is not supported. */
103
+ DISTRIBUTION_NOT_SUPPORTED: 'distribution-not-supported',
104
+ /** UserLink. Employee is enrolled in a paycard program. */
105
+ ENROLLED_IN_PAYCARD: 'enrolled-in-paycard',
106
+ /** UserLink. Session or token has expired. */
107
+ EXPIRED: 'expired',
108
+ /** UserLink. No data found for the requested operation. */
109
+ NO_DATA_FOUND: 'no-data-found',
110
+ /** UserLink. The operation is not supported by this employer. */
111
+ PRODUCT_NOT_SUPPORTED: 'product-not-supported',
112
+ /** UserLink. The routing number is not supported. */
113
+ ROUTING_NUMBER_NOT_SUPPORTED: 'routing-number-not-supported',
114
+ /** UserLink. The session timed out. */
115
+ SESSION_TIMEOUT: 'session-timeout',
116
+ /** UserLink. The payroll system is unavailable. */
117
+ SYSTEM_UNAVAILABLE: 'system-unavailable',
118
+ /** UserLink. A pending transaction is blocking the operation. */
119
+ TRANSACTION_PENDING: 'transaction-pending',
120
+ /** UserLink. Employee work status is terminated. */
121
+ WORK_STATUS_TERMINATED: 'work-status-terminated',
122
+ // ── PayLink ─────────────────────────────────────────────────────────────────
123
+ /** PayLink. The subscription is inactive. */
124
+ SUBSCRIPTION_INACTIVE: 'subscription-inactive',
125
+ /** PayLink. Subscription is managed by a partner provider. */
126
+ SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: 'subscription-managed-by-partner-provider',
127
+ /** PayLink. The payment method is locked. */
128
+ PAYMENT_METHOD_LOCKED: 'payment-method-locked',
129
+ /** PayLink. The payment method type is not supported. */
130
+ PAYMENT_METHOD_NOT_SUPPORTED: 'payment-method-not-supported',
131
+ /** PayLink. Insufficient funds on the payment method. */
132
+ PAYMENT_METHOD_INSUFFICIENT_FUNDS: 'payment-method-insufficient-funds',
133
+ /** PayLink. Payment method limit has been reached. */
134
+ PAYMENT_METHOD_LIMIT_REACHED: 'payment-method-limit-reached',
135
+ /** PayLink. The payment method was declined. */
136
+ PAYMENT_METHOD_DECLINED: 'payment-method-declined',
137
+ /** PayLink. The payment token has expired. */
138
+ PAYMENT_TOKEN_EXPIRED: 'payment-token-expired',
139
+ /** PayLink. Payment switch was unsuccessful. */
140
+ PAYMENT_SWITCH_UNSUCCESSFUL: 'payment-switch-unsuccessful',
141
+ // ── Shared ──────────────────────────────────────────────────────────────────
142
+ /** Shared. The user's device disconnected. */
143
+ DEVICE_DISCONNECTED: 'device-disconnected',
144
+ /** Shared. The user abandoned the flow. */
145
+ USER_ABANDON: 'user-abandon',
146
+ /** Shared. An unknown failure occurred. */
147
+ UNKNOWN_FAILURE: 'unknown-failure',
148
+ };
149
+ /**
150
+ * PayLink-only. Strategy for providing deferred payment method data
151
+ * when Transact triggers an `onDataRequest` event.
152
+ *
153
+ * - `SDK` — Respond through the native SDK's `resolveDataRequest` method.
154
+ * - `API` — Send data via the Update User API endpoint.
155
+ */
156
+ export const DeferredPaymentMethodStrategy = {
157
+ SDK: 'sdk',
158
+ API: 'api',
159
+ };
160
+ //# sourceMappingURL=definitions.js.map