attlaz-client 1.69.0 → 1.71.0
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/StorageInformation.d.ts +1 -1
- package/dist/Model/Storage/StorageInformation.js +1 -1
- package/dist/Service/ProjectEndpoint.d.ts +1 -1
- package/dist/Service/ProjectEndpoint.js +4 -2
- package/dist/Service/StorageEndpoint.d.ts +3 -3
- package/dist/Service/StorageEndpoint.js +8 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { State } from '../Model/State.js';
|
|
|
4
4
|
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
5
5
|
import { Endpoint } from './Endpoint.js';
|
|
6
6
|
export declare class ProjectEndpoint extends Endpoint {
|
|
7
|
-
getAll(): Promise<CollectionResult<Project>>;
|
|
7
|
+
getAll(pagination?: CursorPagination | null): Promise<CollectionResult<Project>>;
|
|
8
8
|
getByWorkspace(workspaceId: string, pagination?: CursorPagination | null, states?: State[] | null): Promise<CollectionResult<Project>>;
|
|
9
9
|
getById(projectId: string): Promise<Project | null>;
|
|
10
10
|
save(project: Project): Promise<Project>;
|
|
@@ -2,9 +2,11 @@ import { Project } from '../Model/Project/Project.js';
|
|
|
2
2
|
import { QueryString } from '../Http/Data/QueryString.js';
|
|
3
3
|
import { Endpoint } from './Endpoint.js';
|
|
4
4
|
export class ProjectEndpoint extends Endpoint {
|
|
5
|
-
async getAll() {
|
|
5
|
+
async getAll(pagination = null) {
|
|
6
6
|
try {
|
|
7
|
-
const
|
|
7
|
+
const queryString = new QueryString('/projects');
|
|
8
|
+
queryString.addPagination(pagination);
|
|
9
|
+
const result = await this.requestCollection(queryString, Project.parse);
|
|
8
10
|
return result;
|
|
9
11
|
}
|
|
10
12
|
catch (e) {
|
|
@@ -13,8 +13,8 @@ export declare class StorageEndpoint extends Endpoint {
|
|
|
13
13
|
getPoolItemsInformation(projectEnvironmentId: string, storageType: StorageType, bucketKey: string, pagination?: CursorPagination | null): Promise<CollectionResult<StorageItemInformation>>;
|
|
14
14
|
/** @deprecated Renamed to clearBucket. Kept for backwards compatibility. */
|
|
15
15
|
clearPool(projectEnvironmentId: string, storageType: StorageType, bucketKey: string): Promise<boolean>;
|
|
16
|
-
getItem(projectEnvironmentId: string, storageType: StorageType,
|
|
16
|
+
getItem(projectEnvironmentId: string, storageType: StorageType, bucketKey: string, storageItemKey: string): Promise<StorageItem | null>;
|
|
17
17
|
getBucketItem(storageBucketId: string, storageItemKey: string): Promise<StorageItem | null>;
|
|
18
|
-
setItem(projectEnvironmentId: string, storageType: StorageType,
|
|
19
|
-
deleteItem(projectEnvironmentId: string, storageType: StorageType,
|
|
18
|
+
setItem(projectEnvironmentId: string, storageType: StorageType, bucketKey: string, storageItem: StorageItem): Promise<StorageItem>;
|
|
19
|
+
deleteItem(projectEnvironmentId: string, storageType: StorageType, bucketKey: string, storageItemKey: string): Promise<boolean>;
|
|
20
20
|
}
|
|
@@ -12,7 +12,8 @@ export class StorageEndpoint extends Endpoint {
|
|
|
12
12
|
storageInformation.bytes = raw.bytes;
|
|
13
13
|
storageInformation.bytes_limit = raw.bytes_limit;
|
|
14
14
|
storageInformation.items = raw.items;
|
|
15
|
-
|
|
15
|
+
// Prefer the new `buckets` field; fall back to the legacy `pools` for older API responses.
|
|
16
|
+
storageInformation.buckets = (raw.buckets ?? raw.pools);
|
|
16
17
|
return storageInformation;
|
|
17
18
|
};
|
|
18
19
|
const result = await this.requestObject(cmd, null, parser, 'GET');
|
|
@@ -65,8 +66,8 @@ export class StorageEndpoint extends Endpoint {
|
|
|
65
66
|
async clearPool(projectEnvironmentId, storageType, bucketKey) {
|
|
66
67
|
return this.clearBucket(projectEnvironmentId, storageType, bucketKey);
|
|
67
68
|
}
|
|
68
|
-
async getItem(projectEnvironmentId, storageType,
|
|
69
|
-
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' +
|
|
69
|
+
async getItem(projectEnvironmentId, storageType, bucketKey, storageItemKey) {
|
|
70
|
+
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items/' + storageItemKey;
|
|
70
71
|
try {
|
|
71
72
|
const result = await this.requestObject(cmd, null, StorageItem.parse, 'GET');
|
|
72
73
|
return result.getData();
|
|
@@ -91,8 +92,8 @@ export class StorageEndpoint extends Endpoint {
|
|
|
91
92
|
throw ex;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
async setItem(projectEnvironmentId, storageType,
|
|
95
|
-
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' +
|
|
95
|
+
async setItem(projectEnvironmentId, storageType, bucketKey, storageItem) {
|
|
96
|
+
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items/' + storageItem.key;
|
|
96
97
|
try {
|
|
97
98
|
const result = await this.requestObject(cmd, storageItem, StorageItem.parse, 'POST');
|
|
98
99
|
const savedItem = result.getData();
|
|
@@ -108,8 +109,8 @@ export class StorageEndpoint extends Endpoint {
|
|
|
108
109
|
throw ex;
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
async deleteItem(projectEnvironmentId, storageType,
|
|
112
|
-
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' +
|
|
112
|
+
async deleteItem(projectEnvironmentId, storageType, bucketKey, storageItemKey) {
|
|
113
|
+
const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items/' + storageItemKey;
|
|
113
114
|
try {
|
|
114
115
|
const parser = (raw) => ({ deleted: raw.deleted });
|
|
115
116
|
const result = await this.requestObject(cmd, null, parser, 'DELETE');
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.71.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.71.0";
|