@inweb/client 25.6.3 → 25.6.4

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/Api/File.d.ts CHANGED
@@ -99,7 +99,8 @@ export declare class File {
99
99
  */
100
100
  get owner(): IShortUserDescription;
101
101
  /**
102
- * File preview image URL. Use {@link File.setPreview | setPreview()} to change preview image.
102
+ * File preview image URL or empty string if the file does not have a preview. Use
103
+ * {@link File.setPreview | setPreview()} to change preview image.
103
104
  *
104
105
  * @readonly
105
106
  */
@@ -93,7 +93,8 @@ export declare class Project {
93
93
  */
94
94
  get owner(): IShortUserDescription;
95
95
  /**
96
- * Project preview image URL. Use {@link Project.setPreview | setPreview()} to change preview image.
96
+ * Project preview image URL or empty string if the project does not have a preview. Use
97
+ * {@link Project.setPreview | setPreview()} to change preview image.
97
98
  *
98
99
  * @readonly
99
100
  */
package/lib/Api/User.d.ts CHANGED
@@ -11,7 +11,8 @@ export declare class User {
11
11
  */
12
12
  constructor(data: any, httpClient: IHttpClient);
13
13
  /**
14
- * User avatar image URL. Use {@link User.setAvatar | setAvatar()} to change avatar image.
14
+ * User avatar image URL or empty string if the user does not have an avatar. Use
15
+ * {@link User.setAvatar | setAvatar()} to change avatar image.
15
16
  *
16
17
  * @readonly
17
18
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "25.6.3",
3
+ "version": "25.6.4",
4
4
  "description": "JavaScript REST API client for the Open Cloud Server",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -26,6 +26,6 @@
26
26
  "ts-docs": "typedoc"
27
27
  },
28
28
  "dependencies": {
29
- "@inweb/eventemitter2": "~25.6.3"
29
+ "@inweb/eventemitter2": "~25.6.4"
30
30
  }
31
31
  }
package/src/Api/File.ts CHANGED
@@ -117,7 +117,9 @@ export class File {
117
117
 
118
118
  private set data(value: any) {
119
119
  this._data = value;
120
- this._data.previewUrl = value.preview ? `${this.httpClient.serverUrl}${this.path}/preview` : "";
120
+ this._data.previewUrl = value.preview
121
+ ? `${this.httpClient.serverUrl}${this.path}/preview?updated=${value.updatedAt}`
122
+ : "";
121
123
  // owner since 24.8
122
124
  if (typeof this._data.owner === "string") this._data.owner = { userId: this._data.owner };
123
125
  this._data.owner ??= {};
@@ -213,7 +215,8 @@ export class File {
213
215
  }
214
216
 
215
217
  /**
216
- * File preview image URL. Use {@link File.setPreview | setPreview()} to change preview image.
218
+ * File preview image URL or empty string if the file does not have a preview. Use
219
+ * {@link File.setPreview | setPreview()} to change preview image.
217
220
  *
218
221
  * @readonly
219
222
  */
@@ -102,7 +102,9 @@ export class Project {
102
102
 
103
103
  private set data(value: any) {
104
104
  this._data = value;
105
- this._data.previewUrl = value.avatarUrl ? `${this.httpClient.serverUrl}/projects/${this._data.id}/preview` : "";
105
+ this._data.previewUrl = value.avatarUrl
106
+ ? `${this.httpClient.serverUrl}/projects/${this._data.id}/preview?updated=${value.updatedAt}`
107
+ : "";
106
108
  this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;
107
109
  this._data.owner.fullName = userFullName(this._data.owner);
108
110
  this._data.owner.initials = userInitials(this._data.owner.fullName);
@@ -187,7 +189,8 @@ export class Project {
187
189
  }
188
190
 
189
191
  /**
190
- * Project preview image URL. Use {@link Project.setPreview | setPreview()} to change preview image.
192
+ * Project preview image URL or empty string if the project does not have a preview. Use
193
+ * {@link Project.setPreview | setPreview()} to change preview image.
191
194
  *
192
195
  * @readonly
193
196
  */
package/src/Api/User.ts CHANGED
@@ -42,7 +42,8 @@ export class User {
42
42
  }
43
43
 
44
44
  /**
45
- * User avatar image URL. Use {@link User.setAvatar | setAvatar()} to change avatar image.
45
+ * User avatar image URL or empty string if the user does not have an avatar. Use
46
+ * {@link User.setAvatar | setAvatar()} to change avatar image.
46
47
  *
47
48
  * @readonly
48
49
  */
@@ -92,7 +93,9 @@ export class User {
92
93
 
93
94
  private set data(value: any) {
94
95
  this._data = value;
95
- this._data.avatarUrl = value.avatarImage ? `${this.httpClient.serverUrl}/users/${this._data.id}/avatar` : "";
96
+ this._data.avatarUrl = value.avatarImage
97
+ ? `${this.httpClient.serverUrl}/users/${this._data.id}/avatar?updated=${value.lastModified}`
98
+ : "";
96
99
  this._data.fullName = userFullName(this._data);
97
100
  this._data.initials = userInitials(this._data.fullName);
98
101
  }