undohaven-core 0.1.2 → 0.1.3

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/package.json +1 -1
  2. package/src/cloud.js +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undohaven-core",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Snapshot, encryption, and restore engine for UndoHaven.",
6
6
  "engines": {
package/src/cloud.js CHANGED
@@ -124,4 +124,16 @@ export class CloudClient {
124
124
  startTrial() {
125
125
  return this.request('POST', '/v1/trial', { body: {} }).then((res) => res.body)
126
126
  }
127
+
128
+ createS3Key(body) {
129
+ return this.request('POST', '/v1/s3/keys', { body }).then((res) => res.body)
130
+ }
131
+
132
+ listS3Keys() {
133
+ return this.request('GET', '/v1/s3/keys').then((res) => res.body.keys)
134
+ }
135
+
136
+ revokeS3Key(id) {
137
+ return this.request('POST', `/v1/s3/keys/${encodeURIComponent(id)}/revoke`, { body: {} }).then((res) => res.body)
138
+ }
127
139
  }