proxymail-qa 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -10
- package/dist/cli-main.d.ts +19 -0
- package/dist/cli-main.js +373 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +27 -0
- package/dist/cypress-methods.d.ts +9 -0
- package/dist/cypress-methods.js +71 -0
- package/dist/cypress-plugin.d.ts +4 -0
- package/dist/cypress-plugin.js +28 -0
- package/dist/cypress.d.ts +32 -0
- package/dist/cypress.js +42 -0
- package/dist/index.d.ts +464 -6
- package/dist/index.js +306 -6
- package/package.json +19 -4
package/dist/cypress.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Cypress commands (FM-15), matching the Playwright helper: cy.proxymail has
|
|
2
|
+
// the client's methods, for the test it's in. Import it in the support file
|
|
3
|
+
// and register the task with setupProxyMailQA from proxymail-qa/cypress/plugin.
|
|
4
|
+
//
|
|
5
|
+
// // cypress/support/e2e.ts
|
|
6
|
+
// import 'proxymail-qa/cypress';
|
|
7
|
+
//
|
|
8
|
+
// it('signs up', () => {
|
|
9
|
+
// cy.proxymail.createAddress({ persona: true }).then(({ address }) => {
|
|
10
|
+
// …
|
|
11
|
+
// cy.proxymail.waitForCode(address).then(({ value }) => cy.get('[name=code]').type(value));
|
|
12
|
+
// });
|
|
13
|
+
// });
|
|
14
|
+
//
|
|
15
|
+
// Each command runs in Node through cy.task, so the API key never reaches the
|
|
16
|
+
// browser. In a run, each call says which test it came from.
|
|
17
|
+
import { CYPRESS_METHODS, CYPRESS_TASK } from './cypress-methods.js';
|
|
18
|
+
import { testName } from './test-name.js';
|
|
19
|
+
const WAITS = new Set(['waitForCode', 'waitForLink', 'expectNoEmail']);
|
|
20
|
+
const DEFAULT_WAIT = 30;
|
|
21
|
+
// Cypress gives up on a task after 60 seconds; a wait can hold for its
|
|
22
|
+
// timeout, so give it that and a margin.
|
|
23
|
+
export function taskTimeout(method, args) {
|
|
24
|
+
if (!WAITS.has(method))
|
|
25
|
+
return undefined;
|
|
26
|
+
const options = args[1];
|
|
27
|
+
return ((options?.timeout ?? DEFAULT_WAIT) + 30) * 1000;
|
|
28
|
+
}
|
|
29
|
+
// Builds cy.proxymail from Cypress's globals; exported for the tests.
|
|
30
|
+
export function proxymailCommands(Cypress, cy) {
|
|
31
|
+
const call = (method, args) => {
|
|
32
|
+
const test = Cypress.currentTest;
|
|
33
|
+
const name = test ? testName('', test.titlePath ?? (test.title ? [test.title] : [])) : '';
|
|
34
|
+
Cypress.log({ name: 'proxymail', displayName: 'proxymail', message: [method, typeof args[0] === 'string' ? args[0] : ''].filter(Boolean).join(' ') });
|
|
35
|
+
return cy.task(CYPRESS_TASK, { method, args, test: name || null }, { log: false, timeout: taskTimeout(method, args) });
|
|
36
|
+
};
|
|
37
|
+
return Object.fromEntries(CYPRESS_METHODS.map((method) => [method, (...args) => call(method, args)]));
|
|
38
|
+
}
|
|
39
|
+
const globals = globalThis;
|
|
40
|
+
if (globals.Cypress && globals.cy) {
|
|
41
|
+
Object.defineProperty(globals.cy, 'proxymail', { value: proxymailCommands(globals.Cypress, globals.cy), configurable: true });
|
|
42
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -99,10 +99,12 @@ export interface FormValuesOptions extends Omit<CreateAddressInput, 'password' |
|
|
|
99
99
|
page?: string;
|
|
100
100
|
screen?: string;
|
|
101
101
|
guess?: FillUnknownFields;
|
|
102
|
+
kycSandbox?: KycVendor;
|
|
103
|
+
kycOutcome?: KycOutcome;
|
|
102
104
|
}
|
|
103
105
|
export interface FormValue {
|
|
104
106
|
id: string;
|
|
105
|
-
kind: 'email' | 'confirm_email' | 'first_name' | 'last_name' | 'full_name' | 'username' | 'company' | 'password' | 'confirm_password' | 'date_of_birth' | 'birth_day' | 'birth_month' | 'birth_year' | 'country' | 'marketing_consent' | 'other' | 'custom' | 'guess';
|
|
107
|
+
kind: 'email' | 'confirm_email' | 'first_name' | 'last_name' | 'full_name' | 'last_name_reading' | 'first_name_reading' | 'full_name_reading' | 'username' | 'company' | 'password' | 'confirm_password' | 'date_of_birth' | 'birth_day' | 'birth_month' | 'birth_year' | 'country' | 'marketing_consent' | 'other' | 'custom' | 'guess' | 'sandbox';
|
|
106
108
|
value: string | null;
|
|
107
109
|
rule?: {
|
|
108
110
|
id: string;
|
|
@@ -112,6 +114,7 @@ export interface FormValue {
|
|
|
112
114
|
values?: string[];
|
|
113
115
|
leave?: boolean;
|
|
114
116
|
from?: 'placeholder' | 'option' | 'pattern' | 'words' | 'type';
|
|
117
|
+
section?: string;
|
|
115
118
|
note?: string;
|
|
116
119
|
}
|
|
117
120
|
export type CustomFieldValue = {
|
|
@@ -136,12 +139,24 @@ export type CustomFieldValue = {
|
|
|
136
139
|
kind: 'generate';
|
|
137
140
|
} | {
|
|
138
141
|
kind: 'leave';
|
|
139
|
-
};
|
|
142
|
+
} | ReadyMadeValue;
|
|
143
|
+
export type ReadyMadeSection = 'phone' | 'id.national' | 'id.tax' | 'id.passport' | 'business.vat' | 'business.tax' | 'gender' | 'referral_source' | 'language' | 'business.role' | 'business.team_size' | 'business.type' | 'consent.terms';
|
|
144
|
+
export type ReadyMadeIdsFrom = 'safe' | 'stripe' | 'plaid' | 'onfido' | 'veriff' | 'didit' | 'cashfree' | 'setu';
|
|
145
|
+
export interface ReadyMadeValue {
|
|
146
|
+
kind: 'ready_made';
|
|
147
|
+
section: ReadyMadeSection;
|
|
148
|
+
ids_from?: ReadyMadeIdsFrom;
|
|
149
|
+
phones?: Array<{
|
|
150
|
+
country: string;
|
|
151
|
+
number: string;
|
|
152
|
+
}>;
|
|
153
|
+
checked?: boolean;
|
|
154
|
+
}
|
|
140
155
|
export interface CustomFieldInput {
|
|
141
156
|
id?: string;
|
|
142
157
|
name: string;
|
|
143
158
|
match: {
|
|
144
|
-
on: 'words' | 'name' | 'html_id' | 'test_id';
|
|
159
|
+
on: 'words' | 'name' | 'html_id' | 'test_id' | 'kind';
|
|
145
160
|
text: string;
|
|
146
161
|
also?: string[];
|
|
147
162
|
};
|
|
@@ -164,7 +179,7 @@ export interface CustomField {
|
|
|
164
179
|
}
|
|
165
180
|
export interface ChangeRequest {
|
|
166
181
|
id: string;
|
|
167
|
-
kind: 'save_custom_field' | 'delete_custom_field' | 'add_site' | 'remove_site' | 'set_guesses' | 'set_multi_step' | 'save_signup_screen' | 'remove_signup_screen' | 'set_custom_field_enabled' | 'set_standard_field';
|
|
182
|
+
kind: 'save_custom_field' | 'delete_custom_field' | 'add_site' | 'remove_site' | 'set_guesses' | 'set_multi_step' | 'save_signup_screen' | 'remove_signup_screen' | 'set_custom_field_enabled' | 'set_standard_field' | 'save_signup_form';
|
|
168
183
|
target_id: string | null;
|
|
169
184
|
summary: string;
|
|
170
185
|
change: Record<string, unknown>;
|
|
@@ -183,6 +198,7 @@ export type StandardFieldSet = {
|
|
|
183
198
|
export interface CustomFields {
|
|
184
199
|
guesses: FillUnknownFields;
|
|
185
200
|
standard_fields_off?: StandardFieldName[];
|
|
201
|
+
fill_id_fields?: boolean;
|
|
186
202
|
locked: boolean;
|
|
187
203
|
you_lead: boolean;
|
|
188
204
|
fields: CustomField[];
|
|
@@ -202,6 +218,192 @@ export type CustomFieldRemoved = {
|
|
|
202
218
|
status: 'requested';
|
|
203
219
|
request: ChangeRequest;
|
|
204
220
|
};
|
|
221
|
+
export interface SignupFormFieldInput {
|
|
222
|
+
section: string;
|
|
223
|
+
custom_field?: string;
|
|
224
|
+
required?: boolean;
|
|
225
|
+
label?: string;
|
|
226
|
+
testid?: string;
|
|
227
|
+
options?: {
|
|
228
|
+
country?: string;
|
|
229
|
+
min_length?: number;
|
|
230
|
+
max_length?: number;
|
|
231
|
+
classes?: Array<'lower' | 'upper' | 'digit' | 'symbol'>;
|
|
232
|
+
min_age?: number;
|
|
233
|
+
choices?: string[];
|
|
234
|
+
type?: 'text' | 'select' | 'checkbox';
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export interface SignupFormSpecInput {
|
|
238
|
+
version?: 1;
|
|
239
|
+
name: string;
|
|
240
|
+
site?: string;
|
|
241
|
+
language?: string;
|
|
242
|
+
country?: string;
|
|
243
|
+
screens: Array<{
|
|
244
|
+
title?: string;
|
|
245
|
+
path?: string;
|
|
246
|
+
screen_id?: string;
|
|
247
|
+
fields: SignupFormFieldInput[];
|
|
248
|
+
}>;
|
|
249
|
+
}
|
|
250
|
+
export interface SignupFormSpec {
|
|
251
|
+
version: 1;
|
|
252
|
+
name: string;
|
|
253
|
+
site: string | null;
|
|
254
|
+
language: string;
|
|
255
|
+
country: string | null;
|
|
256
|
+
screens: Array<{
|
|
257
|
+
title: string | null;
|
|
258
|
+
path: string | null;
|
|
259
|
+
screen_id: string | null;
|
|
260
|
+
fields: Array<Required<Omit<SignupFormFieldInput, 'options' | 'custom_field'>> & {
|
|
261
|
+
custom_field?: string;
|
|
262
|
+
options: NonNullable<SignupFormFieldInput['options']>;
|
|
263
|
+
}>;
|
|
264
|
+
}>;
|
|
265
|
+
}
|
|
266
|
+
export type SignupFormStatus = 'saved' | 'requested' | 'draft';
|
|
267
|
+
export interface SignupFormSummary {
|
|
268
|
+
id: string;
|
|
269
|
+
name: string;
|
|
270
|
+
status: SignupFormStatus;
|
|
271
|
+
site: string | null;
|
|
272
|
+
screens: number;
|
|
273
|
+
fields: number;
|
|
274
|
+
created_via: 'app' | 'extension' | 'agent' | 'api';
|
|
275
|
+
agent_name: string | null;
|
|
276
|
+
created_at: string;
|
|
277
|
+
updated_at: string;
|
|
278
|
+
}
|
|
279
|
+
export interface SignupFormCustomField {
|
|
280
|
+
name: string;
|
|
281
|
+
match: {
|
|
282
|
+
on: 'test_id';
|
|
283
|
+
text: string;
|
|
284
|
+
};
|
|
285
|
+
site?: string;
|
|
286
|
+
path?: string;
|
|
287
|
+
field_type: 'select' | 'checkbox' | 'text';
|
|
288
|
+
value: CustomFieldValue;
|
|
289
|
+
}
|
|
290
|
+
export interface SignupForm extends SignupFormSummary {
|
|
291
|
+
spec: SignupFormSpec;
|
|
292
|
+
custom_fields: SignupFormCustomField[];
|
|
293
|
+
fills: Array<{
|
|
294
|
+
testid: string;
|
|
295
|
+
section: string;
|
|
296
|
+
fill: 'built_in' | 'custom_field' | 'never';
|
|
297
|
+
}>;
|
|
298
|
+
requested?: {
|
|
299
|
+
name: string;
|
|
300
|
+
spec: SignupFormSpec;
|
|
301
|
+
custom_fields: SignupFormCustomField[];
|
|
302
|
+
};
|
|
303
|
+
request?: ChangeRequest;
|
|
304
|
+
}
|
|
305
|
+
export interface SignupForms {
|
|
306
|
+
locked: boolean;
|
|
307
|
+
you_lead: boolean;
|
|
308
|
+
forms: SignupFormSummary[];
|
|
309
|
+
}
|
|
310
|
+
export interface SignupFormFillPlan {
|
|
311
|
+
fields_filled_by: Array<{
|
|
312
|
+
testid: string;
|
|
313
|
+
label: string;
|
|
314
|
+
filled_by: 'made' | 'form' | 'yours' | 'none';
|
|
315
|
+
custom_field?: {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
};
|
|
319
|
+
named?: true;
|
|
320
|
+
finds?: boolean;
|
|
321
|
+
}>;
|
|
322
|
+
clashes: Array<{
|
|
323
|
+
testid: string;
|
|
324
|
+
label: string;
|
|
325
|
+
yours: {
|
|
326
|
+
id: string;
|
|
327
|
+
name: string;
|
|
328
|
+
};
|
|
329
|
+
form: {
|
|
330
|
+
id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
};
|
|
333
|
+
}>;
|
|
334
|
+
leftovers: Array<{
|
|
335
|
+
custom_field: {
|
|
336
|
+
id: string;
|
|
337
|
+
name: string;
|
|
338
|
+
};
|
|
339
|
+
testid: string;
|
|
340
|
+
reason: 'gone' | 'renamed' | 'yours';
|
|
341
|
+
to?: string;
|
|
342
|
+
}>;
|
|
343
|
+
tidied?: {
|
|
344
|
+
custom_fields_removed: string[];
|
|
345
|
+
custom_fields_moved: string[];
|
|
346
|
+
custom_fields_asked: string[];
|
|
347
|
+
custom_fields_kept: string[];
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
export type SignupFormSaved = ({
|
|
351
|
+
status: 'saved';
|
|
352
|
+
form: SignupForm;
|
|
353
|
+
} | {
|
|
354
|
+
status: 'requested';
|
|
355
|
+
form: SignupForm;
|
|
356
|
+
request: ChangeRequest;
|
|
357
|
+
}) & SignupFormFillPlan;
|
|
358
|
+
export interface SaveSignupFormOptions {
|
|
359
|
+
choices?: Record<string, 'yours' | 'form'>;
|
|
360
|
+
tidy?: {
|
|
361
|
+
remove?: string[];
|
|
362
|
+
move?: Array<{
|
|
363
|
+
id: string;
|
|
364
|
+
testid: string;
|
|
365
|
+
}>;
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
export type SignupCodeFormat = 'react-hook-form' | 'react' | 'html';
|
|
369
|
+
export interface SignupFormCode {
|
|
370
|
+
form: {
|
|
371
|
+
id: string;
|
|
372
|
+
name: string;
|
|
373
|
+
status: 'saved' | 'requested' | 'draft';
|
|
374
|
+
};
|
|
375
|
+
format: SignupCodeFormat;
|
|
376
|
+
files: Array<{
|
|
377
|
+
path: string;
|
|
378
|
+
contents: string;
|
|
379
|
+
}>;
|
|
380
|
+
dependencies: string[];
|
|
381
|
+
notes: string[];
|
|
382
|
+
}
|
|
383
|
+
export type SignupStarterId = 'b2c' | 'b2b' | 'education' | 'marketplace' | 'travel' | 'fintech' | 'japan' | 'china';
|
|
384
|
+
export interface SignupStarter {
|
|
385
|
+
id: SignupStarterId;
|
|
386
|
+
item: string;
|
|
387
|
+
name: string;
|
|
388
|
+
description: string;
|
|
389
|
+
notes: string[];
|
|
390
|
+
spec: SignupFormSpec;
|
|
391
|
+
}
|
|
392
|
+
export type SignupTestFramework = 'playwright' | 'cypress';
|
|
393
|
+
export interface SignupFormTest {
|
|
394
|
+
form: SignupFormCode['form'];
|
|
395
|
+
framework: SignupTestFramework;
|
|
396
|
+
files: Array<{
|
|
397
|
+
path: string;
|
|
398
|
+
contents: string;
|
|
399
|
+
}>;
|
|
400
|
+
dependencies: string[];
|
|
401
|
+
counts: {
|
|
402
|
+
refuse: number;
|
|
403
|
+
take: number;
|
|
404
|
+
};
|
|
405
|
+
notes: string[];
|
|
406
|
+
}
|
|
205
407
|
export interface SignupScreen {
|
|
206
408
|
id: string;
|
|
207
409
|
site_id: string | null;
|
|
@@ -264,6 +466,7 @@ export type ProjectInfo = Record<string, unknown> & {
|
|
|
264
466
|
addresses?: AddressAllowance;
|
|
265
467
|
fill_unknown_fields?: FillUnknownFields;
|
|
266
468
|
standard_fields_off?: StandardFieldName[];
|
|
469
|
+
fill_id_fields?: boolean;
|
|
267
470
|
locked?: boolean;
|
|
268
471
|
custom_fields?: number;
|
|
269
472
|
multi_step_sites?: string[];
|
|
@@ -275,6 +478,7 @@ export interface FormValues {
|
|
|
275
478
|
password?: string;
|
|
276
479
|
values: FormValue[];
|
|
277
480
|
screen?: SignupScreen | null;
|
|
481
|
+
kyc_sandbox?: KycSandbox;
|
|
278
482
|
}
|
|
279
483
|
export interface PreparedAccountOptions extends CheckoutOptions {
|
|
280
484
|
create?: (account: CheckedOutAccount & {
|
|
@@ -315,6 +519,45 @@ export interface Match {
|
|
|
315
519
|
note?: string;
|
|
316
520
|
discount?: string | null;
|
|
317
521
|
valid_until?: string | null;
|
|
522
|
+
link_site?: LinkSite;
|
|
523
|
+
time_to_email?: TimeToEmail;
|
|
524
|
+
}
|
|
525
|
+
export type SubmitFlow = 'sign_up' | 'sign_in' | 'reset' | 'magic_link' | 'other';
|
|
526
|
+
export interface Submit {
|
|
527
|
+
id: string;
|
|
528
|
+
address: string;
|
|
529
|
+
flow: SubmitFlow;
|
|
530
|
+
site: string | null;
|
|
531
|
+
submitted_at: string;
|
|
532
|
+
}
|
|
533
|
+
export interface TimeToEmail {
|
|
534
|
+
submitted_at: string;
|
|
535
|
+
flow: SubmitFlow;
|
|
536
|
+
site: string | null;
|
|
537
|
+
source: 'extension' | 'agent';
|
|
538
|
+
after_seconds: number;
|
|
539
|
+
their_seconds: number | null;
|
|
540
|
+
our_seconds: number | null;
|
|
541
|
+
emails_for_submit: number;
|
|
542
|
+
position: number;
|
|
543
|
+
after_wait_gave_up: boolean;
|
|
544
|
+
usual: {
|
|
545
|
+
submits: number;
|
|
546
|
+
arrived: number;
|
|
547
|
+
nothing: number;
|
|
548
|
+
median_seconds: number | null;
|
|
549
|
+
today_median_seconds: number | null;
|
|
550
|
+
slowest_seconds: number | null;
|
|
551
|
+
slower_than_usual: boolean;
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
export type LinkSiteProblem = 'local' | 'other_site' | 'preview' | 'published' | 'http' | 'bubble_live' | 'bubble_test';
|
|
555
|
+
export interface LinkSite {
|
|
556
|
+
status: 'pass' | 'fail';
|
|
557
|
+
problem?: LinkSiteProblem;
|
|
558
|
+
site: string;
|
|
559
|
+
goes_to: string | null;
|
|
560
|
+
detail: string;
|
|
318
561
|
}
|
|
319
562
|
export interface CreateAddressInput {
|
|
320
563
|
label?: string;
|
|
@@ -326,6 +569,7 @@ export interface CreateAddressInput {
|
|
|
326
569
|
age?: AgeBand;
|
|
327
570
|
dateOfBirth?: string;
|
|
328
571
|
country?: string;
|
|
572
|
+
oneName?: boolean;
|
|
329
573
|
site?: string;
|
|
330
574
|
environment?: string;
|
|
331
575
|
}
|
|
@@ -370,8 +614,17 @@ export interface DeliveryStatus {
|
|
|
370
614
|
last_email_at: string | null;
|
|
371
615
|
refused: Refusal[];
|
|
372
616
|
hint: string;
|
|
617
|
+
shared_sender?: SharedSender;
|
|
373
618
|
help: string;
|
|
374
619
|
}
|
|
620
|
+
export interface SharedSender {
|
|
621
|
+
platform: 'supabase' | 'firebase' | 'bubble' | 'glide' | 'base44' | 'cognito' | 'auth0';
|
|
622
|
+
name: string;
|
|
623
|
+
cap: string | null;
|
|
624
|
+
fix: string;
|
|
625
|
+
docs: string;
|
|
626
|
+
}
|
|
627
|
+
export type NothingArrivedCase = 'nothing_arrived' | 'no_match' | 'turned_away' | 'already_used';
|
|
375
628
|
export interface Variant {
|
|
376
629
|
tests: string;
|
|
377
630
|
address: string;
|
|
@@ -387,6 +640,7 @@ export interface WaitOptions {
|
|
|
387
640
|
service?: string;
|
|
388
641
|
since?: Date | string;
|
|
389
642
|
unused?: boolean;
|
|
643
|
+
expectSite?: string;
|
|
390
644
|
}
|
|
391
645
|
export type CodeType = 'otp' | 'coupon' | 'any';
|
|
392
646
|
export type LinkType = 'verify' | 'magic_signin' | 'invite' | 'reset' | 'unsubscribe' | 'list_unsubscribe' | 'any';
|
|
@@ -423,7 +677,7 @@ export interface CountOptions {
|
|
|
423
677
|
}
|
|
424
678
|
export type EmailCategory = 'auth' | 'transactional' | 'marketing';
|
|
425
679
|
export type CountSubtype = 'otp' | 'coupon' | 'verify' | 'magic_signin' | 'invite' | 'reset' | 'other' | 'unsubscribe' | 'list_unsubscribe' | 'any';
|
|
426
|
-
export type CheckId = 'spf' | 'dkim' | 'dmarc' | 'local_links' | 'plain_http' | 'expected_host' | 'expiry' | 'coupon_expiry' | 'plain_text' | 'size' | 'images_only' | 'layout' | 'expected_text' | 'language' | 'arrival_time' | 'expected_attachment' | 'list_unsubscribe' | 'one_click_unsubscribe' | 'unsubscribe_link' | 'preheader' | 'after_unsubscribe' | 'offer_reuse' | 'coupon_result' | 'marketing_consent' | 'prechecked_consent' | 'double_opt_in' | 'unsubscribe_deadline' | 'postal_address' | 'sender_identity' | 'minor_marketing' | 'harmful_attachment' | 'spam_risk' | 'misleading_subject' | 'ad_label';
|
|
680
|
+
export type CheckId = 'spf' | 'dkim' | 'dmarc' | 'shared_sender' | 'local_links' | 'plain_http' | 'expected_host' | 'link_site' | 'expiry' | 'coupon_expiry' | 'plain_text' | 'size' | 'images_only' | 'layout' | 'expected_text' | 'language' | 'arrival_time' | 'expected_attachment' | 'list_unsubscribe' | 'one_click_unsubscribe' | 'unsubscribe_link' | 'preheader' | 'after_unsubscribe' | 'offer_reuse' | 'coupon_result' | 'marketing_consent' | 'prechecked_consent' | 'double_opt_in' | 'unsubscribe_deadline' | 'postal_address' | 'sender_identity' | 'minor_marketing' | 'harmful_attachment' | 'spam_risk' | 'misleading_subject' | 'ad_label';
|
|
427
681
|
export interface EmailCheck {
|
|
428
682
|
check: CheckId;
|
|
429
683
|
status: 'pass' | 'fail' | 'warn' | 'skip';
|
|
@@ -536,6 +790,130 @@ export interface PasswordVariants {
|
|
|
536
790
|
reject: FieldVariant[];
|
|
537
791
|
decide: FieldVariant[];
|
|
538
792
|
}
|
|
793
|
+
export type Flow = 'sign_up' | 'password_reset' | 'magic_link';
|
|
794
|
+
export interface FlowCheck {
|
|
795
|
+
id: string;
|
|
796
|
+
checks: string;
|
|
797
|
+
needs?: string;
|
|
798
|
+
steps: string[];
|
|
799
|
+
expect: string;
|
|
800
|
+
why: string;
|
|
801
|
+
}
|
|
802
|
+
export type FormSectionGroup = 'person' | 'account' | 'business' | 'documents';
|
|
803
|
+
export type FormSectionTier = 'A' | 'B' | 'rule_only' | 'not_offered';
|
|
804
|
+
export interface FormSectionSummary {
|
|
805
|
+
id: string;
|
|
806
|
+
group: FormSectionGroup;
|
|
807
|
+
name: string;
|
|
808
|
+
source: 'persona' | 'generated' | 'choice' | 'id' | 'never';
|
|
809
|
+
labels: Record<string, string[]>;
|
|
810
|
+
note: string;
|
|
811
|
+
formats?: Array<{
|
|
812
|
+
country: string;
|
|
813
|
+
name: string;
|
|
814
|
+
shape: string;
|
|
815
|
+
tier: FormSectionTier;
|
|
816
|
+
tier_name: string;
|
|
817
|
+
}>;
|
|
818
|
+
ready_made?: {
|
|
819
|
+
options: Array<'ids_from' | 'phones' | 'checked'>;
|
|
820
|
+
leads_only: boolean;
|
|
821
|
+
note: string;
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
export interface FormSection extends FormSectionSummary {
|
|
825
|
+
country: string | null;
|
|
826
|
+
format?: {
|
|
827
|
+
name: string;
|
|
828
|
+
shape: string;
|
|
829
|
+
pattern: string;
|
|
830
|
+
check: FormatCheck | null;
|
|
831
|
+
check_name: string | null;
|
|
832
|
+
tier: FormSectionTier;
|
|
833
|
+
tier_name: string;
|
|
834
|
+
note: string;
|
|
835
|
+
};
|
|
836
|
+
value?: {
|
|
837
|
+
value: string | null;
|
|
838
|
+
compact: string | null;
|
|
839
|
+
shared: boolean;
|
|
840
|
+
fails_strict_checks: boolean;
|
|
841
|
+
unique?: string;
|
|
842
|
+
source?: string;
|
|
843
|
+
url?: string;
|
|
844
|
+
specimen?: {
|
|
845
|
+
value: string;
|
|
846
|
+
source: string;
|
|
847
|
+
url?: string;
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
passport?: {
|
|
851
|
+
issuing_state: string;
|
|
852
|
+
expiry: string;
|
|
853
|
+
holder: {
|
|
854
|
+
surname: string;
|
|
855
|
+
given_names: string;
|
|
856
|
+
date_of_birth: string;
|
|
857
|
+
from: 'address' | 'made_up';
|
|
858
|
+
};
|
|
859
|
+
mrz: [string, string];
|
|
860
|
+
};
|
|
861
|
+
variants?: {
|
|
862
|
+
accept: FieldVariant[];
|
|
863
|
+
reject: FieldVariant[];
|
|
864
|
+
};
|
|
865
|
+
says?: string;
|
|
866
|
+
kyc_sandbox?: KycSandbox;
|
|
867
|
+
}
|
|
868
|
+
export type KycVendor = 'stripe' | 'plaid' | 'onfido' | 'veriff' | 'didit' | 'cashfree' | 'setu';
|
|
869
|
+
export type KycOutcome = 'pass' | 'fail' | 'review';
|
|
870
|
+
export interface KycSandbox {
|
|
871
|
+
vendor: KycVendor;
|
|
872
|
+
name: string;
|
|
873
|
+
product: string;
|
|
874
|
+
outcome: KycOutcome;
|
|
875
|
+
label: string;
|
|
876
|
+
url: string;
|
|
877
|
+
note: string;
|
|
878
|
+
values: Array<{
|
|
879
|
+
section: string | null;
|
|
880
|
+
field: string;
|
|
881
|
+
value: string;
|
|
882
|
+
outcome: KycOutcome;
|
|
883
|
+
gives: string;
|
|
884
|
+
needs?: string;
|
|
885
|
+
country?: string;
|
|
886
|
+
url: string;
|
|
887
|
+
}>;
|
|
888
|
+
says: string;
|
|
889
|
+
}
|
|
890
|
+
export type FormatCheck = 'verhoeff' | 'cpf' | 'cnpj' | 'gb11643' | 'my_number' | 'abn' | 'gb_vat' | 'icao';
|
|
891
|
+
export interface CleanupList {
|
|
892
|
+
from: string;
|
|
893
|
+
to: string;
|
|
894
|
+
kept_from: string;
|
|
895
|
+
count: number;
|
|
896
|
+
truncated: boolean;
|
|
897
|
+
mail_domains: string[];
|
|
898
|
+
addresses: Array<{
|
|
899
|
+
address: string;
|
|
900
|
+
created_at: string;
|
|
901
|
+
status: 'live' | 'expired' | 'deleted';
|
|
902
|
+
ended_at?: string;
|
|
903
|
+
site?: string;
|
|
904
|
+
environment?: string;
|
|
905
|
+
had_email: boolean;
|
|
906
|
+
}>;
|
|
907
|
+
}
|
|
908
|
+
export interface CleanupListOptions {
|
|
909
|
+
from?: Date | string;
|
|
910
|
+
to?: Date | string;
|
|
911
|
+
site?: string;
|
|
912
|
+
}
|
|
913
|
+
export interface FlowChecks {
|
|
914
|
+
flow: Flow;
|
|
915
|
+
checks: FlowCheck[];
|
|
916
|
+
}
|
|
539
917
|
export interface AddressAllowance {
|
|
540
918
|
limited: boolean;
|
|
541
919
|
used: number;
|
|
@@ -568,6 +946,7 @@ export interface EmailChecks {
|
|
|
568
946
|
export interface CheckOptions extends CountOptions {
|
|
569
947
|
emailId?: string;
|
|
570
948
|
expectHost?: string;
|
|
949
|
+
expectSite?: string;
|
|
571
950
|
expectText?: string[];
|
|
572
951
|
expectLanguage?: string;
|
|
573
952
|
expectWithin?: number | string;
|
|
@@ -638,7 +1017,9 @@ export declare class ProxyMailQAError extends Error {
|
|
|
638
1017
|
readonly hint?: string | undefined;
|
|
639
1018
|
readonly refused?: Refusal[] | undefined;
|
|
640
1019
|
readonly help?: string | undefined;
|
|
641
|
-
|
|
1020
|
+
readonly why?: NothingArrivedCase | undefined;
|
|
1021
|
+
readonly sharedSender?: SharedSender | undefined;
|
|
1022
|
+
constructor(status: number, code: string, message: string, hint?: string | undefined, refused?: Refusal[] | undefined, help?: string | undefined, why?: NothingArrivedCase | undefined, sharedSender?: SharedSender | undefined);
|
|
642
1023
|
}
|
|
643
1024
|
export declare class ProxyMailQA {
|
|
644
1025
|
#private;
|
|
@@ -657,12 +1038,33 @@ export declare class ProxyMailQA {
|
|
|
657
1038
|
emailPrefix?: string | null;
|
|
658
1039
|
mailDomain?: string;
|
|
659
1040
|
fillUnknownFields?: FillUnknownFields;
|
|
1041
|
+
fillIdFields?: boolean;
|
|
660
1042
|
}): Promise<ProjectInfo>;
|
|
661
1043
|
customFields(): Promise<CustomFields>;
|
|
662
1044
|
saveCustomField(field: CustomFieldInput): Promise<CustomFieldSaved>;
|
|
663
1045
|
deleteCustomField(id: string): Promise<CustomFieldRemoved>;
|
|
664
1046
|
setCustomFieldEnabled(id: string, on: boolean): Promise<CustomFieldSaved>;
|
|
665
1047
|
setStandardField(field: StandardFieldName, on: boolean): Promise<StandardFieldSet>;
|
|
1048
|
+
signupForms(): Promise<SignupForms>;
|
|
1049
|
+
signupForm(id: string): Promise<SignupForm>;
|
|
1050
|
+
saveSignupForm(spec: SignupFormSpecInput, id?: string, options?: SaveSignupFormOptions): Promise<SignupFormSaved>;
|
|
1051
|
+
deleteSignupForm(id: string, options?: {
|
|
1052
|
+
removeCustomFields?: boolean;
|
|
1053
|
+
}): Promise<{
|
|
1054
|
+
status: "removed";
|
|
1055
|
+
id: string;
|
|
1056
|
+
custom_fields_removed: string[];
|
|
1057
|
+
custom_fields_asked: string[];
|
|
1058
|
+
custom_fields_kept: string[];
|
|
1059
|
+
}>;
|
|
1060
|
+
signupFormCode(id: string, options?: {
|
|
1061
|
+
format?: SignupCodeFormat;
|
|
1062
|
+
requested?: boolean;
|
|
1063
|
+
}): Promise<SignupFormCode>;
|
|
1064
|
+
signupFormTest(id: string, options?: {
|
|
1065
|
+
framework?: SignupTestFramework;
|
|
1066
|
+
requested?: boolean;
|
|
1067
|
+
}): Promise<SignupFormTest>;
|
|
666
1068
|
sites(): Promise<Sites>;
|
|
667
1069
|
addSite(site: string, environment: string): Promise<SiteAdded>;
|
|
668
1070
|
setMultiStep(site: string, on: boolean): Promise<MultiStepSet>;
|
|
@@ -680,6 +1082,39 @@ export declare class ProxyMailQA {
|
|
|
680
1082
|
formValues(options: FormValuesOptions): Promise<FormValues>;
|
|
681
1083
|
listAddresses(options?: ListAddressesOptions): Promise<Address[]>;
|
|
682
1084
|
signInAccount(options?: SignInOptions): Promise<SignInAccount | null>;
|
|
1085
|
+
totpCode(secret: string, options?: TotpOptions): Promise<string>;
|
|
1086
|
+
signupStarters(options?: {
|
|
1087
|
+
id?: SignupStarterId;
|
|
1088
|
+
language?: string;
|
|
1089
|
+
country?: string;
|
|
1090
|
+
}): Promise<{
|
|
1091
|
+
starters: SignupStarter[];
|
|
1092
|
+
}>;
|
|
1093
|
+
listFormSections(options?: {
|
|
1094
|
+
country?: string;
|
|
1095
|
+
group?: FormSectionGroup;
|
|
1096
|
+
kycSandbox?: KycVendor;
|
|
1097
|
+
kycOutcome?: KycOutcome;
|
|
1098
|
+
}): Promise<{
|
|
1099
|
+
country: string | null;
|
|
1100
|
+
group: FormSectionGroup | null;
|
|
1101
|
+
sections: FormSectionSummary[];
|
|
1102
|
+
kyc_sandbox?: KycSandbox;
|
|
1103
|
+
}>;
|
|
1104
|
+
getFormSection(id: string, options?: {
|
|
1105
|
+
country?: string;
|
|
1106
|
+
address?: string;
|
|
1107
|
+
kycSandbox?: KycVendor;
|
|
1108
|
+
kycOutcome?: KycOutcome;
|
|
1109
|
+
}): Promise<FormSection>;
|
|
1110
|
+
followsFormat(format: {
|
|
1111
|
+
pattern: string;
|
|
1112
|
+
check: FormatCheck | null;
|
|
1113
|
+
}, value: string): {
|
|
1114
|
+
follows: boolean;
|
|
1115
|
+
problem?: string;
|
|
1116
|
+
};
|
|
1117
|
+
cleanupList(options?: CleanupListOptions): Promise<CleanupList>;
|
|
683
1118
|
markDevHost(host: string): Promise<{
|
|
684
1119
|
dev_hosts: string[];
|
|
685
1120
|
}>;
|
|
@@ -701,6 +1136,10 @@ export declare class ProxyMailQA {
|
|
|
701
1136
|
private note;
|
|
702
1137
|
updateAddress(address: string, patch: AddressPatch): Promise<Address>;
|
|
703
1138
|
deleteAddress(address: string): Promise<void>;
|
|
1139
|
+
markSubmitted(address: string, options?: {
|
|
1140
|
+
flow?: SubmitFlow;
|
|
1141
|
+
site?: string;
|
|
1142
|
+
}): Promise<Submit>;
|
|
704
1143
|
waitForCode(address: string, options?: WaitOptions & {
|
|
705
1144
|
type?: CodeType;
|
|
706
1145
|
}): Promise<Match>;
|
|
@@ -759,6 +1198,7 @@ export declare class ProxyMailQA {
|
|
|
759
1198
|
maxLength?: number;
|
|
760
1199
|
symbols?: boolean;
|
|
761
1200
|
}): Promise<PasswordVariants>;
|
|
1201
|
+
flowChecks(flow: Flow): Promise<FlowChecks>;
|
|
762
1202
|
setPassword(address: string, options: {
|
|
763
1203
|
password: string;
|
|
764
1204
|
label?: string;
|
|
@@ -792,3 +1232,21 @@ export declare class ProxyMailQA {
|
|
|
792
1232
|
private requireRun;
|
|
793
1233
|
private wait;
|
|
794
1234
|
}
|
|
1235
|
+
export type TotpAlgorithm = 'SHA-1' | 'SHA-256' | 'SHA-512';
|
|
1236
|
+
export interface TotpOptions {
|
|
1237
|
+
digits?: number;
|
|
1238
|
+
period?: number;
|
|
1239
|
+
algorithm?: TotpAlgorithm;
|
|
1240
|
+
at?: Date | number;
|
|
1241
|
+
minSecondsLeft?: number;
|
|
1242
|
+
}
|
|
1243
|
+
export declare function totpCode(secret: string, options?: TotpOptions): Promise<string>;
|
|
1244
|
+
export declare function followsFormat(format: {
|
|
1245
|
+
pattern: string;
|
|
1246
|
+
check: FormatCheck | null;
|
|
1247
|
+
name?: string;
|
|
1248
|
+
shape?: string;
|
|
1249
|
+
}, value: string): {
|
|
1250
|
+
follows: boolean;
|
|
1251
|
+
problem?: string;
|
|
1252
|
+
};
|