@forgeroute/ui 0.5.0 → 0.5.2
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/fesm2022/forgeroute-ui-offline.mjs +18 -2
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs +4970 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-square.mjs +4332 -0
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs +1230 -72
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-Bdh64Ql6.mjs → forgeroute-ui-ui-labels.es-OIkNyhI5.mjs} +277 -2
- package/fesm2022/{forgeroute-ui-ui-labels.es-Bdh64Ql6.mjs.map → forgeroute-ui-ui-labels.es-OIkNyhI5.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui.mjs +1885 -5
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +9 -1
- package/types/forgeroute-ui-offline.d.ts +20 -0
- package/types/forgeroute-ui-quickbooks.d.ts +1482 -0
- package/types/forgeroute-ui-square.d.ts +1376 -0
- package/types/forgeroute-ui-stripe.d.ts +421 -4
- package/types/forgeroute-ui.d.ts +883 -11
|
@@ -0,0 +1,1482 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DestroyRef, InjectionToken, Provider, TemplateRef, WritableSignal } from "@angular/core";
|
|
3
|
+
import { CheckPaymentStatusFn, HostResult, PaymentAllocation, PaymentAttempt, PaymentAttemptControls, PaymentAttemptOutcome, PaymentMethodBodyContext, PaymentMethodPlugin, PaymentPluginMethod, PaymentReadiness, PaymentReadinessResult, PillTab, ReadinessCheckFn, SelectOption, UiLabelKey, UiLabelsService } from "@forgeroute/ui";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
5
|
+
/**
|
|
6
|
+
* Pure validation and formatting helpers of the QuickBooks Payments card / bank-account form. They never log, store or return more than a verdict: a function that
|
|
7
|
+
* answers an "issue" answers a short code (`'required'`, `'length'`, `'luhn'`, ...), never the value, and the component turns the code into text.
|
|
8
|
+
*/
|
|
9
|
+
type QboCardBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'diners' | 'jcb';
|
|
10
|
+
type QboBankAccountType = 'PERSONAL_CHECKING' | 'PERSONAL_SAVINGS' | 'BUSINESS_CHECKING' | 'BUSINESS_SAVINGS';
|
|
11
|
+
/** The account types Intuit accepts for a bank-account token (`bankAccount.accountType`). */
|
|
12
|
+
export declare const QBO_BANK_ACCOUNT_TYPES: readonly QboBankAccountType[];
|
|
13
|
+
declare const digitsOnly: (value: string | null | undefined) => string;
|
|
14
|
+
/** The Luhn checksum of a card number (digits only; an empty string or a non-digit is invalid). */
|
|
15
|
+
export declare function luhnValid(value: string): boolean;
|
|
16
|
+
/** The brand a card number belongs to by its leading digits (the number may still be incomplete); `null` when unknown. */
|
|
17
|
+
export declare function detectCardBrand(value: string): QboCardBrand | null;
|
|
18
|
+
/** The lengths a number of that brand may have (an unknown brand: 13 to 19). */
|
|
19
|
+
export declare function cardLengthsFor(brand: QboCardBrand | null): readonly number[];
|
|
20
|
+
/** The number grouped for reading: 4-6-5 for American Express, groups of four otherwise. Digits only in, at most 19 digits (15 for Amex). */
|
|
21
|
+
export declare function formatCardNumber(value: string): string;
|
|
22
|
+
/** `'required'` (empty), `'length'` (digits cannot be a number of that brand) or `'luhn'` (the checksum fails); `null` when the number is plausible. */
|
|
23
|
+
export declare function cardNumberIssue(value: string): 'required' | 'length' | 'luhn' | null;
|
|
24
|
+
/** The security code lengths of a brand: 4 for American Express, 3 for the others (an unknown brand: 3 or 4). */
|
|
25
|
+
export declare function cvcLengthsFor(brand: QboCardBrand | null): readonly number[];
|
|
26
|
+
export declare function cvcIssue(value: string, brand: QboCardBrand | null): 'required' | 'length' | null;
|
|
27
|
+
/** Types the expiry as `MM/YY`: digits only, the slash after the month, a first digit 2-9 becomes `0X`. At most `MM/YYYY`. */
|
|
28
|
+
export declare function formatExpiry(value: string): string;
|
|
29
|
+
/** `MM/YY`, `MM/YYYY`, `M/YY`, `MMYY` or `MMYYYY` as a month and a four-digit year; `null` when it cannot be read. The month is not range-checked here. */
|
|
30
|
+
export declare function parseExpiry(value: string): {
|
|
31
|
+
month: number;
|
|
32
|
+
year: number;
|
|
33
|
+
} | null;
|
|
34
|
+
/** `'required'`, `'format'` (not `MM/YY`), `'month'` (not 1-12), `'past'` (the card expired: the month is valid through its last day); `null` when fine. */
|
|
35
|
+
export declare function expiryIssue(value: string, now?: Date): 'required' | 'format' | 'month' | 'past' | null;
|
|
36
|
+
/**
|
|
37
|
+
* `'required'` (empty) or `'length'` (not exactly 9 digits); `null` when the format is right. There is deliberately NO checksum here: Intuit validates the real number, and a
|
|
38
|
+
* client-side ABA checksum would reject the sandbox / test routing numbers (and a bank's brand-new number) before Intuit ever saw them. Same rule as `ui-bank-account-form`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function routingIssue(value: string): 'required' | 'length' | null;
|
|
41
|
+
/** US bank account numbers are 4 to 17 digits. */
|
|
42
|
+
export declare function accountNumberIssue(value: string): 'required' | 'length' | null;
|
|
43
|
+
/** Where the card's postal code is from: a US ZIP or a Canadian postal code. */
|
|
44
|
+
type QboPostalCountry = 'US' | 'CA';
|
|
45
|
+
/** A US ZIP (`12345` or `12345-6789` / `123456789`) or, for `country` `'CA'`, a Canadian postal code. Empty is fine unless `required`. */
|
|
46
|
+
export declare function postalCodeIssue(value: string, required?: boolean, country?: QboPostalCountry): 'required' | 'format' | null;
|
|
47
|
+
/**
|
|
48
|
+
* Replaces every run of 4 or more digits (a card, routing or account number, or a part of one, that an error text might echo) with a mask. A run may hold single spaces or
|
|
49
|
+
* dashes between its digits (`4242 4242`, `011-000-015`); a short number such as an HTTP status (`400`, `401`) or a field index is kept.
|
|
50
|
+
*/
|
|
51
|
+
export declare function scrubDigits(text: string): string;
|
|
52
|
+
/** Which Intuit host the tokens endpoint is on. */
|
|
53
|
+
type QboEnvironment = 'sandbox' | 'production';
|
|
54
|
+
/** The card as Intuit's tokens endpoint takes it (`POST /quickbooks/v4/payments/tokens`, body `{ card }`). Lives only for the duration of one call. */
|
|
55
|
+
interface QboCardTokenRequest {
|
|
56
|
+
number: string;
|
|
57
|
+
/** Two digits, `'02'`. */
|
|
58
|
+
expMonth: string;
|
|
59
|
+
/** Four digits, `'2028'`. */
|
|
60
|
+
expYear: string;
|
|
61
|
+
cvc: string;
|
|
62
|
+
name?: string;
|
|
63
|
+
/** `country` is sent only for a non-US postal code (`'CA'`); a US ZIP sends none, as before. */
|
|
64
|
+
address?: {
|
|
65
|
+
postalCode?: string;
|
|
66
|
+
country?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** The bank account as Intuit's tokens endpoint takes it (body `{ bankAccount }`). */
|
|
70
|
+
interface QboBankTokenRequest {
|
|
71
|
+
name: string;
|
|
72
|
+
routingNumber: string;
|
|
73
|
+
accountNumber: string;
|
|
74
|
+
accountType: QboBankAccountType;
|
|
75
|
+
}
|
|
76
|
+
type QboTokenizeRequest = {
|
|
77
|
+
kind: 'card';
|
|
78
|
+
card: QboCardTokenRequest;
|
|
79
|
+
} | {
|
|
80
|
+
kind: 'bank';
|
|
81
|
+
bankAccount: QboBankTokenRequest;
|
|
82
|
+
};
|
|
83
|
+
interface QboTokenizeContext {
|
|
84
|
+
environment: QboEnvironment;
|
|
85
|
+
/** The `Request-Id` header: a new unique value per call (Intuit uses it to make a repeated call idempotent). */
|
|
86
|
+
requestId: string;
|
|
87
|
+
}
|
|
88
|
+
/** One entry of Intuit's `errors` array. Only these four text fields are kept; nothing else of the answer is passed on. */
|
|
89
|
+
interface QboTokenError {
|
|
90
|
+
code?: string;
|
|
91
|
+
message?: string;
|
|
92
|
+
detail?: string;
|
|
93
|
+
moreInfo?: string;
|
|
94
|
+
}
|
|
95
|
+
type QboTokenizeResult = {
|
|
96
|
+
ok: true;
|
|
97
|
+
token: string;
|
|
98
|
+
} |
|
|
99
|
+
/** `status` is the HTTP status, `0` when the request never got an answer (offline, blocked, CORS). */
|
|
100
|
+
{
|
|
101
|
+
ok: false;
|
|
102
|
+
status: number;
|
|
103
|
+
errors: QboTokenError[];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Exchanges card or bank-account details for a single-use token by talking to Intuit DIRECTLY from the browser. This is the seam of the card data: the default
|
|
107
|
+
* implementation posts to Intuit and nothing else; a spec replaces it with a fake. It must never log, store or forward the request.
|
|
108
|
+
*/
|
|
109
|
+
type QboTokenizerFn = (request: QboTokenizeRequest, context: QboTokenizeContext) => Promise<QboTokenizeResult>;
|
|
110
|
+
/** How long the tokens call may take before it is aborted (a stalled connection). */
|
|
111
|
+
declare const QBO_TOKENS_TIMEOUT_MS = 30000;
|
|
112
|
+
export declare const QBO_TOKENS_PATH = "/quickbooks/v4/payments/tokens";
|
|
113
|
+
export declare const QBO_PRODUCTION_ORIGIN = "https://api.intuit.com";
|
|
114
|
+
export declare const QBO_SANDBOX_ORIGIN = "https://sandbox.api.intuit.com";
|
|
115
|
+
/** The tokens endpoint of an environment. */
|
|
116
|
+
export declare const qboTokensUrl: (environment: QboEnvironment) => string;
|
|
117
|
+
/** The `errors` of an Intuit answer reduced to code / message / detail / moreInfo strings. */
|
|
118
|
+
export declare function readQboErrors(body: unknown): QboTokenError[];
|
|
119
|
+
/**
|
|
120
|
+
* The default tokenizer: one `fetch` POST to Intuit's tokens endpoint (production or sandbox host by `environment`) with `Content-Type: application/json` and a `Request-Id`
|
|
121
|
+
* header. No cookies are sent (`credentials: 'omit'`), no referrer, nothing is cached, and the body is only the card / bank object. The tokens endpoint needs no
|
|
122
|
+
* authorization: the single-use token it answers is only useful to the seller's connected QuickBooks Payments account.
|
|
123
|
+
*/
|
|
124
|
+
export declare const defaultQboTokenizer: QboTokenizerFn;
|
|
125
|
+
/** How the tokens are requested. Provide your own to fake Intuit in tests. Defaults to `defaultQboTokenizer`. */
|
|
126
|
+
export declare const QBO_TOKENIZER: InjectionToken<QboTokenizerFn>;
|
|
127
|
+
/** App-wide defaults for every QuickBooks Payments component, set once with `provideQboPayment`. A value on the component always wins. */
|
|
128
|
+
interface QboPaymentDefaults {
|
|
129
|
+
/** `'production'` or `'sandbox'` (default `'sandbox'`: a forgotten setting never talks to the real endpoint). */
|
|
130
|
+
environment?: QboEnvironment;
|
|
131
|
+
}
|
|
132
|
+
export declare const QBO_PAYMENT_DEFAULTS: InjectionToken<QboPaymentDefaults>;
|
|
133
|
+
interface ProvideQboPaymentOptions extends QboPaymentDefaults {
|
|
134
|
+
/** Replaces how the tokens are requested (tests). */
|
|
135
|
+
tokenizer?: QboTokenizerFn;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Global defaults for the QuickBooks Payments components:
|
|
139
|
+
*
|
|
140
|
+
* providers: [provideQboPayment({ environment: 'production' })]
|
|
141
|
+
*/
|
|
142
|
+
export declare function provideQboPayment(options?: ProvideQboPaymentOptions): Provider[];
|
|
143
|
+
/** A new `Request-Id` (a UUID, with a time + random fallback for a browser without `crypto.randomUUID`). */
|
|
144
|
+
export declare function newQboRequestId(): string;
|
|
145
|
+
/**
|
|
146
|
+
* The request field an Intuit validation error is about, read from the error's `detail` / `message` (Intuit names the JSON path, e.g. `card.expMonth`).
|
|
147
|
+
* Order matters: the longer names come first.
|
|
148
|
+
*/
|
|
149
|
+
export declare const QBO_FIELD_ERROR_KEYS: ReadonlyArray<readonly [needle: string, key: UiLabelKey]>;
|
|
150
|
+
/** `'friendly'` (default): the field table, then the HTTP status. `'intuit'`: Intuit's own `message` (digits masked), the fallback when there is none. */
|
|
151
|
+
type QboErrorDisplay = 'friendly' | 'intuit';
|
|
152
|
+
interface QboErrorMessageOptions {
|
|
153
|
+
display?: QboErrorDisplay;
|
|
154
|
+
/** Text for single Intuit error codes (`PMT-4000`); wins over the tables. */
|
|
155
|
+
overrides?: Readonly<Record<string, string>> | null;
|
|
156
|
+
/** Shown in `'intuit'` display when Intuit sent no text (the friendly mode always has a status text). */
|
|
157
|
+
fallback?: string;
|
|
158
|
+
}
|
|
159
|
+
/** The text key of an HTTP status of the tokens endpoint. */
|
|
160
|
+
export declare function qboStatusKey(status: number): UiLabelKey;
|
|
161
|
+
/**
|
|
162
|
+
* The text to show the customer for a failed token request. Friendly mode: an override by Intuit code, then the card / bank field the error names, then the status
|
|
163
|
+
* (network, invalid details, not allowed, too many requests, service unavailable). It never echoes a number the customer typed.
|
|
164
|
+
*/
|
|
165
|
+
export declare function getQboErrorMessage(status: number, errors?: readonly QboTokenError[], options?: QboErrorMessageOptions): string;
|
|
166
|
+
/** `'card'` = card number form, `'ach'` = bank-account form. */
|
|
167
|
+
type QboMethod = 'card' | 'ach';
|
|
168
|
+
/** `'payment'` takes a payment, `'setup'` keeps the method on file (the token is used to create a card / bank account on file). */
|
|
169
|
+
type QboIntentKind = 'payment' | 'setup';
|
|
170
|
+
/** What is safe to say about the tokenized method: never a full number. Every field is `null` when it does not apply. */
|
|
171
|
+
interface QboTokenDetails {
|
|
172
|
+
/** Card brand by its leading digits (`'visa'`, `'mastercard'`, `'amex'`, `'discover'`, `'diners'`, `'jcb'`), `null` when unknown. */
|
|
173
|
+
brand: string | null;
|
|
174
|
+
/** The last four digits of the card number or of the bank account number. */
|
|
175
|
+
last4: string | null;
|
|
176
|
+
expMonth: number | null;
|
|
177
|
+
expYear: number | null;
|
|
178
|
+
/** The bank account type the customer picked (`'PERSONAL_CHECKING'`, ...). */
|
|
179
|
+
accountType: string | null;
|
|
180
|
+
}
|
|
181
|
+
/** A successful tokenization. The component NEVER talks to your backend: send `token` (single use) to it. */
|
|
182
|
+
interface QboTokenizedEvent {
|
|
183
|
+
/** Intuit's single-use token (`value` of the tokens answer). */
|
|
184
|
+
token: string;
|
|
185
|
+
method: QboMethod;
|
|
186
|
+
kind: QboIntentKind;
|
|
187
|
+
details: QboTokenDetails;
|
|
188
|
+
/** The `Request-Id` of the tokens call. */
|
|
189
|
+
requestId: string;
|
|
190
|
+
/**
|
|
191
|
+
* The key of this PAYMENT ATTEMPT (stable across retries after a timeout, a reload and a second tab; renewed only after a definitive failure or success): send it to your backend with the
|
|
192
|
+
* charge, which derives Intuit's `Request-Id` of the charge from it. `requestId` above is the Request-Id of the (new per call) tokens request.
|
|
193
|
+
*/
|
|
194
|
+
attemptKey: string;
|
|
195
|
+
/** The payable the attempt started for (the form's `payableRef` at the click): send it with the charge; the backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key. */
|
|
196
|
+
payableRef: string | null;
|
|
197
|
+
}
|
|
198
|
+
type QboFailureStage = 'validate' | 'tokenize';
|
|
199
|
+
/** A failure: `message` is what to show the customer. `errors` are Intuit's own errors (code / message / detail / moreInfo, digit runs masked). */
|
|
200
|
+
interface QboFailure {
|
|
201
|
+
code: string;
|
|
202
|
+
message: string;
|
|
203
|
+
stage: QboFailureStage;
|
|
204
|
+
/** The form field a validation failure is about: `'number'`, `'expiry'`, `'cvc'`, `'postalCode'`, `'name'`, `'holder'`, `'routing'`, `'account'`, `'confirmAccount'`, `'accountType'`, `'consent'`. */
|
|
205
|
+
field?: string;
|
|
206
|
+
/** The HTTP status of the tokens call (`0` = no answer). */
|
|
207
|
+
status?: number;
|
|
208
|
+
errors?: QboTokenError[];
|
|
209
|
+
}
|
|
210
|
+
/** The texts of the screen-reader status region. */
|
|
211
|
+
interface QboA11yMessages {
|
|
212
|
+
processing: string;
|
|
213
|
+
tokenized: string;
|
|
214
|
+
}
|
|
215
|
+
/** The screen-reader messages of the payment form; read on every access, so they follow the app's active language. */
|
|
216
|
+
export declare const QBO_A11Y_MESSAGES: Readonly<QboA11yMessages>;
|
|
217
|
+
/**
|
|
218
|
+
* QuickBooks Payments card / bank-account form that tokenizes IN THE BROWSER: the numbers go from this form straight to Intuit's tokens endpoint and never to your
|
|
219
|
+
* backend (or to the payments service). The component collects the fields with the library inputs, validates them (Luhn, expiry, security code length by brand,
|
|
220
|
+
* routing format (9 digits; no ABA checksum), account length, ZIP / Canadian postal code) with inline messages, posts them through the `QBO_TOKENIZER` seam, CLEARS every field (and re-creates the inputs) the moment the
|
|
221
|
+
* request is on its way, and emits `(tokenized)` with the single-use token and the brand / last four, or `(failed)`.
|
|
222
|
+
*
|
|
223
|
+
* <ui-qbo-payment environment="production" [methods]="['card', 'ach']" (tokenized)="onToken($event)" (failed)="onFailed($event)" />
|
|
224
|
+
*
|
|
225
|
+
* Typing a card number into a page of your own still puts that page in PCI DSS SAQ A-EP scope (see docs/quickbooks-payments.md: CSP, no logging, no analytics on the
|
|
226
|
+
* page, autocomplete attributes, never store the values).
|
|
227
|
+
*/
|
|
228
|
+
export declare class QboPaymentComponent {
|
|
229
|
+
protected readonly labels: UiLabelsService;
|
|
230
|
+
private readonly tokenizer;
|
|
231
|
+
private readonly defaults;
|
|
232
|
+
private readonly host;
|
|
233
|
+
private readonly injector;
|
|
234
|
+
/**
|
|
235
|
+
* Mount-only mode: the fields (and the method switcher when `methods` has two) only. No submit button, secure note, required heading, status text (unless `a11yMessages` is set) or
|
|
236
|
+
* error alert: failures go to `(failed)` only. The host keeps its own button and calls `tokenize()`; the typed values are still read, sent and cleared by it.
|
|
237
|
+
*/
|
|
238
|
+
readonly mountOnly: import("@angular/core").InputSignal<boolean>;
|
|
239
|
+
/** `'payment'` takes a payment, `'setup'` keeps the method on file (changes the default button text). */
|
|
240
|
+
readonly mode: import("@angular/core").InputSignal<QboIntentKind>;
|
|
241
|
+
/** The method shown: `'card'` or `'ach'` (a bank account). Two-way. */
|
|
242
|
+
readonly method: import("@angular/core").ModelSignal<QboMethod>;
|
|
243
|
+
/** The methods the customer may pick between (a switcher is shown for two or more); `null` = only the `method` above. */
|
|
244
|
+
readonly methods: import("@angular/core").InputSignal<readonly QboMethod[] | null>;
|
|
245
|
+
/** `'production'` or `'sandbox'` (default: the provider's, else `'sandbox'`). Decides which Intuit host the tokens are requested from. */
|
|
246
|
+
readonly environment: import("@angular/core").InputSignal<QboEnvironment | null>;
|
|
247
|
+
/** Pre-fills the name on the card and the account holder; the customer can edit it. */
|
|
248
|
+
readonly cardholderName: import("@angular/core").InputSignal<string>;
|
|
249
|
+
/** The name on the card is required (default: optional, Intuit does not need it). */
|
|
250
|
+
readonly requireName: import("@angular/core").InputSignal<boolean>;
|
|
251
|
+
/** The postal code is required (default: optional). */
|
|
252
|
+
readonly requirePostalCode: import("@angular/core").InputSignal<boolean>;
|
|
253
|
+
/** Where the card's postal code is from: `'US'` (a ZIP: `12345` or `12345-6789`, the default) or `'CA'` (a Canadian code: `A1A 1A1`). Sent to Intuit as `address.country` only for `'CA'`. */
|
|
254
|
+
readonly postalCountry: import("@angular/core").InputSignal<QboPostalCountry>;
|
|
255
|
+
/** Ask for the account number twice (default true). */
|
|
256
|
+
readonly confirmAccountNumber: import("@angular/core").InputSignal<boolean>;
|
|
257
|
+
/** ACH: the authorization checkbox must be ticked (default true: a bank debit needs the account holder's authorization). */
|
|
258
|
+
readonly requireAchConsent: import("@angular/core").InputSignal<boolean>;
|
|
259
|
+
readonly achConsentTextInput: import("@angular/core").InputSignal<string | null>;
|
|
260
|
+
readonly achConsent: import("@angular/core").Signal<string>;
|
|
261
|
+
/** Show the built-in attempt / readiness status block (a payment plugin that embeds this form shows its own and turns this off). */
|
|
262
|
+
readonly showStatus: import("@angular/core").InputSignal<boolean>;
|
|
263
|
+
/**
|
|
264
|
+
* The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a
|
|
265
|
+
* SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.
|
|
266
|
+
*/
|
|
267
|
+
readonly payableRef: import("@angular/core").InputSignal<string | null>;
|
|
268
|
+
/** A key the host supplies for the charge; empty = the component generates one per payment attempt session (see `attemptKeyChange`). */
|
|
269
|
+
readonly attemptKey: import("@angular/core").InputSignal<string | null>;
|
|
270
|
+
/** The host's status check by attempt key: resolves an UNKNOWN outcome (`'succeeded' | 'failed' | 'unknown' | 'in_flight'`). */
|
|
271
|
+
readonly checkStatus: import("@angular/core").InputSignal<CheckPaymentStatusFn | null>;
|
|
272
|
+
/** The payable is paid (host re-render, back navigation): the form shows the paid state and ignores every submit for good. */
|
|
273
|
+
readonly paid: import("@angular/core").InputSignal<boolean>;
|
|
274
|
+
/** The host reports an ambiguous result of ITS charge call (its own timeout): the form goes to "Checking your payment..." while true. */
|
|
275
|
+
readonly hostPending: import("@angular/core").InputSignal<boolean>;
|
|
276
|
+
readonly statusPollMs: import("@angular/core").InputSignal<number>;
|
|
277
|
+
readonly statusPollMaxMs: import("@angular/core").InputSignal<number>;
|
|
278
|
+
/** A status check slower than this counts as unknown (ms). */
|
|
279
|
+
readonly statusCheckTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
280
|
+
/** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */
|
|
281
|
+
readonly statusFailGraceMs: import("@angular/core").InputSignal<number>;
|
|
282
|
+
/** Offer "Start over" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */
|
|
283
|
+
readonly allowStartOver: import("@angular/core").InputSignal<boolean>;
|
|
284
|
+
/** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */
|
|
285
|
+
readonly offlineOverride: import("@angular/core").InputSignal<boolean>;
|
|
286
|
+
/** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and "Check again" engage. */
|
|
287
|
+
readonly hostSilenceMs: import("@angular/core").InputSignal<number>;
|
|
288
|
+
/** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */
|
|
289
|
+
readonly readinessCheck: import("@angular/core").InputSignal<ReadinessCheckFn | null>;
|
|
290
|
+
readonly readinessTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
291
|
+
readonly readinessEveryMs: import("@angular/core").InputSignal<number>;
|
|
292
|
+
readonly submitLabel: import("@angular/core").InputSignal<string>;
|
|
293
|
+
/** Show the built-in submit button; turn off to use your own and call `tokenize()`. */
|
|
294
|
+
readonly showSubmit: import("@angular/core").InputSignal<boolean>;
|
|
295
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
296
|
+
/** The host is still preparing the form: the fields and the button are off. */
|
|
297
|
+
readonly pending: import("@angular/core").InputSignal<boolean>;
|
|
298
|
+
/** Accessible name of the payment form. */
|
|
299
|
+
readonly labelInput: import("@angular/core").InputSignal<string | null>;
|
|
300
|
+
readonly label: import("@angular/core").Signal<string>;
|
|
301
|
+
/** The payment details are required (a required wizard step): a visible heading with a red asterisk is shown above the form. Not shown in `mountOnly` mode. */
|
|
302
|
+
readonly required: import("@angular/core").InputSignal<boolean>;
|
|
303
|
+
/** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */
|
|
304
|
+
readonly showErrors: import("@angular/core").InputSignal<boolean>;
|
|
305
|
+
/** `'friendly'` (default) or `'intuit'` (Intuit's own message, digits masked). See `getQboErrorMessage`. */
|
|
306
|
+
readonly errorDisplay: import("@angular/core").InputSignal<QboErrorDisplay>;
|
|
307
|
+
/** Replacement texts by code: Intuit error codes AND the library's own codes (`validation`, `network`, ...). */
|
|
308
|
+
readonly errorMessages: import("@angular/core").InputSignal<Record<string, string> | null>;
|
|
309
|
+
readonly errorFallback: import("@angular/core").InputSignal<string>;
|
|
310
|
+
/** Texts of the screen-reader status region (translate them); missing keys keep the defaults. */
|
|
311
|
+
readonly a11yMessages: import("@angular/core").InputSignal<Partial<QboA11yMessages> | null>;
|
|
312
|
+
/** The details were tokenized: send `token` to your backend. The typed values are already gone from the form. */
|
|
313
|
+
readonly tokenized: import("@angular/core").OutputEmitterRef<QboTokenizedEvent>;
|
|
314
|
+
/** A step failed (validation, or Intuit refused the details). `message` is ready to show. */
|
|
315
|
+
readonly failed: import("@angular/core").OutputEmitterRef<QboFailure>;
|
|
316
|
+
/** A step of an attempt started / ended (the synchronous lock). */
|
|
317
|
+
readonly inFlightChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
318
|
+
/** Unified outcome of a payment attempt: `succeeded`, `failed`, `unknown`, `refused` (with `reason`), `pending`. */
|
|
319
|
+
readonly outcome: import("@angular/core").OutputEmitterRef<PaymentAttemptOutcome>;
|
|
320
|
+
/** The attempt key in effect (also on `tokenized`): send it to your backend with the charge. */
|
|
321
|
+
readonly attemptKeyChange: import("@angular/core").OutputEmitterRef<string>;
|
|
322
|
+
/** The readiness gate changed: `{ ready, reasons }`. */
|
|
323
|
+
readonly readinessChange: import("@angular/core").OutputEmitterRef<PaymentReadinessResult>;
|
|
324
|
+
readonly submitting: import("@angular/core").WritableSignal<boolean>;
|
|
325
|
+
readonly errorText: import("@angular/core").WritableSignal<string>;
|
|
326
|
+
private readonly announcement;
|
|
327
|
+
protected readonly attempted: import("@angular/core").WritableSignal<boolean>;
|
|
328
|
+
private readonly formKey;
|
|
329
|
+
protected readonly formKeys: import("@angular/core").Signal<number[]>;
|
|
330
|
+
protected readonly number: import("@angular/core").WritableSignal<string>;
|
|
331
|
+
protected readonly cardName: import("@angular/core").WritableSignal<string>;
|
|
332
|
+
protected readonly expiry: import("@angular/core").WritableSignal<string>;
|
|
333
|
+
protected readonly cvc: import("@angular/core").WritableSignal<string>;
|
|
334
|
+
protected readonly postal: import("@angular/core").WritableSignal<string>;
|
|
335
|
+
protected readonly holder: import("@angular/core").WritableSignal<string>;
|
|
336
|
+
protected readonly routing: import("@angular/core").WritableSignal<string>;
|
|
337
|
+
protected readonly account: import("@angular/core").WritableSignal<string>;
|
|
338
|
+
protected readonly confirm: import("@angular/core").WritableSignal<string>;
|
|
339
|
+
protected readonly accountType: import("@angular/core").WritableSignal<QboBankAccountType>;
|
|
340
|
+
protected readonly consent: import("@angular/core").WritableSignal<boolean>;
|
|
341
|
+
protected readonly errorId: string;
|
|
342
|
+
protected readonly formatNumber: typeof formatCardNumber;
|
|
343
|
+
protected readonly formatExpiryText: typeof formatExpiry;
|
|
344
|
+
protected readonly cvcFormatter: (raw: string) => string;
|
|
345
|
+
protected readonly postalFormatter: import("@angular/core").Signal<(raw: string) => string>;
|
|
346
|
+
protected readonly postalPlaceholder: import("@angular/core").Signal<"A1A 1A1" | "94086">;
|
|
347
|
+
protected readonly postalInputMode: import("@angular/core").Signal<"text" | "numeric">;
|
|
348
|
+
protected readonly postalMaxLength: import("@angular/core").Signal<7 | 10>;
|
|
349
|
+
protected readonly routingFormatter: (raw: string) => string;
|
|
350
|
+
protected readonly accountFormatter: (raw: string) => string;
|
|
351
|
+
protected readonly tabs: import("@angular/core").Signal<PillTab[]>;
|
|
352
|
+
protected readonly accountTypeOptions: import("@angular/core").Signal<SelectOption<string>[]>;
|
|
353
|
+
protected readonly locked: import("@angular/core").Signal<boolean>;
|
|
354
|
+
protected readonly brand: import("@angular/core").Signal<import("@forgeroute/ui/quickbooks").QboCardBrand | null>;
|
|
355
|
+
protected readonly brandHint: import("@angular/core").Signal<string>;
|
|
356
|
+
protected readonly effectiveSubmitLabel: import("@angular/core").Signal<string>;
|
|
357
|
+
private readonly messages;
|
|
358
|
+
protected readonly statusText: import("@angular/core").Signal<string>;
|
|
359
|
+
private destroyed;
|
|
360
|
+
/** The method whose fields are on screen; a change clears the typed values (a card number must not linger in the bank form's state, nor the other way round). */
|
|
361
|
+
private shownMethod;
|
|
362
|
+
/** The country whose postal rule the typed code was written for; a change empties the code (a ZIP is not a Canadian postal code and the other way round). */
|
|
363
|
+
private shownCountry;
|
|
364
|
+
protected readonly numberError: import("@angular/core").Signal<string>;
|
|
365
|
+
protected readonly expiryError: import("@angular/core").Signal<string>;
|
|
366
|
+
protected readonly cvcError: import("@angular/core").Signal<string>;
|
|
367
|
+
protected readonly postalError: import("@angular/core").Signal<string>;
|
|
368
|
+
protected readonly routingError: import("@angular/core").Signal<string>;
|
|
369
|
+
protected readonly accountError: import("@angular/core").Signal<string>;
|
|
370
|
+
protected readonly confirmError: import("@angular/core").Signal<string>;
|
|
371
|
+
/** The duplicate-payment protection of this form: the synchronous lock, the attempt key, the unknown state. */
|
|
372
|
+
readonly attempt: PaymentAttempt;
|
|
373
|
+
/** The readiness gate: `readiness.ready()` / `readiness.reasons()`. */
|
|
374
|
+
readonly readiness: PaymentReadiness;
|
|
375
|
+
constructor();
|
|
376
|
+
/**
|
|
377
|
+
* Validates and tokenizes the entered card / bank account (the same as the built-in button). Resolves the event (also emitted as `tokenized`), or `null` after a failure
|
|
378
|
+
* (emitted as `failed`) or when nothing was started (already running, disabled). Never rejects. The typed values are cleared from the form as soon as the request is sent,
|
|
379
|
+
* whatever the answer: after a failure the customer types them again.
|
|
380
|
+
*/
|
|
381
|
+
tokenize(): Promise<QboTokenizedEvent | null>;
|
|
382
|
+
/** The host reports that ITS charge call timed out or is ambiguous: the form shows "Checking your payment..." and stays locked (see `checkStatus`). */
|
|
383
|
+
markUnknown(): void;
|
|
384
|
+
/** The host reports that the charge succeeded: the form locks for this payable (a success does NOT move the epoch: the same key replays the original payment; the paid lock lasts 24 hours, see `resetPaid()`). */
|
|
385
|
+
markSucceeded(): void;
|
|
386
|
+
/** The host reports a DEFINITIVE failure of the charge (declined): the form unlocks with a NEW attempt key. */
|
|
387
|
+
markFailed(): void;
|
|
388
|
+
/** The host did not use the token and nothing reached the processor (its call never left, the offline layer refused it): the form unlocks and the attempt key is KEPT. */
|
|
389
|
+
markNotCharged(): void;
|
|
390
|
+
/** The host starts a deliberate SECOND payment of this payable (an explicit "pay again" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */
|
|
391
|
+
resetPaid(): void;
|
|
392
|
+
/** The gate before ANYTHING starts: a paid or unknown payable, offline, or a failed readiness check refuses (nothing is sent, the reason is reported). */
|
|
393
|
+
private refusedByProtection;
|
|
394
|
+
/** After a refused submit the focus goes to the field the message is about (WCAG 2.2: the error is reachable without hunting for it); the inline message is already shown there. */
|
|
395
|
+
private focusField;
|
|
396
|
+
/** Clears every typed value and re-creates the inputs (also what tokenize() does after sending). */
|
|
397
|
+
reset(): void;
|
|
398
|
+
/** Builds the Intuit request from the fields and starts it. Everything sensitive stays in this function's scope; only the non-sensitive details leave it. */
|
|
399
|
+
private dispatch;
|
|
400
|
+
private clearFields;
|
|
401
|
+
private fail;
|
|
402
|
+
private requiredText;
|
|
403
|
+
private numberMessage;
|
|
404
|
+
private expiryMessage;
|
|
405
|
+
private cvcMessage;
|
|
406
|
+
private postalMessage;
|
|
407
|
+
private routingMessage;
|
|
408
|
+
private accountMessage;
|
|
409
|
+
private confirmMessage;
|
|
410
|
+
/** The first thing that stops the form from being tokenized, in the order of the fields. */
|
|
411
|
+
private firstIssue;
|
|
412
|
+
protected onTab(key: string): void;
|
|
413
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QboPaymentComponent, never>;
|
|
414
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QboPaymentComponent, "ui-qbo-payment", never, {
|
|
415
|
+
"mountOnly": {
|
|
416
|
+
"alias": "mountOnly";
|
|
417
|
+
"required": false;
|
|
418
|
+
"isSignal": true;
|
|
419
|
+
};
|
|
420
|
+
"mode": {
|
|
421
|
+
"alias": "mode";
|
|
422
|
+
"required": false;
|
|
423
|
+
"isSignal": true;
|
|
424
|
+
};
|
|
425
|
+
"method": {
|
|
426
|
+
"alias": "method";
|
|
427
|
+
"required": false;
|
|
428
|
+
"isSignal": true;
|
|
429
|
+
};
|
|
430
|
+
"methods": {
|
|
431
|
+
"alias": "methods";
|
|
432
|
+
"required": false;
|
|
433
|
+
"isSignal": true;
|
|
434
|
+
};
|
|
435
|
+
"environment": {
|
|
436
|
+
"alias": "environment";
|
|
437
|
+
"required": false;
|
|
438
|
+
"isSignal": true;
|
|
439
|
+
};
|
|
440
|
+
"cardholderName": {
|
|
441
|
+
"alias": "cardholderName";
|
|
442
|
+
"required": false;
|
|
443
|
+
"isSignal": true;
|
|
444
|
+
};
|
|
445
|
+
"requireName": {
|
|
446
|
+
"alias": "requireName";
|
|
447
|
+
"required": false;
|
|
448
|
+
"isSignal": true;
|
|
449
|
+
};
|
|
450
|
+
"requirePostalCode": {
|
|
451
|
+
"alias": "requirePostalCode";
|
|
452
|
+
"required": false;
|
|
453
|
+
"isSignal": true;
|
|
454
|
+
};
|
|
455
|
+
"postalCountry": {
|
|
456
|
+
"alias": "postalCountry";
|
|
457
|
+
"required": false;
|
|
458
|
+
"isSignal": true;
|
|
459
|
+
};
|
|
460
|
+
"confirmAccountNumber": {
|
|
461
|
+
"alias": "confirmAccountNumber";
|
|
462
|
+
"required": false;
|
|
463
|
+
"isSignal": true;
|
|
464
|
+
};
|
|
465
|
+
"requireAchConsent": {
|
|
466
|
+
"alias": "requireAchConsent";
|
|
467
|
+
"required": false;
|
|
468
|
+
"isSignal": true;
|
|
469
|
+
};
|
|
470
|
+
"achConsentTextInput": {
|
|
471
|
+
"alias": "achConsentText";
|
|
472
|
+
"required": false;
|
|
473
|
+
"isSignal": true;
|
|
474
|
+
};
|
|
475
|
+
"showStatus": {
|
|
476
|
+
"alias": "showStatus";
|
|
477
|
+
"required": false;
|
|
478
|
+
"isSignal": true;
|
|
479
|
+
};
|
|
480
|
+
"payableRef": {
|
|
481
|
+
"alias": "payableRef";
|
|
482
|
+
"required": false;
|
|
483
|
+
"isSignal": true;
|
|
484
|
+
};
|
|
485
|
+
"attemptKey": {
|
|
486
|
+
"alias": "attemptKey";
|
|
487
|
+
"required": false;
|
|
488
|
+
"isSignal": true;
|
|
489
|
+
};
|
|
490
|
+
"checkStatus": {
|
|
491
|
+
"alias": "checkStatus";
|
|
492
|
+
"required": false;
|
|
493
|
+
"isSignal": true;
|
|
494
|
+
};
|
|
495
|
+
"paid": {
|
|
496
|
+
"alias": "paid";
|
|
497
|
+
"required": false;
|
|
498
|
+
"isSignal": true;
|
|
499
|
+
};
|
|
500
|
+
"hostPending": {
|
|
501
|
+
"alias": "hostPending";
|
|
502
|
+
"required": false;
|
|
503
|
+
"isSignal": true;
|
|
504
|
+
};
|
|
505
|
+
"statusPollMs": {
|
|
506
|
+
"alias": "statusPollMs";
|
|
507
|
+
"required": false;
|
|
508
|
+
"isSignal": true;
|
|
509
|
+
};
|
|
510
|
+
"statusPollMaxMs": {
|
|
511
|
+
"alias": "statusPollMaxMs";
|
|
512
|
+
"required": false;
|
|
513
|
+
"isSignal": true;
|
|
514
|
+
};
|
|
515
|
+
"statusCheckTimeoutMs": {
|
|
516
|
+
"alias": "statusCheckTimeoutMs";
|
|
517
|
+
"required": false;
|
|
518
|
+
"isSignal": true;
|
|
519
|
+
};
|
|
520
|
+
"statusFailGraceMs": {
|
|
521
|
+
"alias": "statusFailGraceMs";
|
|
522
|
+
"required": false;
|
|
523
|
+
"isSignal": true;
|
|
524
|
+
};
|
|
525
|
+
"allowStartOver": {
|
|
526
|
+
"alias": "allowStartOver";
|
|
527
|
+
"required": false;
|
|
528
|
+
"isSignal": true;
|
|
529
|
+
};
|
|
530
|
+
"offlineOverride": {
|
|
531
|
+
"alias": "offlineOverride";
|
|
532
|
+
"required": false;
|
|
533
|
+
"isSignal": true;
|
|
534
|
+
};
|
|
535
|
+
"hostSilenceMs": {
|
|
536
|
+
"alias": "hostSilenceMs";
|
|
537
|
+
"required": false;
|
|
538
|
+
"isSignal": true;
|
|
539
|
+
};
|
|
540
|
+
"readinessCheck": {
|
|
541
|
+
"alias": "readinessCheck";
|
|
542
|
+
"required": false;
|
|
543
|
+
"isSignal": true;
|
|
544
|
+
};
|
|
545
|
+
"readinessTimeoutMs": {
|
|
546
|
+
"alias": "readinessTimeoutMs";
|
|
547
|
+
"required": false;
|
|
548
|
+
"isSignal": true;
|
|
549
|
+
};
|
|
550
|
+
"readinessEveryMs": {
|
|
551
|
+
"alias": "readinessEveryMs";
|
|
552
|
+
"required": false;
|
|
553
|
+
"isSignal": true;
|
|
554
|
+
};
|
|
555
|
+
"submitLabel": {
|
|
556
|
+
"alias": "submitLabel";
|
|
557
|
+
"required": false;
|
|
558
|
+
"isSignal": true;
|
|
559
|
+
};
|
|
560
|
+
"showSubmit": {
|
|
561
|
+
"alias": "showSubmit";
|
|
562
|
+
"required": false;
|
|
563
|
+
"isSignal": true;
|
|
564
|
+
};
|
|
565
|
+
"disabled": {
|
|
566
|
+
"alias": "disabled";
|
|
567
|
+
"required": false;
|
|
568
|
+
"isSignal": true;
|
|
569
|
+
};
|
|
570
|
+
"pending": {
|
|
571
|
+
"alias": "pending";
|
|
572
|
+
"required": false;
|
|
573
|
+
"isSignal": true;
|
|
574
|
+
};
|
|
575
|
+
"labelInput": {
|
|
576
|
+
"alias": "label";
|
|
577
|
+
"required": false;
|
|
578
|
+
"isSignal": true;
|
|
579
|
+
};
|
|
580
|
+
"required": {
|
|
581
|
+
"alias": "required";
|
|
582
|
+
"required": false;
|
|
583
|
+
"isSignal": true;
|
|
584
|
+
};
|
|
585
|
+
"showErrors": {
|
|
586
|
+
"alias": "showErrors";
|
|
587
|
+
"required": false;
|
|
588
|
+
"isSignal": true;
|
|
589
|
+
};
|
|
590
|
+
"errorDisplay": {
|
|
591
|
+
"alias": "errorDisplay";
|
|
592
|
+
"required": false;
|
|
593
|
+
"isSignal": true;
|
|
594
|
+
};
|
|
595
|
+
"errorMessages": {
|
|
596
|
+
"alias": "errorMessages";
|
|
597
|
+
"required": false;
|
|
598
|
+
"isSignal": true;
|
|
599
|
+
};
|
|
600
|
+
"errorFallback": {
|
|
601
|
+
"alias": "errorFallback";
|
|
602
|
+
"required": false;
|
|
603
|
+
"isSignal": true;
|
|
604
|
+
};
|
|
605
|
+
"a11yMessages": {
|
|
606
|
+
"alias": "a11yMessages";
|
|
607
|
+
"required": false;
|
|
608
|
+
"isSignal": true;
|
|
609
|
+
};
|
|
610
|
+
}, {
|
|
611
|
+
"method": "methodChange";
|
|
612
|
+
"tokenized": "tokenized";
|
|
613
|
+
"failed": "failed";
|
|
614
|
+
"inFlightChange": "inFlightChange";
|
|
615
|
+
"outcome": "outcome";
|
|
616
|
+
"attemptKeyChange": "attemptKeyChange";
|
|
617
|
+
"readinessChange": "readinessChange";
|
|
618
|
+
}, never, never, true, never>;
|
|
619
|
+
}
|
|
620
|
+
/** The state of the seller's QuickBooks Payments connection (the shape of contractor's `GET /integrations/qbo-payments/status`, with the optional names a service may add). */
|
|
621
|
+
interface QboConnectStatus {
|
|
622
|
+
connected: boolean;
|
|
623
|
+
/** The integration is switched on for this account (informational). */
|
|
624
|
+
enabled?: boolean;
|
|
625
|
+
/** The QuickBooks company (realm) id. */
|
|
626
|
+
realmId?: string | null;
|
|
627
|
+
companyName?: string | null;
|
|
628
|
+
/** ISO date-time the connection was made. */
|
|
629
|
+
connectedAt?: string | null;
|
|
630
|
+
/** The access token was revoked or expired for good: the seller has to authorize again. */
|
|
631
|
+
needsReconnect?: boolean;
|
|
632
|
+
}
|
|
633
|
+
/** What the start call answers: the address of Intuit's authorization page (`authUrl`, or `url`). */
|
|
634
|
+
interface QboConnectStart {
|
|
635
|
+
authUrl?: string;
|
|
636
|
+
url?: string;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* What happened after the user pressed a button or the page asked for the state. The flow never shows toasts itself (each app has its own): the host words each outcome.
|
|
640
|
+
*
|
|
641
|
+
* - `connected`: the connection is live. `source: 'check'` = after "Check Status"; `'return'` = the state was read again when the user came back to this tab (`refreshOnReturn`).
|
|
642
|
+
* - `needs-reconnect`: Intuit no longer accepts the saved authorization.
|
|
643
|
+
* - `not-connected`: "Check Status" found no connection (the authorization was not finished).
|
|
644
|
+
* - `disconnected`: the connection was removed.
|
|
645
|
+
* - `link-unavailable`: the answer had no https Intuit address; nothing was opened.
|
|
646
|
+
* - `failed`: a call failed (`action` says which); `error` is what it threw.
|
|
647
|
+
*/
|
|
648
|
+
type QboConnectOutcome = {
|
|
649
|
+
kind: 'connected';
|
|
650
|
+
source: 'check' | 'return';
|
|
651
|
+
} | {
|
|
652
|
+
kind: 'needs-reconnect';
|
|
653
|
+
source: 'check' | 'return';
|
|
654
|
+
} | {
|
|
655
|
+
kind: 'not-connected';
|
|
656
|
+
} | {
|
|
657
|
+
kind: 'disconnected';
|
|
658
|
+
} | {
|
|
659
|
+
kind: 'link-unavailable';
|
|
660
|
+
} | {
|
|
661
|
+
kind: 'failed';
|
|
662
|
+
action: 'start' | 'check' | 'disconnect';
|
|
663
|
+
error: unknown;
|
|
664
|
+
};
|
|
665
|
+
/** The state the flow reads and writes: signals owned by the host (or by the card's two-way models). */
|
|
666
|
+
interface QboConnectState {
|
|
667
|
+
status: WritableSignal<QboConnectStatus | null>;
|
|
668
|
+
loading: WritableSignal<boolean>;
|
|
669
|
+
}
|
|
670
|
+
interface QboConnectFlowOptions {
|
|
671
|
+
/** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */
|
|
672
|
+
start: () => (() => Observable<QboConnectStart>) | null;
|
|
673
|
+
getStatus: () => (() => Observable<QboConnectStatus>) | null;
|
|
674
|
+
disconnect: () => (() => Observable<unknown>) | null;
|
|
675
|
+
state: QboConnectState;
|
|
676
|
+
/** Where outcomes go. */
|
|
677
|
+
emit: (outcome: QboConnectOutcome) => void;
|
|
678
|
+
/** The buttons and methods do nothing while this says true (a read-only user). */
|
|
679
|
+
disabled?: () => boolean;
|
|
680
|
+
/** How THIS tab is sent to Intuit when the browser refused the new tab (default `window.location.href = url`). */
|
|
681
|
+
navigate?: (url: string) => void;
|
|
682
|
+
/** Called when Intuit's page was opened in a new tab (the card then offers "Check Status"). */
|
|
683
|
+
onOpened?: () => void;
|
|
684
|
+
destroyRef: DestroyRef;
|
|
685
|
+
}
|
|
686
|
+
/** Only an https address on Intuit's own domains (`intuit.com`, `quickbooks.com`, or a real subdomain): never `evilintuit.com`, `intuit.com.evil.com`, `http:` or `javascript:`. */
|
|
687
|
+
export declare function isQboUrl(url: string | undefined | null): url is string;
|
|
688
|
+
/**
|
|
689
|
+
* The QuickBooks Payments (Intuit OAuth) connection as a plain class: start (authorization page in a new tab), "Check Status", disconnect, and the "back from Intuit" read.
|
|
690
|
+
* `ui-qbo-connect` runs it behind its card; a host that has to start the flow from code creates its own instance over the same state signals.
|
|
691
|
+
* Intuit's page always opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers); only an https Intuit address is
|
|
692
|
+
* opened; a failed call closes the empty tab.
|
|
693
|
+
*/
|
|
694
|
+
export declare class QboConnectFlow {
|
|
695
|
+
private readonly o;
|
|
696
|
+
/** An Intuit tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */
|
|
697
|
+
tabOpened: boolean;
|
|
698
|
+
constructor(o: QboConnectFlowOptions);
|
|
699
|
+
private get blocked();
|
|
700
|
+
/** Asks for the authorization address and opens Intuit's page in a new tab. */
|
|
701
|
+
startConnect(): void;
|
|
702
|
+
/** "Check Status": reads the state and reports it. */
|
|
703
|
+
check(): void;
|
|
704
|
+
/** Removes the connection. The state becomes "not connected" only after the call succeeded. */
|
|
705
|
+
disconnect(): void;
|
|
706
|
+
/** The state read when the user came back to this tab: silent unless a connection is live or needs to be redone. */
|
|
707
|
+
readStatusOnReturn(): void;
|
|
708
|
+
private openQbo;
|
|
709
|
+
/** The empty tab, opened inside the click and cut from this page (`opener`); null when the browser refused. */
|
|
710
|
+
openBlankTab(): Window | null;
|
|
711
|
+
/** The browser refused the new tab: Intuit opens in this one. */
|
|
712
|
+
private navigateCurrentTab;
|
|
713
|
+
private closeTab;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* The default wording of an outcome, for apps that just want a toast: `{ variant, message }`, or null when nothing should be said.
|
|
717
|
+
*/
|
|
718
|
+
export declare function qboConnectNotice(outcome: QboConnectOutcome): {
|
|
719
|
+
variant: 'success' | 'info' | 'error';
|
|
720
|
+
message: string;
|
|
721
|
+
} | null;
|
|
722
|
+
/**
|
|
723
|
+
* "QuickBooks Payments": the card where a business connects the QuickBooks Payments account it collects payments into (Intuit OAuth). The host owns the data (its three calls and the
|
|
724
|
+
* status value); the component owns the screen and the flow:
|
|
725
|
+
*
|
|
726
|
+
* - not connected: "Connect QuickBooks" (opens Intuit's authorization page in a NEW tab, then offers "Check Status");
|
|
727
|
+
* - connected: success with the company and the date, "Check Status" and "Disconnect" (asks to confirm first);
|
|
728
|
+
* - needs reconnect: warning with "Reconnect".
|
|
729
|
+
*
|
|
730
|
+
* The page opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers) and receives the address when it arrives; with the
|
|
731
|
+
* tab refused the address opens in the current tab. Only an https Intuit address is ever opened. A failed call closes the empty tab and is reported, never toasted.
|
|
732
|
+
*
|
|
733
|
+
* <ui-qbo-connect [(status)]="status" [startConnect]="start" [getStatus]="getStatus" [disconnect]="disconnect" [refreshOnReturn]="true" (outcome)="onOutcome($event)" />
|
|
734
|
+
*
|
|
735
|
+
* where `start = () => http.get<QboConnectStart>('/integrations/qbo-payments/connect')`, `getStatus = () => http.get<QboConnectStatus>('/integrations/qbo-payments/status')` and
|
|
736
|
+
* `disconnect = () => http.delete('/integrations/qbo-payments/disconnect')`.
|
|
737
|
+
*/
|
|
738
|
+
export declare class QboConnectComponent {
|
|
739
|
+
/** Unique per instance: two connect cards on one page must not share the id the dialog's description points at. */
|
|
740
|
+
protected readonly confirmMessageId: string;
|
|
741
|
+
protected readonly labels: UiLabelsService;
|
|
742
|
+
private readonly destroyRef;
|
|
743
|
+
private readonly injector;
|
|
744
|
+
private readonly host;
|
|
745
|
+
/** The call that answers Intuit's authorization address (`{ authUrl }`). Needed for `start()`. */
|
|
746
|
+
readonly startConnect: import("@angular/core").InputSignal<(() => Observable<QboConnectStart>) | null>;
|
|
747
|
+
/** The call that reads the connection's state. Needed for `check()` and `refreshOnReturn`. */
|
|
748
|
+
readonly getStatus: import("@angular/core").InputSignal<(() => Observable<QboConnectStatus>) | null>;
|
|
749
|
+
/** The call that removes the connection. Needed for "Disconnect". */
|
|
750
|
+
readonly disconnect: import("@angular/core").InputSignal<(() => Observable<unknown>) | null>;
|
|
751
|
+
/** The connection state (null = not read yet = shown as not connected). Two-way: the component sets it after "Check Status" and "Disconnect". */
|
|
752
|
+
readonly status: import("@angular/core").ModelSignal<QboConnectStatus | null>;
|
|
753
|
+
readonly titleInput: import("@angular/core").InputSignal<string | null>;
|
|
754
|
+
readonly title: import("@angular/core").Signal<string>;
|
|
755
|
+
/** No card around the content: the text and the buttons sit directly in the host's own card (a setup wizard step). `title` is not shown then. */
|
|
756
|
+
readonly bare: import("@angular/core").InputSignal<boolean>;
|
|
757
|
+
readonly startTitleInput: import("@angular/core").InputSignal<string | null>;
|
|
758
|
+
readonly startTitle: import("@angular/core").Signal<string>;
|
|
759
|
+
readonly startTextInput: import("@angular/core").InputSignal<string | null>;
|
|
760
|
+
readonly startText: import("@angular/core").Signal<string>;
|
|
761
|
+
readonly startLabelInput: import("@angular/core").InputSignal<string | null>;
|
|
762
|
+
readonly startLabel: import("@angular/core").Signal<string>;
|
|
763
|
+
/** The buttons cannot be pressed (a read-only user). */
|
|
764
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
765
|
+
/** Ask before disconnecting (default true). */
|
|
766
|
+
readonly confirmDisconnect: import("@angular/core").InputSignal<boolean>;
|
|
767
|
+
/** After an Intuit tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `connected` / `needs-reconnect` with source `return`. */
|
|
768
|
+
readonly refreshOnReturn: import("@angular/core").InputSignal<boolean>;
|
|
769
|
+
/** How the current tab is sent to Intuit when the browser refused the new tab (default: `window.location.href = url`). */
|
|
770
|
+
readonly navigateTab: import("@angular/core").InputSignal<((url: string) => void) | null>;
|
|
771
|
+
/** What happened (see {@link QboConnectOutcome}); the host words it. */
|
|
772
|
+
readonly outcome: import("@angular/core").OutputEmitterRef<QboConnectOutcome>;
|
|
773
|
+
/** A request is running: the buttons show "Loading..." / "Checking..." and cannot be pressed again. Two-way, so a host can read it. */
|
|
774
|
+
readonly loading: import("@angular/core").ModelSignal<boolean>;
|
|
775
|
+
protected readonly awaiting: import("@angular/core").WritableSignal<boolean>;
|
|
776
|
+
protected readonly confirming: import("@angular/core").WritableSignal<boolean>;
|
|
777
|
+
protected readonly state: import("@angular/core").Signal<"none" | "connected" | "reconnect">;
|
|
778
|
+
protected readonly company: import("@angular/core").Signal<string>;
|
|
779
|
+
protected readonly connectedOn: import("@angular/core").Signal<string>;
|
|
780
|
+
/** What the persistent status region says: the current state, plus "Loading." while a request runs. */
|
|
781
|
+
protected readonly liveText: import("@angular/core").Signal<string>;
|
|
782
|
+
/** The user pressed a button that started a request: when the screen then changes, focus moves to the new screen (the pressed button is gone). */
|
|
783
|
+
private acted;
|
|
784
|
+
private lastState;
|
|
785
|
+
private readonly flow;
|
|
786
|
+
constructor();
|
|
787
|
+
/** Asks for the authorization address and opens Intuit's page in a new tab. */
|
|
788
|
+
start(): void;
|
|
789
|
+
/** "Check Status": reads the state; the card updates and the outcome is reported. */
|
|
790
|
+
check(): void;
|
|
791
|
+
/** "Disconnect": asks for confirmation first (`confirmDisconnect`, default), then removes the connection. */
|
|
792
|
+
askDisconnect(): void;
|
|
793
|
+
protected cancelDisconnect(): void;
|
|
794
|
+
/** Removes the connection (what the confirm's button calls). */
|
|
795
|
+
doDisconnect(): void;
|
|
796
|
+
/** The flow will really send a request (the host gave the call, nothing is running, the card is not read-only). */
|
|
797
|
+
private canRun;
|
|
798
|
+
/** The browser refused the new tab: Intuit opens in this one (through the host's `navigateTab` when it gave one). */
|
|
799
|
+
protected navigateCurrentTab(url: string): void;
|
|
800
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QboConnectComponent, never>;
|
|
801
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QboConnectComponent, "ui-qbo-connect", never, {
|
|
802
|
+
"startConnect": {
|
|
803
|
+
"alias": "startConnect";
|
|
804
|
+
"required": false;
|
|
805
|
+
"isSignal": true;
|
|
806
|
+
};
|
|
807
|
+
"getStatus": {
|
|
808
|
+
"alias": "getStatus";
|
|
809
|
+
"required": false;
|
|
810
|
+
"isSignal": true;
|
|
811
|
+
};
|
|
812
|
+
"disconnect": {
|
|
813
|
+
"alias": "disconnect";
|
|
814
|
+
"required": false;
|
|
815
|
+
"isSignal": true;
|
|
816
|
+
};
|
|
817
|
+
"status": {
|
|
818
|
+
"alias": "status";
|
|
819
|
+
"required": false;
|
|
820
|
+
"isSignal": true;
|
|
821
|
+
};
|
|
822
|
+
"titleInput": {
|
|
823
|
+
"alias": "title";
|
|
824
|
+
"required": false;
|
|
825
|
+
"isSignal": true;
|
|
826
|
+
};
|
|
827
|
+
"bare": {
|
|
828
|
+
"alias": "bare";
|
|
829
|
+
"required": false;
|
|
830
|
+
"isSignal": true;
|
|
831
|
+
};
|
|
832
|
+
"startTitleInput": {
|
|
833
|
+
"alias": "startTitle";
|
|
834
|
+
"required": false;
|
|
835
|
+
"isSignal": true;
|
|
836
|
+
};
|
|
837
|
+
"startTextInput": {
|
|
838
|
+
"alias": "startText";
|
|
839
|
+
"required": false;
|
|
840
|
+
"isSignal": true;
|
|
841
|
+
};
|
|
842
|
+
"startLabelInput": {
|
|
843
|
+
"alias": "startLabel";
|
|
844
|
+
"required": false;
|
|
845
|
+
"isSignal": true;
|
|
846
|
+
};
|
|
847
|
+
"disabled": {
|
|
848
|
+
"alias": "disabled";
|
|
849
|
+
"required": false;
|
|
850
|
+
"isSignal": true;
|
|
851
|
+
};
|
|
852
|
+
"confirmDisconnect": {
|
|
853
|
+
"alias": "confirmDisconnect";
|
|
854
|
+
"required": false;
|
|
855
|
+
"isSignal": true;
|
|
856
|
+
};
|
|
857
|
+
"refreshOnReturn": {
|
|
858
|
+
"alias": "refreshOnReturn";
|
|
859
|
+
"required": false;
|
|
860
|
+
"isSignal": true;
|
|
861
|
+
};
|
|
862
|
+
"navigateTab": {
|
|
863
|
+
"alias": "navigateTab";
|
|
864
|
+
"required": false;
|
|
865
|
+
"isSignal": true;
|
|
866
|
+
};
|
|
867
|
+
"loading": {
|
|
868
|
+
"alias": "loading";
|
|
869
|
+
"required": false;
|
|
870
|
+
"isSignal": true;
|
|
871
|
+
};
|
|
872
|
+
}, {
|
|
873
|
+
"status": "statusChange";
|
|
874
|
+
"outcome": "outcome";
|
|
875
|
+
"loading": "loadingChange";
|
|
876
|
+
}, never, never, true, never>;
|
|
877
|
+
}
|
|
878
|
+
/** What the host's `createPayment` receives: the entered payment, how it is applied to charges, and the single-use token Intuit gave for the customer's card / bank account. */
|
|
879
|
+
interface QboPaymentContext extends PaymentAllocation {
|
|
880
|
+
/** The amount the payer owes (before processing fees), in major units (12.5 = $12.50). */
|
|
881
|
+
amount: number;
|
|
882
|
+
/** The method value that was selected (`'CARD'` / `'ACH'`). */
|
|
883
|
+
paymentMethod: string;
|
|
884
|
+
/** `'card'` or `'ach'` (a bank account). */
|
|
885
|
+
method: QboMethod;
|
|
886
|
+
receivedDate: string;
|
|
887
|
+
notes: string | null;
|
|
888
|
+
/** Intuit's single-use token: send it to your backend (which sends it to the payments service). The card / bank numbers never reach your backend. */
|
|
889
|
+
token: string;
|
|
890
|
+
/** Brand, last four, expiry or account type as far as they apply (never a full number). Intuit's answer has no card funding and no bank name. */
|
|
891
|
+
details: QboTokenDetails;
|
|
892
|
+
/** The `Request-Id` of the tokens call: a good base for the charge's own `Request-Id` (idempotency). */
|
|
893
|
+
requestId: string;
|
|
894
|
+
/**
|
|
895
|
+
* The key of this PAYMENT ATTEMPT: stable across retries after a timeout / offline loss, a reload and a second tab; renewed only after a definitive failure or success. Send it to your
|
|
896
|
+
* backend with the charge (it derives Intuit's `Request-Id` of the charge from it) and answer `checkStatus(attemptKey)` with it.
|
|
897
|
+
*/
|
|
898
|
+
attemptKey: string;
|
|
899
|
+
/** The payable of this attempt (the plugin's `payableRef` at the click): the backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key. */
|
|
900
|
+
payableRef: string | null;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* What the host's `createPayment` answers. `status` is the QuickBooks Payments status: `CAPTURED` / `SUCCEEDED` / `COMPLETED` = paid, `PENDING` / `AUTHORIZED` (and any other
|
|
904
|
+
* non-final value) = submitted and settling (an eCheck takes days), `DECLINED` / `FAILED` / `CANCELLED` / `VOIDED` = not paid (the panel shows `failureMessage` / a default text and
|
|
905
|
+
* the payer types the details again). Fees are optional; when given they are shown as rows under the form.
|
|
906
|
+
*/
|
|
907
|
+
interface QboPaymentResult {
|
|
908
|
+
paymentId?: string | null;
|
|
909
|
+
status?: string;
|
|
910
|
+
failureMessage?: string;
|
|
911
|
+
processingFee?: number;
|
|
912
|
+
platformFee?: number;
|
|
913
|
+
totalAmount?: number;
|
|
914
|
+
processingFeeLabel?: string;
|
|
915
|
+
platformFeeLabel?: string;
|
|
916
|
+
}
|
|
917
|
+
/** The fees of a payment, shown before the payer pays (the host's `estimateFees`) or after the payment exists. Display only. */
|
|
918
|
+
interface QboFees {
|
|
919
|
+
processingFee?: number;
|
|
920
|
+
platformFee?: number;
|
|
921
|
+
/** What the payer is charged (amount + fees), shown as "Total charged". */
|
|
922
|
+
totalAmount?: number;
|
|
923
|
+
processingFeeLabel?: string;
|
|
924
|
+
platformFeeLabel?: string;
|
|
925
|
+
}
|
|
926
|
+
interface QboFeeContext {
|
|
927
|
+
amount: number;
|
|
928
|
+
paymentMethod: string;
|
|
929
|
+
method: QboMethod;
|
|
930
|
+
}
|
|
931
|
+
type QboOutcomeKind = 'paid' | 'processing' | 'failed';
|
|
932
|
+
/**
|
|
933
|
+
* The QuickBooks Payments status as one outcome. A non-final status (`PENDING`, `AUTHORIZED`, anything unknown) counts as `'processing'`: the payment exists, so the payer is told
|
|
934
|
+
* it was submitted, never "failed". No status at all is `'paid'` for a card and `'processing'` for a bank account, which never settles at once.
|
|
935
|
+
*/
|
|
936
|
+
export declare function qboOutcomeOf(status: string | null | undefined, method?: QboMethod): QboOutcomeKind;
|
|
937
|
+
/** The method values the plugin takes over by default. */
|
|
938
|
+
export declare const QBO_PAYMENT_METHOD_VALUES: readonly ["CARD", "ACH"];
|
|
939
|
+
/** The name of a method in the app's active language (an unknown value is shown as it is). */
|
|
940
|
+
export declare const qboMethodLabel: (value: string) => string;
|
|
941
|
+
declare const qboMethodOf: (method: string) => QboMethod;
|
|
942
|
+
/** The texts of the QuickBooks Payments method; read on every access, so they follow the app's active language. */
|
|
943
|
+
export declare const QBO_METHOD_TEXTS: {
|
|
944
|
+
readonly amountNeeded: string;
|
|
945
|
+
readonly notCompleted: string;
|
|
946
|
+
readonly achTitle: string;
|
|
947
|
+
achMessage: (amount: string) => string;
|
|
948
|
+
readonly pendingTitle: string;
|
|
949
|
+
pendingMessage: (amount: string) => string;
|
|
950
|
+
readonly receiptNote: string;
|
|
951
|
+
};
|
|
952
|
+
/**
|
|
953
|
+
* Adds LIVE Card and ACH (QuickBooks Payments) to `ui-payment-side-panel`. Put it inside the panel only for customers who use QuickBooks Payments: its presence replaces the record-only
|
|
954
|
+
* Card / ACH (last 4 digits) with the card / bank-account form that tokenizes in the browser; remove it and the panel is record-only again.
|
|
955
|
+
*
|
|
956
|
+
* <ui-payment-side-panel ...>
|
|
957
|
+
* @if (qboEnabled()) {
|
|
958
|
+
* <ui-qbo-payment-method environment="production" [createPayment]="createPayment" />
|
|
959
|
+
* }
|
|
960
|
+
* </ui-payment-side-panel>
|
|
961
|
+
*
|
|
962
|
+
* The host owns the HTTP: `createPayment(ctx)` receives the single-use token (and the entered amount, date, notes, allocation) and answers the payment result
|
|
963
|
+
* (`{ status, fees... }`). Outcomes arrive as the panel's `outcome` events with kind `'plugin'` and codes `paid`, `processing` and `failed`.
|
|
964
|
+
*/
|
|
965
|
+
export declare class QboPaymentMethodComponent extends PaymentMethodPlugin {
|
|
966
|
+
protected readonly self: this;
|
|
967
|
+
/** Creates the payment on the host's backend from the token (called when the payer presses Pay, after Intuit tokenized). */
|
|
968
|
+
readonly createPayment: import("@angular/core").InputSignal<((ctx: QboPaymentContext) => HostResult<QboPaymentResult>) | null>;
|
|
969
|
+
/** Optional fee preview before paying (display only). */
|
|
970
|
+
readonly estimateFees: import("@angular/core").InputSignal<((ctx: QboFeeContext) => HostResult<QboFees>) | null>;
|
|
971
|
+
readonly environment: import("@angular/core").InputSignal<QboEnvironment | null>;
|
|
972
|
+
/** Pre-fills the name on the card and the bank account holder. */
|
|
973
|
+
readonly cardholderName: import("@angular/core").InputSignal<string>;
|
|
974
|
+
readonly requireName: import("@angular/core").InputSignal<boolean>;
|
|
975
|
+
readonly requirePostalCode: import("@angular/core").InputSignal<boolean>;
|
|
976
|
+
/** `'US'` (ZIP, default) or `'CA'` (Canadian postal code) for the card's postal code. */
|
|
977
|
+
readonly postalCountry: import("@angular/core").InputSignal<QboPostalCountry>;
|
|
978
|
+
/** ACH: the authorization checkbox must be ticked (default true). */
|
|
979
|
+
readonly requireAchConsent: import("@angular/core").InputSignal<boolean>;
|
|
980
|
+
/** The methods this plugin takes over (default: Card and ACH / Bank Transfer). Pass `[{ value: 'CARD', label: 'Card' }]` for cards only. */
|
|
981
|
+
readonly methodListInput: import("@angular/core").InputSignal<readonly PaymentPluginMethod[] | null>;
|
|
982
|
+
readonly methodList: import("@angular/core").Signal<readonly PaymentPluginMethod[]>;
|
|
983
|
+
/** How long a fee estimate may take before Pay is released and "Try again" is offered (ms). */
|
|
984
|
+
readonly estimateTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
985
|
+
/**
|
|
986
|
+
* The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a
|
|
987
|
+
* SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.
|
|
988
|
+
*/
|
|
989
|
+
readonly payableRef: import("@angular/core").InputSignal<string | null>;
|
|
990
|
+
/** A key the host supplies for the charge; empty = the plugin generates one per payment attempt session (it arrives in `createPayment(ctx).attemptKey`). */
|
|
991
|
+
readonly attemptKey: import("@angular/core").InputSignal<string | null>;
|
|
992
|
+
/** The host's status check by attempt key: resolves an UNKNOWN outcome (timeout, offline mid-flight). */
|
|
993
|
+
readonly checkStatus: import("@angular/core").InputSignal<CheckPaymentStatusFn | null>;
|
|
994
|
+
/** The payable is paid (host re-render, back navigation): Pay stays locked for good. */
|
|
995
|
+
readonly paid: import("@angular/core").InputSignal<boolean>;
|
|
996
|
+
/** The host reports an ambiguous result of ITS charge call: the plugin goes to "Checking your payment..." while true. */
|
|
997
|
+
readonly hostPending: import("@angular/core").InputSignal<boolean>;
|
|
998
|
+
readonly statusPollMs: import("@angular/core").InputSignal<number>;
|
|
999
|
+
readonly statusPollMaxMs: import("@angular/core").InputSignal<number>;
|
|
1000
|
+
/** A status check slower than this counts as unknown (ms). */
|
|
1001
|
+
readonly statusCheckTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
1002
|
+
/** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */
|
|
1003
|
+
readonly statusFailGraceMs: import("@angular/core").InputSignal<number>;
|
|
1004
|
+
/** Offer "Start over" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */
|
|
1005
|
+
readonly allowStartOver: import("@angular/core").InputSignal<boolean>;
|
|
1006
|
+
/** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */
|
|
1007
|
+
readonly offlineOverride: import("@angular/core").InputSignal<boolean>;
|
|
1008
|
+
/** How long ONE `createPayment` (tokenize + charge) may take before the outcome counts as unknown (ms). */
|
|
1009
|
+
readonly paymentTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
1010
|
+
/** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */
|
|
1011
|
+
readonly readinessCheck: import("@angular/core").InputSignal<ReadinessCheckFn | null>;
|
|
1012
|
+
readonly readinessTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
1013
|
+
readonly readinessEveryMs: import("@angular/core").InputSignal<number>;
|
|
1014
|
+
/** The payer covers fees: a rejected or empty estimate keeps Pay off (with "Try again") instead of paying without the fee preview. */
|
|
1015
|
+
readonly feesRequired: import("@angular/core").InputSignal<boolean>;
|
|
1016
|
+
readonly receiptNoteInput: import("@angular/core").InputSignal<string | null>;
|
|
1017
|
+
readonly receiptNote: import("@angular/core").Signal<string>;
|
|
1018
|
+
private readonly body;
|
|
1019
|
+
private readonly controls;
|
|
1020
|
+
/** @internal The body registers itself. */
|
|
1021
|
+
attachControls(controls: PaymentAttemptControls): void;
|
|
1022
|
+
/** @internal The body leaves. */
|
|
1023
|
+
detachControls(controls: PaymentAttemptControls): void;
|
|
1024
|
+
/** The host's charge of this payment is ambiguous (its call timed out): the plugin shows "Checking your payment..." and stays locked (see `checkStatus`). */
|
|
1025
|
+
markUnknown(): void;
|
|
1026
|
+
/** The host's charge succeeded: the plugin records it (paid + complete) and locks the payable. */
|
|
1027
|
+
markSucceeded(): void;
|
|
1028
|
+
/** The host's charge was DEFINITIVELY refused: the plugin unlocks with a NEW attempt key. */
|
|
1029
|
+
markFailed(): void;
|
|
1030
|
+
/** NOTHING was sent to the processor: the plugin unlocks and the attempt key is KEPT (the backend must still answer the state of an attempt it already holds for that key). */
|
|
1031
|
+
markNotCharged(): void;
|
|
1032
|
+
/** The host starts a deliberate SECOND payment of this payable (an explicit "pay again" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */
|
|
1033
|
+
resetPaid(): void;
|
|
1034
|
+
readonly methods: import("@angular/core").Signal<readonly PaymentPluginMethod[]>;
|
|
1035
|
+
readonly template: import("@angular/core").Signal<TemplateRef<PaymentMethodBodyContext> | undefined>;
|
|
1036
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QboPaymentMethodComponent, never>;
|
|
1037
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QboPaymentMethodComponent, "ui-qbo-payment-method", never, {
|
|
1038
|
+
"createPayment": {
|
|
1039
|
+
"alias": "createPayment";
|
|
1040
|
+
"required": false;
|
|
1041
|
+
"isSignal": true;
|
|
1042
|
+
};
|
|
1043
|
+
"estimateFees": {
|
|
1044
|
+
"alias": "estimateFees";
|
|
1045
|
+
"required": false;
|
|
1046
|
+
"isSignal": true;
|
|
1047
|
+
};
|
|
1048
|
+
"environment": {
|
|
1049
|
+
"alias": "environment";
|
|
1050
|
+
"required": false;
|
|
1051
|
+
"isSignal": true;
|
|
1052
|
+
};
|
|
1053
|
+
"cardholderName": {
|
|
1054
|
+
"alias": "cardholderName";
|
|
1055
|
+
"required": false;
|
|
1056
|
+
"isSignal": true;
|
|
1057
|
+
};
|
|
1058
|
+
"requireName": {
|
|
1059
|
+
"alias": "requireName";
|
|
1060
|
+
"required": false;
|
|
1061
|
+
"isSignal": true;
|
|
1062
|
+
};
|
|
1063
|
+
"requirePostalCode": {
|
|
1064
|
+
"alias": "requirePostalCode";
|
|
1065
|
+
"required": false;
|
|
1066
|
+
"isSignal": true;
|
|
1067
|
+
};
|
|
1068
|
+
"postalCountry": {
|
|
1069
|
+
"alias": "postalCountry";
|
|
1070
|
+
"required": false;
|
|
1071
|
+
"isSignal": true;
|
|
1072
|
+
};
|
|
1073
|
+
"requireAchConsent": {
|
|
1074
|
+
"alias": "requireAchConsent";
|
|
1075
|
+
"required": false;
|
|
1076
|
+
"isSignal": true;
|
|
1077
|
+
};
|
|
1078
|
+
"methodListInput": {
|
|
1079
|
+
"alias": "methodList";
|
|
1080
|
+
"required": false;
|
|
1081
|
+
"isSignal": true;
|
|
1082
|
+
};
|
|
1083
|
+
"estimateTimeoutMs": {
|
|
1084
|
+
"alias": "estimateTimeoutMs";
|
|
1085
|
+
"required": false;
|
|
1086
|
+
"isSignal": true;
|
|
1087
|
+
};
|
|
1088
|
+
"payableRef": {
|
|
1089
|
+
"alias": "payableRef";
|
|
1090
|
+
"required": false;
|
|
1091
|
+
"isSignal": true;
|
|
1092
|
+
};
|
|
1093
|
+
"attemptKey": {
|
|
1094
|
+
"alias": "attemptKey";
|
|
1095
|
+
"required": false;
|
|
1096
|
+
"isSignal": true;
|
|
1097
|
+
};
|
|
1098
|
+
"checkStatus": {
|
|
1099
|
+
"alias": "checkStatus";
|
|
1100
|
+
"required": false;
|
|
1101
|
+
"isSignal": true;
|
|
1102
|
+
};
|
|
1103
|
+
"paid": {
|
|
1104
|
+
"alias": "paid";
|
|
1105
|
+
"required": false;
|
|
1106
|
+
"isSignal": true;
|
|
1107
|
+
};
|
|
1108
|
+
"hostPending": {
|
|
1109
|
+
"alias": "hostPending";
|
|
1110
|
+
"required": false;
|
|
1111
|
+
"isSignal": true;
|
|
1112
|
+
};
|
|
1113
|
+
"statusPollMs": {
|
|
1114
|
+
"alias": "statusPollMs";
|
|
1115
|
+
"required": false;
|
|
1116
|
+
"isSignal": true;
|
|
1117
|
+
};
|
|
1118
|
+
"statusPollMaxMs": {
|
|
1119
|
+
"alias": "statusPollMaxMs";
|
|
1120
|
+
"required": false;
|
|
1121
|
+
"isSignal": true;
|
|
1122
|
+
};
|
|
1123
|
+
"statusCheckTimeoutMs": {
|
|
1124
|
+
"alias": "statusCheckTimeoutMs";
|
|
1125
|
+
"required": false;
|
|
1126
|
+
"isSignal": true;
|
|
1127
|
+
};
|
|
1128
|
+
"statusFailGraceMs": {
|
|
1129
|
+
"alias": "statusFailGraceMs";
|
|
1130
|
+
"required": false;
|
|
1131
|
+
"isSignal": true;
|
|
1132
|
+
};
|
|
1133
|
+
"allowStartOver": {
|
|
1134
|
+
"alias": "allowStartOver";
|
|
1135
|
+
"required": false;
|
|
1136
|
+
"isSignal": true;
|
|
1137
|
+
};
|
|
1138
|
+
"offlineOverride": {
|
|
1139
|
+
"alias": "offlineOverride";
|
|
1140
|
+
"required": false;
|
|
1141
|
+
"isSignal": true;
|
|
1142
|
+
};
|
|
1143
|
+
"paymentTimeoutMs": {
|
|
1144
|
+
"alias": "paymentTimeoutMs";
|
|
1145
|
+
"required": false;
|
|
1146
|
+
"isSignal": true;
|
|
1147
|
+
};
|
|
1148
|
+
"readinessCheck": {
|
|
1149
|
+
"alias": "readinessCheck";
|
|
1150
|
+
"required": false;
|
|
1151
|
+
"isSignal": true;
|
|
1152
|
+
};
|
|
1153
|
+
"readinessTimeoutMs": {
|
|
1154
|
+
"alias": "readinessTimeoutMs";
|
|
1155
|
+
"required": false;
|
|
1156
|
+
"isSignal": true;
|
|
1157
|
+
};
|
|
1158
|
+
"readinessEveryMs": {
|
|
1159
|
+
"alias": "readinessEveryMs";
|
|
1160
|
+
"required": false;
|
|
1161
|
+
"isSignal": true;
|
|
1162
|
+
};
|
|
1163
|
+
"feesRequired": {
|
|
1164
|
+
"alias": "feesRequired";
|
|
1165
|
+
"required": false;
|
|
1166
|
+
"isSignal": true;
|
|
1167
|
+
};
|
|
1168
|
+
"receiptNoteInput": {
|
|
1169
|
+
"alias": "receiptNote";
|
|
1170
|
+
"required": false;
|
|
1171
|
+
"isSignal": true;
|
|
1172
|
+
};
|
|
1173
|
+
}, {}, never, never, true, never>;
|
|
1174
|
+
}
|
|
1175
|
+
/** Which screen the hosted page shows. */
|
|
1176
|
+
type QboHostedPayState = 'loading' | 'form' | 'processing' | 'success' | 'expired' | 'used' | 'error';
|
|
1177
|
+
/**
|
|
1178
|
+
* The building block of a public "pay this link" page (contractor's `/pay/:token`): the amount summary (title, company, description), the loading / expired / already-paid /
|
|
1179
|
+
* success / error screens and, while the link can be paid, the card / bank form that tokenizes IN THE BROWSER (`ui-qbo-payment`). The page itself (route, token, language
|
|
1180
|
+
* switch, the request that loads the link and the request that charges it) stays in the app: it sets `state`, sends `(tokenized)`'s token to its backend, then sets `success`
|
|
1181
|
+
* or goes back to `form` with an `errorMessage`.
|
|
1182
|
+
*
|
|
1183
|
+
* <ui-qbo-hosted-pay [state]="state()" [companyName]="info()?.companyName" [amountLabel]="info()?.amount" [description]="info()?.description"
|
|
1184
|
+
* [errorMessage]="error()" environment="production" (tokenized)="pay($event)" />
|
|
1185
|
+
*/
|
|
1186
|
+
export declare class QboHostedPayComponent {
|
|
1187
|
+
protected readonly labels: UiLabelsService;
|
|
1188
|
+
/** Which screen to show. `'form'` / `'processing'` show the payment form (`'processing'` locks it while the host charges the token). */
|
|
1189
|
+
readonly state: import("@angular/core").InputSignal<QboHostedPayState>;
|
|
1190
|
+
readonly companyName: import("@angular/core").InputSignal<string>;
|
|
1191
|
+
/** The amount as the host formats it (`'$125.00'`): used in the title, the button and the success text. */
|
|
1192
|
+
readonly amountLabel: import("@angular/core").InputSignal<string>;
|
|
1193
|
+
readonly description: import("@angular/core").InputSignal<string>;
|
|
1194
|
+
/** A message the host words (a failed charge on the form, the load error on the error screen). */
|
|
1195
|
+
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
1196
|
+
readonly environment: import("@angular/core").InputSignal<QboEnvironment | null>;
|
|
1197
|
+
readonly methods: import("@angular/core").InputSignal<readonly QboMethod[] | null>;
|
|
1198
|
+
readonly method: import("@angular/core").InputSignal<QboMethod>;
|
|
1199
|
+
readonly cardholderName: import("@angular/core").InputSignal<string>;
|
|
1200
|
+
readonly requirePostalCode: import("@angular/core").InputSignal<boolean>;
|
|
1201
|
+
/** Passed to the form: the name on the card is required (default: optional). */
|
|
1202
|
+
readonly requireName: import("@angular/core").InputSignal<boolean>;
|
|
1203
|
+
/** Passed to the form: `'US'` (ZIP, default) or `'CA'` (Canadian postal code). */
|
|
1204
|
+
readonly postalCountry: import("@angular/core").InputSignal<QboPostalCountry>;
|
|
1205
|
+
/** Passed to the form: ask for the bank account number twice (default true). */
|
|
1206
|
+
readonly confirmAccountNumber: import("@angular/core").InputSignal<boolean>;
|
|
1207
|
+
/** Passed to the form: the wording of the bank authorization checkbox (default: the library text of the active language). */
|
|
1208
|
+
readonly achConsentText: import("@angular/core").InputSignal<string | null>;
|
|
1209
|
+
/** Passed to the form: the bank authorization must be ticked (default true). */
|
|
1210
|
+
readonly requireAchConsent: import("@angular/core").InputSignal<boolean>;
|
|
1211
|
+
/** Passed to the form: `'payment'` (default) or `'setup'` (button text and authorization wording). */
|
|
1212
|
+
readonly mode: import("@angular/core").InputSignal<QboIntentKind>;
|
|
1213
|
+
/** Passed to the form: `'friendly'` (default) or `'intuit'` (Intuit's own message, digits masked). */
|
|
1214
|
+
readonly errorDisplay: import("@angular/core").InputSignal<QboErrorDisplay>;
|
|
1215
|
+
/** Passed to the form: replacement texts by Intuit code / library code. */
|
|
1216
|
+
readonly errorMessages: import("@angular/core").InputSignal<Record<string, string> | null>;
|
|
1217
|
+
readonly errorFallback: import("@angular/core").InputSignal<string>;
|
|
1218
|
+
/** Passed to the form: texts of its screen-reader status region. */
|
|
1219
|
+
readonly a11yMessages: import("@angular/core").InputSignal<Partial<QboA11yMessages> | null>;
|
|
1220
|
+
/** Accessible name of the payment form (default: the library's "Payment details"). */
|
|
1221
|
+
readonly label: import("@angular/core").InputSignal<string | null>;
|
|
1222
|
+
protected readonly formLabel: import("@angular/core").Signal<string>;
|
|
1223
|
+
/** `'received'` (a card: the money is taken) or `'submitted'` (a bank transfer: it settles in days). `null` (default) = decided by the method the payer tokenized. */
|
|
1224
|
+
readonly successKind: import("@angular/core").InputSignal<"received" | "submitted" | null>;
|
|
1225
|
+
private readonly lastMethod;
|
|
1226
|
+
protected readonly effectiveSuccessKind: import("@angular/core").Signal<"received" | "submitted">;
|
|
1227
|
+
readonly titleInput: import("@angular/core").InputSignal<string | null>;
|
|
1228
|
+
readonly title: import("@angular/core").Signal<string>;
|
|
1229
|
+
protected readonly submitText: import("@angular/core").Signal<string>;
|
|
1230
|
+
/**
|
|
1231
|
+
* The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a
|
|
1232
|
+
* SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.
|
|
1233
|
+
*/
|
|
1234
|
+
readonly payableRef: import("@angular/core").InputSignal<string | null>;
|
|
1235
|
+
readonly attemptKey: import("@angular/core").InputSignal<string | null>;
|
|
1236
|
+
/** The host's status check by attempt key (`GET /public/qbo-pay/attempts/{key}`): resolves an UNKNOWN outcome. */
|
|
1237
|
+
readonly checkStatus: import("@angular/core").InputSignal<CheckPaymentStatusFn | null>;
|
|
1238
|
+
/** The link is already paid (a reload, the back button): the form shows the paid state and ignores every submit. */
|
|
1239
|
+
readonly paid: import("@angular/core").InputSignal<boolean>;
|
|
1240
|
+
/** The host's charge call timed out or is ambiguous: the form shows "Checking your payment..." while true. */
|
|
1241
|
+
readonly hostPending: import("@angular/core").InputSignal<boolean>;
|
|
1242
|
+
readonly statusPollMs: import("@angular/core").InputSignal<number>;
|
|
1243
|
+
readonly statusPollMaxMs: import("@angular/core").InputSignal<number>;
|
|
1244
|
+
/** A status check slower than this counts as unknown (ms). */
|
|
1245
|
+
readonly statusCheckTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
1246
|
+
/** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */
|
|
1247
|
+
readonly statusFailGraceMs: import("@angular/core").InputSignal<number>;
|
|
1248
|
+
/** Offer "Start over" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */
|
|
1249
|
+
readonly allowStartOver: import("@angular/core").InputSignal<boolean>;
|
|
1250
|
+
/** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */
|
|
1251
|
+
readonly offlineOverride: import("@angular/core").InputSignal<boolean>;
|
|
1252
|
+
/** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and "Check again" engage. */
|
|
1253
|
+
readonly hostSilenceMs: import("@angular/core").InputSignal<number>;
|
|
1254
|
+
readonly readinessCheck: import("@angular/core").InputSignal<ReadinessCheckFn | null>;
|
|
1255
|
+
readonly readinessTimeoutMs: import("@angular/core").InputSignal<number>;
|
|
1256
|
+
readonly readinessEveryMs: import("@angular/core").InputSignal<number>;
|
|
1257
|
+
readonly inFlightChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
1258
|
+
readonly outcome: import("@angular/core").OutputEmitterRef<PaymentAttemptOutcome>;
|
|
1259
|
+
readonly attemptKeyChange: import("@angular/core").OutputEmitterRef<string>;
|
|
1260
|
+
readonly readinessChange: import("@angular/core").OutputEmitterRef<PaymentReadinessResult>;
|
|
1261
|
+
private readonly form;
|
|
1262
|
+
constructor();
|
|
1263
|
+
/** The host's charge call timed out or is ambiguous: "Checking your payment..." and locked (see `checkStatus`). */
|
|
1264
|
+
markUnknown(): void;
|
|
1265
|
+
/** The host's charge succeeded: the form locks for this payable (set `state` to `'success'` as well). */
|
|
1266
|
+
markSucceeded(): void;
|
|
1267
|
+
/** The host's charge was DEFINITIVELY refused (declined): unlock with a new attempt key. */
|
|
1268
|
+
markFailed(): void;
|
|
1269
|
+
/** The host did not use the token and nothing reached the processor (its call never left): unlock, the attempt key is KEPT. */
|
|
1270
|
+
markNotCharged(): void;
|
|
1271
|
+
/** The host starts a deliberate SECOND payment of this payable (an explicit "pay again" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */
|
|
1272
|
+
resetPaid(): void;
|
|
1273
|
+
/** The customer's details were tokenized (inside the browser): send `token` to your backend. */
|
|
1274
|
+
readonly tokenized: import("@angular/core").OutputEmitterRef<QboTokenizedEvent>;
|
|
1275
|
+
/** The form refused the details (validation, or Intuit refused them). The built-in alert of the hosted page shows `message`. */
|
|
1276
|
+
readonly failed: import("@angular/core").OutputEmitterRef<QboFailure>;
|
|
1277
|
+
/** The message of the form's last refusal (shown under the form until the next successful tokenization). */
|
|
1278
|
+
protected readonly localError: import("@angular/core").WritableSignal<string>;
|
|
1279
|
+
protected onFailed(failure: QboFailure): void;
|
|
1280
|
+
protected onTokenized(event: QboTokenizedEvent): void;
|
|
1281
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QboHostedPayComponent, never>;
|
|
1282
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QboHostedPayComponent, "ui-qbo-hosted-pay", never, {
|
|
1283
|
+
"state": {
|
|
1284
|
+
"alias": "state";
|
|
1285
|
+
"required": false;
|
|
1286
|
+
"isSignal": true;
|
|
1287
|
+
};
|
|
1288
|
+
"companyName": {
|
|
1289
|
+
"alias": "companyName";
|
|
1290
|
+
"required": false;
|
|
1291
|
+
"isSignal": true;
|
|
1292
|
+
};
|
|
1293
|
+
"amountLabel": {
|
|
1294
|
+
"alias": "amountLabel";
|
|
1295
|
+
"required": false;
|
|
1296
|
+
"isSignal": true;
|
|
1297
|
+
};
|
|
1298
|
+
"description": {
|
|
1299
|
+
"alias": "description";
|
|
1300
|
+
"required": false;
|
|
1301
|
+
"isSignal": true;
|
|
1302
|
+
};
|
|
1303
|
+
"errorMessage": {
|
|
1304
|
+
"alias": "errorMessage";
|
|
1305
|
+
"required": false;
|
|
1306
|
+
"isSignal": true;
|
|
1307
|
+
};
|
|
1308
|
+
"environment": {
|
|
1309
|
+
"alias": "environment";
|
|
1310
|
+
"required": false;
|
|
1311
|
+
"isSignal": true;
|
|
1312
|
+
};
|
|
1313
|
+
"methods": {
|
|
1314
|
+
"alias": "methods";
|
|
1315
|
+
"required": false;
|
|
1316
|
+
"isSignal": true;
|
|
1317
|
+
};
|
|
1318
|
+
"method": {
|
|
1319
|
+
"alias": "method";
|
|
1320
|
+
"required": false;
|
|
1321
|
+
"isSignal": true;
|
|
1322
|
+
};
|
|
1323
|
+
"cardholderName": {
|
|
1324
|
+
"alias": "cardholderName";
|
|
1325
|
+
"required": false;
|
|
1326
|
+
"isSignal": true;
|
|
1327
|
+
};
|
|
1328
|
+
"requirePostalCode": {
|
|
1329
|
+
"alias": "requirePostalCode";
|
|
1330
|
+
"required": false;
|
|
1331
|
+
"isSignal": true;
|
|
1332
|
+
};
|
|
1333
|
+
"requireName": {
|
|
1334
|
+
"alias": "requireName";
|
|
1335
|
+
"required": false;
|
|
1336
|
+
"isSignal": true;
|
|
1337
|
+
};
|
|
1338
|
+
"postalCountry": {
|
|
1339
|
+
"alias": "postalCountry";
|
|
1340
|
+
"required": false;
|
|
1341
|
+
"isSignal": true;
|
|
1342
|
+
};
|
|
1343
|
+
"confirmAccountNumber": {
|
|
1344
|
+
"alias": "confirmAccountNumber";
|
|
1345
|
+
"required": false;
|
|
1346
|
+
"isSignal": true;
|
|
1347
|
+
};
|
|
1348
|
+
"achConsentText": {
|
|
1349
|
+
"alias": "achConsentText";
|
|
1350
|
+
"required": false;
|
|
1351
|
+
"isSignal": true;
|
|
1352
|
+
};
|
|
1353
|
+
"requireAchConsent": {
|
|
1354
|
+
"alias": "requireAchConsent";
|
|
1355
|
+
"required": false;
|
|
1356
|
+
"isSignal": true;
|
|
1357
|
+
};
|
|
1358
|
+
"mode": {
|
|
1359
|
+
"alias": "mode";
|
|
1360
|
+
"required": false;
|
|
1361
|
+
"isSignal": true;
|
|
1362
|
+
};
|
|
1363
|
+
"errorDisplay": {
|
|
1364
|
+
"alias": "errorDisplay";
|
|
1365
|
+
"required": false;
|
|
1366
|
+
"isSignal": true;
|
|
1367
|
+
};
|
|
1368
|
+
"errorMessages": {
|
|
1369
|
+
"alias": "errorMessages";
|
|
1370
|
+
"required": false;
|
|
1371
|
+
"isSignal": true;
|
|
1372
|
+
};
|
|
1373
|
+
"errorFallback": {
|
|
1374
|
+
"alias": "errorFallback";
|
|
1375
|
+
"required": false;
|
|
1376
|
+
"isSignal": true;
|
|
1377
|
+
};
|
|
1378
|
+
"a11yMessages": {
|
|
1379
|
+
"alias": "a11yMessages";
|
|
1380
|
+
"required": false;
|
|
1381
|
+
"isSignal": true;
|
|
1382
|
+
};
|
|
1383
|
+
"label": {
|
|
1384
|
+
"alias": "label";
|
|
1385
|
+
"required": false;
|
|
1386
|
+
"isSignal": true;
|
|
1387
|
+
};
|
|
1388
|
+
"successKind": {
|
|
1389
|
+
"alias": "successKind";
|
|
1390
|
+
"required": false;
|
|
1391
|
+
"isSignal": true;
|
|
1392
|
+
};
|
|
1393
|
+
"titleInput": {
|
|
1394
|
+
"alias": "title";
|
|
1395
|
+
"required": false;
|
|
1396
|
+
"isSignal": true;
|
|
1397
|
+
};
|
|
1398
|
+
"payableRef": {
|
|
1399
|
+
"alias": "payableRef";
|
|
1400
|
+
"required": false;
|
|
1401
|
+
"isSignal": true;
|
|
1402
|
+
};
|
|
1403
|
+
"attemptKey": {
|
|
1404
|
+
"alias": "attemptKey";
|
|
1405
|
+
"required": false;
|
|
1406
|
+
"isSignal": true;
|
|
1407
|
+
};
|
|
1408
|
+
"checkStatus": {
|
|
1409
|
+
"alias": "checkStatus";
|
|
1410
|
+
"required": false;
|
|
1411
|
+
"isSignal": true;
|
|
1412
|
+
};
|
|
1413
|
+
"paid": {
|
|
1414
|
+
"alias": "paid";
|
|
1415
|
+
"required": false;
|
|
1416
|
+
"isSignal": true;
|
|
1417
|
+
};
|
|
1418
|
+
"hostPending": {
|
|
1419
|
+
"alias": "hostPending";
|
|
1420
|
+
"required": false;
|
|
1421
|
+
"isSignal": true;
|
|
1422
|
+
};
|
|
1423
|
+
"statusPollMs": {
|
|
1424
|
+
"alias": "statusPollMs";
|
|
1425
|
+
"required": false;
|
|
1426
|
+
"isSignal": true;
|
|
1427
|
+
};
|
|
1428
|
+
"statusPollMaxMs": {
|
|
1429
|
+
"alias": "statusPollMaxMs";
|
|
1430
|
+
"required": false;
|
|
1431
|
+
"isSignal": true;
|
|
1432
|
+
};
|
|
1433
|
+
"statusCheckTimeoutMs": {
|
|
1434
|
+
"alias": "statusCheckTimeoutMs";
|
|
1435
|
+
"required": false;
|
|
1436
|
+
"isSignal": true;
|
|
1437
|
+
};
|
|
1438
|
+
"statusFailGraceMs": {
|
|
1439
|
+
"alias": "statusFailGraceMs";
|
|
1440
|
+
"required": false;
|
|
1441
|
+
"isSignal": true;
|
|
1442
|
+
};
|
|
1443
|
+
"allowStartOver": {
|
|
1444
|
+
"alias": "allowStartOver";
|
|
1445
|
+
"required": false;
|
|
1446
|
+
"isSignal": true;
|
|
1447
|
+
};
|
|
1448
|
+
"offlineOverride": {
|
|
1449
|
+
"alias": "offlineOverride";
|
|
1450
|
+
"required": false;
|
|
1451
|
+
"isSignal": true;
|
|
1452
|
+
};
|
|
1453
|
+
"hostSilenceMs": {
|
|
1454
|
+
"alias": "hostSilenceMs";
|
|
1455
|
+
"required": false;
|
|
1456
|
+
"isSignal": true;
|
|
1457
|
+
};
|
|
1458
|
+
"readinessCheck": {
|
|
1459
|
+
"alias": "readinessCheck";
|
|
1460
|
+
"required": false;
|
|
1461
|
+
"isSignal": true;
|
|
1462
|
+
};
|
|
1463
|
+
"readinessTimeoutMs": {
|
|
1464
|
+
"alias": "readinessTimeoutMs";
|
|
1465
|
+
"required": false;
|
|
1466
|
+
"isSignal": true;
|
|
1467
|
+
};
|
|
1468
|
+
"readinessEveryMs": {
|
|
1469
|
+
"alias": "readinessEveryMs";
|
|
1470
|
+
"required": false;
|
|
1471
|
+
"isSignal": true;
|
|
1472
|
+
};
|
|
1473
|
+
}, {
|
|
1474
|
+
"inFlightChange": "inFlightChange";
|
|
1475
|
+
"outcome": "outcome";
|
|
1476
|
+
"attemptKeyChange": "attemptKeyChange";
|
|
1477
|
+
"readinessChange": "readinessChange";
|
|
1478
|
+
"tokenized": "tokenized";
|
|
1479
|
+
"failed": "failed";
|
|
1480
|
+
}, never, never, true, never>;
|
|
1481
|
+
}
|
|
1482
|
+
export type { ProvideQboPaymentOptions, QboA11yMessages, QboBankAccountType, QboBankTokenRequest, QboCardBrand, QboCardTokenRequest, QboConnectFlowOptions, QboConnectOutcome, QboConnectStart, QboConnectState, QboConnectStatus, QboEnvironment, QboErrorDisplay, QboErrorMessageOptions, QboFailure, QboFailureStage, QboFeeContext, QboFees, QboHostedPayState, QboIntentKind, QboMethod, QboOutcomeKind, QboPaymentContext, QboPaymentDefaults, QboPaymentResult, QboPostalCountry, QboTokenDetails, QboTokenError, QboTokenizeContext, QboTokenizeRequest, QboTokenizeResult, QboTokenizedEvent, QboTokenizerFn };
|