attlaz-client 1.11.8 → 1.11.10
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/dist/Model/Storage/StorageItem.d.ts +4 -1
- package/dist/Model/Storage/StorageItem.js +7 -1
- package/dist/Model/Storage/StorageItemInformation.d.ts +3 -0
- package/dist/Model/Storage/StorageItemInformation.js +6 -0
- package/dist/Service/StorageEndpoint.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare class StorageItem {
|
|
2
|
+
id: string;
|
|
2
3
|
key: string;
|
|
3
4
|
bytes: number;
|
|
4
|
-
|
|
5
|
+
created: Date | null;
|
|
6
|
+
updated: Date | null;
|
|
5
7
|
expiration: Date | null;
|
|
8
|
+
value: string | number | boolean | null | any;
|
|
6
9
|
static parse(raw: any): StorageItem;
|
|
7
10
|
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { Utils } from '../../Utils.js';
|
|
2
2
|
export class StorageItem {
|
|
3
|
+
id;
|
|
3
4
|
key;
|
|
4
5
|
bytes;
|
|
5
|
-
|
|
6
|
+
created;
|
|
7
|
+
updated;
|
|
6
8
|
expiration;
|
|
9
|
+
value;
|
|
7
10
|
static parse(raw) {
|
|
8
11
|
const storageItem = new StorageItem();
|
|
12
|
+
storageItem.id = raw.id;
|
|
9
13
|
storageItem.key = raw.key;
|
|
10
14
|
storageItem.bytes = raw.bytes;
|
|
11
15
|
storageItem.value = raw.value;
|
|
16
|
+
storageItem.created = raw.expiration === null ? null : Utils.parseRawDate(raw.created);
|
|
17
|
+
storageItem.updated = raw.expiration === null ? null : Utils.parseRawDate(raw.updated);
|
|
12
18
|
storageItem.expiration = raw.expiration === null ? null : Utils.parseRawDate(raw.expiration);
|
|
13
19
|
return storageItem;
|
|
14
20
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Utils } from '../../Utils.js';
|
|
2
2
|
export class StorageItemInformation {
|
|
3
|
+
id;
|
|
3
4
|
key;
|
|
4
5
|
bytes;
|
|
6
|
+
created;
|
|
7
|
+
updated;
|
|
5
8
|
expiration;
|
|
6
9
|
static parse(raw) {
|
|
7
10
|
const storageItemInformation = new StorageItemInformation();
|
|
11
|
+
storageItemInformation.id = raw.id;
|
|
8
12
|
storageItemInformation.key = raw.key;
|
|
9
13
|
storageItemInformation.bytes = raw.bytes;
|
|
14
|
+
storageItemInformation.created = raw.expiration === null ? null : Utils.parseRawDate(raw.created);
|
|
15
|
+
storageItemInformation.updated = raw.expiration === null ? null : Utils.parseRawDate(raw.updated);
|
|
10
16
|
storageItemInformation.expiration = raw.expiration === null ? null : Utils.parseRawDate(raw.expiration);
|
|
11
17
|
return storageItemInformation;
|
|
12
18
|
}
|
|
@@ -72,7 +72,7 @@ export class StorageEndpoint extends Endpoint {
|
|
|
72
72
|
async setItem(projectEnvironmentId, storageType, poolKey, storageItem) {
|
|
73
73
|
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + poolKey + '/items/' + storageItem.key;
|
|
74
74
|
try {
|
|
75
|
-
const result = await this.requestObject(cmd,
|
|
75
|
+
const result = await this.requestObject(cmd, storageItem, StorageItem.parse, 'POST');
|
|
76
76
|
const savedItem = result.getData();
|
|
77
77
|
if (savedItem === null) {
|
|
78
78
|
console.log('Storage set item wrong data', { result, parsed: savedItem });
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.11.
|
|
1
|
+
export declare const VERSION = "1.11.8";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.11.
|
|
1
|
+
export const VERSION = "1.11.8";
|