@vibiz/sdk 0.3.15 → 0.3.17

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vibiz/sdk
2
2
 
3
- The typed client for the [thelastapi](https://app.vibiz.app/docs) API: projects, hosting and
3
+ The typed client for the [thelastapi](https://thelastapi.dev/docs) API: projects, hosting and
4
4
  deploys, databases, sign-in, email, AI, usage, payments and more, with the same calls the `vibiz`
5
5
  CLI makes.
6
6
 
@@ -11,7 +11,7 @@ npm install @vibiz/sdk
11
11
  ```ts
12
12
  import { Vibiz } from '@vibiz/sdk';
13
13
 
14
- const vibiz = new Vibiz({ apiKey: process.env.VIBIZ_API_KEY!, baseUrl: 'https://app.vibiz.app' });
14
+ const vibiz = new Vibiz({ apiKey: process.env.VIBIZ_API_KEY!, baseUrl: 'https://thelastapi.dev' });
15
15
 
16
16
  const { project } = await vibiz.projects.create({ name: 'Acme Bakery' });
17
17
  const projects = await vibiz.projects.list();
@@ -22,4 +22,4 @@ ESM with TypeScript types, Node 20+. The account key (`vz_sk_…`) is a secret:
22
22
  in scripts and in CI, never in a browser. For code that runs inside your app, use
23
23
  [`@vibiz/app`](https://www.npmjs.com/package/@vibiz/app).
24
24
 
25
- Docs: https://app.vibiz.app/docs
25
+ Docs: https://thelastapi.dev/docs
package/dist/client.d.ts CHANGED
@@ -530,6 +530,13 @@ export declare class Vibiz {
530
530
  /** Check DNS and ownership again now. */
531
531
  verify: (id: string, domain: string) => Promise<Domain>;
532
532
  remove: (id: string, domain: string) => Promise<DomainList>;
533
+ /**
534
+ * Moving to a new address (full-access keys): every URL on `domain`
535
+ * answers a permanent redirect to the same path on `to`, another live
536
+ * domain of the project, so search engines carry its pages over. `null`
537
+ * stops it. A redirecting domain is never the project's primary.
538
+ */
539
+ redirect: (id: string, domain: string, to: string | null) => Promise<Domain>;
533
540
  /**
534
541
  * Full-access keys: buy a domain from the account's credits; it serves on this
535
542
  * project once registered. A Limited key answers `owner_only` with the
package/dist/index.js CHANGED
@@ -619,6 +619,16 @@ var Vibiz = class {
619
619
  remove: (id, domain) => this.request(`/projects/${id}/domains/${encodeURIComponent(domain)}`, {
620
620
  method: "DELETE"
621
621
  }),
622
+ /**
623
+ * Moving to a new address (full-access keys): every URL on `domain`
624
+ * answers a permanent redirect to the same path on `to`, another live
625
+ * domain of the project, so search engines carry its pages over. `null`
626
+ * stops it. A redirecting domain is never the project's primary.
627
+ */
628
+ redirect: (id, domain, to) => this.request(`/projects/${id}/domains/${encodeURIComponent(domain)}`, {
629
+ method: "PATCH",
630
+ body: { redirect_to: to }
631
+ }),
622
632
  /**
623
633
  * Full-access keys: buy a domain from the account's credits; it serves on this
624
634
  * project once registered. A Limited key answers `owner_only` with the
@@ -1995,7 +2005,7 @@ function formatMinor(minor, currency) {
1995
2005
  }
1996
2006
 
1997
2007
  // packages/sdk/src/one-key.ts
1998
- var APP_SDK_VERSION = "0.3.15";
2008
+ var APP_SDK_VERSION = "0.3.17";
1999
2009
  var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
2000
2010
  function oneKeyMessage(url, host) {
2001
2011
  const where = host ?? "your host";
package/dist/one-key.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * (`npm install --save-exact @vibiz/app@<this>`). A test keeps it, the skills
11
11
  * and the docs equal to packages/app/package.json.
12
12
  */
13
- export declare const APP_SDK_VERSION = "0.3.15";
13
+ export declare const APP_SDK_VERSION = "0.3.17";
14
14
  /** Everything one app key reaches. */
15
15
  export declare const ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
16
16
  /**
package/dist/types.d.ts CHANGED
@@ -81,6 +81,12 @@ export interface Domain {
81
81
  records_to_set: DnsRecordToSet[];
82
82
  /** `www.<domain>`, redirecting to the domain (an apex domain). */
83
83
  www_redirect: string | null;
84
+ /**
85
+ * Another of the project's domains every URL here permanently redirects to,
86
+ * path kept (a move to a new address). Null: it serves the app. Optional for
87
+ * an API from before redirects.
88
+ */
89
+ redirect_to?: string | null;
84
90
  /** What to do next, in plain words. */
85
91
  next_step: string;
86
92
  error: string | null;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@vibiz/sdk",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "Typed client for the thelastapi API: projects, hosting, databases, sign-in, email, AI, payments and more.",
5
5
  "keywords": [
6
6
  "vibiz",
7
7
  "sdk",
8
8
  "api-client"
9
9
  ],
10
- "homepage": "https://app.vibiz.app/docs",
10
+ "homepage": "https://thelastapi.dev/docs",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/Vibiz-ai/vibiz-stack.git",