attlaz-client 1.69.0 → 1.70.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.
@@ -2,7 +2,7 @@ export declare class StorageInformation {
2
2
  bytes: number;
3
3
  bytes_limit: number | null;
4
4
  items: number;
5
- pools: {
5
+ buckets: {
6
6
  name: string;
7
7
  bytes: number;
8
8
  items: number;
@@ -3,5 +3,5 @@ export class StorageInformation {
3
3
  // null = explicitly unlimited at some scope in the configuration chain.
4
4
  bytes_limit;
5
5
  items;
6
- pools;
6
+ buckets;
7
7
  }
@@ -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, poolKey: string, storageItemKey: string): Promise<StorageItem | null>;
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, poolKey: string, storageItem: StorageItem): Promise<StorageItem>;
19
- deleteItem(projectEnvironmentId: string, storageType: StorageType, poolKey: string, storageItemKey: string): Promise<boolean>;
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
- storageInformation.pools = raw.pools;
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, poolKey, storageItemKey) {
69
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + poolKey + '/items/' + storageItemKey;
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, poolKey, storageItem) {
95
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + poolKey + '/items/' + storageItem.key;
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, poolKey, storageItemKey) {
112
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + poolKey + '/items/' + storageItemKey;
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.69.0";
1
+ export declare const VERSION = "1.70.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.69.0";
1
+ export const VERSION = "1.70.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.69.0",
3
+ "version": "1.70.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",