@alfresco/aca-shared 8.1.0-36570555800 → 8.1.0-36581753654

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.
@@ -280,6 +280,37 @@ class ContentApiService {
280
280
  const queryOptions = Object.assign(defaults, options);
281
281
  return from(this.nodesApi.listNodeChildren(nodeId, queryOptions));
282
282
  }
283
+ /**
284
+ * Gets the target nodes that are associated with the given source node.
285
+ *
286
+ * @param nodeId ID of the source node
287
+ * @param options Optional parameters supported by JS-API
288
+ * @returns List of target associations
289
+ */
290
+ getNodeTargetAssociations(nodeId, options = {}) {
291
+ return from(this.nodesApi.listTargetAssociations(nodeId, options));
292
+ }
293
+ /**
294
+ * Creates a target association from the given source node to another node.
295
+ *
296
+ * @param nodeId ID of the source node
297
+ * @param association Target node id and association type
298
+ * @returns The created association
299
+ */
300
+ createNodeAssociation(nodeId, association) {
301
+ return from(this.nodesApi.createAssociation(nodeId, association));
302
+ }
303
+ /**
304
+ * Deletes a target association between the given source node and a target node.
305
+ *
306
+ * @param nodeId ID of the source node
307
+ * @param targetId ID of the target node
308
+ * @param assocType Association type to remove
309
+ * @returns Empty result that notifies when the deletion is complete
310
+ */
311
+ deleteNodeAssociation(nodeId, targetId, assocType) {
312
+ return from(this.nodesApi.deleteAssociation(nodeId, targetId, { assocType }));
313
+ }
283
314
  deleteSharedLink(linkId) {
284
315
  return from(this.sharedLinksApi.deleteSharedLink(linkId));
285
316
  }