@vxil/sdk 0.34.0 → 0.35.1
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 +44 -4
- package/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -321,6 +321,33 @@ export interface FeatureConfig {
|
|
|
321
321
|
feature: string;
|
|
322
322
|
version: number;
|
|
323
323
|
manifest: Record<string, unknown>;
|
|
324
|
+
/** cms writes only (PUT /v1/config/cms): what the write changed in
|
|
325
|
+
* `features.cms.rules[]` (the App builder apps' rules). */
|
|
326
|
+
rules_summary?: ConfigRulesSummary;
|
|
327
|
+
}
|
|
328
|
+
/** One rules[] entry as a cms config write reports it. */
|
|
329
|
+
export interface ConfigRuleLine {
|
|
330
|
+
app: string;
|
|
331
|
+
kind: string;
|
|
332
|
+
collection: string;
|
|
333
|
+
sentence: string;
|
|
334
|
+
/** server: cms enforces it for every writer but the owner's server key; app: only writes through that App builder app are checked */
|
|
335
|
+
enforced_by: 'app' | 'server';
|
|
336
|
+
/** an added capacity / no_overlap rule only: the `list.field` keys the app's page does not provably write */
|
|
337
|
+
unwritten_keys?: string[];
|
|
338
|
+
}
|
|
339
|
+
/** `rules_summary` of a cms config write. */
|
|
340
|
+
export interface ConfigRulesSummary {
|
|
341
|
+
added: ConfigRuleLine[];
|
|
342
|
+
removed: ConfigRuleLine[];
|
|
343
|
+
/** w43: the rules that were waiting for Apply (their write had not landed
|
|
344
|
+
* yet) that this write's rules[] left out — dropped, never committed later.
|
|
345
|
+
* Absent when none. `quote` is the brief's own words for the rule. */
|
|
346
|
+
dropped_waiting?: Array<{
|
|
347
|
+
kind: string;
|
|
348
|
+
collection: string;
|
|
349
|
+
quote: string;
|
|
350
|
+
}>;
|
|
324
351
|
}
|
|
325
352
|
/** The failure-alert digest settings (`webhooks.alerts`, guide ch. 12). The
|
|
326
353
|
* digest mails the project's owner accounts; `chatWebhook` (ALERT-CHAT-DEST)
|
|
@@ -4567,13 +4594,16 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4567
4594
|
* the move continues in the background — wait for the
|
|
4568
4595
|
* `auth.user.rekeyed` event before reading owner-scoped rows as the
|
|
4569
4596
|
* merged user. The event is written when the pass finishes and is
|
|
4570
|
-
* best-effort past this response (see `anonymous.link.verify`).
|
|
4597
|
+
* best-effort past this response (see `anonymous.link.verify`).
|
|
4598
|
+
* A link returned to a test recipient answers `verified: false,
|
|
4599
|
+
* test_issued: true` (it signs in, but proves nothing about the mailbox). */
|
|
4571
4600
|
verify: (token: string, opts?: {
|
|
4572
4601
|
anonymous_token?: string;
|
|
4573
4602
|
}) => Promise<{
|
|
4574
4603
|
user_id: string;
|
|
4575
4604
|
session: AuthSession;
|
|
4576
4605
|
verified: boolean;
|
|
4606
|
+
test_issued?: true;
|
|
4577
4607
|
merged?: boolean;
|
|
4578
4608
|
rekeyed?: boolean;
|
|
4579
4609
|
}>;
|
|
@@ -4602,6 +4632,8 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4602
4632
|
test_code?: string;
|
|
4603
4633
|
test_link?: string;
|
|
4604
4634
|
}>;
|
|
4635
|
+
/** `verified: false, test_issued: true` for a code returned to a test
|
|
4636
|
+
* recipient (it signs in, but proves nothing about the mailbox). */
|
|
4605
4637
|
verify: (input: {
|
|
4606
4638
|
email: string;
|
|
4607
4639
|
code: string;
|
|
@@ -4609,6 +4641,7 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4609
4641
|
user_id: string;
|
|
4610
4642
|
session: AuthSession;
|
|
4611
4643
|
verified: boolean;
|
|
4644
|
+
test_issued?: true;
|
|
4612
4645
|
}>;
|
|
4613
4646
|
};
|
|
4614
4647
|
/** Anonymous (guest) sessions: instant end-user + session (JWT carries
|
|
@@ -4647,7 +4680,9 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4647
4680
|
* retried — treat `rekeyed: false` with no event within a minute or
|
|
4648
4681
|
* so as "poll your own rows", or re-run the idempotent
|
|
4649
4682
|
* `cms.items.reKey` / `files.reKey` / `payments.reKeySubscriptions`
|
|
4650
|
-
* routes from the `auth.user.merged` backstop.
|
|
4683
|
+
* routes from the `auth.user.merged` backstop. A `test_code` handed
|
|
4684
|
+
* back for an `otp.testRecipients` address proves no mailbox: the
|
|
4685
|
+
* claim goes through unverified, `verified: false, test_issued: true`. */
|
|
4651
4686
|
verify: (input: {
|
|
4652
4687
|
token: string;
|
|
4653
4688
|
email: string;
|
|
@@ -4656,6 +4691,7 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4656
4691
|
user_id: string;
|
|
4657
4692
|
email: string;
|
|
4658
4693
|
verified: boolean;
|
|
4694
|
+
test_issued?: true;
|
|
4659
4695
|
merged?: true;
|
|
4660
4696
|
rekeyed?: boolean;
|
|
4661
4697
|
session?: {
|
|
@@ -4680,7 +4716,10 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4680
4716
|
* else `verify`'s optional `locale`; no mute preference suppresses it). With
|
|
4681
4717
|
* the auth config's `security.emailChangeStepUp: true`, `request` answers
|
|
4682
4718
|
* 403 `step_up_required` unless this session passed `auth.stepUp` in the
|
|
4683
|
-
* last 300 s — retry with the rotated token.
|
|
4719
|
+
* last 300 s — retry with the rotated token. A `test_code` handed back
|
|
4720
|
+
* for an `otp.testRecipients` address proves no mailbox: its verify
|
|
4721
|
+
* changes the address unverified and answers `verified: false,
|
|
4722
|
+
* test_issued: true`. */
|
|
4684
4723
|
email: {
|
|
4685
4724
|
change: {
|
|
4686
4725
|
request: (input: {
|
|
@@ -4699,7 +4738,8 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
4699
4738
|
}) => Promise<{
|
|
4700
4739
|
user_id: string;
|
|
4701
4740
|
email: string;
|
|
4702
|
-
verified:
|
|
4741
|
+
verified: boolean;
|
|
4742
|
+
test_issued?: true;
|
|
4703
4743
|
}>;
|
|
4704
4744
|
};
|
|
4705
4745
|
};
|
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