UNPKG

@microsoft/msgraph-beta-sdk-subscriptions

Version:
94 lines 5.67 kB
import { type Subscription, type SubscriptionCollectionResponse } from '@microsoft/msgraph-beta-sdk/models/index.js'; import { type SubscriptionItemRequestBuilder } from './item/index.js'; import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; /** * Provides operations to manage the collection of subscription entities. */ export interface SubscriptionsRequestBuilder extends BaseRequestBuilder<SubscriptionsRequestBuilder> { /** * Provides operations to manage the collection of subscription entities. * @param subscriptionId The unique identifier of subscription * @returns {SubscriptionItemRequestBuilder} */ bySubscriptionId(subscriptionId: string): SubscriptionItemRequestBuilder; /** * Retrieve a list of webhook subscriptions. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise<SubscriptionCollectionResponse>} * @throws {ODataError} error when the service returns a 4XX or 5XX status code * @see {@link https://learn.microsoft.com/graph/api/subscription-list?view=graph-rest-beta|Find more info here} */ get(requestConfiguration?: RequestConfiguration<SubscriptionsRequestBuilderGetQueryParameters> | undefined): Promise<SubscriptionCollectionResponse | undefined>; /** * Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise<Subscription>} * @throws {ODataError} error when the service returns a 4XX or 5XX status code * @see {@link https://learn.microsoft.com/graph/api/subscription-post-subscriptions?view=graph-rest-beta|Find more info here} */ post(body: Subscription, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<Subscription | undefined>; /** * Retrieve a list of webhook subscriptions. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionsRequestBuilderGetQueryParameters> | undefined): RequestInformation; /** * Subscribes a listener application to receive change notifications when the requested type of changes occur to the specified resource in Microsoft Graph. To identify the resources for which you can create subscriptions and the limitations on subscriptions, see Set up notifications for changes in resource data: Supported resources. Some resources support rich notifications, that is, notifications that include resource data. For more information about these resources, see Set up change notifications that include resource data: Supported resources. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toPostRequestInformation(body: Subscription, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation; } /** * Retrieve a list of webhook subscriptions. The content of the response depends on the context in which the app is calling; for details, see the scenarios in the Permissions section. */ export interface SubscriptionsRequestBuilderGetQueryParameters { /** * Include count of items */ count?: boolean; /** * Expand related entities */ expand?: string[]; /** * Filter items by property values */ filter?: string; /** * Order items by property values */ orderby?: string[]; /** * Search items by search phrases */ search?: string; /** * Select properties to be returned */ select?: string[]; /** * Skip the first n items */ skip?: number; /** * Show only the first n items */ top?: number; } /** * Uri template for the request builder. */ export declare const SubscriptionsRequestBuilderUriTemplate = "{+baseurl}/subscriptions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}"; /** * Metadata for all the navigation properties in the request builder. */ export declare const SubscriptionsRequestBuilderNavigationMetadata: Record<Exclude<keyof SubscriptionsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>; /** * Metadata for all the requests in the request builder. */ export declare const SubscriptionsRequestBuilderRequestsMetadata: RequestsMetadata; //# sourceMappingURL=index.d.ts.map