import type { SysLink, MetaSysProps, DefaultElements, MakeRequest } from '../common-types'; export type SpaceMembershipProps = { sys: MetaSysProps & { space: SysLink; user: SysLink; }; user: SysLink; admin: boolean; roles: SysLink[]; }; export type CreateSpaceMembershipProps = Omit & { email: string; }; export interface SpaceMembership extends SpaceMembershipProps, DefaultElements { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '' * }) * * client.getSpace('') * .then((space) => space.getSpaceMembership('')) * .then((spaceMembership) => spaceMembership.delete()) * .then(() => console.log(`spaceMembership deleted.`)) * .catch(console.error) * ``` */ delete(): Promise; /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. * @example ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '' * }) * * client.getSpace('') * .then((space) => space.getSpaceMembership('')) * .then((spaceMembership) => { * spaceMembership.name = 'new space membership name' * }) * .then((spaceMembership) => console.log(`spaceMembership ${spaceMembership.sys.id} updated.`)) * .catch(console.error) * ``` */ update(): Promise; } /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw space membership data * @return Wrapped space membership data */ export declare function wrapSpaceMembership(makeRequest: MakeRequest, data: SpaceMembershipProps): SpaceMembership; /** * @private */ export declare const wrapSpaceMembershipCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp) => import("../common-types").Collection;