bimplus-websdk 1.0.28 → 1.0.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimplus-websdk",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "bim+ websdk",
5
5
  "types": "types/bimplus-websdk.d.ts",
6
6
  "keywords": [
@@ -164,16 +164,66 @@ declare module 'bimplus-websdk' {
164
164
  url: string;
165
165
  }
166
166
 
167
- interface Attachment {
167
+ export interface Attachment {
168
168
  id: string;
169
169
  fileName: string;
170
+ size: number;
171
+ }
172
+
173
+ export type GetAttachmentResponse = {
174
+ id: string;
175
+ objectIds: string[];
176
+ name: string;
177
+ fileName: string;
178
+ type: string;
179
+ size: number;
180
+ createdAt: string;
181
+ changed: string;
182
+ changedFile: string;
183
+ changedBy: {
184
+ id: string;
185
+ email: string;
186
+ };
187
+ hash: string;
188
+ attachmentType: string;
189
+ classification: string;
190
+ tag: string;
191
+ sizeMB: string;
170
192
  version: number;
193
+ relatedId: string;
194
+ rights: {
195
+ update: boolean;
196
+ share: boolean;
197
+ delete: boolean;
198
+ download: boolean;
199
+ };
200
+ release: boolean;
171
201
  }
172
202
 
173
203
  type HyperlinksResponse = Hyperlink[];
174
204
  type AttachmentLinksResponse = AttachmentLink[];
175
205
  type AttachmentResponse = Attachment[];
176
206
 
207
+ export type PostAttachmentResponse = {
208
+ id: string;
209
+ objectIds: string[];
210
+ name: string;
211
+ fileName: string;
212
+ type: string;
213
+ size: number;
214
+ createdAt: string,
215
+ creator: Author;
216
+ changedFile: string,
217
+ hash: string,
218
+ attachmentType: string;
219
+ classification: string;
220
+ tag: string;
221
+ sizeMB: string;
222
+ version: number;
223
+ relatedId: string;
224
+ release: boolean;
225
+ }
226
+
177
227
  type CommentsResponse = CommentResponse[];
178
228
 
179
229
  export interface CommentResponse {
@@ -214,13 +264,14 @@ declare module 'bimplus-websdk' {
214
264
  postAttachmentLink(objectId: string, data: string): Promise<AttachmentLink>;
215
265
  postComment(objectId: string, data: string): Promise<CommentResponse>;
216
266
  getComments(objectId: string): Promise<CommentsResponse>;
217
- postAttachment(objectId: string, data: FormData, uploadProgress: () => void, documentFolderId: string): Promise<Attachment>;
218
- getAttachments(objectId: string): Promise<Attachment[]>;
267
+ postAttachment(objectId: string, data: FormData, uploadProgress: () => void, documentFolderId: string): Promise<PostAttachmentResponse>;
268
+ getAttachments(objectId: string): Promise<AttachmentResponse>;
219
269
  }
220
270
 
221
271
  export class Attachments {
222
272
  constructor(api: Api);
223
273
  delete(id:string, version?: number): Promise<void>;
274
+ get(id: string): Promise<GetAttachmentResponse>;
224
275
  }
225
276
 
226
277
  export interface SelectionObjectTopologyNode {