@novence/sdk 0.3.0 → 0.4.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.
@@ -40,6 +40,30 @@ export interface Project {
40
40
  createdAt?: string;
41
41
  updatedAt?: string;
42
42
  }
43
+ /** Result of `projects.delete`. Calling it on an already-deleted project returns `alreadyDeleted: true`. */
44
+ export interface ProjectDeleteResult {
45
+ deleted: true;
46
+ alreadyDeleted: boolean;
47
+ project: {
48
+ id: string;
49
+ name: string;
50
+ suffix: string;
51
+ url: string;
52
+ customDomain: string | null;
53
+ };
54
+ deletedAt: string;
55
+ /** Custom-domain hosts unmapped at the edge by this call. */
56
+ customDomainHostsReleased: string[];
57
+ /** Site files are erased after the response unless the purge already finished. */
58
+ storage: {
59
+ status: "purged";
60
+ objectsDeleted: number;
61
+ } | {
62
+ status: "purging";
63
+ };
64
+ /** Edge cleanup steps that failed. Call `projects.delete` again to retry them. */
65
+ warnings: string[];
66
+ }
43
67
  /**
44
68
  * Quality-gate payload. When `skipped` is true (unverified accounts), `passed`
45
69
  * is null — do not treat that as checks having passed.
@@ -302,6 +326,14 @@ export declare class Novence {
302
326
  }) => Promise<{
303
327
  project: Project;
304
328
  }>;
329
+ /**
330
+ * Permanently delete a project (owner only, account key). Irreversible: the site goes
331
+ * offline on every host and its files are erased. `confirm` must equal the project's
332
+ * exact name or suffix.
333
+ */
334
+ delete: (id: string, input: {
335
+ confirm: string;
336
+ }) => Promise<ProjectDeleteResult>;
305
337
  usage: (id: string) => Promise<{
306
338
  projectId: string;
307
339
  period: {
package/dist/cjs/index.js CHANGED
@@ -111,6 +111,12 @@ class Novence {
111
111
  list: () => this.request("GET", "/v1/projects"),
112
112
  get: (id) => this.request("GET", `/v1/projects/${id}`),
113
113
  update: (id, input) => this.request("PATCH", `/v1/projects/${id}`, input),
114
+ /**
115
+ * Permanently delete a project (owner only, account key). Irreversible: the site goes
116
+ * offline on every host and its files are erased. `confirm` must equal the project's
117
+ * exact name or suffix.
118
+ */
119
+ delete: (id, input) => this.request("DELETE", `/v1/projects/${id}`, { confirm: input.confirm }),
114
120
  usage: (id) => this.request("GET", `/v1/projects/${id}/usage`),
115
121
  analytics: (id, range) => {
116
122
  const q = new URLSearchParams();
@@ -40,6 +40,30 @@ export interface Project {
40
40
  createdAt?: string;
41
41
  updatedAt?: string;
42
42
  }
43
+ /** Result of `projects.delete`. Calling it on an already-deleted project returns `alreadyDeleted: true`. */
44
+ export interface ProjectDeleteResult {
45
+ deleted: true;
46
+ alreadyDeleted: boolean;
47
+ project: {
48
+ id: string;
49
+ name: string;
50
+ suffix: string;
51
+ url: string;
52
+ customDomain: string | null;
53
+ };
54
+ deletedAt: string;
55
+ /** Custom-domain hosts unmapped at the edge by this call. */
56
+ customDomainHostsReleased: string[];
57
+ /** Site files are erased after the response unless the purge already finished. */
58
+ storage: {
59
+ status: "purged";
60
+ objectsDeleted: number;
61
+ } | {
62
+ status: "purging";
63
+ };
64
+ /** Edge cleanup steps that failed. Call `projects.delete` again to retry them. */
65
+ warnings: string[];
66
+ }
43
67
  /**
44
68
  * Quality-gate payload. When `skipped` is true (unverified accounts), `passed`
45
69
  * is null — do not treat that as checks having passed.
@@ -302,6 +326,14 @@ export declare class Novence {
302
326
  }) => Promise<{
303
327
  project: Project;
304
328
  }>;
329
+ /**
330
+ * Permanently delete a project (owner only, account key). Irreversible: the site goes
331
+ * offline on every host and its files are erased. `confirm` must equal the project's
332
+ * exact name or suffix.
333
+ */
334
+ delete: (id: string, input: {
335
+ confirm: string;
336
+ }) => Promise<ProjectDeleteResult>;
305
337
  usage: (id: string) => Promise<{
306
338
  projectId: string;
307
339
  period: {
package/dist/esm/index.js CHANGED
@@ -98,6 +98,12 @@ export class Novence {
98
98
  list: () => this.request("GET", "/v1/projects"),
99
99
  get: (id) => this.request("GET", `/v1/projects/${id}`),
100
100
  update: (id, input) => this.request("PATCH", `/v1/projects/${id}`, input),
101
+ /**
102
+ * Permanently delete a project (owner only, account key). Irreversible: the site goes
103
+ * offline on every host and its files are erased. `confirm` must equal the project's
104
+ * exact name or suffix.
105
+ */
106
+ delete: (id, input) => this.request("DELETE", `/v1/projects/${id}`, { confirm: input.confirm }),
101
107
  usage: (id) => this.request("GET", `/v1/projects/${id}/usage`),
102
108
  analytics: (id, range) => {
103
109
  const q = new URLSearchParams();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novence/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Official TypeScript SDK for Novence — static site hosting for AI agents. Create projects, upload files, run quality checks, deploy to the edge.",
5
5
  "license": "MIT",
6
6
  "type": "module",