@pc-nexus/storage 0.5.0-next.8 → 0.5.0-next.9
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/lib/nos/nos.js +3 -3
- package/lib/nos/type.d.ts +3 -2
- package/lib/nos/type.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/nos/nos.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { invoke } from "@pc-nexus/internal";
|
|
2
2
|
class NOS {
|
|
3
3
|
async createUploadUrl(body) {
|
|
4
|
-
const response = await invoke("storage/nos", "
|
|
4
|
+
const response = await invoke("storage/nos", "create-upload-url", {
|
|
5
5
|
body,
|
|
6
6
|
});
|
|
7
7
|
const result = (await response.json());
|
|
8
8
|
return result.value;
|
|
9
9
|
}
|
|
10
10
|
async createDownloadUrl(key) {
|
|
11
|
-
const response = await invoke("storage/nos", "
|
|
11
|
+
const response = await invoke("storage/nos", "create-download-url", {
|
|
12
12
|
key,
|
|
13
13
|
});
|
|
14
14
|
const result = (await response.json());
|
|
15
15
|
return result.value;
|
|
16
16
|
}
|
|
17
17
|
async getMetadata(key) {
|
|
18
|
-
const response = await invoke("storage/nos", "
|
|
18
|
+
const response = await invoke("storage/nos", "get-metadata", {
|
|
19
19
|
key,
|
|
20
20
|
});
|
|
21
21
|
const result = (await response.json());
|
package/lib/nos/type.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export type ChecksumType = "SHA1" | "SHA256" | "CRC32" | "CRC32C";
|
|
1
2
|
export interface UploadUrlBody {
|
|
2
3
|
key: string;
|
|
3
|
-
|
|
4
|
+
size: number;
|
|
4
5
|
checksum: string;
|
|
5
|
-
checksum_type:
|
|
6
|
+
checksum_type: ChecksumType;
|
|
6
7
|
overwrite?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export interface PresignedUrlResponse {
|
package/lib/nos/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/nos/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/nos/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pc-nexus/storage",
|
|
3
|
-
"version": "0.5.0-next.
|
|
3
|
+
"version": "0.5.0-next.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"type": "module",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@pc-nexus/internal": "0.5.0-next.
|
|
33
|
+
"@pc-nexus/internal": "0.5.0-next.9",
|
|
34
34
|
"lodash": "^4.17.21"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|