ESPCDFGroupSharingRequest
ESPCDFGroupSharingRequest represents an incoming or outgoing group share invitation. Use it when the user accepts, declines, or removes a pending share — not for everyday group editing (see ESPCDFGroup).
Requests are returned from ESPCDFUser.getIssuedGroupSharingRequests and getReceivedGroupSharingRequests. Stores update via UserStoreSynchronizer after each operation.
Properties
| Property | Type | Description |
|---|---|---|
id | string | Request id |
status | ESPCDFGroupSharingStatus | Pending, accepted, etc. |
groupIds | string[] | Groups included in the request |
groupnames | string[] | Display names |
username | string | Involved user |
primaryUsername | string | Group owner |
transfer | boolean | Ownership transfer vs share |
operations | ESPCDFGroupSharingRequestOperation | SDK delegates |
_raw | any | Original SDK object |
events | ESPCDFOperationEventEmitter | Operation bus |
Common Workflows
Load sharing requests
import { initCDF } from "@espressif/rainmaker-base-cdf";
const espCDF = await initCDF({ sdkAdaptorRegistry });
const user = espCDF.userStore.user!;
const issued = await user.getIssuedGroupSharingRequests(20);
const received = await user.getReceivedGroupSharingRequests(20);
const request = received.data?.[0];
Accept or decline an invitation
await request!.accept();
// or
await request!.decline();
Remove a request record
await request!.remove();
Error Handling
accept, decline, and remove treat API responses with status !== "success" as operation failures on the event bus (synchronizer may skip store patches):
try {
const res = await request!.accept();
if (res.status !== "success") {
showErrorBanner(res.description ?? "Accept failed");
}
} catch (e) {
showErrorBanner("Network error");
}