proxymail-qa 0.14.0 → 0.15.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 CHANGED
@@ -14,18 +14,23 @@ it. Then:
14
14
  - wait for a coupon, record whether checkout took it, and catch an offer
15
15
  given twice to versions of one address
16
16
  - test unsubscribing: any marketing email from that sender afterwards fails
17
- - check marketing emails: unsubscribe headers, a spam score and the consent
17
+ - check marketing emails: unsubscribe headers, an inbox score and the consent
18
18
  rules where the persona lives
19
19
  - check a welcome series or drip campaign came in order and on time
20
20
  - find out why an email didn't arrive
21
21
  - group tests into a run whose report says which test each email came from
22
22
 
23
- Checkout results, offers given twice, unsubscribing, consent, welcome series,
24
- the marketing checks, the spam score and a site's journey (with its five
25
- good-practice checks) are in
26
- [Labs](https://proxymail.qa/docs/labs) for now: the key's creator switches
27
- them on in the app under Account settings → Labs. Until then those methods
28
- throw with a 403 that says so, and `checkEmail` leaves those checks out.
23
+ The coupon and marketing checks come with projects that test offers or
24
+ marketing, and the inbox score (out of 10, where 10 is good) and the
25
+ attachment check with the project's spam checks: both are set in the app under
26
+ Project settings → What you test, or with
27
+ `updateProject({ areas, spamChecks })`. `checkEmail` leaves out the checks of
28
+ what the project has off.
29
+
30
+ A site's journey (`journey()`, with its five good-practice checks) is in
31
+ [Labs](https://proxymail.qa/docs/labs) for now: the key's creator switches it
32
+ on in the app under Account settings → Labs. Until then `journey()` throws
33
+ with a 403 that says so, and `checkEmail` leaves those checks out.
29
34
 
30
35
  Get an API key in [app.proxymail.qa](https://app.proxymail.qa) → Project
31
36
  settings → API keys (the Free plan includes it), and set it as
@@ -271,12 +276,12 @@ await qa.withAccount(
271
276
  },
272
277
  );
273
278
 
274
- // Offers (Labs): wait for the coupon (offers can take minutes), apply it at
279
+ // Offers: wait for the coupon (offers can take minutes), apply it at
275
280
  // checkout on staging with test payments, then record what the app said.
276
281
  const coupon = await qa.waitForCode(address, { type: 'coupon', timeout: 600 });
277
282
  await qa.recordCouponResult(address, 'accepted', { code: coupon.value });
278
283
 
279
- // Unsubscribing (Labs): after the test unsubscribes in the app (Proxy Mail
284
+ // Unsubscribing: after the test unsubscribes in the app (Proxy Mail
280
285
  // QA never opens the link), marketing from that sender fails; receipts can
281
286
  // still come.
282
287
  await qa.markUnsubscribed(address);
package/dist/index.d.ts CHANGED
@@ -470,7 +470,10 @@ export type ProjectInfo = Record<string, unknown> & {
470
470
  locked?: boolean;
471
471
  custom_fields?: number;
472
472
  multi_step_sites?: string[];
473
+ areas?: ProjectArea[];
474
+ spam_checks?: boolean;
473
475
  };
476
+ export type ProjectArea = 'signup' | 'offers' | 'marketing' | 'receipts';
474
477
  export interface FormValues {
475
478
  address: string;
476
479
  created: boolean;
@@ -682,6 +685,7 @@ export interface EmailCheck {
682
685
  check: CheckId;
683
686
  status: 'pass' | 'fail' | 'warn' | 'skip';
684
687
  detail: string;
688
+ inbox_score?: number;
685
689
  score?: number;
686
690
  markers?: Array<{
687
691
  id: string;
@@ -1116,6 +1120,7 @@ export interface Run {
1116
1120
  likely_spam: number;
1117
1121
  may_spam: number;
1118
1122
  harmful_attachments: number;
1123
+ lowest_inbox_score?: number | null;
1119
1124
  highest_spam_score: number | null;
1120
1125
  };
1121
1126
  comparison?: {
@@ -1154,6 +1159,8 @@ export declare class ProxyMailQA {
1154
1159
  mailDomain?: string;
1155
1160
  fillUnknownFields?: FillUnknownFields;
1156
1161
  fillIdFields?: boolean;
1162
+ areas?: ProjectArea[];
1163
+ spamChecks?: boolean;
1157
1164
  }): Promise<ProjectInfo>;
1158
1165
  customFields(): Promise<CustomFields>;
1159
1166
  saveCustomField(field: CustomFieldInput): Promise<CustomFieldSaved>;
package/dist/index.js CHANGED
@@ -101,7 +101,8 @@ export class ProxyMailQA {
101
101
  // throws ProxyMailQAError with status 402 and code plan_required; past the
102
102
  // day's 50, status 429 and code daily_limit, until midnight UTC.
103
103
  // From 0.12.0 it also has fill_unknown_fields, standard_fields_off, locked,
104
- // custom_fields (how many) and multi_step_sites.
104
+ // custom_fields (how many) and multi_step_sites; from 0.13.0, fill_id_fields;
105
+ // from 0.15.0, areas and spam_checks.
105
106
  project() {
106
107
  return this.request('GET', '/project');
107
108
  }
@@ -117,15 +118,18 @@ export class ProxyMailQA {
117
118
  // person asks; for one call, pass guess to formValues. fillIdFields (new in
118
119
  // 0.13.0) true adds the five ID and tax number ready-made custom fields, or
119
120
  // turns on those there, and false turns them off: a lead's key only, and
120
- // only when the person asks.
121
+ // only when the person asks. areas (the whole list, at least one) and
122
+ // spamChecks (both new in 0.15.0) need the lead too; spam checks can fail a
123
+ // run.
121
124
  updateProject(patch) {
122
- const { emailPrefix, mailDomain, fillUnknownFields, fillIdFields, ...rest } = patch;
125
+ const { emailPrefix, mailDomain, fillUnknownFields, fillIdFields, spamChecks, ...rest } = patch;
123
126
  return this.request('PATCH', '/project', {
124
127
  ...rest,
125
128
  ...(emailPrefix !== undefined ? { email_prefix: emailPrefix } : {}),
126
129
  ...(mailDomain !== undefined ? { mail_domain: mailDomain } : {}),
127
130
  ...(fillUnknownFields !== undefined ? { fill_unknown_fields: fillUnknownFields } : {}),
128
131
  ...(fillIdFields !== undefined ? { fill_id_fields: fillIdFields } : {}),
132
+ ...(spamChecks !== undefined ? { spam_checks: spamChecks } : {}),
129
133
  });
130
134
  }
131
135
  // The project's custom fields, its guesses setting and whether only leads
@@ -734,9 +738,8 @@ export class ProxyMailQA {
734
738
  return { address: result.address, since: result.since, until: result.until };
735
739
  }
736
740
  }
737
- // markUnsubscribed to offers below are Marketing and offer emails, in Labs:
738
- // the key's creator switches it on in Account settings → Labs. Until then
739
- // they throw a 403 that says so.
741
+ // markUnsubscribed to offers below are for projects that test offers or
742
+ // marketing (Project settings → What you test, or updateProject({ areas })).
740
743
  // Records that the address unsubscribed from a sender, after the test did
741
744
  // it in its own browser (Proxy Mail QA never opens unsubscribe links). Any
742
745
  // later marketing email from that sender fails after_unsubscribe, however
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proxymail-qa",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Test every email your app sends from Playwright, Cypress, Jest, Vitest, any Node script or the command line: disposable inboxes, sign-up codes, links and coupons, email checks, unsubscribe tests and run reports.",
5
5
  "license": "MIT",
6
6
  "author": "Proxy Mail QA <hello@proxymail.qa> (https://proxymail.qa)",