@noatgnu/cupcake-core 1.2.15 → 1.2.16

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.
@@ -1912,6 +1912,17 @@ class LabGroupService extends BaseApiService {
1912
1912
  removeMemberFromLabGroup(id, userId) {
1913
1913
  return this.post(`${this.apiUrl}/lab-groups/${id}/remove_member/`, { userId });
1914
1914
  }
1915
+ /**
1916
+ * Check if a user is a member of a lab group
1917
+ * @param id Lab group ID
1918
+ * @param userId User ID to check (optional, defaults to current user)
1919
+ * @returns Membership status including direct and indirect membership
1920
+ */
1921
+ checkMembership(id, userId) {
1922
+ const params = userId ? { user_id: userId.toString() } : {};
1923
+ const httpParams = this.buildHttpParams(params);
1924
+ return this.get(`${this.apiUrl}/lab-groups/${id}/check_membership/`, { params: httpParams });
1925
+ }
1915
1926
  getRootLabGroups(params) {
1916
1927
  const httpParams = this.buildHttpParams({ ...params, parentGroup__isnull: 'true' });
1917
1928
  return this.get(`${this.apiUrl}/lab-groups/`, { params: httpParams });