@vxil/sdk 0.34.0 → 0.35.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 +17 -4
- package/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4567,13 +4567,16 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4567
4567
|
* the move continues in the background — wait for the
|
|
4568
4568
|
* `auth.user.rekeyed` event before reading owner-scoped rows as the
|
|
4569
4569
|
* merged user. The event is written when the pass finishes and is
|
|
4570
|
-
* best-effort past this response (see `anonymous.link.verify`).
|
|
4570
|
+
* best-effort past this response (see `anonymous.link.verify`).
|
|
4571
|
+
* A link returned to a test recipient answers `verified: false,
|
|
4572
|
+
* test_issued: true` (it signs in, but proves nothing about the mailbox). */
|
|
4571
4573
|
verify: (token: string, opts?: {
|
|
4572
4574
|
anonymous_token?: string;
|
|
4573
4575
|
}) => Promise<{
|
|
4574
4576
|
user_id: string;
|
|
4575
4577
|
session: AuthSession;
|
|
4576
4578
|
verified: boolean;
|
|
4579
|
+
test_issued?: true;
|
|
4577
4580
|
merged?: boolean;
|
|
4578
4581
|
rekeyed?: boolean;
|
|
4579
4582
|
}>;
|
|
@@ -4602,6 +4605,8 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4602
4605
|
test_code?: string;
|
|
4603
4606
|
test_link?: string;
|
|
4604
4607
|
}>;
|
|
4608
|
+
/** `verified: false, test_issued: true` for a code returned to a test
|
|
4609
|
+
* recipient (it signs in, but proves nothing about the mailbox). */
|
|
4605
4610
|
verify: (input: {
|
|
4606
4611
|
email: string;
|
|
4607
4612
|
code: string;
|
|
@@ -4609,6 +4614,7 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4609
4614
|
user_id: string;
|
|
4610
4615
|
session: AuthSession;
|
|
4611
4616
|
verified: boolean;
|
|
4617
|
+
test_issued?: true;
|
|
4612
4618
|
}>;
|
|
4613
4619
|
};
|
|
4614
4620
|
/** Anonymous (guest) sessions: instant end-user + session (JWT carries
|
|
@@ -4647,7 +4653,9 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4647
4653
|
* retried — treat `rekeyed: false` with no event within a minute or
|
|
4648
4654
|
* so as "poll your own rows", or re-run the idempotent
|
|
4649
4655
|
* `cms.items.reKey` / `files.reKey` / `payments.reKeySubscriptions`
|
|
4650
|
-
* routes from the `auth.user.merged` backstop.
|
|
4656
|
+
* routes from the `auth.user.merged` backstop. A `test_code` handed
|
|
4657
|
+
* back for an `otp.testRecipients` address proves no mailbox: the
|
|
4658
|
+
* claim goes through unverified, `verified: false, test_issued: true`. */
|
|
4651
4659
|
verify: (input: {
|
|
4652
4660
|
token: string;
|
|
4653
4661
|
email: string;
|
|
@@ -4656,6 +4664,7 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4656
4664
|
user_id: string;
|
|
4657
4665
|
email: string;
|
|
4658
4666
|
verified: boolean;
|
|
4667
|
+
test_issued?: true;
|
|
4659
4668
|
merged?: true;
|
|
4660
4669
|
rekeyed?: boolean;
|
|
4661
4670
|
session?: {
|
|
@@ -4680,7 +4689,10 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4680
4689
|
* else `verify`'s optional `locale`; no mute preference suppresses it). With
|
|
4681
4690
|
* the auth config's `security.emailChangeStepUp: true`, `request` answers
|
|
4682
4691
|
* 403 `step_up_required` unless this session passed `auth.stepUp` in the
|
|
4683
|
-
* last 300 s — retry with the rotated token.
|
|
4692
|
+
* last 300 s — retry with the rotated token. A `test_code` handed back
|
|
4693
|
+
* for an `otp.testRecipients` address proves no mailbox: its verify
|
|
4694
|
+
* changes the address unverified and answers `verified: false,
|
|
4695
|
+
* test_issued: true`. */
|
|
4684
4696
|
email: {
|
|
4685
4697
|
change: {
|
|
4686
4698
|
request: (input: {
|
|
@@ -4699,7 +4711,8 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4699
4711
|
}) => Promise<{
|
|
4700
4712
|
user_id: string;
|
|
4701
4713
|
email: string;
|
|
4702
|
-
verified:
|
|
4714
|
+
verified: boolean;
|
|
4715
|
+
test_issued?: true;
|
|
4703
4716
|
}>;
|
|
4704
4717
|
};
|
|
4705
4718
|
};
|
package/dist/index.js
CHANGED
|
@@ -1240,7 +1240,9 @@ export class Vxil {
|
|
|
1240
1240
|
* the move continues in the background — wait for the
|
|
1241
1241
|
* `auth.user.rekeyed` event before reading owner-scoped rows as the
|
|
1242
1242
|
* merged user. The event is written when the pass finishes and is
|
|
1243
|
-
* best-effort past this response (see `anonymous.link.verify`).
|
|
1243
|
+
* best-effort past this response (see `anonymous.link.verify`).
|
|
1244
|
+
* A link returned to a test recipient answers `verified: false,
|
|
1245
|
+
* test_issued: true` (it signs in, but proves nothing about the mailbox). */
|
|
1244
1246
|
verify: async (token, opts = {}) => (await this.call('POST', '/v1/auth/magic-link/verify', { token, ...(opts.anonymous_token !== undefined ? { anonymous_token: opts.anonymous_token } : {}) })).data,
|
|
1245
1247
|
},
|
|
1246
1248
|
/** Email OTP sign-in: a 6-digit single-use code (distinct from magic-link).
|
|
@@ -1258,6 +1260,8 @@ export class Vxil {
|
|
|
1258
1260
|
* budget. The link lands on your page with `?token=`, which you pass to
|
|
1259
1261
|
* `auth.magicLink.verify`. A test recipient gets `test_link` too. */
|
|
1260
1262
|
request: async (input) => (await this.call('POST', '/v1/auth/otp/request', input)).data,
|
|
1263
|
+
/** `verified: false, test_issued: true` for a code returned to a test
|
|
1264
|
+
* recipient (it signs in, but proves nothing about the mailbox). */
|
|
1261
1265
|
verify: async (input) => (await this.call('POST', '/v1/auth/otp/verify', input)).data,
|
|
1262
1266
|
},
|
|
1263
1267
|
/** Anonymous (guest) sessions: instant end-user + session (JWT carries
|
|
@@ -1285,7 +1289,9 @@ export class Vxil {
|
|
|
1285
1289
|
* retried — treat `rekeyed: false` with no event within a minute or
|
|
1286
1290
|
* so as "poll your own rows", or re-run the idempotent
|
|
1287
1291
|
* `cms.items.reKey` / `files.reKey` / `payments.reKeySubscriptions`
|
|
1288
|
-
* routes from the `auth.user.merged` backstop.
|
|
1292
|
+
* routes from the `auth.user.merged` backstop. A `test_code` handed
|
|
1293
|
+
* back for an `otp.testRecipients` address proves no mailbox: the
|
|
1294
|
+
* claim goes through unverified, `verified: false, test_issued: true`. */
|
|
1289
1295
|
verify: async (input) => (await this.call('POST', '/v1/auth/anonymous/link/verify', input)).data,
|
|
1290
1296
|
},
|
|
1291
1297
|
},
|
|
@@ -1304,7 +1310,10 @@ export class Vxil {
|
|
|
1304
1310
|
* else `verify`'s optional `locale`; no mute preference suppresses it). With
|
|
1305
1311
|
* the auth config's `security.emailChangeStepUp: true`, `request` answers
|
|
1306
1312
|
* 403 `step_up_required` unless this session passed `auth.stepUp` in the
|
|
1307
|
-
* last 300 s — retry with the rotated token.
|
|
1313
|
+
* last 300 s — retry with the rotated token. A `test_code` handed back
|
|
1314
|
+
* for an `otp.testRecipients` address proves no mailbox: its verify
|
|
1315
|
+
* changes the address unverified and answers `verified: false,
|
|
1316
|
+
* test_issued: true`. */
|
|
1308
1317
|
email: {
|
|
1309
1318
|
change: {
|
|
1310
1319
|
request: async (input) => (await this.call('POST', '/v1/auth/email/change/request', input)).data,
|
package/package.json
CHANGED