@drawbridge/drawbridge-utils 0.0.165 → 0.0.166

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/dist/sendgrid.cjs CHANGED
@@ -116,6 +116,7 @@ var sendgridRequest = ({ apiKey, body, method, path, query, request: request2 =
116
116
  var dnsRows = (dns) => Object.values(dns || {}).filter((row) => (row == null ? void 0 : row.host) && (row == null ? void 0 : row.type)).map((row) => ({
117
117
  data: String(row.data ?? ""),
118
118
  host: String(row.host),
119
+ reason: row.reason ? String(row.reason) : null,
119
120
  type: String(row.type),
120
121
  valid: typeof row.valid === "boolean" ? row.valid : null
121
122
  }));
@@ -115,11 +115,20 @@ const sendgridRequest = ({ apiKey, body, method, path, query, request: request$1
115
115
  // flattened to the rows the identity schema stores — the UI then renders
116
116
  // whatever came back instead of naming roles it would have to keep in step
117
117
  // with.
118
+ //
119
+ // `reason` is SendGrid's own sentence for a record that does not validate —
120
+ // "Expected your MX record to be … but found …" — and null when it does. It
121
+ // is what tells a merchant their VALUE is wrong (a typo, a proxied CNAME)
122
+ // rather than that DNS is still propagating, so it is kept verbatim and shown
123
+ // beside the record. Never classified: the docs define it only as a
124
+ // description, and a badge that pattern-matched vendor prose would be right
125
+ // until a sentence changed.
118
126
  const dnsRows = ( dns ) => Object.values( dns || {} )
119
127
  .filter( ( row ) => row?.host && row?.type )
120
128
  .map( ( row ) => ({
121
129
  data : String( row.data ?? '' ),
122
130
  host : String( row.host ),
131
+ reason : row.reason ? String( row.reason ) : null,
123
132
  type : String( row.type ),
124
133
  valid : typeof row.valid === 'boolean' ? row.valid : null
125
134
  }) );
@@ -115,11 +115,20 @@ const sendgridRequest = ({ apiKey, body, method, path, query, request: request$1
115
115
  // flattened to the rows the identity schema stores — the UI then renders
116
116
  // whatever came back instead of naming roles it would have to keep in step
117
117
  // with.
118
+ //
119
+ // `reason` is SendGrid's own sentence for a record that does not validate —
120
+ // "Expected your MX record to be … but found …" — and null when it does. It
121
+ // is what tells a merchant their VALUE is wrong (a typo, a proxied CNAME)
122
+ // rather than that DNS is still propagating, so it is kept verbatim and shown
123
+ // beside the record. Never classified: the docs define it only as a
124
+ // description, and a badge that pattern-matched vendor prose would be right
125
+ // until a sentence changed.
118
126
  const dnsRows = ( dns ) => Object.values( dns || {} )
119
127
  .filter( ( row ) => row?.host && row?.type )
120
128
  .map( ( row ) => ({
121
129
  data : String( row.data ?? '' ),
122
130
  host : String( row.host ),
131
+ reason : row.reason ? String( row.reason ) : null,
123
132
  type : String( row.type ),
124
133
  valid : typeof row.valid === 'boolean' ? row.valid : null
125
134
  }) );
package/dist/sendgrid.js CHANGED
@@ -87,6 +87,7 @@ var sendgridRequest = ({ apiKey, body, method, path, query, request: request2 =
87
87
  var dnsRows = (dns) => Object.values(dns || {}).filter((row) => (row == null ? void 0 : row.host) && (row == null ? void 0 : row.type)).map((row) => ({
88
88
  data: String(row.data ?? ""),
89
89
  host: String(row.host),
90
+ reason: row.reason ? String(row.reason) : null,
90
91
  type: String(row.type),
91
92
  valid: typeof row.valid === "boolean" ? row.valid : null
92
93
  }));
package/package.json CHANGED
@@ -226,5 +226,5 @@
226
226
  "prepublishOnly": ". \"$HOME/.nvm/nvm.sh\" && nvm use && tsup && node --test"
227
227
  },
228
228
  "types": "dist/index.d.ts",
229
- "version": "0.0.165"
229
+ "version": "0.0.166"
230
230
  }