@vxil/sdk 0.29.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
@@ -1400,8 +1400,9 @@ export type AiThinkingLevel = 'minimal' | 'low' | 'medium' | 'high';
1400
1400
  /** Gemini media resolution for `ai.generate` / `stream` / `generateAsync`
1401
1401
  * (`media_resolution`): the token budget Gemini spends per image or PDF page.
1402
1402
  * A lower level is faster and bills fewer input tokens. Sent to Gemini only —
1403
- * every other provider ignores it; omitted →
1404
- * `features.ai.defaults.mediaResolution` → the model's own default. */
1403
+ * every other provider ignores it; omitted → the template's own level (set
1404
+ * with `ai.templates.put`) → `features.ai.defaults.mediaResolution` → the
1405
+ * model's own default. */
1405
1406
  export type AiMediaResolution = 'low' | 'medium' | 'high';
1406
1407
  /** A prior conversation turn for the tool-calling round-trip: assistant turns
1407
1408
  * carry the tool_calls they made; `role:'tool'` turns carry one call's result
@@ -4504,14 +4505,22 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
4504
4505
  /** `test_code` is present ONLY when the address matches auth config
4505
4506
  * `otp.testRecipients` (store-review / CI accounts): no mail is sent and
4506
4507
  * the code comes back instead. `captcha_token` is required when the
4507
- * 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. */
4508
4515
  request: (input: {
4509
4516
  email: string;
4517
+ redirect_url?: string;
4510
4518
  locale?: string;
4511
4519
  captcha_token?: string;
4512
4520
  }) => Promise<{
4513
4521
  sent: true;
4514
4522
  test_code?: string;
4523
+ test_link?: string;
4515
4524
  }>;
4516
4525
  verify: (input: {
4517
4526
  email: string;
@@ -6789,26 +6798,34 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
6789
6798
  * `{{var}}` placeholders are filled from `generate`'s `input`.
6790
6799
  * `schema` (a JSON Schema) is now ENFORCED at generate time on sync/job
6791
6800
  * requests — the output is validated (with one repair pass) against it;
6792
- * a per-request `response_schema` overrides it. Ignored on streams. */
6801
+ * a per-request `response_schema` overrides it. Ignored on streams.
6802
+ * `media_resolution` (Gemini only) is this template's media resolution:
6803
+ * a request's `media_resolution` wins, else this, else
6804
+ * `features.ai.defaults.mediaResolution`. */
6793
6805
  put: (input: {
6794
6806
  template: string;
6795
6807
  user: string;
6796
6808
  system?: string;
6797
6809
  schema?: Record<string, unknown>;
6810
+ media_resolution?: AiMediaResolution;
6798
6811
  }) => Promise<{
6799
6812
  template: string;
6800
6813
  version: number;
6814
+ content_sha256?: string;
6815
+ media_resolution?: AiMediaResolution;
6801
6816
  }>;
6802
6817
  /** List stored templates (each name + its latest version). `content_sha256`
6803
6818
  * is the canonical hash of the latest version's {system, user, schema},
6804
6819
  * stored when the version was written — what `vxil push` compares a
6805
6820
  * declared `ai.templates[]` entry against; absent on a version stored
6806
- * before 2026-09-23 (the next push re-puts that template once). */
6821
+ * before 2026-09-23 (the next push re-puts that template once).
6822
+ * `media_resolution` is the latest version's level, when it has one. */
6807
6823
  list: () => Promise<Array<{
6808
6824
  name: string;
6809
6825
  latest_version: number;
6810
6826
  created_at: string;
6811
6827
  content_sha256?: string;
6828
+ media_resolution?: AiMediaResolution;
6812
6829
  }>>;
6813
6830
  /** Retire a stored template (soft): every live version of the name leaves
6814
6831
  * the list and can no longer be rendered (by name or by version → 404
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
  },
@@ -2546,13 +2552,17 @@ export class Vxil {
2546
2552
  * `{{var}}` placeholders are filled from `generate`'s `input`.
2547
2553
  * `schema` (a JSON Schema) is now ENFORCED at generate time on sync/job
2548
2554
  * requests — the output is validated (with one repair pass) against it;
2549
- * a per-request `response_schema` overrides it. Ignored on streams. */
2555
+ * a per-request `response_schema` overrides it. Ignored on streams.
2556
+ * `media_resolution` (Gemini only) is this template's media resolution:
2557
+ * a request's `media_resolution` wins, else this, else
2558
+ * `features.ai.defaults.mediaResolution`. */
2550
2559
  put: async (input) => (await this.call('POST', '/v1/ai/templates', input)).data,
2551
2560
  /** List stored templates (each name + its latest version). `content_sha256`
2552
2561
  * is the canonical hash of the latest version's {system, user, schema},
2553
2562
  * stored when the version was written — what `vxil push` compares a
2554
2563
  * declared `ai.templates[]` entry against; absent on a version stored
2555
- * before 2026-09-23 (the next push re-puts that template once). */
2564
+ * before 2026-09-23 (the next push re-puts that template once).
2565
+ * `media_resolution` is the latest version's level, when it has one. */
2556
2566
  list: async () => (await this.call('GET', '/v1/ai/templates')).data.templates,
2557
2567
  /** Retire a stored template (soft): every live version of the name leaves
2558
2568
  * the list and can no longer be rendered (by name or by version → 404
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxil/sdk",
3
- "version": "0.29.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).",