@hasna/configs-sdk 0.1.0 → 0.1.1

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 +21 -18
package/dist/index.js CHANGED
@@ -67,6 +67,18 @@ class ConfigsClient {
67
67
  async getStats() {
68
68
  return this.req("GET", "/api/stats");
69
69
  }
70
+ async getStatus() {
71
+ return this.req("GET", "/api/status");
72
+ }
73
+ async syncKnown(opts) {
74
+ return this.req("POST", "/api/sync-known", opts);
75
+ }
76
+ async createSnapshot(configId) {
77
+ return this.req("POST", `/api/configs/${configId}/snapshot`);
78
+ }
79
+ async getSnapshots(configId) {
80
+ return this.req("GET", `/api/configs/${configId}/snapshots`);
81
+ }
70
82
  async health() {
71
83
  return this.req("GET", "/health");
72
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/configs-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Zero-dependency TypeScript client for @hasna/configs REST API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -11,22 +11,25 @@
11
11
  "import": "./dist/index.js"
12
12
  }
13
13
  },
14
- "files": ["dist", "README.md"],
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
15
18
  "publishConfig": {
16
- "access": "public"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/hasna/open-configs.git"
21
- },
22
- "author": "Andrei Hasna <andrei@hasna.com>",
23
- "license": "Apache-2.0",
24
- "devDependencies": {
25
- "typescript": "^5.7.3",
26
- "@types/bun": "^1.2.4"
27
- },
28
- "scripts": {
29
- "build": "bun build src/index.ts --outdir dist --target browser && tsc --emitDeclarationOnly --outDir dist",
30
- "typecheck": "tsc --noEmit"
31
- }
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/hasna/open-configs.git"
24
+ },
25
+ "author": "Andrei Hasna <andrei@hasna.com>",
26
+ "license": "Apache-2.0",
27
+ "devDependencies": {
28
+ "typescript": "^5.7.3",
29
+ "@types/bun": "^1.2.4"
30
+ },
31
+ "scripts": {
32
+ "build": "bun build src/index.ts --outdir dist --target browser && tsc --emitDeclarationOnly --outDir dist",
33
+ "typecheck": "tsc --noEmit"
34
+ }
32
35
  }