@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.
- package/AtomicfiTransactCapacitor.podspec +18 -0
- package/Package.swift +30 -0
- package/README.md +602 -0
- package/android/build.gradle +72 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/atomicfi/transact/TransactPluginPlugin.kt +274 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +1384 -0
- package/dist/esm/definitions.d.ts +469 -0
- package/dist/esm/definitions.js +160 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +8 -0
- package/dist/esm/web.js +16 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +201 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +204 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/TransactPluginPlugin/TransactPluginPlugin.swift +380 -0
- package/ios/Tests/TransactPluginPluginTests/TransactPluginTests.swift +14 -0
- package/package.json +80 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,YAAY;AACZ,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,2CAA2C;IAC3C,OAAO,EAAE,SAAS;IAClB,4CAA4C;IAC5C,MAAM,EAAE,QAAQ;IAChB,sCAAsC;IACtC,GAAG,EAAE,KAAK;IACV,0CAA0C;IAC1C,MAAM,EAAE,QAAQ;IAChB,kCAAkC;IAClC,OAAO,EAAE,SAAS;CACV,CAAC;AAEX,4CAA4C;AAC5C,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,SAAS,EAAE,WAAW;IACtB,QAAQ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AC,MAAM,6BAA6B,GAAG;IAC3C,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAC","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\n// ──────────────────────────────────────────────────────────────────────────────\n// Constants\n// ──────────────────────────────────────────────────────────────────────────────\n\n/**\n * Task operations available in Transact.\n *\n * **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`\n *\n * **PayLink** (`scope: 'pay-link'`): `switch`, `present`\n */\nexport const Operation = {\n /** UserLink — Direct Deposit Switching. */\n DEPOSIT: 'deposit',\n /** UserLink — Payroll Data Verification. */\n VERIFY: 'verify',\n /** UserLink — Tax Document Access. */\n TAX: 'tax',\n /** PayLink — Payment Method Switching. */\n SWITCH: 'switch',\n /** PayLink — Bill Presentment. */\n PRESENT: 'present',\n} as const;\n\n/** Product scope for a Transact session. */\nexport const Scope = {\n USER_LINK: 'user-link',\n PAY_LINK: 'pay-link',\n} as const;\n\n/** Convenience helpers for creating {@link TransactEnvironment} values. */\nexport const Environment = {\n production: { environment: 'production' } as TransactEnvironment,\n sandbox: { environment: 'sandbox' } as TransactEnvironment,\n custom: (transactPath: string, apiPath: string): TransactEnvironment => ({\n environment: 'custom',\n transactPath,\n apiPath,\n }),\n};\n\n/**\n * Deeplink steps for navigating to a specific point in the Transact flow.\n *\n * Both steps are supported by UserLink and PayLink.\n */\nexport const Step = {\n /** Both scopes. Deeplinks to a specific company's login screen. */\n LOGIN_COMPANY: 'login-company',\n /** Both scopes. Deeplinks to the company search screen. */\n SEARCH_COMPANY: 'search-company',\n} as const;\n\n/** Native presentation style for the Transact modal (iOS only). */\nexport const PresentationStyle = {\n FORM_SHEET: 'formSheet',\n FULL_SCREEN: 'fullScreen',\n} as const;\n\n/** Display language for the Transact UI. */\nexport const Language = {\n ENGLISH: 'en',\n SPANISH: 'es',\n} as const;\n\n/**\n * UserLink-only. Views that can be handed off to the host app via SDK events\n * instead of being handled inside Transact.\n */\nexport const Handoff = {\n EXIT_PROMPT: 'exit-prompt',\n AUTHENTICATION_SUCCESS: 'authentication-success',\n HIGH_LATENCY: 'high-latency',\n} as const;\n\n/**\n * UserLink-only. Company tags for filtering search results.\n *\n * Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.\n */\nexport const Tag = {\n GIG_ECONOMY: 'gig-economy',\n PAYROLL_PROVIDER: 'payroll-provider',\n UNEMPLOYMENT: 'unemployment',\n} as const;\n\n/** Status values for the `onTaskStatusUpdate` event. */\nexport const TaskStatus = {\n PROCESSING: 'processing',\n FAILED: 'failed',\n COMPLETED: 'completed',\n} as const;\n\n/**\n * Failure reason codes returned in the `onTaskStatusUpdate` event\n * when `status` is `'failed'`.\n */\nexport const FailReason = {\n // ── UserLink ────────────────────────────────────────────────────────────────\n /** UserLink. The account is locked. */\n ACCOUNT_LOCKOUT: 'account-lockout',\n /** UserLink. Account setup is incomplete. */\n ACCOUNT_SETUP_INCOMPLETE: 'account-setup-incomplete',\n /** UserLink. Account is unusable for this operation. */\n ACCOUNT_UNUSABLE: 'account-unusable',\n /** UserLink. Automation was blocked by the payroll provider. */\n AUTOMATION_BLOCKED: 'automation-blocked',\n /** UserLink. Invalid login credentials. */\n BAD_CREDENTIALS: 'bad-credentials',\n /** UserLink. Connection error with the payroll provider. */\n CONNECTION_ERROR: 'connection-error',\n /** UserLink. The requested distribution is not supported. */\n DISTRIBUTION_NOT_SUPPORTED: 'distribution-not-supported',\n /** UserLink. Employee is enrolled in a paycard program. */\n ENROLLED_IN_PAYCARD: 'enrolled-in-paycard',\n /** UserLink. Session or token has expired. */\n EXPIRED: 'expired',\n /** UserLink. No data found for the requested operation. */\n NO_DATA_FOUND: 'no-data-found',\n /** UserLink. The operation is not supported by this employer. */\n PRODUCT_NOT_SUPPORTED: 'product-not-supported',\n /** UserLink. The routing number is not supported. */\n ROUTING_NUMBER_NOT_SUPPORTED: 'routing-number-not-supported',\n /** UserLink. The session timed out. */\n SESSION_TIMEOUT: 'session-timeout',\n /** UserLink. The payroll system is unavailable. */\n SYSTEM_UNAVAILABLE: 'system-unavailable',\n /** UserLink. A pending transaction is blocking the operation. */\n TRANSACTION_PENDING: 'transaction-pending',\n /** UserLink. Employee work status is terminated. */\n WORK_STATUS_TERMINATED: 'work-status-terminated',\n\n // ── PayLink ─────────────────────────────────────────────────────────────────\n /** PayLink. The subscription is inactive. */\n SUBSCRIPTION_INACTIVE: 'subscription-inactive',\n /** PayLink. Subscription is managed by a partner provider. */\n SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: 'subscription-managed-by-partner-provider',\n /** PayLink. The payment method is locked. */\n PAYMENT_METHOD_LOCKED: 'payment-method-locked',\n /** PayLink. The payment method type is not supported. */\n PAYMENT_METHOD_NOT_SUPPORTED: 'payment-method-not-supported',\n /** PayLink. Insufficient funds on the payment method. */\n PAYMENT_METHOD_INSUFFICIENT_FUNDS: 'payment-method-insufficient-funds',\n /** PayLink. Payment method limit has been reached. */\n PAYMENT_METHOD_LIMIT_REACHED: 'payment-method-limit-reached',\n /** PayLink. The payment method was declined. */\n PAYMENT_METHOD_DECLINED: 'payment-method-declined',\n /** PayLink. The payment token has expired. */\n PAYMENT_TOKEN_EXPIRED: 'payment-token-expired',\n /** PayLink. Payment switch was unsuccessful. */\n PAYMENT_SWITCH_UNSUCCESSFUL: 'payment-switch-unsuccessful',\n\n // ── Shared ──────────────────────────────────────────────────────────────────\n /** Shared. The user's device disconnected. */\n DEVICE_DISCONNECTED: 'device-disconnected',\n /** Shared. The user abandoned the flow. */\n USER_ABANDON: 'user-abandon',\n /** Shared. An unknown failure occurred. */\n UNKNOWN_FAILURE: 'unknown-failure',\n} as const;\n\n/**\n * PayLink-only. Strategy for providing deferred payment method data\n * when Transact triggers an `onDataRequest` event.\n *\n * - `SDK` — Respond through the native SDK's `resolveDataRequest` method.\n * - `API` — Send data via the Update User API endpoint.\n */\nexport const DeferredPaymentMethodStrategy = {\n SDK: 'sdk',\n API: 'api',\n} as const;\n\n// ──────────────────────────────────────────────────────────────────────────────\n// Derived types\n// ──────────────────────────────────────────────────────────────────────────────\n\nexport type OperationType = (typeof Operation)[keyof typeof Operation];\nexport type ScopeType = (typeof Scope)[keyof typeof Scope];\nexport type LanguageType = (typeof Language)[keyof typeof Language];\nexport type HandoffType = (typeof Handoff)[keyof typeof Handoff];\nexport type TagType = (typeof Tag)[keyof typeof Tag];\nexport type StepType = (typeof Step)[keyof typeof Step];\nexport type TaskStatusType = (typeof TaskStatus)[keyof typeof TaskStatus];\nexport type FailReasonType = (typeof FailReason)[keyof typeof FailReason];\nexport type DeferredPaymentMethodStrategyType =\n (typeof DeferredPaymentMethodStrategy)[keyof typeof DeferredPaymentMethodStrategy];\n\n// ──────────────────────────────────────────────────────────────────────────────\n// Configuration types\n// ──────────────────────────────────────────────────────────────────────────────\n\n/**\n * Top-level configuration object for a Transact session.\n *\n * Properties are grouped by scope compatibility:\n * - **Shared** — `publicToken`, `scope`, `tasks`, `theme`, `language`, `deeplink`, `metadata`\n * - **UserLink-only** — `linkedAccount`, `search`, `handoff`, `experiments`, `customer`,\n * `features`, `sessionContext`, `conversionToken`, `inSdk`\n * - **PayLink-only** — `deferredPaymentMethodStrategy`\n */\nexport interface TransactConfig {\n /** Required. Public token returned from AccessToken creation. */\n publicToken: string;\n /** Required. Product scope — `'user-link'` or `'pay-link'`. */\n scope: ScopeType;\n /** Required. Task operations to execute. Operations differ per scope. */\n tasks: TransactTask[];\n /** Shared. Visual theme customization. */\n theme?: TransactTheme;\n /** Shared. Display language — `'en'` or `'es'`. Defaults to `'en'`. */\n language?: LanguageType;\n /** Shared. Deeplink into a specific step in the Transact flow. */\n deeplink?: TransactDeeplink;\n /** Shared. Custom key-value pairs returned in webhook events. */\n metadata?: Record<string, string>;\n /** UserLink-only. Linked account ID for immediate authentication. */\n linkedAccount?: string;\n /** UserLink-only. Search filtering by company tags. */\n search?: TransactSearch;\n /** UserLink-only. Views to hand off to the host app via SDK events. */\n handoff?: HandoffType[];\n /** UserLink-only. Override feature flags from the Atomic Console. */\n experiments?: TransactExperiments;\n /** UserLink-only. Override the customer name displayed in the UI. */\n customer?: TransactCustomer;\n /** UserLink-only. Feature toggles. */\n features?: TransactFeatures;\n /** UserLink-only. Optional session context string. */\n sessionContext?: string;\n /** UserLink-only. Token for conversion tracking. */\n conversionToken?: string;\n /** UserLink-only. When `false`, removes SDK-dependent UI elements. Defaults to `true`. */\n inSdk?: boolean;\n /**\n * PayLink-only. Strategy for providing deferred payment method data.\n * - `'sdk'` — Respond via the native `resolveDataRequest` method.\n * - `'api'` — Send data via the Update User API endpoint.\n */\n deferredPaymentMethodStrategy?: DeferredPaymentMethodStrategyType;\n}\n\n/**\n * A single task in the Transact workflow.\n *\n * - `operation` — Shared (required). Operations differ by scope.\n * - `distribution`, `onComplete`, `onFail` — **UserLink-only.**\n */\nexport interface TransactTask {\n /** Required. The task operation — see {@link Operation} for scope-specific values. */\n operation: OperationType;\n /** UserLink-only. Deposit distribution settings. Only meaningful with `deposit` operation. */\n distribution?: TransactDistribution;\n /** UserLink-only. Action on task success: `'continue'` or `'finish'`. Defaults to `'continue'`. */\n onComplete?: 'continue' | 'finish';\n /** UserLink-only. Action on task failure: `'continue'` or `'finish'`. Defaults to `'continue'`. */\n onFail?: 'continue' | 'finish';\n}\n\n/** Visual theme customization for the Transact UI. */\nexport interface TransactTheme {\n /** Any valid CSS color value for buttons and accent elements. */\n brandColor?: string;\n /** Any valid CSS background-color value for the modal overlay. */\n overlayColor?: string;\n /** Enable dark mode. */\n dark?: boolean;\n /** Set to `'inline'` to render inside a container element instead of as a modal. */\n display?: string;\n /** Navigation bar element visibility. */\n navigationOptions?: TransactNavigationOptions;\n}\n\n/** Controls for navigation bar element visibility. */\nexport interface TransactNavigationOptions {\n /** Whether the back button is visible. Defaults to `true`. */\n showBackButton?: boolean;\n /** Whether a text label appears next to the back button. Defaults to `false`. */\n showBackButtonText?: boolean;\n /** Whether the close/exit button is displayed. Defaults to `true`. */\n showCloseButton?: boolean;\n}\n\n/**\n * UserLink-only. Deposit distribution settings for the `deposit` operation.\n * Enforces deposit configuration and eliminates incompatible search results.\n */\nexport interface TransactDistribution {\n /** Distribution type: `'total'`, `'fixed'`, or `'percent'`. */\n type: 'total' | 'fixed' | 'percent';\n /** Dollar amount (for `'fixed'`) or percentage of paycheck (for `'percent'`). */\n amount?: number;\n /** If `true`, the user can override the default amount. Defaults to `false`. */\n canUpdate?: boolean;\n}\n\n/**\n * Deeplink configuration to navigate directly to a specific step.\n *\n * Both `login-company` and `search-company` are supported by UserLink and PayLink.\n */\nexport interface TransactDeeplink {\n /** The step to navigate to — `'login-company'` or `'search-company'`. */\n step?: StepType;\n /** Company ID to deeplink into. */\n companyId?: string;\n}\n\n/** UserLink-only. Search filtering by company tags. */\nexport interface TransactSearch {\n /** Filter companies by tags. */\n tags?: TagType[];\n /** Exclude companies matching these tags. */\n excludedTags?: TagType[];\n /** Identifier for a search experience defined in the Atomic Console. */\n ruleId?: string;\n}\n\n/** UserLink-only. Override feature flags from the Atomic Console. */\nexport interface TransactExperiments {\n /** Override the Fractional Deposit feature flag value. */\n fractionalDeposits?: boolean;\n}\n\n/** UserLink-only. Override the customer name displayed in the Transact UI. */\nexport interface TransactCustomer {\n /** Customer name shown in the UI. */\n name?: string;\n}\n\n/** UserLink-only. Feature toggles for the Transact session. */\nexport interface TransactFeatures {\n /** Enable or disable fractional (decimal) deposit amounts. */\n fractionalDeposits?: boolean;\n /** Enable or disable custom search functionality. */\n customSearch?: boolean;\n}\n\n/** Result returned when a Transact flow finishes or is closed. */\nexport interface TransactResult {\n /** Present when the flow completed successfully. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n finished?: Record<string, any>;\n /** Present when the flow was closed by the user. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n closed?: Record<string, any>;\n /** Error message if the flow failed to launch. */\n error?: string;\n}\n\n/** Environment configuration for connecting to Atomic services. */\nexport interface TransactEnvironment {\n /** Environment target: `'production'`, `'sandbox'`, or `'custom'`. */\n environment: 'production' | 'sandbox' | 'custom';\n /** Custom Transact URL. Required when `environment` is `'custom'`. */\n transactPath?: string;\n /** Custom API URL. Required when `environment` is `'custom'`. */\n apiPath?: string;\n}\n\n// ──────────────────────────────────────────────────────────────────────────────\n// Method option types\n// ──────────────────────────────────────────────────────────────────────────────\n\n/** Options for {@link TransactPluginPlugin.presentTransact}. */\nexport interface PresentTransactOptions {\n /** The Transact configuration. */\n config: TransactConfig;\n /** Environment to connect to. Defaults to production. */\n environment?: TransactEnvironment;\n /** iOS only. Modal presentation style. */\n presentationStyle?: 'formSheet' | 'fullScreen';\n}\n\n/** Options for {@link TransactPluginPlugin.presentAction}. */\nexport interface PresentActionOptions {\n /** Required. The action ID to present. */\n id: string;\n /** Environment to connect to. Defaults to production. */\n environment?: TransactEnvironment;\n /** Visual theme customization. */\n theme?: TransactTheme;\n /** Custom key-value pairs returned in webhook events. */\n metadata?: Record<string, string>;\n /** iOS only. Modal presentation style. */\n presentationStyle?: 'formSheet' | 'fullScreen';\n}\n\n/** Response payload for resolving an `onDataRequest` event. */\nexport interface DataRequestResponse {\n /** Payment card data. */\n card?: CardData;\n /** Identity data. */\n identity?: IdentityData;\n}\n\n/** Payment card information for resolving data requests. */\nexport interface CardData {\n /** Full card number. */\n number: string;\n /** Card expiration date. */\n expiry?: string;\n /** Card verification value. */\n cvv?: string;\n}\n\n/** Identity information for resolving data requests. */\nexport interface IdentityData {\n firstName?: string;\n lastName?: string;\n postalCode?: string;\n address?: string;\n address2?: string;\n city?: string;\n state?: string;\n phone?: string;\n email?: string;\n}\n\n// ──────────────────────────────────────────────────────────────────────────────\n// Event types\n// ──────────────────────────────────────────────────────────────────────────────\n\n/** Payload for the `onInteraction` event. */\nexport interface InteractionEvent {\n /** Name of the interaction. */\n name: string;\n /** Interaction value. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any;\n}\n\n/** Payload for the `onDataRequest` event. */\nexport interface DataRequestEvent {\n /** Requested data fields. */\n fields?: string[];\n taskId?: string;\n userId?: string;\n identifier?: string;\n taskWorkflowId?: string;\n externalId?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/** Payload for the `onAuthStatusUpdate` event. */\nexport interface AuthStatusUpdateEvent {\n /** Authentication status. */\n status: string;\n /** Company associated with the authentication. */\n company: TransactCompanyEvent;\n}\n\n/** Payload for the `onTaskStatusUpdate` event. */\nexport interface TaskStatusUpdateEvent {\n taskId: string;\n product: string;\n /** Current task status. */\n status: TaskStatusType;\n /** Reason for failure. Only present when `status` is `'failed'`. */\n failReason?: FailReasonType;\n /** Company associated with the task. */\n company: TransactCompanyEvent;\n /** UserLink — Deposit data returned on successful deposit operations. */\n depositData?: DepositDataEvent;\n /** PayLink — Payment method data returned on successful switch operations. */\n switchData?: SwitchDataEvent;\n /** Present when a task is managed by another company. */\n managedBy?: { company: TransactCompanyEvent };\n}\n\n/** Company information included in event payloads. */\nexport interface TransactCompanyEvent {\n _id: string;\n name: string;\n branding?: {\n color: string;\n logo: {\n url: string;\n backgroundColor?: string;\n };\n };\n}\n\n/** UserLink — Deposit data from a successful deposit operation. */\nexport interface DepositDataEvent {\n accountType?: string;\n distributionAmount?: number;\n distributionType?: string;\n lastFour?: string;\n routingNumber?: string;\n title?: string;\n}\n\n/** PayLink — Payment method data from a successful switch operation. */\nexport interface SwitchDataEvent {\n paymentMethod: {\n type: string;\n brand?: string;\n expiry?: string;\n lastFour?: string;\n accountType?: string;\n routingNumber?: string;\n accountNumberLastFour?: string;\n };\n}\n\n/** Payload for the `onFinish` event. */\nexport interface FinishEvent {\n taskId?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/** Payload for the `onClose` event. */\nexport interface CloseEvent {\n reason?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n// ──────────────────────────────────────────────────────────────────────────────\n// Plugin interface\n// ──────────────────────────────────────────────────────────────────────────────\n\n/** The Transact Capacitor plugin interface. */\nexport interface TransactPluginPlugin {\n /** Launch a Transact flow. Resolves when the flow finishes or is closed. */\n presentTransact(options: PresentTransactOptions): Promise<TransactResult>;\n\n /** Present a specific action by ID. Resolves when the action completes or is closed. */\n presentAction(options: PresentActionOptions): Promise<TransactResult>;\n\n /** Programmatically hide the Transact overlay. */\n hideTransact(): Promise<void>;\n\n /** Respond to an `onDataRequest` event with card or identity data. */\n resolveDataRequest(options: DataRequestResponse): Promise<void>;\n\n addListener(\n eventName: 'onInteraction',\n listenerFunc: (event: InteractionEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'onDataRequest',\n listenerFunc: (event: DataRequestEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'onAuthStatusUpdate',\n listenerFunc: (event: AuthStatusUpdateEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'onTaskStatusUpdate',\n listenerFunc: (event: TaskStatusUpdateEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(eventName: 'onFinish', listenerFunc: (event: FinishEvent) => void): Promise<PluginListenerHandle>;\n\n addListener(eventName: 'onClose', listenerFunc: (event: CloseEvent) => void): Promise<PluginListenerHandle>;\n\n addListener(eventName: 'onLaunch', listenerFunc: () => void): Promise<PluginListenerHandle>;\n\n removeAllListeners(): Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerPlugin } from '@capacitor/core';
|
|
2
|
+
const TransactPlugin = registerPlugin('TransactPlugin', {
|
|
3
|
+
web: () => import('./web').then((m) => new m.TransactPluginWeb()),
|
|
4
|
+
});
|
|
5
|
+
export * from './definitions';
|
|
6
|
+
export { TransactPlugin };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,cAAc,GAAG,cAAc,CAAuB,gBAAgB,EAAE;IAC5E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;CAClE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { TransactPluginPlugin } from './definitions';\n\nconst TransactPlugin = registerPlugin<TransactPluginPlugin>('TransactPlugin', {\n web: () => import('./web').then((m) => new m.TransactPluginWeb()),\n});\n\nexport * from './definitions';\nexport { TransactPlugin };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { TransactPluginPlugin, TransactResult } from './definitions';
|
|
3
|
+
export declare class TransactPluginWeb extends WebPlugin implements TransactPluginPlugin {
|
|
4
|
+
presentTransact(): Promise<TransactResult>;
|
|
5
|
+
presentAction(): Promise<TransactResult>;
|
|
6
|
+
hideTransact(): Promise<void>;
|
|
7
|
+
resolveDataRequest(): Promise<void>;
|
|
8
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class TransactPluginWeb extends WebPlugin {
|
|
3
|
+
async presentTransact() {
|
|
4
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
5
|
+
}
|
|
6
|
+
async presentAction() {
|
|
7
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
8
|
+
}
|
|
9
|
+
async hideTransact() {
|
|
10
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
11
|
+
}
|
|
12
|
+
async resolveDataRequest() {
|
|
13
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,WAAW,CAAC,8EAA8E,CAAC,CAAC;IACzG,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,MAAM,IAAI,CAAC,WAAW,CAAC,8EAA8E,CAAC,CAAC;IACzG,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,WAAW,CAAC,8EAA8E,CAAC,CAAC;IACzG,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,WAAW,CAAC,8EAA8E,CAAC,CAAC;IACzG,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { TransactPluginPlugin, TransactResult } from './definitions';\n\nexport class TransactPluginWeb extends WebPlugin implements TransactPluginPlugin {\n async presentTransact(): Promise<TransactResult> {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n\n async presentAction(): Promise<TransactResult> {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n\n async hideTransact(): Promise<void> {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n\n async resolveDataRequest(): Promise<void> {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n}\n"]}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
6
|
+
// Constants
|
|
7
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
8
|
+
/**
|
|
9
|
+
* Task operations available in Transact.
|
|
10
|
+
*
|
|
11
|
+
* **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`
|
|
12
|
+
*
|
|
13
|
+
* **PayLink** (`scope: 'pay-link'`): `switch`, `present`
|
|
14
|
+
*/
|
|
15
|
+
const Operation = {
|
|
16
|
+
/** UserLink — Direct Deposit Switching. */
|
|
17
|
+
DEPOSIT: 'deposit',
|
|
18
|
+
/** UserLink — Payroll Data Verification. */
|
|
19
|
+
VERIFY: 'verify',
|
|
20
|
+
/** UserLink — Tax Document Access. */
|
|
21
|
+
TAX: 'tax',
|
|
22
|
+
/** PayLink — Payment Method Switching. */
|
|
23
|
+
SWITCH: 'switch',
|
|
24
|
+
/** PayLink — Bill Presentment. */
|
|
25
|
+
PRESENT: 'present',
|
|
26
|
+
};
|
|
27
|
+
/** Product scope for a Transact session. */
|
|
28
|
+
const Scope = {
|
|
29
|
+
USER_LINK: 'user-link',
|
|
30
|
+
PAY_LINK: 'pay-link',
|
|
31
|
+
};
|
|
32
|
+
/** Convenience helpers for creating {@link TransactEnvironment} values. */
|
|
33
|
+
const Environment = {
|
|
34
|
+
production: { environment: 'production' },
|
|
35
|
+
sandbox: { environment: 'sandbox' },
|
|
36
|
+
custom: (transactPath, apiPath) => ({
|
|
37
|
+
environment: 'custom',
|
|
38
|
+
transactPath,
|
|
39
|
+
apiPath,
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Deeplink steps for navigating to a specific point in the Transact flow.
|
|
44
|
+
*
|
|
45
|
+
* Both steps are supported by UserLink and PayLink.
|
|
46
|
+
*/
|
|
47
|
+
const Step = {
|
|
48
|
+
/** Both scopes. Deeplinks to a specific company's login screen. */
|
|
49
|
+
LOGIN_COMPANY: 'login-company',
|
|
50
|
+
/** Both scopes. Deeplinks to the company search screen. */
|
|
51
|
+
SEARCH_COMPANY: 'search-company',
|
|
52
|
+
};
|
|
53
|
+
/** Native presentation style for the Transact modal (iOS only). */
|
|
54
|
+
const PresentationStyle = {
|
|
55
|
+
FORM_SHEET: 'formSheet',
|
|
56
|
+
FULL_SCREEN: 'fullScreen',
|
|
57
|
+
};
|
|
58
|
+
/** Display language for the Transact UI. */
|
|
59
|
+
const Language = {
|
|
60
|
+
ENGLISH: 'en',
|
|
61
|
+
SPANISH: 'es',
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* UserLink-only. Views that can be handed off to the host app via SDK events
|
|
65
|
+
* instead of being handled inside Transact.
|
|
66
|
+
*/
|
|
67
|
+
const Handoff = {
|
|
68
|
+
EXIT_PROMPT: 'exit-prompt',
|
|
69
|
+
AUTHENTICATION_SUCCESS: 'authentication-success',
|
|
70
|
+
HIGH_LATENCY: 'high-latency',
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* UserLink-only. Company tags for filtering search results.
|
|
74
|
+
*
|
|
75
|
+
* Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.
|
|
76
|
+
*/
|
|
77
|
+
const Tag = {
|
|
78
|
+
GIG_ECONOMY: 'gig-economy',
|
|
79
|
+
PAYROLL_PROVIDER: 'payroll-provider',
|
|
80
|
+
UNEMPLOYMENT: 'unemployment',
|
|
81
|
+
};
|
|
82
|
+
/** Status values for the `onTaskStatusUpdate` event. */
|
|
83
|
+
const TaskStatus = {
|
|
84
|
+
PROCESSING: 'processing',
|
|
85
|
+
FAILED: 'failed',
|
|
86
|
+
COMPLETED: 'completed',
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Failure reason codes returned in the `onTaskStatusUpdate` event
|
|
90
|
+
* when `status` is `'failed'`.
|
|
91
|
+
*/
|
|
92
|
+
const FailReason = {
|
|
93
|
+
// ── UserLink ────────────────────────────────────────────────────────────────
|
|
94
|
+
/** UserLink. The account is locked. */
|
|
95
|
+
ACCOUNT_LOCKOUT: 'account-lockout',
|
|
96
|
+
/** UserLink. Account setup is incomplete. */
|
|
97
|
+
ACCOUNT_SETUP_INCOMPLETE: 'account-setup-incomplete',
|
|
98
|
+
/** UserLink. Account is unusable for this operation. */
|
|
99
|
+
ACCOUNT_UNUSABLE: 'account-unusable',
|
|
100
|
+
/** UserLink. Automation was blocked by the payroll provider. */
|
|
101
|
+
AUTOMATION_BLOCKED: 'automation-blocked',
|
|
102
|
+
/** UserLink. Invalid login credentials. */
|
|
103
|
+
BAD_CREDENTIALS: 'bad-credentials',
|
|
104
|
+
/** UserLink. Connection error with the payroll provider. */
|
|
105
|
+
CONNECTION_ERROR: 'connection-error',
|
|
106
|
+
/** UserLink. The requested distribution is not supported. */
|
|
107
|
+
DISTRIBUTION_NOT_SUPPORTED: 'distribution-not-supported',
|
|
108
|
+
/** UserLink. Employee is enrolled in a paycard program. */
|
|
109
|
+
ENROLLED_IN_PAYCARD: 'enrolled-in-paycard',
|
|
110
|
+
/** UserLink. Session or token has expired. */
|
|
111
|
+
EXPIRED: 'expired',
|
|
112
|
+
/** UserLink. No data found for the requested operation. */
|
|
113
|
+
NO_DATA_FOUND: 'no-data-found',
|
|
114
|
+
/** UserLink. The operation is not supported by this employer. */
|
|
115
|
+
PRODUCT_NOT_SUPPORTED: 'product-not-supported',
|
|
116
|
+
/** UserLink. The routing number is not supported. */
|
|
117
|
+
ROUTING_NUMBER_NOT_SUPPORTED: 'routing-number-not-supported',
|
|
118
|
+
/** UserLink. The session timed out. */
|
|
119
|
+
SESSION_TIMEOUT: 'session-timeout',
|
|
120
|
+
/** UserLink. The payroll system is unavailable. */
|
|
121
|
+
SYSTEM_UNAVAILABLE: 'system-unavailable',
|
|
122
|
+
/** UserLink. A pending transaction is blocking the operation. */
|
|
123
|
+
TRANSACTION_PENDING: 'transaction-pending',
|
|
124
|
+
/** UserLink. Employee work status is terminated. */
|
|
125
|
+
WORK_STATUS_TERMINATED: 'work-status-terminated',
|
|
126
|
+
// ── PayLink ─────────────────────────────────────────────────────────────────
|
|
127
|
+
/** PayLink. The subscription is inactive. */
|
|
128
|
+
SUBSCRIPTION_INACTIVE: 'subscription-inactive',
|
|
129
|
+
/** PayLink. Subscription is managed by a partner provider. */
|
|
130
|
+
SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: 'subscription-managed-by-partner-provider',
|
|
131
|
+
/** PayLink. The payment method is locked. */
|
|
132
|
+
PAYMENT_METHOD_LOCKED: 'payment-method-locked',
|
|
133
|
+
/** PayLink. The payment method type is not supported. */
|
|
134
|
+
PAYMENT_METHOD_NOT_SUPPORTED: 'payment-method-not-supported',
|
|
135
|
+
/** PayLink. Insufficient funds on the payment method. */
|
|
136
|
+
PAYMENT_METHOD_INSUFFICIENT_FUNDS: 'payment-method-insufficient-funds',
|
|
137
|
+
/** PayLink. Payment method limit has been reached. */
|
|
138
|
+
PAYMENT_METHOD_LIMIT_REACHED: 'payment-method-limit-reached',
|
|
139
|
+
/** PayLink. The payment method was declined. */
|
|
140
|
+
PAYMENT_METHOD_DECLINED: 'payment-method-declined',
|
|
141
|
+
/** PayLink. The payment token has expired. */
|
|
142
|
+
PAYMENT_TOKEN_EXPIRED: 'payment-token-expired',
|
|
143
|
+
/** PayLink. Payment switch was unsuccessful. */
|
|
144
|
+
PAYMENT_SWITCH_UNSUCCESSFUL: 'payment-switch-unsuccessful',
|
|
145
|
+
// ── Shared ──────────────────────────────────────────────────────────────────
|
|
146
|
+
/** Shared. The user's device disconnected. */
|
|
147
|
+
DEVICE_DISCONNECTED: 'device-disconnected',
|
|
148
|
+
/** Shared. The user abandoned the flow. */
|
|
149
|
+
USER_ABANDON: 'user-abandon',
|
|
150
|
+
/** Shared. An unknown failure occurred. */
|
|
151
|
+
UNKNOWN_FAILURE: 'unknown-failure',
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* PayLink-only. Strategy for providing deferred payment method data
|
|
155
|
+
* when Transact triggers an `onDataRequest` event.
|
|
156
|
+
*
|
|
157
|
+
* - `SDK` — Respond through the native SDK's `resolveDataRequest` method.
|
|
158
|
+
* - `API` — Send data via the Update User API endpoint.
|
|
159
|
+
*/
|
|
160
|
+
const DeferredPaymentMethodStrategy = {
|
|
161
|
+
SDK: 'sdk',
|
|
162
|
+
API: 'api',
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const TransactPlugin = core.registerPlugin('TransactPlugin', {
|
|
166
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.TransactPluginWeb()),
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
class TransactPluginWeb extends core.WebPlugin {
|
|
170
|
+
async presentTransact() {
|
|
171
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
172
|
+
}
|
|
173
|
+
async presentAction() {
|
|
174
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
175
|
+
}
|
|
176
|
+
async hideTransact() {
|
|
177
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
178
|
+
}
|
|
179
|
+
async resolveDataRequest() {
|
|
180
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
185
|
+
__proto__: null,
|
|
186
|
+
TransactPluginWeb: TransactPluginWeb
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
exports.DeferredPaymentMethodStrategy = DeferredPaymentMethodStrategy;
|
|
190
|
+
exports.Environment = Environment;
|
|
191
|
+
exports.FailReason = FailReason;
|
|
192
|
+
exports.Handoff = Handoff;
|
|
193
|
+
exports.Language = Language;
|
|
194
|
+
exports.Operation = Operation;
|
|
195
|
+
exports.PresentationStyle = PresentationStyle;
|
|
196
|
+
exports.Scope = Scope;
|
|
197
|
+
exports.Step = Step;
|
|
198
|
+
exports.Tag = Tag;
|
|
199
|
+
exports.TaskStatus = TaskStatus;
|
|
200
|
+
exports.TransactPlugin = TransactPlugin;
|
|
201
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["// ──────────────────────────────────────────────────────────────────────────────\n// Constants\n// ──────────────────────────────────────────────────────────────────────────────\n/**\n * Task operations available in Transact.\n *\n * **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`\n *\n * **PayLink** (`scope: 'pay-link'`): `switch`, `present`\n */\nexport const Operation = {\n /** UserLink — Direct Deposit Switching. */\n DEPOSIT: 'deposit',\n /** UserLink — Payroll Data Verification. */\n VERIFY: 'verify',\n /** UserLink — Tax Document Access. */\n TAX: 'tax',\n /** PayLink — Payment Method Switching. */\n SWITCH: 'switch',\n /** PayLink — Bill Presentment. */\n PRESENT: 'present',\n};\n/** Product scope for a Transact session. */\nexport const Scope = {\n USER_LINK: 'user-link',\n PAY_LINK: 'pay-link',\n};\n/** Convenience helpers for creating {@link TransactEnvironment} values. */\nexport const Environment = {\n production: { environment: 'production' },\n sandbox: { environment: 'sandbox' },\n custom: (transactPath, apiPath) => ({\n environment: 'custom',\n transactPath,\n apiPath,\n }),\n};\n/**\n * Deeplink steps for navigating to a specific point in the Transact flow.\n *\n * Both steps are supported by UserLink and PayLink.\n */\nexport const Step = {\n /** Both scopes. Deeplinks to a specific company's login screen. */\n LOGIN_COMPANY: 'login-company',\n /** Both scopes. Deeplinks to the company search screen. */\n SEARCH_COMPANY: 'search-company',\n};\n/** Native presentation style for the Transact modal (iOS only). */\nexport const PresentationStyle = {\n FORM_SHEET: 'formSheet',\n FULL_SCREEN: 'fullScreen',\n};\n/** Display language for the Transact UI. */\nexport const Language = {\n ENGLISH: 'en',\n SPANISH: 'es',\n};\n/**\n * UserLink-only. Views that can be handed off to the host app via SDK events\n * instead of being handled inside Transact.\n */\nexport const Handoff = {\n EXIT_PROMPT: 'exit-prompt',\n AUTHENTICATION_SUCCESS: 'authentication-success',\n HIGH_LATENCY: 'high-latency',\n};\n/**\n * UserLink-only. Company tags for filtering search results.\n *\n * Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.\n */\nexport const Tag = {\n GIG_ECONOMY: 'gig-economy',\n PAYROLL_PROVIDER: 'payroll-provider',\n UNEMPLOYMENT: 'unemployment',\n};\n/** Status values for the `onTaskStatusUpdate` event. */\nexport const TaskStatus = {\n PROCESSING: 'processing',\n FAILED: 'failed',\n COMPLETED: 'completed',\n};\n/**\n * Failure reason codes returned in the `onTaskStatusUpdate` event\n * when `status` is `'failed'`.\n */\nexport const FailReason = {\n // ── UserLink ────────────────────────────────────────────────────────────────\n /** UserLink. The account is locked. */\n ACCOUNT_LOCKOUT: 'account-lockout',\n /** UserLink. Account setup is incomplete. */\n ACCOUNT_SETUP_INCOMPLETE: 'account-setup-incomplete',\n /** UserLink. Account is unusable for this operation. */\n ACCOUNT_UNUSABLE: 'account-unusable',\n /** UserLink. Automation was blocked by the payroll provider. */\n AUTOMATION_BLOCKED: 'automation-blocked',\n /** UserLink. Invalid login credentials. */\n BAD_CREDENTIALS: 'bad-credentials',\n /** UserLink. Connection error with the payroll provider. */\n CONNECTION_ERROR: 'connection-error',\n /** UserLink. The requested distribution is not supported. */\n DISTRIBUTION_NOT_SUPPORTED: 'distribution-not-supported',\n /** UserLink. Employee is enrolled in a paycard program. */\n ENROLLED_IN_PAYCARD: 'enrolled-in-paycard',\n /** UserLink. Session or token has expired. */\n EXPIRED: 'expired',\n /** UserLink. No data found for the requested operation. */\n NO_DATA_FOUND: 'no-data-found',\n /** UserLink. The operation is not supported by this employer. */\n PRODUCT_NOT_SUPPORTED: 'product-not-supported',\n /** UserLink. The routing number is not supported. */\n ROUTING_NUMBER_NOT_SUPPORTED: 'routing-number-not-supported',\n /** UserLink. The session timed out. */\n SESSION_TIMEOUT: 'session-timeout',\n /** UserLink. The payroll system is unavailable. */\n SYSTEM_UNAVAILABLE: 'system-unavailable',\n /** UserLink. A pending transaction is blocking the operation. */\n TRANSACTION_PENDING: 'transaction-pending',\n /** UserLink. Employee work status is terminated. */\n WORK_STATUS_TERMINATED: 'work-status-terminated',\n // ── PayLink ─────────────────────────────────────────────────────────────────\n /** PayLink. The subscription is inactive. */\n SUBSCRIPTION_INACTIVE: 'subscription-inactive',\n /** PayLink. Subscription is managed by a partner provider. */\n SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: 'subscription-managed-by-partner-provider',\n /** PayLink. The payment method is locked. */\n PAYMENT_METHOD_LOCKED: 'payment-method-locked',\n /** PayLink. The payment method type is not supported. */\n PAYMENT_METHOD_NOT_SUPPORTED: 'payment-method-not-supported',\n /** PayLink. Insufficient funds on the payment method. */\n PAYMENT_METHOD_INSUFFICIENT_FUNDS: 'payment-method-insufficient-funds',\n /** PayLink. Payment method limit has been reached. */\n PAYMENT_METHOD_LIMIT_REACHED: 'payment-method-limit-reached',\n /** PayLink. The payment method was declined. */\n PAYMENT_METHOD_DECLINED: 'payment-method-declined',\n /** PayLink. The payment token has expired. */\n PAYMENT_TOKEN_EXPIRED: 'payment-token-expired',\n /** PayLink. Payment switch was unsuccessful. */\n PAYMENT_SWITCH_UNSUCCESSFUL: 'payment-switch-unsuccessful',\n // ── Shared ──────────────────────────────────────────────────────────────────\n /** Shared. The user's device disconnected. */\n DEVICE_DISCONNECTED: 'device-disconnected',\n /** Shared. The user abandoned the flow. */\n USER_ABANDON: 'user-abandon',\n /** Shared. An unknown failure occurred. */\n UNKNOWN_FAILURE: 'unknown-failure',\n};\n/**\n * PayLink-only. Strategy for providing deferred payment method data\n * when Transact triggers an `onDataRequest` event.\n *\n * - `SDK` — Respond through the native SDK's `resolveDataRequest` method.\n * - `API` — Send data via the Update User API endpoint.\n */\nexport const DeferredPaymentMethodStrategy = {\n SDK: 'sdk',\n API: 'api',\n};\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst TransactPlugin = registerPlugin('TransactPlugin', {\n web: () => import('./web').then((m) => new m.TransactPluginWeb()),\n});\nexport * from './definitions';\nexport { TransactPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class TransactPluginWeb extends WebPlugin {\n async presentTransact() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n async presentAction() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n async hideTransact() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n async resolveDataRequest() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG;AACzB;AACA,IAAI,OAAO,EAAE,SAAS;AACtB;AACA,IAAI,MAAM,EAAE,QAAQ;AACpB;AACA,IAAI,GAAG,EAAE,KAAK;AACd;AACA,IAAI,MAAM,EAAE,QAAQ;AACpB;AACA,IAAI,OAAO,EAAE,SAAS;AACtB;AACA;AACY,MAAC,KAAK,GAAG;AACrB,IAAI,SAAS,EAAE,WAAW;AAC1B,IAAI,QAAQ,EAAE,UAAU;AACxB;AACA;AACY,MAAC,WAAW,GAAG;AAC3B,IAAI,UAAU,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;AAC7C,IAAI,OAAO,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;AACvC,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,MAAM;AACxC,QAAQ,WAAW,EAAE,QAAQ;AAC7B,QAAQ,YAAY;AACpB,QAAQ,OAAO;AACf,KAAK,CAAC;AACN;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG;AACpB;AACA,IAAI,aAAa,EAAE,eAAe;AAClC;AACA,IAAI,cAAc,EAAE,gBAAgB;AACpC;AACA;AACY,MAAC,iBAAiB,GAAG;AACjC,IAAI,UAAU,EAAE,WAAW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,IAAI;AACJ;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
var capacitorTransactPlugin = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
5
|
+
// Constants
|
|
6
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
/**
|
|
8
|
+
* Task operations available in Transact.
|
|
9
|
+
*
|
|
10
|
+
* **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`
|
|
11
|
+
*
|
|
12
|
+
* **PayLink** (`scope: 'pay-link'`): `switch`, `present`
|
|
13
|
+
*/
|
|
14
|
+
const Operation = {
|
|
15
|
+
/** UserLink — Direct Deposit Switching. */
|
|
16
|
+
DEPOSIT: 'deposit',
|
|
17
|
+
/** UserLink — Payroll Data Verification. */
|
|
18
|
+
VERIFY: 'verify',
|
|
19
|
+
/** UserLink — Tax Document Access. */
|
|
20
|
+
TAX: 'tax',
|
|
21
|
+
/** PayLink — Payment Method Switching. */
|
|
22
|
+
SWITCH: 'switch',
|
|
23
|
+
/** PayLink — Bill Presentment. */
|
|
24
|
+
PRESENT: 'present',
|
|
25
|
+
};
|
|
26
|
+
/** Product scope for a Transact session. */
|
|
27
|
+
const Scope = {
|
|
28
|
+
USER_LINK: 'user-link',
|
|
29
|
+
PAY_LINK: 'pay-link',
|
|
30
|
+
};
|
|
31
|
+
/** Convenience helpers for creating {@link TransactEnvironment} values. */
|
|
32
|
+
const Environment = {
|
|
33
|
+
production: { environment: 'production' },
|
|
34
|
+
sandbox: { environment: 'sandbox' },
|
|
35
|
+
custom: (transactPath, apiPath) => ({
|
|
36
|
+
environment: 'custom',
|
|
37
|
+
transactPath,
|
|
38
|
+
apiPath,
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Deeplink steps for navigating to a specific point in the Transact flow.
|
|
43
|
+
*
|
|
44
|
+
* Both steps are supported by UserLink and PayLink.
|
|
45
|
+
*/
|
|
46
|
+
const Step = {
|
|
47
|
+
/** Both scopes. Deeplinks to a specific company's login screen. */
|
|
48
|
+
LOGIN_COMPANY: 'login-company',
|
|
49
|
+
/** Both scopes. Deeplinks to the company search screen. */
|
|
50
|
+
SEARCH_COMPANY: 'search-company',
|
|
51
|
+
};
|
|
52
|
+
/** Native presentation style for the Transact modal (iOS only). */
|
|
53
|
+
const PresentationStyle = {
|
|
54
|
+
FORM_SHEET: 'formSheet',
|
|
55
|
+
FULL_SCREEN: 'fullScreen',
|
|
56
|
+
};
|
|
57
|
+
/** Display language for the Transact UI. */
|
|
58
|
+
const Language = {
|
|
59
|
+
ENGLISH: 'en',
|
|
60
|
+
SPANISH: 'es',
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* UserLink-only. Views that can be handed off to the host app via SDK events
|
|
64
|
+
* instead of being handled inside Transact.
|
|
65
|
+
*/
|
|
66
|
+
const Handoff = {
|
|
67
|
+
EXIT_PROMPT: 'exit-prompt',
|
|
68
|
+
AUTHENTICATION_SUCCESS: 'authentication-success',
|
|
69
|
+
HIGH_LATENCY: 'high-latency',
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* UserLink-only. Company tags for filtering search results.
|
|
73
|
+
*
|
|
74
|
+
* Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.
|
|
75
|
+
*/
|
|
76
|
+
const Tag = {
|
|
77
|
+
GIG_ECONOMY: 'gig-economy',
|
|
78
|
+
PAYROLL_PROVIDER: 'payroll-provider',
|
|
79
|
+
UNEMPLOYMENT: 'unemployment',
|
|
80
|
+
};
|
|
81
|
+
/** Status values for the `onTaskStatusUpdate` event. */
|
|
82
|
+
const TaskStatus = {
|
|
83
|
+
PROCESSING: 'processing',
|
|
84
|
+
FAILED: 'failed',
|
|
85
|
+
COMPLETED: 'completed',
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Failure reason codes returned in the `onTaskStatusUpdate` event
|
|
89
|
+
* when `status` is `'failed'`.
|
|
90
|
+
*/
|
|
91
|
+
const FailReason = {
|
|
92
|
+
// ── UserLink ────────────────────────────────────────────────────────────────
|
|
93
|
+
/** UserLink. The account is locked. */
|
|
94
|
+
ACCOUNT_LOCKOUT: 'account-lockout',
|
|
95
|
+
/** UserLink. Account setup is incomplete. */
|
|
96
|
+
ACCOUNT_SETUP_INCOMPLETE: 'account-setup-incomplete',
|
|
97
|
+
/** UserLink. Account is unusable for this operation. */
|
|
98
|
+
ACCOUNT_UNUSABLE: 'account-unusable',
|
|
99
|
+
/** UserLink. Automation was blocked by the payroll provider. */
|
|
100
|
+
AUTOMATION_BLOCKED: 'automation-blocked',
|
|
101
|
+
/** UserLink. Invalid login credentials. */
|
|
102
|
+
BAD_CREDENTIALS: 'bad-credentials',
|
|
103
|
+
/** UserLink. Connection error with the payroll provider. */
|
|
104
|
+
CONNECTION_ERROR: 'connection-error',
|
|
105
|
+
/** UserLink. The requested distribution is not supported. */
|
|
106
|
+
DISTRIBUTION_NOT_SUPPORTED: 'distribution-not-supported',
|
|
107
|
+
/** UserLink. Employee is enrolled in a paycard program. */
|
|
108
|
+
ENROLLED_IN_PAYCARD: 'enrolled-in-paycard',
|
|
109
|
+
/** UserLink. Session or token has expired. */
|
|
110
|
+
EXPIRED: 'expired',
|
|
111
|
+
/** UserLink. No data found for the requested operation. */
|
|
112
|
+
NO_DATA_FOUND: 'no-data-found',
|
|
113
|
+
/** UserLink. The operation is not supported by this employer. */
|
|
114
|
+
PRODUCT_NOT_SUPPORTED: 'product-not-supported',
|
|
115
|
+
/** UserLink. The routing number is not supported. */
|
|
116
|
+
ROUTING_NUMBER_NOT_SUPPORTED: 'routing-number-not-supported',
|
|
117
|
+
/** UserLink. The session timed out. */
|
|
118
|
+
SESSION_TIMEOUT: 'session-timeout',
|
|
119
|
+
/** UserLink. The payroll system is unavailable. */
|
|
120
|
+
SYSTEM_UNAVAILABLE: 'system-unavailable',
|
|
121
|
+
/** UserLink. A pending transaction is blocking the operation. */
|
|
122
|
+
TRANSACTION_PENDING: 'transaction-pending',
|
|
123
|
+
/** UserLink. Employee work status is terminated. */
|
|
124
|
+
WORK_STATUS_TERMINATED: 'work-status-terminated',
|
|
125
|
+
// ── PayLink ─────────────────────────────────────────────────────────────────
|
|
126
|
+
/** PayLink. The subscription is inactive. */
|
|
127
|
+
SUBSCRIPTION_INACTIVE: 'subscription-inactive',
|
|
128
|
+
/** PayLink. Subscription is managed by a partner provider. */
|
|
129
|
+
SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: 'subscription-managed-by-partner-provider',
|
|
130
|
+
/** PayLink. The payment method is locked. */
|
|
131
|
+
PAYMENT_METHOD_LOCKED: 'payment-method-locked',
|
|
132
|
+
/** PayLink. The payment method type is not supported. */
|
|
133
|
+
PAYMENT_METHOD_NOT_SUPPORTED: 'payment-method-not-supported',
|
|
134
|
+
/** PayLink. Insufficient funds on the payment method. */
|
|
135
|
+
PAYMENT_METHOD_INSUFFICIENT_FUNDS: 'payment-method-insufficient-funds',
|
|
136
|
+
/** PayLink. Payment method limit has been reached. */
|
|
137
|
+
PAYMENT_METHOD_LIMIT_REACHED: 'payment-method-limit-reached',
|
|
138
|
+
/** PayLink. The payment method was declined. */
|
|
139
|
+
PAYMENT_METHOD_DECLINED: 'payment-method-declined',
|
|
140
|
+
/** PayLink. The payment token has expired. */
|
|
141
|
+
PAYMENT_TOKEN_EXPIRED: 'payment-token-expired',
|
|
142
|
+
/** PayLink. Payment switch was unsuccessful. */
|
|
143
|
+
PAYMENT_SWITCH_UNSUCCESSFUL: 'payment-switch-unsuccessful',
|
|
144
|
+
// ── Shared ──────────────────────────────────────────────────────────────────
|
|
145
|
+
/** Shared. The user's device disconnected. */
|
|
146
|
+
DEVICE_DISCONNECTED: 'device-disconnected',
|
|
147
|
+
/** Shared. The user abandoned the flow. */
|
|
148
|
+
USER_ABANDON: 'user-abandon',
|
|
149
|
+
/** Shared. An unknown failure occurred. */
|
|
150
|
+
UNKNOWN_FAILURE: 'unknown-failure',
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* PayLink-only. Strategy for providing deferred payment method data
|
|
154
|
+
* when Transact triggers an `onDataRequest` event.
|
|
155
|
+
*
|
|
156
|
+
* - `SDK` — Respond through the native SDK's `resolveDataRequest` method.
|
|
157
|
+
* - `API` — Send data via the Update User API endpoint.
|
|
158
|
+
*/
|
|
159
|
+
const DeferredPaymentMethodStrategy = {
|
|
160
|
+
SDK: 'sdk',
|
|
161
|
+
API: 'api',
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const TransactPlugin = core.registerPlugin('TransactPlugin', {
|
|
165
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.TransactPluginWeb()),
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
class TransactPluginWeb extends core.WebPlugin {
|
|
169
|
+
async presentTransact() {
|
|
170
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
171
|
+
}
|
|
172
|
+
async presentAction() {
|
|
173
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
174
|
+
}
|
|
175
|
+
async hideTransact() {
|
|
176
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
177
|
+
}
|
|
178
|
+
async resolveDataRequest() {
|
|
179
|
+
throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
184
|
+
__proto__: null,
|
|
185
|
+
TransactPluginWeb: TransactPluginWeb
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
exports.DeferredPaymentMethodStrategy = DeferredPaymentMethodStrategy;
|
|
189
|
+
exports.Environment = Environment;
|
|
190
|
+
exports.FailReason = FailReason;
|
|
191
|
+
exports.Handoff = Handoff;
|
|
192
|
+
exports.Language = Language;
|
|
193
|
+
exports.Operation = Operation;
|
|
194
|
+
exports.PresentationStyle = PresentationStyle;
|
|
195
|
+
exports.Scope = Scope;
|
|
196
|
+
exports.Step = Step;
|
|
197
|
+
exports.Tag = Tag;
|
|
198
|
+
exports.TaskStatus = TaskStatus;
|
|
199
|
+
exports.TransactPlugin = TransactPlugin;
|
|
200
|
+
|
|
201
|
+
return exports;
|
|
202
|
+
|
|
203
|
+
})({}, capacitorExports);
|
|
204
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["// ──────────────────────────────────────────────────────────────────────────────\n// Constants\n// ──────────────────────────────────────────────────────────────────────────────\n/**\n * Task operations available in Transact.\n *\n * **UserLink** (`scope: 'user-link'`): `deposit`, `verify`, `tax`\n *\n * **PayLink** (`scope: 'pay-link'`): `switch`, `present`\n */\nexport const Operation = {\n /** UserLink — Direct Deposit Switching. */\n DEPOSIT: 'deposit',\n /** UserLink — Payroll Data Verification. */\n VERIFY: 'verify',\n /** UserLink — Tax Document Access. */\n TAX: 'tax',\n /** PayLink — Payment Method Switching. */\n SWITCH: 'switch',\n /** PayLink — Bill Presentment. */\n PRESENT: 'present',\n};\n/** Product scope for a Transact session. */\nexport const Scope = {\n USER_LINK: 'user-link',\n PAY_LINK: 'pay-link',\n};\n/** Convenience helpers for creating {@link TransactEnvironment} values. */\nexport const Environment = {\n production: { environment: 'production' },\n sandbox: { environment: 'sandbox' },\n custom: (transactPath, apiPath) => ({\n environment: 'custom',\n transactPath,\n apiPath,\n }),\n};\n/**\n * Deeplink steps for navigating to a specific point in the Transact flow.\n *\n * Both steps are supported by UserLink and PayLink.\n */\nexport const Step = {\n /** Both scopes. Deeplinks to a specific company's login screen. */\n LOGIN_COMPANY: 'login-company',\n /** Both scopes. Deeplinks to the company search screen. */\n SEARCH_COMPANY: 'search-company',\n};\n/** Native presentation style for the Transact modal (iOS only). */\nexport const PresentationStyle = {\n FORM_SHEET: 'formSheet',\n FULL_SCREEN: 'fullScreen',\n};\n/** Display language for the Transact UI. */\nexport const Language = {\n ENGLISH: 'en',\n SPANISH: 'es',\n};\n/**\n * UserLink-only. Views that can be handed off to the host app via SDK events\n * instead of being handled inside Transact.\n */\nexport const Handoff = {\n EXIT_PROMPT: 'exit-prompt',\n AUTHENTICATION_SUCCESS: 'authentication-success',\n HIGH_LATENCY: 'high-latency',\n};\n/**\n * UserLink-only. Company tags for filtering search results.\n *\n * Used by {@link TransactSearch.tags} and {@link TransactSearch.excludedTags}.\n */\nexport const Tag = {\n GIG_ECONOMY: 'gig-economy',\n PAYROLL_PROVIDER: 'payroll-provider',\n UNEMPLOYMENT: 'unemployment',\n};\n/** Status values for the `onTaskStatusUpdate` event. */\nexport const TaskStatus = {\n PROCESSING: 'processing',\n FAILED: 'failed',\n COMPLETED: 'completed',\n};\n/**\n * Failure reason codes returned in the `onTaskStatusUpdate` event\n * when `status` is `'failed'`.\n */\nexport const FailReason = {\n // ── UserLink ────────────────────────────────────────────────────────────────\n /** UserLink. The account is locked. */\n ACCOUNT_LOCKOUT: 'account-lockout',\n /** UserLink. Account setup is incomplete. */\n ACCOUNT_SETUP_INCOMPLETE: 'account-setup-incomplete',\n /** UserLink. Account is unusable for this operation. */\n ACCOUNT_UNUSABLE: 'account-unusable',\n /** UserLink. Automation was blocked by the payroll provider. */\n AUTOMATION_BLOCKED: 'automation-blocked',\n /** UserLink. Invalid login credentials. */\n BAD_CREDENTIALS: 'bad-credentials',\n /** UserLink. Connection error with the payroll provider. */\n CONNECTION_ERROR: 'connection-error',\n /** UserLink. The requested distribution is not supported. */\n DISTRIBUTION_NOT_SUPPORTED: 'distribution-not-supported',\n /** UserLink. Employee is enrolled in a paycard program. */\n ENROLLED_IN_PAYCARD: 'enrolled-in-paycard',\n /** UserLink. Session or token has expired. */\n EXPIRED: 'expired',\n /** UserLink. No data found for the requested operation. */\n NO_DATA_FOUND: 'no-data-found',\n /** UserLink. The operation is not supported by this employer. */\n PRODUCT_NOT_SUPPORTED: 'product-not-supported',\n /** UserLink. The routing number is not supported. */\n ROUTING_NUMBER_NOT_SUPPORTED: 'routing-number-not-supported',\n /** UserLink. The session timed out. */\n SESSION_TIMEOUT: 'session-timeout',\n /** UserLink. The payroll system is unavailable. */\n SYSTEM_UNAVAILABLE: 'system-unavailable',\n /** UserLink. A pending transaction is blocking the operation. */\n TRANSACTION_PENDING: 'transaction-pending',\n /** UserLink. Employee work status is terminated. */\n WORK_STATUS_TERMINATED: 'work-status-terminated',\n // ── PayLink ─────────────────────────────────────────────────────────────────\n /** PayLink. The subscription is inactive. */\n SUBSCRIPTION_INACTIVE: 'subscription-inactive',\n /** PayLink. Subscription is managed by a partner provider. */\n SUBSCRIPTION_MANAGED_BY_PARTNER_PROVIDER: 'subscription-managed-by-partner-provider',\n /** PayLink. The payment method is locked. */\n PAYMENT_METHOD_LOCKED: 'payment-method-locked',\n /** PayLink. The payment method type is not supported. */\n PAYMENT_METHOD_NOT_SUPPORTED: 'payment-method-not-supported',\n /** PayLink. Insufficient funds on the payment method. */\n PAYMENT_METHOD_INSUFFICIENT_FUNDS: 'payment-method-insufficient-funds',\n /** PayLink. Payment method limit has been reached. */\n PAYMENT_METHOD_LIMIT_REACHED: 'payment-method-limit-reached',\n /** PayLink. The payment method was declined. */\n PAYMENT_METHOD_DECLINED: 'payment-method-declined',\n /** PayLink. The payment token has expired. */\n PAYMENT_TOKEN_EXPIRED: 'payment-token-expired',\n /** PayLink. Payment switch was unsuccessful. */\n PAYMENT_SWITCH_UNSUCCESSFUL: 'payment-switch-unsuccessful',\n // ── Shared ──────────────────────────────────────────────────────────────────\n /** Shared. The user's device disconnected. */\n DEVICE_DISCONNECTED: 'device-disconnected',\n /** Shared. The user abandoned the flow. */\n USER_ABANDON: 'user-abandon',\n /** Shared. An unknown failure occurred. */\n UNKNOWN_FAILURE: 'unknown-failure',\n};\n/**\n * PayLink-only. Strategy for providing deferred payment method data\n * when Transact triggers an `onDataRequest` event.\n *\n * - `SDK` — Respond through the native SDK's `resolveDataRequest` method.\n * - `API` — Send data via the Update User API endpoint.\n */\nexport const DeferredPaymentMethodStrategy = {\n SDK: 'sdk',\n API: 'api',\n};\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst TransactPlugin = registerPlugin('TransactPlugin', {\n web: () => import('./web').then((m) => new m.TransactPluginWeb()),\n});\nexport * from './definitions';\nexport { TransactPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class TransactPluginWeb extends WebPlugin {\n async presentTransact() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n async presentAction() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n async hideTransact() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n async resolveDataRequest() {\n throw this.unavailable('Transact plugin is not available on web. Use a native iOS or Android device.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACY,UAAC,SAAS,GAAG;IACzB;IACA,IAAI,OAAO,EAAE,SAAS;IACtB;IACA,IAAI,MAAM,EAAE,QAAQ;IACpB;IACA,IAAI,GAAG,EAAE,KAAK;IACd;IACA,IAAI,MAAM,EAAE,QAAQ;IACpB;IACA,IAAI,OAAO,EAAE,SAAS;IACtB;IACA;AACY,UAAC,KAAK,GAAG;IACrB,IAAI,SAAS,EAAE,WAAW;IAC1B,IAAI,QAAQ,EAAE,UAAU;IACxB;IACA;AACY,UAAC,WAAW,GAAG;IAC3B,IAAI,UAAU,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;IAC7C,IAAI,OAAO,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;IACvC,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,MAA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