@noatgnu/cupcake-core 1.2.15 → 1.2.17

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.
@@ -85,7 +85,6 @@ var AnnotationType;
85
85
  AnnotationType["Calculator"] = "calculator";
86
86
  AnnotationType["MolarityCalculator"] = "mcalculator";
87
87
  AnnotationType["Randomization"] = "randomization";
88
- AnnotationType["Instrument"] = "instrument";
89
88
  AnnotationType["Metadata"] = "metadata";
90
89
  AnnotationType["Booking"] = "booking";
91
90
  })(AnnotationType || (AnnotationType = {}));
@@ -1912,6 +1911,17 @@ class LabGroupService extends BaseApiService {
1912
1911
  removeMemberFromLabGroup(id, userId) {
1913
1912
  return this.post(`${this.apiUrl}/lab-groups/${id}/remove_member/`, { userId });
1914
1913
  }
1914
+ /**
1915
+ * Check if a user is a member of a lab group
1916
+ * @param id Lab group ID
1917
+ * @param userId User ID to check (optional, defaults to current user)
1918
+ * @returns Membership status including direct and indirect membership
1919
+ */
1920
+ checkMembership(id, userId) {
1921
+ const params = userId ? { user_id: userId.toString() } : {};
1922
+ const httpParams = this.buildHttpParams(params);
1923
+ return this.get(`${this.apiUrl}/lab-groups/${id}/check_membership/`, { params: httpParams });
1924
+ }
1915
1925
  getRootLabGroups(params) {
1916
1926
  const httpParams = this.buildHttpParams({ ...params, parentGroup__isnull: 'true' });
1917
1927
  return this.get(`${this.apiUrl}/lab-groups/`, { params: httpParams });