UNPKG

@microsoft/msgraph-sdk-shares

Version:
90 lines 4.89 kB
import { type BaseCollectionPaginationCountResponse, type DriveRecipient, type Permission } from '@microsoft/msgraph-sdk/models/index.js'; import { type AdditionalDataHolder, type BackedModel, type BaseRequestBuilder, type Parsable, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions'; /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object * @returns {GrantPostRequestBody} */ export declare function createGrantPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>); /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object * @returns {GrantPostResponse} */ export declare function createGrantPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>); /** * The deserialization information for the current model * @param GrantPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ export declare function deserializeIntoGrantPostRequestBody(grantPostRequestBody?: Partial<GrantPostRequestBody> | undefined): Record<string, (node: ParseNode) => void>; /** * The deserialization information for the current model * @param GrantPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ export declare function deserializeIntoGrantPostResponse(grantPostResponse?: Partial<GrantPostResponse> | undefined): Record<string, (node: ParseNode) => void>; export interface GrantPostRequestBody extends AdditionalDataHolder, BackedModel, Parsable { /** * Stores model information. */ backingStoreEnabled?: boolean | null; /** * The recipients property */ recipients?: DriveRecipient[] | null; /** * The roles property */ roles?: string[] | null; } export interface GrantPostResponse extends BaseCollectionPaginationCountResponse, Parsable { /** * The value property */ value?: Permission[] | null; } /** * Provides operations to call the grant method. */ export interface GrantRequestBuilder extends BaseRequestBuilder<GrantRequestBuilder> { /** * Grant users access to a link represented by a permission. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise<GrantPostResponse>} * @throws {ODataError} error when the service returns a 4XX or 5XX status code * @see {@link https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0|Find more info here} */ post(body: GrantPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<GrantPostResponse | undefined>; /** * Grant users access to a link represented by a permission. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toPostRequestInformation(body: GrantPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation; } /** * Serializes information the current object * @param GrantPostRequestBody The instance to serialize from. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param writer Serialization writer to use to serialize this model */ export declare function serializeGrantPostRequestBody(writer: SerializationWriter, grantPostRequestBody?: Partial<GrantPostRequestBody> | undefined | null, isSerializingDerivedType?: boolean): void; /** * Serializes information the current object * @param GrantPostResponse The instance to serialize from. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param writer Serialization writer to use to serialize this model */ export declare function serializeGrantPostResponse(writer: SerializationWriter, grantPostResponse?: Partial<GrantPostResponse> | undefined | null, isSerializingDerivedType?: boolean): void; /** * Uri template for the request builder. */ export declare const GrantRequestBuilderUriTemplate = "{+baseurl}/shares/{sharedDriveItem%2Did}/permission/grant"; /** * Metadata for all the requests in the request builder. */ export declare const GrantRequestBuilderRequestsMetadata: RequestsMetadata; //# sourceMappingURL=index.d.ts.map