@hasna/configs-sdk 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -58,12 +58,24 @@ class ConfigsClient {
58
58
  async getProfile(idOrSlug) {
59
59
  return this.req("GET", `/api/profiles/${idOrSlug}`);
60
60
  }
61
+ async createProfile(name, description) {
62
+ return this.req("POST", "/api/profiles", { name, description });
63
+ }
64
+ async updateProfile(idOrSlug, input) {
65
+ return this.req("PUT", `/api/profiles/${idOrSlug}`, input);
66
+ }
67
+ async deleteProfile(idOrSlug) {
68
+ await this.req("DELETE", `/api/profiles/${idOrSlug}`);
69
+ }
61
70
  async applyProfile(idOrSlug, dryRun = false) {
62
71
  return this.req("POST", `/api/profiles/${idOrSlug}/apply`, { dry_run: dryRun });
63
72
  }
64
73
  async listMachines() {
65
74
  return this.req("GET", "/api/machines");
66
75
  }
76
+ async registerMachine(hostname, os) {
77
+ return this.req("POST", "/api/machines", { hostname, os });
78
+ }
67
79
  async getStats() {
68
80
  return this.req("GET", "/api/stats");
69
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/configs-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Zero-dependency TypeScript client for @hasna/configs REST API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",