@vxil/sdk 0.30.0 → 0.32.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
@@ -1213,7 +1213,7 @@ export interface PublishedFile {
1213
1213
  * `oauth_provider_unreachable` (502). */
1214
1214
  export type OAuthSignInErrorCode = 'oauth_token_invalid' | 'oidc_domain_not_allowed' | 'oidc_link_only' | 'signup_not_allowed' | 'auth_method_disabled' | 'oauth_email_conflict' | 'oauth_provider_unconfigured' | 'oauth_provider_unreachable';
1215
1215
  /** Why one id of a bulk publish was not published. */
1216
- export type PublishErrorCode = 'not_found' | 'upload_incomplete' | 'content_type_not_publishable' | 'object_too_large' | 'quota_exceeded' | 'batch_budget_exceeded' | 'asset_taken_down' | 'publish_failed';
1216
+ export type PublishErrorCode = 'not_found' | 'upload_incomplete' | 'content_type_not_publishable' | 'object_too_large' | 'quota_exceeded' | 'batch_budget_exceeded' | 'asset_taken_down' | 'publish_failed' | 'object_rewritten';
1217
1217
  /** A live shared link as listed by GET /v1/files/{id}/shared-links (guide ch. 6,
1218
1218
  * files). `downloads` is the burn-on-read counter; `max_downloads` null =
1219
1219
  * unlimited (1 = a one-time link). A link that hit its cap, expired, or was
@@ -2991,9 +2991,10 @@ export type EnabledVxil<S extends VxilSchemaShape> = Omit<Vxil<S>, DisabledFeatu
2991
2991
  };
2992
2992
  /** A cms collection's END-USER ACCESS mode (guide ch. 9): what a verified end
2993
2993
  * user (thin-client key + session) may do on it — `'readwrite'` (default),
2994
- * `'read'` (writes are `403 server_only`) or `'none'` (reads and writes are
2995
- * `403 server_only`). Server keys are never affected. */
2996
- export type CmsEndUserAccess = 'readwrite' | 'read' | 'none';
2994
+ * `'read'` (writes are `403 server_only`), `'none'` (reads and writes are
2995
+ * `403 server_only`) or `'read_all'` (every row is readable past the owner
2996
+ * field; writes stay owner-scoped). Server keys are never affected. */
2997
+ export type CmsEndUserAccess = 'readwrite' | 'read' | 'none' | 'read_all';
2997
2998
  /** One config-declared per-record ACTION (guide ch. 4): a button on a record row
2998
2999
  * that invokes the deployed tenant function `fn` ONCE with `{ collection,
2999
3000
  * item_id, action, actor, item }`. Exactly one human-initiated step — no
@@ -4505,14 +4506,22 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
4505
4506
  /** `test_code` is present ONLY when the address matches auth config
4506
4507
  * `otp.testRecipients` (store-review / CI accounts): no mail is sent and
4507
4508
  * the code comes back instead. `captcha_token` is required when the
4508
- * tenant configured `security.captchaSecretRef`. */
4509
+ * tenant configured `security.captchaSecretRef`.
4510
+ * `redirect_url` (optional): the same mail also carries a sign-in link
4511
+ * to that page (the magic-link rule: https, `security.allowedRedirectOrigins`,
4512
+ * `methods.magicLink` on). The code and the link are ONE credential:
4513
+ * using either consumes both; same expiry, one cooldown, one attempt
4514
+ * budget. The link lands on your page with `?token=`, which you pass to
4515
+ * `auth.magicLink.verify`. A test recipient gets `test_link` too. */
4509
4516
  request: (input: {
4510
4517
  email: string;
4518
+ redirect_url?: string;
4511
4519
  locale?: string;
4512
4520
  captcha_token?: string;
4513
4521
  }) => Promise<{
4514
4522
  sent: true;
4515
4523
  test_code?: string;
4524
+ test_link?: string;
4516
4525
  }>;
4517
4526
  verify: (input: {
4518
4527
  email: string;
@@ -7614,7 +7623,9 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
7614
7623
  * 404 charge_not_found; 422 charge_user_mismatch (another user's charge) /
7615
7624
  * charge_refunded (the refund beat the grant — nothing to grant against).
7616
7625
  * 422 reserved_idempotency_key when `idempotency_key` starts with
7617
- * `purchase:` (the namespace of purchase passes). */
7626
+ * `purchase:` (the namespace of purchase passes). Stacking: a grant whose
7627
+ * `until` reaches past a live same-tier manual row (a grant or a pass with
7628
+ * an end) starts where that row ends — `since` names that start. */
7618
7629
  grantSubscription: (input: PaymentsSubjectBody & {
7619
7630
  tier: string;
7620
7631
  until?: string | null;
@@ -7626,8 +7637,10 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
7626
7637
  user_id: string;
7627
7638
  tier: string;
7628
7639
  status: string;
7629
- /** (2026-09-25) the grant row's start — the time it was WRITTEN (a replay
7630
- * answers the first grant's), never a window you computed */
7640
+ /** the grant row's start: the time it was written — or, when `until`
7641
+ * reaches past a live same-tier manual grant or pass, the end of that
7642
+ * window (the grant queues behind it like a purchase; `until` is yours,
7643
+ * never moved). A replay answers the first grant's. */
7631
7644
  since?: string | null;
7632
7645
  until: string | null;
7633
7646
  charge_id: string | null;
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
  },
@@ -2970,7 +2976,9 @@ export class Vxil {
2970
2976
  * 404 charge_not_found; 422 charge_user_mismatch (another user's charge) /
2971
2977
  * charge_refunded (the refund beat the grant — nothing to grant against).
2972
2978
  * 422 reserved_idempotency_key when `idempotency_key` starts with
2973
- * `purchase:` (the namespace of purchase passes). */
2979
+ * `purchase:` (the namespace of purchase passes). Stacking: a grant whose
2980
+ * `until` reaches past a live same-tier manual row (a grant or a pass with
2981
+ * an end) starts where that row ends — `since` names that start. */
2974
2982
  grantSubscription: async (input) => (await this.call('POST', '/v1/payments/subscriptions/grant', input)).data,
2975
2983
  /** SERVER-ONLY. Revoke a MANUAL grant now (409 not_manual for a provider
2976
2984
  * subscription — use `cancel`). Never touches a provider. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxil/sdk",
3
- "version": "0.30.0",
3
+ "version": "0.32.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).",