@vxil/sdk 0.30.0 → 0.31.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/dist/index.d.ts CHANGED
@@ -4505,14 +4505,22 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
4505
4505
  /** `test_code` is present ONLY when the address matches auth config
4506
4506
  * `otp.testRecipients` (store-review / CI accounts): no mail is sent and
4507
4507
  * the code comes back instead. `captcha_token` is required when the
4508
- * tenant configured `security.captchaSecretRef`. */
4508
+ * tenant configured `security.captchaSecretRef`.
4509
+ * `redirect_url` (optional): the same mail also carries a sign-in link
4510
+ * to that page (the magic-link rule: https, `security.allowedRedirectOrigins`,
4511
+ * `methods.magicLink` on). The code and the link are ONE credential:
4512
+ * using either consumes both; same expiry, one cooldown, one attempt
4513
+ * budget. The link lands on your page with `?token=`, which you pass to
4514
+ * `auth.magicLink.verify`. A test recipient gets `test_link` too. */
4509
4515
  request: (input: {
4510
4516
  email: string;
4517
+ redirect_url?: string;
4511
4518
  locale?: string;
4512
4519
  captcha_token?: string;
4513
4520
  }) => Promise<{
4514
4521
  sent: true;
4515
4522
  test_code?: string;
4523
+ test_link?: string;
4516
4524
  }>;
4517
4525
  verify: (input: {
4518
4526
  email: string;
package/dist/index.js CHANGED
@@ -1175,7 +1175,13 @@ export class Vxil {
1175
1175
  /** `test_code` is present ONLY when the address matches auth config
1176
1176
  * `otp.testRecipients` (store-review / CI accounts): no mail is sent and
1177
1177
  * the code comes back instead. `captcha_token` is required when the
1178
- * tenant configured `security.captchaSecretRef`. */
1178
+ * tenant configured `security.captchaSecretRef`.
1179
+ * `redirect_url` (optional): the same mail also carries a sign-in link
1180
+ * to that page (the magic-link rule: https, `security.allowedRedirectOrigins`,
1181
+ * `methods.magicLink` on). The code and the link are ONE credential:
1182
+ * using either consumes both; same expiry, one cooldown, one attempt
1183
+ * budget. The link lands on your page with `?token=`, which you pass to
1184
+ * `auth.magicLink.verify`. A test recipient gets `test_link` too. */
1179
1185
  request: async (input) => (await this.call('POST', '/v1/auth/otp/request', input)).data,
1180
1186
  verify: async (input) => (await this.call('POST', '/v1/auth/otp/verify', input)).data,
1181
1187
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxil/sdk",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Typed client for the Vxil REST API (notifications, auth, jobs, files, cms, comments, webhooks, realtime, orgs, rate-limits).",