@novence/sdk 0.2.3 → 0.2.4
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 +2 -0
- package/dist/cjs/index.d.ts +22 -0
- package/dist/cjs/index.js +15 -0
- package/dist/esm/index.d.ts +22 -0
- package/dist/esm/index.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,8 @@ await client.deployments.create(project.id);
|
|
|
38
38
|
console.log(url); // https://{suffix}.novence.ai
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
One HTML document (report, dashboard, artifact): `client.publishHtml({ html, title })` then poll `deployments.latest`. CLI: `npx novence deploy report.html`.
|
|
42
|
+
|
|
41
43
|
### Bootstrap + verify (email path)
|
|
42
44
|
|
|
43
45
|
When you need a key from email OTP instead of the CLI:
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -80,6 +80,13 @@ export interface ConfirmBatchResponse {
|
|
|
80
80
|
error: string;
|
|
81
81
|
}>;
|
|
82
82
|
}
|
|
83
|
+
export interface PublishHtmlResult {
|
|
84
|
+
url: string;
|
|
85
|
+
projectId: string;
|
|
86
|
+
project: Project | null;
|
|
87
|
+
deployment: Deployment;
|
|
88
|
+
created: boolean;
|
|
89
|
+
}
|
|
83
90
|
export type FormFieldType = "text" | "email" | "tel" | "url" | "textarea" | "number" | "select" | "checkbox" | "hidden";
|
|
84
91
|
export interface FormField {
|
|
85
92
|
name: string;
|
|
@@ -289,7 +296,22 @@ export declare class Novence {
|
|
|
289
296
|
latest: (projectId: string) => Promise<{
|
|
290
297
|
deployment: Deployment;
|
|
291
298
|
}>;
|
|
299
|
+
rollback: (projectId: string, opts?: {
|
|
300
|
+
deploymentId?: string;
|
|
301
|
+
}) => Promise<{
|
|
302
|
+
deployment: Deployment;
|
|
303
|
+
}>;
|
|
292
304
|
};
|
|
305
|
+
/**
|
|
306
|
+
* Write `/index.html` and deploy in one call. Omit `projectId` to create a
|
|
307
|
+
* project. Poll `deployments.latest` until live or failed.
|
|
308
|
+
*/
|
|
309
|
+
publishHtml(input: {
|
|
310
|
+
html: string;
|
|
311
|
+
title?: string;
|
|
312
|
+
projectId?: string;
|
|
313
|
+
force?: boolean;
|
|
314
|
+
}): Promise<PublishHtmlResult>;
|
|
293
315
|
domains: {
|
|
294
316
|
configure: (projectId: string, hostname: string) => Promise<DomainConfigureResult>;
|
|
295
317
|
status: (projectId: string) => Promise<DomainStatus>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -173,7 +173,22 @@ class Novence {
|
|
|
173
173
|
deployments = {
|
|
174
174
|
create: (projectId, opts) => this.request("POST", `/v1/projects/${projectId}/deployments`, opts ?? {}),
|
|
175
175
|
latest: (projectId) => this.request("GET", `/v1/projects/${projectId}/deployments/latest`),
|
|
176
|
+
rollback: (projectId, opts) => this.request("POST", `/v1/projects/${projectId}/rollback`, opts ?? {}),
|
|
176
177
|
};
|
|
178
|
+
/**
|
|
179
|
+
* Write `/index.html` and deploy in one call. Omit `projectId` to create a
|
|
180
|
+
* project. Poll `deployments.latest` until live or failed.
|
|
181
|
+
*/
|
|
182
|
+
publishHtml(input) {
|
|
183
|
+
if (input.projectId) {
|
|
184
|
+
return this.request("POST", `/v1/projects/${input.projectId}/publish-html`, { html: input.html, title: input.title, force: input.force });
|
|
185
|
+
}
|
|
186
|
+
return this.request("POST", "/v1/publish-html", {
|
|
187
|
+
html: input.html,
|
|
188
|
+
title: input.title,
|
|
189
|
+
force: input.force,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
177
192
|
domains = {
|
|
178
193
|
configure: (projectId, hostname) => this.request("POST", `/v1/projects/${projectId}/domains`, {
|
|
179
194
|
hostname,
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -80,6 +80,13 @@ export interface ConfirmBatchResponse {
|
|
|
80
80
|
error: string;
|
|
81
81
|
}>;
|
|
82
82
|
}
|
|
83
|
+
export interface PublishHtmlResult {
|
|
84
|
+
url: string;
|
|
85
|
+
projectId: string;
|
|
86
|
+
project: Project | null;
|
|
87
|
+
deployment: Deployment;
|
|
88
|
+
created: boolean;
|
|
89
|
+
}
|
|
83
90
|
export type FormFieldType = "text" | "email" | "tel" | "url" | "textarea" | "number" | "select" | "checkbox" | "hidden";
|
|
84
91
|
export interface FormField {
|
|
85
92
|
name: string;
|
|
@@ -289,7 +296,22 @@ export declare class Novence {
|
|
|
289
296
|
latest: (projectId: string) => Promise<{
|
|
290
297
|
deployment: Deployment;
|
|
291
298
|
}>;
|
|
299
|
+
rollback: (projectId: string, opts?: {
|
|
300
|
+
deploymentId?: string;
|
|
301
|
+
}) => Promise<{
|
|
302
|
+
deployment: Deployment;
|
|
303
|
+
}>;
|
|
292
304
|
};
|
|
305
|
+
/**
|
|
306
|
+
* Write `/index.html` and deploy in one call. Omit `projectId` to create a
|
|
307
|
+
* project. Poll `deployments.latest` until live or failed.
|
|
308
|
+
*/
|
|
309
|
+
publishHtml(input: {
|
|
310
|
+
html: string;
|
|
311
|
+
title?: string;
|
|
312
|
+
projectId?: string;
|
|
313
|
+
force?: boolean;
|
|
314
|
+
}): Promise<PublishHtmlResult>;
|
|
293
315
|
domains: {
|
|
294
316
|
configure: (projectId: string, hostname: string) => Promise<DomainConfigureResult>;
|
|
295
317
|
status: (projectId: string) => Promise<DomainStatus>;
|
package/dist/esm/index.js
CHANGED
|
@@ -162,7 +162,22 @@ export class Novence {
|
|
|
162
162
|
deployments = {
|
|
163
163
|
create: (projectId, opts) => this.request("POST", `/v1/projects/${projectId}/deployments`, opts ?? {}),
|
|
164
164
|
latest: (projectId) => this.request("GET", `/v1/projects/${projectId}/deployments/latest`),
|
|
165
|
+
rollback: (projectId, opts) => this.request("POST", `/v1/projects/${projectId}/rollback`, opts ?? {}),
|
|
165
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* Write `/index.html` and deploy in one call. Omit `projectId` to create a
|
|
169
|
+
* project. Poll `deployments.latest` until live or failed.
|
|
170
|
+
*/
|
|
171
|
+
publishHtml(input) {
|
|
172
|
+
if (input.projectId) {
|
|
173
|
+
return this.request("POST", `/v1/projects/${input.projectId}/publish-html`, { html: input.html, title: input.title, force: input.force });
|
|
174
|
+
}
|
|
175
|
+
return this.request("POST", "/v1/publish-html", {
|
|
176
|
+
html: input.html,
|
|
177
|
+
title: input.title,
|
|
178
|
+
force: input.force,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
166
181
|
domains = {
|
|
167
182
|
configure: (projectId, hostname) => this.request("POST", `/v1/projects/${projectId}/domains`, {
|
|
168
183
|
hostname,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novence/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
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",
|