diff --git a/package-lock.json b/package-lock.json index 8de5392fb34..872286b9e2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@microsoft/msgraph-sdk-javascript", - "version": "1.0.0-preview.7", + "version": "1.0.0-preview.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@microsoft/msgraph-sdk-javascript", - "version": "1.0.0-preview.7", + "version": "1.0.0-preview.8", "license": "ISC", "dependencies": { "@microsoft/kiota-abstractions": "^1.0.0-preview.9", diff --git a/package.json b/package.json index 7739f9563be..9b82dd56d95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/msgraph-sdk-javascript", - "version": "1.0.0-preview.7", + "version": "1.0.0-preview.8", "description": "", "main": "lib/src/graphclient/index.js", "types": "lib/src/graphclient/index.d.ts", diff --git a/src/graphBaseServiceClient.ts b/src/graphBaseServiceClient.ts index e24b0338d80..894dbeff4a1 100644 --- a/src/graphBaseServiceClient.ts +++ b/src/graphBaseServiceClient.ts @@ -46,7 +46,6 @@ import { IdentityProtectionRequestBuilder } from './identityProtection/identityP import { IdentityProvidersRequestBuilder } from './identityProviders/identityProvidersRequestBuilder'; import { InformationProtectionRequestBuilder } from './informationProtection/informationProtectionRequestBuilder'; import { InvitationsRequestBuilder } from './invitations/invitationsRequestBuilder'; -import { MeRequestBuilder } from './me/meRequestBuilder'; import { Oauth2PermissionGrantsRequestBuilder } from './oauth2PermissionGrants/oauth2PermissionGrantsRequestBuilder'; import { OrganizationRequestBuilder } from './organization/organizationRequestBuilder'; import { PermissionGrantsRequestBuilder } from './permissionGrants/permissionGrantsRequestBuilder'; @@ -335,12 +334,6 @@ export class GraphBaseServiceClient extends BaseRequestBuilder { public get invitations(): InvitationsRequestBuilder { return new InvitationsRequestBuilder(this.pathParameters, this.requestAdapter); } - /** - * Provides operations to manage the user singleton. - */ - public get me(): MeRequestBuilder { - return new MeRequestBuilder(this.pathParameters, this.requestAdapter); - } /** * Provides operations to manage the collection of oAuth2PermissionGrant entities. */ diff --git a/src/me/activities/activitiesRequestBuilder.ts b/src/me/activities/activitiesRequestBuilder.ts deleted file mode 100644 index 9421c9804a8..00000000000 --- a/src/me/activities/activitiesRequestBuilder.ts +++ /dev/null @@ -1,161 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type UserActivityCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createUserActivityFromDiscriminatorValue, deserializeIntoUserActivity, serializeUserActivity, type UserActivity } from '../../models/userActivity'; -import { createUserActivityCollectionResponseFromDiscriminatorValue } from '../../models/userActivityCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { UserActivityItemRequestBuilder } from './item/userActivityItemRequestBuilder'; -import { RecentRequestBuilder } from './recent/recentRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ActivitiesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the activities property of the microsoft.graph.user entity. - */ -export class ActivitiesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the recent method. - */ - public get recent(): RecentRequestBuilder { - return new RecentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the activities property of the microsoft.graph.user entity. - * @param userActivityId The unique identifier of userActivity - * @returns a UserActivityItemRequestBuilder - */ - public byUserActivityId(userActivityId: string) : UserActivityItemRequestBuilder { - if(!userActivityId) throw new Error("userActivityId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["userActivity%2Did"] = userActivityId - return new UserActivityItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ActivitiesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserActivityCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/projectrome-get-activities?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserActivityCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to activities for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserActivity - */ - public post(body: UserActivity, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserActivityFromDiscriminatorValue, errorMapping); - }; - /** - * Get activities for a given user. Unlike the recent OData function, activities without histories will be returned. The permission UserActivity.ReadWrite.CreatedByApp will apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, activitiesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to activities for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UserActivity, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUserActivity); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a activitiesRequestBuilder - */ - public withUrl(rawUrl: string) : ActivitiesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ActivitiesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const activitiesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/count/countRequestBuilder.ts b/src/me/activities/count/countRequestBuilder.ts deleted file mode 100644 index 3a4f3e76957..00000000000 --- a/src/me/activities/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/count/index.ts b/src/me/activities/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/activities/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/activities/index.ts b/src/me/activities/index.ts deleted file mode 100644 index 4a18cd31ecd..00000000000 --- a/src/me/activities/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './activitiesRequestBuilder' diff --git a/src/me/activities/item/historyItems/count/countRequestBuilder.ts b/src/me/activities/item/historyItems/count/countRequestBuilder.ts deleted file mode 100644 index a8b0f13b5b0..00000000000 --- a/src/me/activities/item/historyItems/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/{userActivity%2Did}/historyItems/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/item/historyItems/count/index.ts b/src/me/activities/item/historyItems/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/activities/item/historyItems/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/activities/item/historyItems/historyItemsRequestBuilder.ts b/src/me/activities/item/historyItems/historyItemsRequestBuilder.ts deleted file mode 100644 index 1a42129aec5..00000000000 --- a/src/me/activities/item/historyItems/historyItemsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ActivityHistoryItemCollectionResponse } from '../../../../models/'; -import { createActivityHistoryItemFromDiscriminatorValue, deserializeIntoActivityHistoryItem, serializeActivityHistoryItem, type ActivityHistoryItem } from '../../../../models/activityHistoryItem'; -import { createActivityHistoryItemCollectionResponseFromDiscriminatorValue } from '../../../../models/activityHistoryItemCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ActivityHistoryItemItemRequestBuilder } from './item/activityHistoryItemItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HistoryItemsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the historyItems property of the microsoft.graph.userActivity entity. - */ -export class HistoryItemsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the historyItems property of the microsoft.graph.userActivity entity. - * @param activityHistoryItemId The unique identifier of activityHistoryItem - * @returns a ActivityHistoryItemItemRequestBuilder - */ - public byActivityHistoryItemId(activityHistoryItemId: string) : ActivityHistoryItemItemRequestBuilder { - if(!activityHistoryItemId) throw new Error("activityHistoryItemId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["activityHistoryItem%2Did"] = activityHistoryItemId - return new ActivityHistoryItemItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HistoryItemsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/{userActivity%2Did}/historyItems{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ActivityHistoryItemCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createActivityHistoryItemCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to historyItems for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ActivityHistoryItem - */ - public post(body: ActivityHistoryItem, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createActivityHistoryItemFromDiscriminatorValue, errorMapping); - }; - /** - * Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, historyItemsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to historyItems for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ActivityHistoryItem, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeActivityHistoryItem); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a historyItemsRequestBuilder - */ - public withUrl(rawUrl: string) : HistoryItemsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HistoryItemsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const historyItemsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/item/historyItems/index.ts b/src/me/activities/item/historyItems/index.ts deleted file mode 100644 index 42f3413f2b8..00000000000 --- a/src/me/activities/item/historyItems/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './historyItemsRequestBuilder' diff --git a/src/me/activities/item/historyItems/item/activity/activityRequestBuilder.ts b/src/me/activities/item/historyItems/item/activity/activityRequestBuilder.ts deleted file mode 100644 index cf65049b2c6..00000000000 --- a/src/me/activities/item/historyItems/item/activity/activityRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type UserActivity } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createUserActivityFromDiscriminatorValue } from '../../../../../../models/userActivity'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ActivityRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the activity property of the microsoft.graph.activityHistoryItem entity. - */ -export class ActivityRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ActivityRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/{userActivity%2Did}/historyItems/{activityHistoryItem%2Did}/activity{?%24select,%24expand}"); - }; - /** - * Optional. NavigationProperty/Containment; navigation property to the associated activity. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserActivity - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserActivityFromDiscriminatorValue, errorMapping); - }; - /** - * Optional. NavigationProperty/Containment; navigation property to the associated activity. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, activityRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a activityRequestBuilder - */ - public withUrl(rawUrl: string) : ActivityRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ActivityRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const activityRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/item/historyItems/item/activity/index.ts b/src/me/activities/item/historyItems/item/activity/index.ts deleted file mode 100644 index aaaeb6b8e35..00000000000 --- a/src/me/activities/item/historyItems/item/activity/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './activityRequestBuilder' diff --git a/src/me/activities/item/historyItems/item/activityHistoryItemItemRequestBuilder.ts b/src/me/activities/item/historyItems/item/activityHistoryItemItemRequestBuilder.ts deleted file mode 100644 index 490534c508d..00000000000 --- a/src/me/activities/item/historyItems/item/activityHistoryItemItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createActivityHistoryItemFromDiscriminatorValue, deserializeIntoActivityHistoryItem, serializeActivityHistoryItem, type ActivityHistoryItem } from '../../../../../models/activityHistoryItem'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { ActivityRequestBuilder } from './activity/activityRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ActivityHistoryItemItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the historyItems property of the microsoft.graph.userActivity entity. - */ -export class ActivityHistoryItemItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the activity property of the microsoft.graph.activityHistoryItem entity. - */ - public get activity(): ActivityRequestBuilder { - return new ActivityRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ActivityHistoryItemItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/{userActivity%2Did}/historyItems/{activityHistoryItem%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property historyItems for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ActivityHistoryItem - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createActivityHistoryItemFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an existing history item for an existing user activity. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ActivityHistoryItem - * @see {@link https://learn.microsoft.com/graph/api/projectrome-delete-historyitem?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ActivityHistoryItem, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createActivityHistoryItemFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property historyItems for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, activityHistoryItemItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Delete an existing history item for an existing user activity. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ActivityHistoryItem, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeActivityHistoryItem); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ActivityHistoryItemItemRequestBuilder - */ - public withUrl(rawUrl: string) : ActivityHistoryItemItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ActivityHistoryItemItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const activityHistoryItemItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/item/historyItems/item/index.ts b/src/me/activities/item/historyItems/item/index.ts deleted file mode 100644 index ae9e79ee9d3..00000000000 --- a/src/me/activities/item/historyItems/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './activityHistoryItemItemRequestBuilder' diff --git a/src/me/activities/item/index.ts b/src/me/activities/item/index.ts deleted file mode 100644 index 4800fccf7ef..00000000000 --- a/src/me/activities/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './userActivityItemRequestBuilder' diff --git a/src/me/activities/item/userActivityItemRequestBuilder.ts b/src/me/activities/item/userActivityItemRequestBuilder.ts deleted file mode 100644 index f2974f38841..00000000000 --- a/src/me/activities/item/userActivityItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createUserActivityFromDiscriminatorValue, deserializeIntoUserActivity, serializeUserActivity, type UserActivity } from '../../../models/userActivity'; -import { HistoryItemsRequestBuilder } from './historyItems/historyItemsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface UserActivityItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the activities property of the microsoft.graph.user entity. - */ -export class UserActivityItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the historyItems property of the microsoft.graph.userActivity entity. - */ - public get historyItems(): HistoryItemsRequestBuilder { - return new HistoryItemsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new UserActivityItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/{userActivity%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an existing user activity for your app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/projectrome-delete-activity?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The user's activities across devices. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserActivity - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserActivityFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property activities in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserActivity - */ - public patch(body: UserActivity, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserActivityFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an existing user activity for your app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The user's activities across devices. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, userActivityItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property activities in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: UserActivity, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUserActivity); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a UserActivityItemRequestBuilder - */ - public withUrl(rawUrl: string) : UserActivityItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UserActivityItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const userActivityItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/activities/recent/index.ts b/src/me/activities/recent/index.ts deleted file mode 100644 index 419ddfda844..00000000000 --- a/src/me/activities/recent/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './recentRequestBuilder' diff --git a/src/me/activities/recent/recentRequestBuilder.ts b/src/me/activities/recent/recentRequestBuilder.ts deleted file mode 100644 index baef47f7919..00000000000 --- a/src/me/activities/recent/recentRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createUserActivityFromDiscriminatorValue, serializeUserActivity, type UserActivity } from '../../../models/userActivity'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createRecentGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoRecentGetResponse; -} -export function deserializeIntoRecentGetResponse(recentGetResponse: RecentGetResponse | undefined = {} as RecentGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(recentGetResponse), - "value": n => { recentGetResponse.value = n.getCollectionOfObjectValues(createUserActivityFromDiscriminatorValue); }, - } -} -export interface RecentGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: UserActivity[]; -} -export interface RecentRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function serializeRecentGetResponse(writer: SerializationWriter, recentGetResponse: RecentGetResponse | undefined = {} as RecentGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, recentGetResponse) - writer.writeCollectionOfObjectValues("value", recentGetResponse.value, serializeUserActivity); -} -/** - * Provides operations to call the recent method. - */ -export class RecentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RecentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/activities/recent(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service queries for the most recent historyItems, and then pull those related activities. Activities are sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems won't be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of RecentGetResponse - * @see {@link https://learn.microsoft.com/graph/api/projectrome-get-recent-activities?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createRecentGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a 'most recently used' API. The service queries for the most recent historyItems, and then pull those related activities. Activities are sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems won't be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, recentRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a recentRequestBuilder - */ - public withUrl(rawUrl: string) : RecentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RecentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const recentRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/agreementAcceptances/agreementAcceptancesRequestBuilder.ts b/src/me/agreementAcceptances/agreementAcceptancesRequestBuilder.ts deleted file mode 100644 index 6561e78ae90..00000000000 --- a/src/me/agreementAcceptances/agreementAcceptancesRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AgreementAcceptanceCollectionResponse } from '../../models/'; -import { createAgreementAcceptanceCollectionResponseFromDiscriminatorValue } from '../../models/agreementAcceptanceCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { AgreementAcceptanceItemRequestBuilder } from './item/agreementAcceptanceItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AgreementAcceptancesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the agreementAcceptances property of the microsoft.graph.user entity. - */ -export class AgreementAcceptancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the agreementAcceptances property of the microsoft.graph.user entity. - * @param agreementAcceptanceId The unique identifier of agreementAcceptance - * @returns a AgreementAcceptanceItemRequestBuilder - */ - public byAgreementAcceptanceId(agreementAcceptanceId: string) : AgreementAcceptanceItemRequestBuilder { - if(!agreementAcceptanceId) throw new Error("agreementAcceptanceId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["agreementAcceptance%2Did"] = agreementAcceptanceId - return new AgreementAcceptanceItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AgreementAcceptancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/agreementAcceptances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the signed-in user's agreementAcceptance objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AgreementAcceptanceCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-agreementacceptances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAgreementAcceptanceCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the signed-in user's agreementAcceptance objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, agreementAcceptancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a agreementAcceptancesRequestBuilder - */ - public withUrl(rawUrl: string) : AgreementAcceptancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AgreementAcceptancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const agreementAcceptancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/agreementAcceptances/count/countRequestBuilder.ts b/src/me/agreementAcceptances/count/countRequestBuilder.ts deleted file mode 100644 index a29a700676f..00000000000 --- a/src/me/agreementAcceptances/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/agreementAcceptances/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/agreementAcceptances/count/index.ts b/src/me/agreementAcceptances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/agreementAcceptances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/agreementAcceptances/index.ts b/src/me/agreementAcceptances/index.ts deleted file mode 100644 index e34a2b3efbe..00000000000 --- a/src/me/agreementAcceptances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './agreementAcceptancesRequestBuilder' diff --git a/src/me/agreementAcceptances/item/agreementAcceptanceItemRequestBuilder.ts b/src/me/agreementAcceptances/item/agreementAcceptanceItemRequestBuilder.ts deleted file mode 100644 index 1fb8fb55b61..00000000000 --- a/src/me/agreementAcceptances/item/agreementAcceptanceItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AgreementAcceptance } from '../../../models/'; -import { createAgreementAcceptanceFromDiscriminatorValue } from '../../../models/agreementAcceptance'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AgreementAcceptanceItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the agreementAcceptances property of the microsoft.graph.user entity. - */ -export class AgreementAcceptanceItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AgreementAcceptanceItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/agreementAcceptances/{agreementAcceptance%2Did}{?%24select,%24expand}"); - }; - /** - * The user's terms of use acceptance statuses. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AgreementAcceptance - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAgreementAcceptanceFromDiscriminatorValue, errorMapping); - }; - /** - * The user's terms of use acceptance statuses. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, agreementAcceptanceItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AgreementAcceptanceItemRequestBuilder - */ - public withUrl(rawUrl: string) : AgreementAcceptanceItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AgreementAcceptanceItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const agreementAcceptanceItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/agreementAcceptances/item/index.ts b/src/me/agreementAcceptances/item/index.ts deleted file mode 100644 index 1f7ab847095..00000000000 --- a/src/me/agreementAcceptances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './agreementAcceptanceItemRequestBuilder' diff --git a/src/me/appRoleAssignments/appRoleAssignmentsRequestBuilder.ts b/src/me/appRoleAssignments/appRoleAssignmentsRequestBuilder.ts deleted file mode 100644 index 8c1cbb233ea..00000000000 --- a/src/me/appRoleAssignments/appRoleAssignmentsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AppRoleAssignmentCollectionResponse } from '../../models/'; -import { createAppRoleAssignmentFromDiscriminatorValue, deserializeIntoAppRoleAssignment, serializeAppRoleAssignment, type AppRoleAssignment } from '../../models/appRoleAssignment'; -import { createAppRoleAssignmentCollectionResponseFromDiscriminatorValue } from '../../models/appRoleAssignmentCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { AppRoleAssignmentItemRequestBuilder } from './item/appRoleAssignmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AppRoleAssignmentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the appRoleAssignments property of the microsoft.graph.user entity. - */ -export class AppRoleAssignmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the appRoleAssignments property of the microsoft.graph.user entity. - * @param appRoleAssignmentId The unique identifier of appRoleAssignment - * @returns a AppRoleAssignmentItemRequestBuilder - */ - public byAppRoleAssignmentId(appRoleAssignmentId: string) : AppRoleAssignmentItemRequestBuilder { - if(!appRoleAssignmentId) throw new Error("appRoleAssignmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["appRoleAssignment%2Did"] = appRoleAssignmentId - return new AppRoleAssignmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AppRoleAssignmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/appRoleAssignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Represents the app roles a user has been granted for an application. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-approleassignments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to assign an app role to a user. To grant an app role assignment to a user, you need three identifiers: - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignment - * @see {@link https://learn.microsoft.com/graph/api/user-post-approleassignments?view=graph-rest-1.0|Find more info here} - */ - public post(body: AppRoleAssignment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentFromDiscriminatorValue, errorMapping); - }; - /** - * Represents the app roles a user has been granted for an application. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, appRoleAssignmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to assign an app role to a user. To grant an app role assignment to a user, you need three identifiers: - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AppRoleAssignment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAppRoleAssignment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a appRoleAssignmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AppRoleAssignmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AppRoleAssignmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const appRoleAssignmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/appRoleAssignments/count/countRequestBuilder.ts b/src/me/appRoleAssignments/count/countRequestBuilder.ts deleted file mode 100644 index 5d7930fccc9..00000000000 --- a/src/me/appRoleAssignments/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/appRoleAssignments/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/appRoleAssignments/count/index.ts b/src/me/appRoleAssignments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/appRoleAssignments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/appRoleAssignments/index.ts b/src/me/appRoleAssignments/index.ts deleted file mode 100644 index 9d85245e8b1..00000000000 --- a/src/me/appRoleAssignments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './appRoleAssignmentsRequestBuilder' diff --git a/src/me/appRoleAssignments/item/appRoleAssignmentItemRequestBuilder.ts b/src/me/appRoleAssignments/item/appRoleAssignmentItemRequestBuilder.ts deleted file mode 100644 index e31f85f4be2..00000000000 --- a/src/me/appRoleAssignments/item/appRoleAssignmentItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAppRoleAssignmentFromDiscriminatorValue, deserializeIntoAppRoleAssignment, serializeAppRoleAssignment, type AppRoleAssignment } from '../../../models/appRoleAssignment'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AppRoleAssignmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the appRoleAssignments property of the microsoft.graph.user entity. - */ -export class AppRoleAssignmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AppRoleAssignmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/appRoleAssignments/{appRoleAssignment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an appRoleAssignment that has been granted to a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-delete-approleassignments?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Represents the app roles a user has been granted for an application. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property appRoleAssignments in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignment - */ - public patch(body: AppRoleAssignment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an appRoleAssignment that has been granted to a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Represents the app roles a user has been granted for an application. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, appRoleAssignmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property appRoleAssignments in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: AppRoleAssignment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAppRoleAssignment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AppRoleAssignmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AppRoleAssignmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AppRoleAssignmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const appRoleAssignmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/appRoleAssignments/item/index.ts b/src/me/appRoleAssignments/item/index.ts deleted file mode 100644 index 7aec34b5dc6..00000000000 --- a/src/me/appRoleAssignments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './appRoleAssignmentItemRequestBuilder' diff --git a/src/me/assignLicense/assignLicenseRequestBuilder.ts b/src/me/assignLicense/assignLicenseRequestBuilder.ts deleted file mode 100644 index 716fb1ac205..00000000000 --- a/src/me/assignLicense/assignLicenseRequestBuilder.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAssignedLicenseFromDiscriminatorValue, serializeAssignedLicense, type AssignedLicense } from '../../models/assignedLicense'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createUserFromDiscriminatorValue, deserializeIntoUser, serializeUser, type User } from '../../models/user'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; -import { type Guid } from 'guid-typescript'; - -export interface AssignLicensePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The addLicenses property - */ - addLicenses?: AssignedLicense[]; - /** - * The removeLicenses property - */ - removeLicenses?: Guid[]; -} -export function createAssignLicensePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAssignLicensePostRequestBody; -} -export function deserializeIntoAssignLicensePostRequestBody(assignLicensePostRequestBody: AssignLicensePostRequestBody | undefined = {} as AssignLicensePostRequestBody) : Record void> { - return { - "addLicenses": n => { assignLicensePostRequestBody.addLicenses = n.getCollectionOfObjectValues(createAssignedLicenseFromDiscriminatorValue); }, - "removeLicenses": n => { assignLicensePostRequestBody.removeLicenses = n.getCollectionOfPrimitiveValues(); }, - } -} -export function serializeAssignLicensePostRequestBody(writer: SerializationWriter, assignLicensePostRequestBody: AssignLicensePostRequestBody | undefined = {} as AssignLicensePostRequestBody) : void { - writer.writeCollectionOfObjectValues("addLicenses", assignLicensePostRequestBody.addLicenses, serializeAssignedLicense); - writer.writeCollectionOfPrimitiveValues("removeLicenses", assignLicensePostRequestBody.removeLicenses); - writer.writeAdditionalData(assignLicensePostRequestBody.additionalData); -} -/** - * Provides operations to call the assignLicense method. - */ -export class AssignLicenseRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AssignLicenseRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/assignLicense"); - }; - /** - * Add or remove subscriptions for the user. You can also enable and disable specific plans associated with a subscription. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of User - * @see {@link https://learn.microsoft.com/graph/api/user-assignlicense?view=graph-rest-1.0|Find more info here} - */ - public post(body: AssignLicensePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserFromDiscriminatorValue, errorMapping); - }; - /** - * Add or remove subscriptions for the user. You can also enable and disable specific plans associated with a subscription. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AssignLicensePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAssignLicensePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a assignLicenseRequestBuilder - */ - public withUrl(rawUrl: string) : AssignLicenseRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AssignLicenseRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/assignLicense/index.ts b/src/me/assignLicense/index.ts deleted file mode 100644 index 5a1de7cb030..00000000000 --- a/src/me/assignLicense/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './assignLicenseRequestBuilder' diff --git a/src/me/authentication/authenticationRequestBuilder.ts b/src/me/authentication/authenticationRequestBuilder.ts deleted file mode 100644 index 3db2bcdcba8..00000000000 --- a/src/me/authentication/authenticationRequestBuilder.ts +++ /dev/null @@ -1,197 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAuthenticationFromDiscriminatorValue, deserializeIntoAuthentication, serializeAuthentication, type Authentication } from '../../models/authentication'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { EmailMethodsRequestBuilder } from './emailMethods/emailMethodsRequestBuilder'; -import { Fido2MethodsRequestBuilder } from './fido2Methods/fido2MethodsRequestBuilder'; -import { MethodsRequestBuilder } from './methods/methodsRequestBuilder'; -import { MicrosoftAuthenticatorMethodsRequestBuilder } from './microsoftAuthenticatorMethods/microsoftAuthenticatorMethodsRequestBuilder'; -import { OperationsRequestBuilder } from './operations/operationsRequestBuilder'; -import { PasswordMethodsRequestBuilder } from './passwordMethods/passwordMethodsRequestBuilder'; -import { PhoneMethodsRequestBuilder } from './phoneMethods/phoneMethodsRequestBuilder'; -import { SoftwareOathMethodsRequestBuilder } from './softwareOathMethods/softwareOathMethodsRequestBuilder'; -import { TemporaryAccessPassMethodsRequestBuilder } from './temporaryAccessPassMethods/temporaryAccessPassMethodsRequestBuilder'; -import { WindowsHelloForBusinessMethodsRequestBuilder } from './windowsHelloForBusinessMethods/windowsHelloForBusinessMethodsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AuthenticationRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the authentication property of the microsoft.graph.user entity. - */ -export class AuthenticationRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the emailMethods property of the microsoft.graph.authentication entity. - */ - public get emailMethods(): EmailMethodsRequestBuilder { - return new EmailMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the fido2Methods property of the microsoft.graph.authentication entity. - */ - public get fido2Methods(): Fido2MethodsRequestBuilder { - return new Fido2MethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the methods property of the microsoft.graph.authentication entity. - */ - public get methods(): MethodsRequestBuilder { - return new MethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the microsoftAuthenticatorMethods property of the microsoft.graph.authentication entity. - */ - public get microsoftAuthenticatorMethods(): MicrosoftAuthenticatorMethodsRequestBuilder { - return new MicrosoftAuthenticatorMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the operations property of the microsoft.graph.authentication entity. - */ - public get operations(): OperationsRequestBuilder { - return new OperationsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the passwordMethods property of the microsoft.graph.authentication entity. - */ - public get passwordMethods(): PasswordMethodsRequestBuilder { - return new PasswordMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity. - */ - public get phoneMethods(): PhoneMethodsRequestBuilder { - return new PhoneMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the softwareOathMethods property of the microsoft.graph.authentication entity. - */ - public get softwareOathMethods(): SoftwareOathMethodsRequestBuilder { - return new SoftwareOathMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the temporaryAccessPassMethods property of the microsoft.graph.authentication entity. - */ - public get temporaryAccessPassMethods(): TemporaryAccessPassMethodsRequestBuilder { - return new TemporaryAccessPassMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the windowsHelloForBusinessMethods property of the microsoft.graph.authentication entity. - */ - public get windowsHelloForBusinessMethods(): WindowsHelloForBusinessMethodsRequestBuilder { - return new WindowsHelloForBusinessMethodsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new AuthenticationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication{?%24select,%24expand}"); - }; - /** - * Delete navigation property authentication for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The authentication methods that are supported for the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Authentication - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAuthenticationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property authentication in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Authentication - */ - public patch(body: Authentication, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAuthenticationFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property authentication for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The authentication methods that are supported for the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, authenticationRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property authentication in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Authentication, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAuthentication); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a authenticationRequestBuilder - */ - public withUrl(rawUrl: string) : AuthenticationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AuthenticationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const authenticationRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/emailMethods/count/countRequestBuilder.ts b/src/me/authentication/emailMethods/count/countRequestBuilder.ts deleted file mode 100644 index 0f0eb27b7aa..00000000000 --- a/src/me/authentication/emailMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/emailMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/emailMethods/count/index.ts b/src/me/authentication/emailMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/emailMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/emailMethods/emailMethodsRequestBuilder.ts b/src/me/authentication/emailMethods/emailMethodsRequestBuilder.ts deleted file mode 100644 index 76619bbd738..00000000000 --- a/src/me/authentication/emailMethods/emailMethodsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EmailAuthenticationMethodCollectionResponse } from '../../../models/'; -import { createEmailAuthenticationMethodFromDiscriminatorValue, deserializeIntoEmailAuthenticationMethod, serializeEmailAuthenticationMethod, type EmailAuthenticationMethod } from '../../../models/emailAuthenticationMethod'; -import { createEmailAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/emailAuthenticationMethodCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { EmailAuthenticationMethodItemRequestBuilder } from './item/emailAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EmailMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the emailMethods property of the microsoft.graph.authentication entity. - */ -export class EmailMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the emailMethods property of the microsoft.graph.authentication entity. - * @param emailAuthenticationMethodId The unique identifier of emailAuthenticationMethod - * @returns a EmailAuthenticationMethodItemRequestBuilder - */ - public byEmailAuthenticationMethodId(emailAuthenticationMethodId: string) : EmailAuthenticationMethodItemRequestBuilder { - if(!emailAuthenticationMethodId) throw new Error("emailAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["emailAuthenticationMethod%2Did"] = emailAuthenticationMethodId - return new EmailAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new EmailMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/emailMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EmailAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/authentication-list-emailmethods?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEmailAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Set a user's emailAuthenticationMethod object. Email authentication is a self-service password reset method. A user may only have one email authentication method. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EmailAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/authentication-post-emailmethods?view=graph-rest-1.0|Find more info here} - */ - public post(body: EmailAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEmailAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of a user's emailAuthenticationMethod objects and their properties. This API will return only a single object in the collection as only one email method can be set for a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, emailMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Set a user's emailAuthenticationMethod object. Email authentication is a self-service password reset method. A user may only have one email authentication method. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: EmailAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEmailAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a emailMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : EmailMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EmailMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const emailMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/emailMethods/index.ts b/src/me/authentication/emailMethods/index.ts deleted file mode 100644 index 89344baaa92..00000000000 --- a/src/me/authentication/emailMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './emailMethodsRequestBuilder' diff --git a/src/me/authentication/emailMethods/item/emailAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/emailMethods/item/emailAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index f4f47041e49..00000000000 --- a/src/me/authentication/emailMethods/item/emailAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createEmailAuthenticationMethodFromDiscriminatorValue, deserializeIntoEmailAuthenticationMethod, serializeEmailAuthenticationMethod, type EmailAuthenticationMethod } from '../../../../models/emailAuthenticationMethod'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EmailAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the emailMethods property of the microsoft.graph.authentication entity. - */ -export class EmailAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new EmailAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/emailMethods/{emailAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a user's emailAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/emailauthenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a user's single email authentication method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EmailAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/emailauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEmailAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Update a user's email address represented by an emailAuthenticationMethod object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EmailAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/emailauthenticationmethod-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: EmailAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEmailAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a user's emailAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a user's single email authentication method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, emailAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update a user's email address represented by an emailAuthenticationMethod object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: EmailAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEmailAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EmailAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : EmailAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EmailAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const emailAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/emailMethods/item/index.ts b/src/me/authentication/emailMethods/item/index.ts deleted file mode 100644 index f29704323bc..00000000000 --- a/src/me/authentication/emailMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './emailAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/fido2Methods/count/countRequestBuilder.ts b/src/me/authentication/fido2Methods/count/countRequestBuilder.ts deleted file mode 100644 index 6027ca4dd57..00000000000 --- a/src/me/authentication/fido2Methods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/fido2Methods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/fido2Methods/count/index.ts b/src/me/authentication/fido2Methods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/fido2Methods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/fido2Methods/fido2MethodsRequestBuilder.ts b/src/me/authentication/fido2Methods/fido2MethodsRequestBuilder.ts deleted file mode 100644 index a345375a8ad..00000000000 --- a/src/me/authentication/fido2Methods/fido2MethodsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Fido2AuthenticationMethodCollectionResponse } from '../../../models/'; -import { createFido2AuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/fido2AuthenticationMethodCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { Fido2AuthenticationMethodItemRequestBuilder } from './item/fido2AuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface Fido2MethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the fido2Methods property of the microsoft.graph.authentication entity. - */ -export class Fido2MethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the fido2Methods property of the microsoft.graph.authentication entity. - * @param fido2AuthenticationMethodId The unique identifier of fido2AuthenticationMethod - * @returns a Fido2AuthenticationMethodItemRequestBuilder - */ - public byFido2AuthenticationMethodId(fido2AuthenticationMethodId: string) : Fido2AuthenticationMethodItemRequestBuilder { - if(!fido2AuthenticationMethodId) throw new Error("fido2AuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["fido2AuthenticationMethod%2Did"] = fido2AuthenticationMethodId - return new Fido2AuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new Fido2MethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/fido2Methods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Fido2AuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/fido2authenticationmethod-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createFido2AuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of a user's FIDO2 Security Key Authentication Method objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, fido2MethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a fido2MethodsRequestBuilder - */ - public withUrl(rawUrl: string) : Fido2MethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new Fido2MethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const fido2MethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/fido2Methods/index.ts b/src/me/authentication/fido2Methods/index.ts deleted file mode 100644 index ee50610ae55..00000000000 --- a/src/me/authentication/fido2Methods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './fido2MethodsRequestBuilder' diff --git a/src/me/authentication/fido2Methods/item/fido2AuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/fido2Methods/item/fido2AuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index 5bab7cc545d..00000000000 --- a/src/me/authentication/fido2Methods/item/fido2AuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,100 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Fido2AuthenticationMethod } from '../../../../models/'; -import { createFido2AuthenticationMethodFromDiscriminatorValue } from '../../../../models/fido2AuthenticationMethod'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface Fido2AuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the fido2Methods property of the microsoft.graph.authentication entity. - */ -export class Fido2AuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new Fido2AuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/fido2Methods/{fido2AuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a user's FIDO2 Security Key Authentication Method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/fido2authenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a user's single FIDO2 Security Key Authentication Method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Fido2AuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/fido2authenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createFido2AuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a user's FIDO2 Security Key Authentication Method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a user's single FIDO2 Security Key Authentication Method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, fido2AuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a Fido2AuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : Fido2AuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new Fido2AuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const fido2AuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/fido2Methods/item/index.ts b/src/me/authentication/fido2Methods/item/index.ts deleted file mode 100644 index 90d7729f95e..00000000000 --- a/src/me/authentication/fido2Methods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './fido2AuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/index.ts b/src/me/authentication/index.ts deleted file mode 100644 index f443ac44d36..00000000000 --- a/src/me/authentication/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './authenticationRequestBuilder' diff --git a/src/me/authentication/methods/count/countRequestBuilder.ts b/src/me/authentication/methods/count/countRequestBuilder.ts deleted file mode 100644 index 807ee2b4020..00000000000 --- a/src/me/authentication/methods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/methods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/methods/count/index.ts b/src/me/authentication/methods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/methods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/methods/index.ts b/src/me/authentication/methods/index.ts deleted file mode 100644 index 5fa3994e41e..00000000000 --- a/src/me/authentication/methods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './methodsRequestBuilder' diff --git a/src/me/authentication/methods/item/authenticationMethodItemRequestBuilder.ts b/src/me/authentication/methods/item/authenticationMethodItemRequestBuilder.ts deleted file mode 100644 index ea4a888f9c7..00000000000 --- a/src/me/authentication/methods/item/authenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAuthenticationMethodFromDiscriminatorValue, deserializeIntoAuthenticationMethod, serializeAuthenticationMethod, type AuthenticationMethod } from '../../../../models/authenticationMethod'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { ResetPasswordRequestBuilder } from './resetPassword/resetPasswordRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the methods property of the microsoft.graph.authentication entity. - */ -export class AuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the resetPassword method. - */ - public get resetPassword(): ResetPasswordRequestBuilder { - return new ResetPasswordRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new AuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/methods/{authenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Retrieve the properties and relationships of an authenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/authenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property methods in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AuthenticationMethod - */ - public patch(body: AuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the properties and relationships of an authenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, authenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property methods in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: AuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : AuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const authenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/methods/item/index.ts b/src/me/authentication/methods/item/index.ts deleted file mode 100644 index 95bd2709a01..00000000000 --- a/src/me/authentication/methods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './authenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/methods/item/resetPassword/index.ts b/src/me/authentication/methods/item/resetPassword/index.ts deleted file mode 100644 index fb6a9118513..00000000000 --- a/src/me/authentication/methods/item/resetPassword/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './resetPasswordPostRequestBody' -export * from './resetPasswordRequestBuilder' diff --git a/src/me/authentication/methods/item/resetPassword/resetPasswordPostRequestBody.ts b/src/me/authentication/methods/item/resetPassword/resetPasswordPostRequestBody.ts deleted file mode 100644 index 1c603fb0d0d..00000000000 --- a/src/me/authentication/methods/item/resetPassword/resetPasswordPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createResetPasswordPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoResetPasswordPostRequestBody; -} -export function deserializeIntoResetPasswordPostRequestBody(resetPasswordPostRequestBody: ResetPasswordPostRequestBody | undefined = {} as ResetPasswordPostRequestBody) : Record void> { - return { - "newPassword": n => { resetPasswordPostRequestBody.newPassword = n.getStringValue(); }, - } -} -export interface ResetPasswordPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The newPassword property - */ - newPassword?: string; -} -export function serializeResetPasswordPostRequestBody(writer: SerializationWriter, resetPasswordPostRequestBody: ResetPasswordPostRequestBody | undefined = {} as ResetPasswordPostRequestBody) : void { - writer.writeStringValue("newPassword", resetPasswordPostRequestBody.newPassword); - writer.writeAdditionalData(resetPasswordPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/methods/item/resetPassword/resetPasswordRequestBuilder.ts b/src/me/authentication/methods/item/resetPassword/resetPasswordRequestBuilder.ts deleted file mode 100644 index 24e9b4aa6c2..00000000000 --- a/src/me/authentication/methods/item/resetPassword/resetPasswordRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPasswordResetResponseFromDiscriminatorValue, deserializeIntoPasswordResetResponse, serializePasswordResetResponse, type PasswordResetResponse } from '../../../../../models/passwordResetResponse'; -import { deserializeIntoResetPasswordPostRequestBody, serializeResetPasswordPostRequestBody, type ResetPasswordPostRequestBody } from './resetPasswordPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the resetPassword method. - */ -export class ResetPasswordRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResetPasswordRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/methods/{authenticationMethod%2Did}/resetPassword"); - }; - /** - * Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and can't be performed on a user's own account. This flow writes the new password to Microsoft Entra ID and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and returns a Location header with a link where the caller can periodically check for the status of the reset operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PasswordResetResponse - * @see {@link https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword?view=graph-rest-1.0|Find more info here} - */ - public post(body: ResetPasswordPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPasswordResetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and can't be performed on a user's own account. This flow writes the new password to Microsoft Entra ID and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and returns a Location header with a link where the caller can periodically check for the status of the reset operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ResetPasswordPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeResetPasswordPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a resetPasswordRequestBuilder - */ - public withUrl(rawUrl: string) : ResetPasswordRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResetPasswordRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/methods/methodsRequestBuilder.ts b/src/me/authentication/methods/methodsRequestBuilder.ts deleted file mode 100644 index c6d49fc1742..00000000000 --- a/src/me/authentication/methods/methodsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AuthenticationMethodCollectionResponse } from '../../../models/'; -import { createAuthenticationMethodFromDiscriminatorValue, deserializeIntoAuthenticationMethod, serializeAuthenticationMethod, type AuthenticationMethod } from '../../../models/authenticationMethod'; -import { createAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/authenticationMethodCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { AuthenticationMethodItemRequestBuilder } from './item/authenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the methods property of the microsoft.graph.authentication entity. - */ -export class MethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the methods property of the microsoft.graph.authentication entity. - * @param authenticationMethodId The unique identifier of authenticationMethod - * @returns a AuthenticationMethodItemRequestBuilder - */ - public byAuthenticationMethodId(authenticationMethodId: string) : AuthenticationMethodItemRequestBuilder { - if(!authenticationMethodId) throw new Error("authenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["authenticationMethod%2Did"] = authenticationMethodId - return new AuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/methods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Microsoft Entra authentication methods API overview for a list of currently supported methods. We don't recommend using the authentication methods APIs for scenarios where you need to iterate over your entire user population for auditing or security check purposes. For these types of scenarios, we recommend using the authentication method registration and usage reporting APIs (available on the beta endpoint only). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/authentication-list-methods?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to methods for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AuthenticationMethod - */ - public post(body: AuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of authentication methods registered to a user. The authentication methods are defined by the types derived from the authenticationMethod resource type, and only the methods supported on this API version. See Microsoft Entra authentication methods API overview for a list of currently supported methods. We don't recommend using the authentication methods APIs for scenarios where you need to iterate over your entire user population for auditing or security check purposes. For these types of scenarios, we recommend using the authentication method registration and usage reporting APIs (available on the beta endpoint only). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, methodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to methods for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a methodsRequestBuilder - */ - public withUrl(rawUrl: string) : MethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const methodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/microsoftAuthenticatorMethods/count/countRequestBuilder.ts b/src/me/authentication/microsoftAuthenticatorMethods/count/countRequestBuilder.ts deleted file mode 100644 index cdc787afa9b..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/microsoftAuthenticatorMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/microsoftAuthenticatorMethods/count/index.ts b/src/me/authentication/microsoftAuthenticatorMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/microsoftAuthenticatorMethods/index.ts b/src/me/authentication/microsoftAuthenticatorMethods/index.ts deleted file mode 100644 index 4784cfb54f8..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './microsoftAuthenticatorMethodsRequestBuilder' diff --git a/src/me/authentication/microsoftAuthenticatorMethods/item/device/deviceRequestBuilder.ts b/src/me/authentication/microsoftAuthenticatorMethods/item/device/deviceRequestBuilder.ts deleted file mode 100644 index ae77b1545f4..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/item/device/deviceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Device } from '../../../../../models/'; -import { createDeviceFromDiscriminatorValue } from '../../../../../models/device'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the device property of the microsoft.graph.microsoftAuthenticatorAuthenticationMethod entity. - */ -export class DeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod%2Did}/device{?%24select,%24expand}"); - }; - /** - * The registered device on which Microsoft Authenticator resides. This property is null if the device isn't registered for passwordless Phone Sign-In. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Device - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * The registered device on which Microsoft Authenticator resides. This property is null if the device isn't registered for passwordless Phone Sign-In. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deviceRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/microsoftAuthenticatorMethods/item/device/index.ts b/src/me/authentication/microsoftAuthenticatorMethods/item/device/index.ts deleted file mode 100644 index f032c450949..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/item/device/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceRequestBuilder' diff --git a/src/me/authentication/microsoftAuthenticatorMethods/item/index.ts b/src/me/authentication/microsoftAuthenticatorMethods/item/index.ts deleted file mode 100644 index 1b3fcde24fe..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './microsoftAuthenticatorAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/microsoftAuthenticatorMethods/item/microsoftAuthenticatorAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/microsoftAuthenticatorMethods/item/microsoftAuthenticatorAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index 4370e471363..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/item/microsoftAuthenticatorAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,107 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MicrosoftAuthenticatorAuthenticationMethod } from '../../../../models/'; -import { createMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue } from '../../../../models/microsoftAuthenticatorAuthenticationMethod'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { DeviceRequestBuilder } from './device/deviceRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the microsoftAuthenticatorMethods property of the microsoft.graph.authentication entity. - */ -export class MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the device property of the microsoft.graph.microsoftAuthenticatorAuthenticationMethod entity. - */ - public get device(): DeviceRequestBuilder { - return new DeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a microsoftAuthenticatorAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/microsoftauthenticatorauthenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MicrosoftAuthenticatorAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/microsoftauthenticatorauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a microsoftAuthenticatorAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, microsoftAuthenticatorAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const microsoftAuthenticatorAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/microsoftAuthenticatorMethods/microsoftAuthenticatorMethodsRequestBuilder.ts b/src/me/authentication/microsoftAuthenticatorMethods/microsoftAuthenticatorMethodsRequestBuilder.ts deleted file mode 100644 index 8a548775a2c..00000000000 --- a/src/me/authentication/microsoftAuthenticatorMethods/microsoftAuthenticatorMethodsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MicrosoftAuthenticatorAuthenticationMethodCollectionResponse } from '../../../models/'; -import { createMicrosoftAuthenticatorAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/microsoftAuthenticatorAuthenticationMethodCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder } from './item/microsoftAuthenticatorAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MicrosoftAuthenticatorMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the microsoftAuthenticatorMethods property of the microsoft.graph.authentication entity. - */ -export class MicrosoftAuthenticatorMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the microsoftAuthenticatorMethods property of the microsoft.graph.authentication entity. - * @param microsoftAuthenticatorAuthenticationMethodId The unique identifier of microsoftAuthenticatorAuthenticationMethod - * @returns a MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder - */ - public byMicrosoftAuthenticatorAuthenticationMethodId(microsoftAuthenticatorAuthenticationMethodId: string) : MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder { - if(!microsoftAuthenticatorAuthenticationMethodId) throw new Error("microsoftAuthenticatorAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["microsoftAuthenticatorAuthenticationMethod%2Did"] = microsoftAuthenticatorAuthenticationMethodId - return new MicrosoftAuthenticatorAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MicrosoftAuthenticatorMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/microsoftAuthenticatorMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MicrosoftAuthenticatorAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/microsoftauthenticatorauthenticationmethod-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMicrosoftAuthenticatorAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the microsoftAuthenticatorAuthenticationMethod objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, microsoftAuthenticatorMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a microsoftAuthenticatorMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : MicrosoftAuthenticatorMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MicrosoftAuthenticatorMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const microsoftAuthenticatorMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/operations/count/countRequestBuilder.ts b/src/me/authentication/operations/count/countRequestBuilder.ts deleted file mode 100644 index a5c4a3a00e7..00000000000 --- a/src/me/authentication/operations/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/operations/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/operations/count/index.ts b/src/me/authentication/operations/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/operations/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/operations/index.ts b/src/me/authentication/operations/index.ts deleted file mode 100644 index c1fc87253ad..00000000000 --- a/src/me/authentication/operations/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './operationsRequestBuilder' diff --git a/src/me/authentication/operations/item/index.ts b/src/me/authentication/operations/item/index.ts deleted file mode 100644 index e91f3bd645f..00000000000 --- a/src/me/authentication/operations/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './longRunningOperationItemRequestBuilder' diff --git a/src/me/authentication/operations/item/longRunningOperationItemRequestBuilder.ts b/src/me/authentication/operations/item/longRunningOperationItemRequestBuilder.ts deleted file mode 100644 index f48d38d9d5b..00000000000 --- a/src/me/authentication/operations/item/longRunningOperationItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createLongRunningOperationFromDiscriminatorValue, deserializeIntoLongRunningOperation, serializeLongRunningOperation, type LongRunningOperation } from '../../../../models/longRunningOperation'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LongRunningOperationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the operations property of the microsoft.graph.authentication entity. - */ -export class LongRunningOperationItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LongRunningOperationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/operations/{longRunningOperation%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property operations for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LongRunningOperation - * @see {@link https://learn.microsoft.com/graph/api/longrunningoperation-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLongRunningOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property operations in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LongRunningOperation - */ - public patch(body: LongRunningOperation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLongRunningOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property operations for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, longRunningOperationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property operations in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: LongRunningOperation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeLongRunningOperation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a LongRunningOperationItemRequestBuilder - */ - public withUrl(rawUrl: string) : LongRunningOperationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LongRunningOperationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const longRunningOperationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/operations/operationsRequestBuilder.ts b/src/me/authentication/operations/operationsRequestBuilder.ts deleted file mode 100644 index 07ea0216040..00000000000 --- a/src/me/authentication/operations/operationsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type LongRunningOperationCollectionResponse } from '../../../models/'; -import { createLongRunningOperationFromDiscriminatorValue, deserializeIntoLongRunningOperation, serializeLongRunningOperation, type LongRunningOperation } from '../../../models/longRunningOperation'; -import { createLongRunningOperationCollectionResponseFromDiscriminatorValue } from '../../../models/longRunningOperationCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { LongRunningOperationItemRequestBuilder } from './item/longRunningOperationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OperationsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the operations property of the microsoft.graph.authentication entity. - */ -export class OperationsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the operations property of the microsoft.graph.authentication entity. - * @param longRunningOperationId The unique identifier of longRunningOperation - * @returns a LongRunningOperationItemRequestBuilder - */ - public byLongRunningOperationId(longRunningOperationId: string) : LongRunningOperationItemRequestBuilder { - if(!longRunningOperationId) throw new Error("longRunningOperationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["longRunningOperation%2Did"] = longRunningOperationId - return new LongRunningOperationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OperationsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LongRunningOperationCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLongRunningOperationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to operations for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LongRunningOperation - */ - public post(body: LongRunningOperation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLongRunningOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the status of a long-running operation, represented by a longRunningOperation object. A long-running operation is initiated when you reset a user's password. This resource type is also the base type for the richLongRunningOperation object that represents the status of a long-running operation on a site or a list. The possible states of the long-running operation are notStarted, running, succeeded, failed, unknownFutureValue where succeeded and failed are terminal states. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, operationsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to operations for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: LongRunningOperation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeLongRunningOperation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a operationsRequestBuilder - */ - public withUrl(rawUrl: string) : OperationsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OperationsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const operationsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/passwordMethods/count/countRequestBuilder.ts b/src/me/authentication/passwordMethods/count/countRequestBuilder.ts deleted file mode 100644 index ed053aab77d..00000000000 --- a/src/me/authentication/passwordMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/passwordMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/passwordMethods/count/index.ts b/src/me/authentication/passwordMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/passwordMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/passwordMethods/index.ts b/src/me/authentication/passwordMethods/index.ts deleted file mode 100644 index dbb7c8d5bbc..00000000000 --- a/src/me/authentication/passwordMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './passwordMethodsRequestBuilder' diff --git a/src/me/authentication/passwordMethods/item/index.ts b/src/me/authentication/passwordMethods/item/index.ts deleted file mode 100644 index af723e4cee6..00000000000 --- a/src/me/authentication/passwordMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './passwordAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/passwordMethods/item/passwordAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/passwordMethods/item/passwordAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index fd36c466fc8..00000000000 --- a/src/me/authentication/passwordMethods/item/passwordAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,74 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PasswordAuthenticationMethod } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createPasswordAuthenticationMethodFromDiscriminatorValue } from '../../../../models/passwordAuthenticationMethod'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PasswordAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the passwordMethods property of the microsoft.graph.authentication entity. - */ -export class PasswordAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PasswordAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/passwordMethods/{passwordAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PasswordAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/passwordauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPasswordAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a password that's registered to a user, represented by a passwordAuthenticationMethod object. For security, the password itself will never be returned in the object and the password property is always null. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, passwordAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PasswordAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : PasswordAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PasswordAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const passwordAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/passwordMethods/passwordMethodsRequestBuilder.ts b/src/me/authentication/passwordMethods/passwordMethodsRequestBuilder.ts deleted file mode 100644 index 024374ea50d..00000000000 --- a/src/me/authentication/passwordMethods/passwordMethodsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PasswordAuthenticationMethodCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createPasswordAuthenticationMethodFromDiscriminatorValue, deserializeIntoPasswordAuthenticationMethod, serializePasswordAuthenticationMethod, type PasswordAuthenticationMethod } from '../../../models/passwordAuthenticationMethod'; -import { createPasswordAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/passwordAuthenticationMethodCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PasswordAuthenticationMethodItemRequestBuilder } from './item/passwordAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PasswordMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the passwordMethods property of the microsoft.graph.authentication entity. - */ -export class PasswordMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the passwordMethods property of the microsoft.graph.authentication entity. - * @param passwordAuthenticationMethodId The unique identifier of passwordAuthenticationMethod - * @returns a PasswordAuthenticationMethodItemRequestBuilder - */ - public byPasswordAuthenticationMethodId(passwordAuthenticationMethodId: string) : PasswordAuthenticationMethodItemRequestBuilder { - if(!passwordAuthenticationMethodId) throw new Error("passwordAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["passwordAuthenticationMethod%2Did"] = passwordAuthenticationMethodId - return new PasswordAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PasswordMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/passwordMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This API returns exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PasswordAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/authentication-list-passwordmethods?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPasswordAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to passwordMethods for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PasswordAuthenticationMethod - */ - public post(body: PasswordAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPasswordAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of the passwords registered to a user, represented by a passwordAuthenticationMethod object. This API returns exactly one object, as a user can have exactly one password. For security, the password itself will never be returned in the object and the password property is always null. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, passwordMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to passwordMethods for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PasswordAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePasswordAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a passwordMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : PasswordMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PasswordMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const passwordMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/phoneMethods/count/countRequestBuilder.ts b/src/me/authentication/phoneMethods/count/countRequestBuilder.ts deleted file mode 100644 index b269f88365e..00000000000 --- a/src/me/authentication/phoneMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/phoneMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/phoneMethods/count/index.ts b/src/me/authentication/phoneMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/phoneMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/phoneMethods/index.ts b/src/me/authentication/phoneMethods/index.ts deleted file mode 100644 index 2095de53f98..00000000000 --- a/src/me/authentication/phoneMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './phoneMethodsRequestBuilder' diff --git a/src/me/authentication/phoneMethods/item/disableSmsSignIn/disableSmsSignInRequestBuilder.ts b/src/me/authentication/phoneMethods/item/disableSmsSignIn/disableSmsSignInRequestBuilder.ts deleted file mode 100644 index 2ca6cd052ac..00000000000 --- a/src/me/authentication/phoneMethods/item/disableSmsSignIn/disableSmsSignInRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the disableSmsSignIn method. - */ -export class DisableSmsSignInRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DisableSmsSignInRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/phoneMethods/{phoneAuthenticationMethod%2Did}/disableSmsSignIn"); - }; - /** - * Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/phoneauthenticationmethod-disablesmssignin?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a disableSmsSignInRequestBuilder - */ - public withUrl(rawUrl: string) : DisableSmsSignInRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DisableSmsSignInRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/phoneMethods/item/enableSmsSignIn/enableSmsSignInRequestBuilder.ts b/src/me/authentication/phoneMethods/item/enableSmsSignIn/enableSmsSignInRequestBuilder.ts deleted file mode 100644 index 72d0ee0e6bd..00000000000 --- a/src/me/authentication/phoneMethods/item/enableSmsSignIn/enableSmsSignInRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the enableSmsSignIn method. - */ -export class EnableSmsSignInRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new EnableSmsSignInRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/phoneMethods/{phoneAuthenticationMethod%2Did}/enableSmsSignIn"); - }; - /** - * Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/phoneauthenticationmethod-enablesmssignin?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a enableSmsSignInRequestBuilder - */ - public withUrl(rawUrl: string) : EnableSmsSignInRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EnableSmsSignInRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/phoneMethods/item/index.ts b/src/me/authentication/phoneMethods/item/index.ts deleted file mode 100644 index eb9a7c5c5d7..00000000000 --- a/src/me/authentication/phoneMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './phoneAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/phoneMethods/item/phoneAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/phoneMethods/item/phoneAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index f60e1a01fd9..00000000000 --- a/src/me/authentication/phoneMethods/item/phoneAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createPhoneAuthenticationMethodFromDiscriminatorValue, deserializeIntoPhoneAuthenticationMethod, serializePhoneAuthenticationMethod, type PhoneAuthenticationMethod } from '../../../../models/phoneAuthenticationMethod'; -import { DisableSmsSignInRequestBuilder } from './disableSmsSignIn/disableSmsSignInRequestBuilder'; -import { EnableSmsSignInRequestBuilder } from './enableSmsSignIn/enableSmsSignInRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhoneAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity. - */ -export class PhoneAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the disableSmsSignIn method. - */ - public get disableSmsSignIn(): DisableSmsSignInRequestBuilder { - return new DisableSmsSignInRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the enableSmsSignIn method. - */ - public get enableSmsSignIn(): EnableSmsSignInRequestBuilder { - return new EnableSmsSignInRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PhoneAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/phoneMethods/{phoneAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a user's phone authentication method. This removes the phone number from the user and they'll no longer be able to use the number for authentication, whether via SMS or voice calls. A user can't have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it can't be deleted. Have the user change their default authentication method, and then delete the number. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/phoneauthenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PhoneAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/phoneauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPhoneAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PhoneAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/phoneauthenticationmethod-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PhoneAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPhoneAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a user's phone authentication method. This removes the phone number from the user and they'll no longer be able to use the number for authentication, whether via SMS or voice calls. A user can't have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it can't be deleted. Have the user change their default authentication method, and then delete the number. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single phoneAuthenticationMethod object for a user. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, phoneAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PhoneAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePhoneAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PhoneAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : PhoneAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhoneAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const phoneAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/phoneMethods/phoneMethodsRequestBuilder.ts b/src/me/authentication/phoneMethods/phoneMethodsRequestBuilder.ts deleted file mode 100644 index 3634f8a1305..00000000000 --- a/src/me/authentication/phoneMethods/phoneMethodsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PhoneAuthenticationMethodCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createPhoneAuthenticationMethodFromDiscriminatorValue, deserializeIntoPhoneAuthenticationMethod, serializePhoneAuthenticationMethod, type PhoneAuthenticationMethod } from '../../../models/phoneAuthenticationMethod'; -import { createPhoneAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/phoneAuthenticationMethodCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PhoneAuthenticationMethodItemRequestBuilder } from './item/phoneAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhoneMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity. - */ -export class PhoneMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity. - * @param phoneAuthenticationMethodId The unique identifier of phoneAuthenticationMethod - * @returns a PhoneAuthenticationMethodItemRequestBuilder - */ - public byPhoneAuthenticationMethodId(phoneAuthenticationMethodId: string) : PhoneAuthenticationMethodItemRequestBuilder { - if(!phoneAuthenticationMethodId) throw new Error("phoneAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["phoneAuthenticationMethod%2Did"] = phoneAuthenticationMethodId - return new PhoneAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PhoneMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/phoneMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PhoneAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/authentication-list-phonemethods?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPhoneAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PhoneAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/authentication-post-phonemethods?view=graph-rest-1.0|Find more info here} - */ - public post(body: PhoneAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPhoneAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of phone authentication method objects for a user. This will return up to three objects, as a user can have up to three phones usable for authentication. This method is available only for standard Microsoft Entra ID and B2B users, but not B2C users. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, phoneMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PhoneAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePhoneAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a phoneMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : PhoneMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhoneMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const phoneMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/softwareOathMethods/count/countRequestBuilder.ts b/src/me/authentication/softwareOathMethods/count/countRequestBuilder.ts deleted file mode 100644 index 81b8326d4ed..00000000000 --- a/src/me/authentication/softwareOathMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/softwareOathMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/softwareOathMethods/count/index.ts b/src/me/authentication/softwareOathMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/softwareOathMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/softwareOathMethods/index.ts b/src/me/authentication/softwareOathMethods/index.ts deleted file mode 100644 index 48302abdc37..00000000000 --- a/src/me/authentication/softwareOathMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './softwareOathMethodsRequestBuilder' diff --git a/src/me/authentication/softwareOathMethods/item/index.ts b/src/me/authentication/softwareOathMethods/item/index.ts deleted file mode 100644 index 303b7e58608..00000000000 --- a/src/me/authentication/softwareOathMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './softwareOathAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/softwareOathMethods/item/softwareOathAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/softwareOathMethods/item/softwareOathAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index 131bf8d188e..00000000000 --- a/src/me/authentication/softwareOathMethods/item/softwareOathAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,100 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SoftwareOathAuthenticationMethod } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createSoftwareOathAuthenticationMethodFromDiscriminatorValue } from '../../../../models/softwareOathAuthenticationMethod'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SoftwareOathAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the softwareOathMethods property of the microsoft.graph.authentication entity. - */ -export class SoftwareOathAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftwareOathAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/softwareOathMethods/{softwareOathAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a user's Software OATH token authentication method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/softwareoathauthenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a user's single Software OATH token authentication method object and its properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SoftwareOathAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/softwareoathauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSoftwareOathAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a user's Software OATH token authentication method object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a user's single Software OATH token authentication method object and its properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, softwareOathAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SoftwareOathAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : SoftwareOathAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftwareOathAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const softwareOathAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/softwareOathMethods/softwareOathMethodsRequestBuilder.ts b/src/me/authentication/softwareOathMethods/softwareOathMethodsRequestBuilder.ts deleted file mode 100644 index 1b79b06a6f1..00000000000 --- a/src/me/authentication/softwareOathMethods/softwareOathMethodsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SoftwareOathAuthenticationMethodCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createSoftwareOathAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/softwareOathAuthenticationMethodCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SoftwareOathAuthenticationMethodItemRequestBuilder } from './item/softwareOathAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SoftwareOathMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the softwareOathMethods property of the microsoft.graph.authentication entity. - */ -export class SoftwareOathMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the softwareOathMethods property of the microsoft.graph.authentication entity. - * @param softwareOathAuthenticationMethodId The unique identifier of softwareOathAuthenticationMethod - * @returns a SoftwareOathAuthenticationMethodItemRequestBuilder - */ - public bySoftwareOathAuthenticationMethodId(softwareOathAuthenticationMethodId: string) : SoftwareOathAuthenticationMethodItemRequestBuilder { - if(!softwareOathAuthenticationMethodId) throw new Error("softwareOathAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["softwareOathAuthenticationMethod%2Did"] = softwareOathAuthenticationMethodId - return new SoftwareOathAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SoftwareOathMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/softwareOathMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of a user's software OATH token authentication method objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SoftwareOathAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/authentication-list-softwareoathmethods?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSoftwareOathAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of a user's software OATH token authentication method objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, softwareOathMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softwareOathMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : SoftwareOathMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftwareOathMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const softwareOathMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/temporaryAccessPassMethods/count/countRequestBuilder.ts b/src/me/authentication/temporaryAccessPassMethods/count/countRequestBuilder.ts deleted file mode 100644 index 8d15241eedd..00000000000 --- a/src/me/authentication/temporaryAccessPassMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/temporaryAccessPassMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/temporaryAccessPassMethods/count/index.ts b/src/me/authentication/temporaryAccessPassMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/temporaryAccessPassMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/temporaryAccessPassMethods/index.ts b/src/me/authentication/temporaryAccessPassMethods/index.ts deleted file mode 100644 index 84c9f8a42f0..00000000000 --- a/src/me/authentication/temporaryAccessPassMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './temporaryAccessPassMethodsRequestBuilder' diff --git a/src/me/authentication/temporaryAccessPassMethods/item/index.ts b/src/me/authentication/temporaryAccessPassMethods/item/index.ts deleted file mode 100644 index b363b19140c..00000000000 --- a/src/me/authentication/temporaryAccessPassMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './temporaryAccessPassAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/temporaryAccessPassMethods/item/temporaryAccessPassAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/temporaryAccessPassMethods/item/temporaryAccessPassAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index 3e50de8e49f..00000000000 --- a/src/me/authentication/temporaryAccessPassMethods/item/temporaryAccessPassAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,100 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TemporaryAccessPassAuthenticationMethod } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTemporaryAccessPassAuthenticationMethodFromDiscriminatorValue } from '../../../../models/temporaryAccessPassAuthenticationMethod'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TemporaryAccessPassAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the temporaryAccessPassMethods property of the microsoft.graph.authentication entity. - */ -export class TemporaryAccessPassAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TemporaryAccessPassAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/temporaryAccessPassMethods/{temporaryAccessPassAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a users's temporaryAccessPassAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/temporaryaccesspassauthenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a user's single temporaryAccessPassAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TemporaryAccessPassAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/temporaryaccesspassauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTemporaryAccessPassAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a users's temporaryAccessPassAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a user's single temporaryAccessPassAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, temporaryAccessPassAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TemporaryAccessPassAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : TemporaryAccessPassAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TemporaryAccessPassAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const temporaryAccessPassAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/temporaryAccessPassMethods/temporaryAccessPassMethodsRequestBuilder.ts b/src/me/authentication/temporaryAccessPassMethods/temporaryAccessPassMethodsRequestBuilder.ts deleted file mode 100644 index 31f569b739e..00000000000 --- a/src/me/authentication/temporaryAccessPassMethods/temporaryAccessPassMethodsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TemporaryAccessPassAuthenticationMethodCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createTemporaryAccessPassAuthenticationMethodFromDiscriminatorValue, deserializeIntoTemporaryAccessPassAuthenticationMethod, serializeTemporaryAccessPassAuthenticationMethod, type TemporaryAccessPassAuthenticationMethod } from '../../../models/temporaryAccessPassAuthenticationMethod'; -import { createTemporaryAccessPassAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/temporaryAccessPassAuthenticationMethodCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TemporaryAccessPassAuthenticationMethodItemRequestBuilder } from './item/temporaryAccessPassAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TemporaryAccessPassMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the temporaryAccessPassMethods property of the microsoft.graph.authentication entity. - */ -export class TemporaryAccessPassMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the temporaryAccessPassMethods property of the microsoft.graph.authentication entity. - * @param temporaryAccessPassAuthenticationMethodId The unique identifier of temporaryAccessPassAuthenticationMethod - * @returns a TemporaryAccessPassAuthenticationMethodItemRequestBuilder - */ - public byTemporaryAccessPassAuthenticationMethodId(temporaryAccessPassAuthenticationMethodId: string) : TemporaryAccessPassAuthenticationMethodItemRequestBuilder { - if(!temporaryAccessPassAuthenticationMethodId) throw new Error("temporaryAccessPassAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["temporaryAccessPassAuthenticationMethod%2Did"] = temporaryAccessPassAuthenticationMethodId - return new TemporaryAccessPassAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TemporaryAccessPassMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/temporaryAccessPassMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TemporaryAccessPassAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/authentication-list-temporaryaccesspassmethods?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTemporaryAccessPassAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new temporaryAccessPassAuthenticationMethod object on a user. A user can only have one Temporary Access Pass that's usable within its specified lifetime. If the user requires a new Temporary Access Pass while the current Temporary Access Pass is valid, the admin can create a new Temporary Access Pass for the user, the previous Temporary Access Pass will be deleted, and a new Temporary Access Pass will be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TemporaryAccessPassAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/authentication-post-temporaryaccesspassmethods?view=graph-rest-1.0|Find more info here} - */ - public post(body: TemporaryAccessPassAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTemporaryAccessPassAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of a user's temporaryAccessPassAuthenticationMethod objects and their properties. This API will only return a single object in the collection as a user can have only one Temporary Access Pass method. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, temporaryAccessPassMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new temporaryAccessPassAuthenticationMethod object on a user. A user can only have one Temporary Access Pass that's usable within its specified lifetime. If the user requires a new Temporary Access Pass while the current Temporary Access Pass is valid, the admin can create a new Temporary Access Pass for the user, the previous Temporary Access Pass will be deleted, and a new Temporary Access Pass will be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TemporaryAccessPassAuthenticationMethod, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTemporaryAccessPassAuthenticationMethod); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a temporaryAccessPassMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : TemporaryAccessPassMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TemporaryAccessPassMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const temporaryAccessPassMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/windowsHelloForBusinessMethods/count/countRequestBuilder.ts b/src/me/authentication/windowsHelloForBusinessMethods/count/countRequestBuilder.ts deleted file mode 100644 index 31bf8372f3d..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/windowsHelloForBusinessMethods/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/windowsHelloForBusinessMethods/count/index.ts b/src/me/authentication/windowsHelloForBusinessMethods/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/authentication/windowsHelloForBusinessMethods/index.ts b/src/me/authentication/windowsHelloForBusinessMethods/index.ts deleted file mode 100644 index 104dc33d9c7..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './windowsHelloForBusinessMethodsRequestBuilder' diff --git a/src/me/authentication/windowsHelloForBusinessMethods/item/device/deviceRequestBuilder.ts b/src/me/authentication/windowsHelloForBusinessMethods/item/device/deviceRequestBuilder.ts deleted file mode 100644 index 3714a13dc09..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/item/device/deviceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Device } from '../../../../../models/'; -import { createDeviceFromDiscriminatorValue } from '../../../../../models/device'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the device property of the microsoft.graph.windowsHelloForBusinessAuthenticationMethod entity. - */ -export class DeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod%2Did}/device{?%24select,%24expand}"); - }; - /** - * The registered device on which this Windows Hello for Business key resides. Supports $expand. When you get a user's Windows Hello for Business registration information, this property is returned only on a single GET and when you specify ?$expand. For example, GET /users/admin@contoso.com/authentication/windowsHelloForBusinessMethods/_jpuR-TGZtk6aQCLF3BQjA2?$expand=device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Device - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * The registered device on which this Windows Hello for Business key resides. Supports $expand. When you get a user's Windows Hello for Business registration information, this property is returned only on a single GET and when you specify ?$expand. For example, GET /users/admin@contoso.com/authentication/windowsHelloForBusinessMethods/_jpuR-TGZtk6aQCLF3BQjA2?$expand=device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deviceRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/windowsHelloForBusinessMethods/item/device/index.ts b/src/me/authentication/windowsHelloForBusinessMethods/item/device/index.ts deleted file mode 100644 index f032c450949..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/item/device/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceRequestBuilder' diff --git a/src/me/authentication/windowsHelloForBusinessMethods/item/index.ts b/src/me/authentication/windowsHelloForBusinessMethods/item/index.ts deleted file mode 100644 index d7907f267ed..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './windowsHelloForBusinessAuthenticationMethodItemRequestBuilder' diff --git a/src/me/authentication/windowsHelloForBusinessMethods/item/windowsHelloForBusinessAuthenticationMethodItemRequestBuilder.ts b/src/me/authentication/windowsHelloForBusinessMethods/item/windowsHelloForBusinessAuthenticationMethodItemRequestBuilder.ts deleted file mode 100644 index 71008c27f5f..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/item/windowsHelloForBusinessAuthenticationMethodItemRequestBuilder.ts +++ /dev/null @@ -1,107 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type WindowsHelloForBusinessAuthenticationMethod } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createWindowsHelloForBusinessAuthenticationMethodFromDiscriminatorValue } from '../../../../models/windowsHelloForBusinessAuthenticationMethod'; -import { DeviceRequestBuilder } from './device/deviceRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface WindowsHelloForBusinessAuthenticationMethodItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the windowsHelloForBusinessMethods property of the microsoft.graph.authentication entity. - */ -export class WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the device property of the microsoft.graph.windowsHelloForBusinessAuthenticationMethod entity. - */ - public get device(): DeviceRequestBuilder { - return new DeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/windowsHelloForBusinessMethods/{windowsHelloForBusinessAuthenticationMethod%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a windowsHelloForBusinessAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/windowshelloforbusinessauthenticationmethod-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsHelloForBusinessAuthenticationMethod - * @see {@link https://learn.microsoft.com/graph/api/windowshelloforbusinessauthenticationmethod-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsHelloForBusinessAuthenticationMethodFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a windowsHelloForBusinessAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a windowsHelloForBusinessAuthenticationMethod object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, windowsHelloForBusinessAuthenticationMethodItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder - */ - public withUrl(rawUrl: string) : WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const windowsHelloForBusinessAuthenticationMethodItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/authentication/windowsHelloForBusinessMethods/windowsHelloForBusinessMethodsRequestBuilder.ts b/src/me/authentication/windowsHelloForBusinessMethods/windowsHelloForBusinessMethodsRequestBuilder.ts deleted file mode 100644 index 890b18e590b..00000000000 --- a/src/me/authentication/windowsHelloForBusinessMethods/windowsHelloForBusinessMethodsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type WindowsHelloForBusinessAuthenticationMethodCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createWindowsHelloForBusinessAuthenticationMethodCollectionResponseFromDiscriminatorValue } from '../../../models/windowsHelloForBusinessAuthenticationMethodCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder } from './item/windowsHelloForBusinessAuthenticationMethodItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface WindowsHelloForBusinessMethodsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the windowsHelloForBusinessMethods property of the microsoft.graph.authentication entity. - */ -export class WindowsHelloForBusinessMethodsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the windowsHelloForBusinessMethods property of the microsoft.graph.authentication entity. - * @param windowsHelloForBusinessAuthenticationMethodId The unique identifier of windowsHelloForBusinessAuthenticationMethod - * @returns a WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder - */ - public byWindowsHelloForBusinessAuthenticationMethodId(windowsHelloForBusinessAuthenticationMethodId: string) : WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder { - if(!windowsHelloForBusinessAuthenticationMethodId) throw new Error("windowsHelloForBusinessAuthenticationMethodId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["windowsHelloForBusinessAuthenticationMethod%2Did"] = windowsHelloForBusinessAuthenticationMethodId - return new WindowsHelloForBusinessAuthenticationMethodItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new WindowsHelloForBusinessMethodsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/authentication/windowsHelloForBusinessMethods{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsHelloForBusinessAuthenticationMethodCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/windowshelloforbusinessauthenticationmethod-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsHelloForBusinessAuthenticationMethodCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the windowsHelloForBusinessAuthenticationMethod objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, windowsHelloForBusinessMethodsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a windowsHelloForBusinessMethodsRequestBuilder - */ - public withUrl(rawUrl: string) : WindowsHelloForBusinessMethodsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WindowsHelloForBusinessMethodsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const windowsHelloForBusinessMethodsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts b/src/me/calendar/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts deleted file mode 100644 index 9263a6e113a..00000000000 --- a/src/me/calendar/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts +++ /dev/null @@ -1,111 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { CalendarRoleType } from '../../../models/calendarRoleType'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AllowedCalendarSharingRolesWithUserGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: CalendarRoleType[]; -} -export interface AllowedCalendarSharingRolesWithUserRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -export function createAllowedCalendarSharingRolesWithUserGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAllowedCalendarSharingRolesWithUserGetResponse; -} -export function deserializeIntoAllowedCalendarSharingRolesWithUserGetResponse(allowedCalendarSharingRolesWithUserGetResponse: AllowedCalendarSharingRolesWithUserGetResponse | undefined = {} as AllowedCalendarSharingRolesWithUserGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(allowedCalendarSharingRolesWithUserGetResponse), - "value": n => { allowedCalendarSharingRolesWithUserGetResponse.value = n.getCollectionOfEnumValues(CalendarRoleType); }, - } -} -export function serializeAllowedCalendarSharingRolesWithUserGetResponse(writer: SerializationWriter, allowedCalendarSharingRolesWithUserGetResponse: AllowedCalendarSharingRolesWithUserGetResponse | undefined = {} as AllowedCalendarSharingRolesWithUserGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, allowedCalendarSharingRolesWithUserGetResponse) - if(allowedCalendarSharingRolesWithUserGetResponse.value) - writer.writeEnumValue("value", ...allowedCalendarSharingRolesWithUserGetResponse.value); -} -/** - * Provides operations to call the allowedCalendarSharingRoles method. - */ -export class AllowedCalendarSharingRolesWithUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AllowedCalendarSharingRolesWithUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - * @param User Usage: User='{User}' - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, user?: string | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}"); - this.pathParameters["User"] = user - }; - /** - * Invoke function allowedCalendarSharingRoles - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AllowedCalendarSharingRolesWithUserGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAllowedCalendarSharingRolesWithUserGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function allowedCalendarSharingRoles - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, allowedCalendarSharingRolesWithUserRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a allowedCalendarSharingRolesWithUserRequestBuilder - */ - public withUrl(rawUrl: string) : AllowedCalendarSharingRolesWithUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AllowedCalendarSharingRolesWithUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const allowedCalendarSharingRolesWithUserRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/allowedCalendarSharingRolesWithUser/index.ts b/src/me/calendar/allowedCalendarSharingRolesWithUser/index.ts deleted file mode 100644 index f0bce8f042c..00000000000 --- a/src/me/calendar/allowedCalendarSharingRolesWithUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './allowedCalendarSharingRolesWithUserRequestBuilder' diff --git a/src/me/calendar/calendarPermissions/calendarPermissionsRequestBuilder.ts b/src/me/calendar/calendarPermissions/calendarPermissionsRequestBuilder.ts deleted file mode 100644 index dcc0fe7dbb9..00000000000 --- a/src/me/calendar/calendarPermissions/calendarPermissionsRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CalendarPermissionCollectionResponse } from '../../../models/'; -import { createCalendarPermissionFromDiscriminatorValue, deserializeIntoCalendarPermission, serializeCalendarPermission, type CalendarPermission } from '../../../models/calendarPermission'; -import { createCalendarPermissionCollectionResponseFromDiscriminatorValue } from '../../../models/calendarPermissionCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CalendarPermissionItemRequestBuilder } from './item/calendarPermissionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarPermissionsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ -export class CalendarPermissionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - * @param calendarPermissionId The unique identifier of calendarPermission - * @returns a CalendarPermissionItemRequestBuilder - */ - public byCalendarPermissionId(calendarPermissionId: string) : CalendarPermissionItemRequestBuilder { - if(!calendarPermissionId) throw new Error("calendarPermissionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["calendarPermission%2Did"] = calendarPermissionId - return new CalendarPermissionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarPermissionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarPermissions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermissionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendar-post-calendarpermissions?view=graph-rest-1.0|Find more info here} - */ - public post(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarPermissionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarPermission); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarPermissionsRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarPermissionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarPermissionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarPermissionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarPermissions/count/countRequestBuilder.ts b/src/me/calendar/calendarPermissions/count/countRequestBuilder.ts deleted file mode 100644 index 2da29c5dc3d..00000000000 --- a/src/me/calendar/calendarPermissions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarPermissions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarPermissions/count/index.ts b/src/me/calendar/calendarPermissions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarPermissions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarPermissions/index.ts b/src/me/calendar/calendarPermissions/index.ts deleted file mode 100644 index 2e7d7f77cd1..00000000000 --- a/src/me/calendar/calendarPermissions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarPermissionsRequestBuilder' diff --git a/src/me/calendar/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts b/src/me/calendar/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts deleted file mode 100644 index 3d43477a508..00000000000 --- a/src/me/calendar/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarPermissionFromDiscriminatorValue, deserializeIntoCalendarPermission, serializeCalendarPermission, type CalendarPermission } from '../../../../models/calendarPermission'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarPermissionItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ -export class CalendarPermissionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarPermissionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarPermissions/{calendarPermission%2Did}{?%24select}"); - }; - /** - * Delete calendarPermission. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the specified permissions object of a user or group calendar that has been shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete calendarPermission. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the specified permissions object of a user or group calendar that has been shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarPermissionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarPermission); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CalendarPermissionItemRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarPermissionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarPermissionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarPermissionItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarPermissions/item/index.ts b/src/me/calendar/calendarPermissions/item/index.ts deleted file mode 100644 index 57054f86b65..00000000000 --- a/src/me/calendar/calendarPermissions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarPermissionItemRequestBuilder' diff --git a/src/me/calendar/calendarRequestBuilder.ts b/src/me/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 5a1e10725c7..00000000000 --- a/src/me/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,137 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarFromDiscriminatorValue, deserializeIntoCalendar, serializeCalendar, type Calendar } from '../../models/calendar'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { AllowedCalendarSharingRolesWithUserRequestBuilder } from './allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder'; -import { CalendarPermissionsRequestBuilder } from './calendarPermissions/calendarPermissionsRequestBuilder'; -import { CalendarViewRequestBuilder } from './calendarView/calendarViewRequestBuilder'; -import { EventsRequestBuilder } from './events/eventsRequestBuilder'; -import { GetScheduleRequestBuilder } from './getSchedule/getScheduleRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.user entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ - public get calendarPermissions(): CalendarPermissionsRequestBuilder { - return new CalendarPermissionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ - public get calendarView(): CalendarViewRequestBuilder { - return new CalendarViewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ - public get events(): EventsRequestBuilder { - return new EventsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getSchedule method. - */ - public get getSchedule(): GetScheduleRequestBuilder { - return new GetScheduleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the allowedCalendarSharingRoles method. - * @param User Usage: User='{User}' - * @returns a allowedCalendarSharingRolesWithUserRequestBuilder - */ - public allowedCalendarSharingRolesWithUser(user: string | undefined) : AllowedCalendarSharingRolesWithUserRequestBuilder { - if(!user) throw new Error("user cannot be undefined"); - return new AllowedCalendarSharingRolesWithUserRequestBuilder(this.pathParameters, this.requestAdapter, user); - }; - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar{?%24select}"); - }; - /** - * Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - * @see {@link https://learn.microsoft.com/graph/api/calendar-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - * @see {@link https://learn.microsoft.com/graph/api/calendar-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Get the properties and relationships of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. There are two scenarios where an app can get another user's calendar: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a calendar object. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendar); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/calendarViewRequestBuilder.ts b/src/me/calendar/calendarView/calendarViewRequestBuilder.ts deleted file mode 100644 index 9e9a38b89af..00000000000 --- a/src/me/calendar/calendarView/calendarViewRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarViewRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ -export class CalendarViewRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarViewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-calendarview?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarViewRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarViewRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarViewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarViewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarViewRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/count/countRequestBuilder.ts b/src/me/calendar/calendarView/count/countRequestBuilder.ts deleted file mode 100644 index d66f5131e5b..00000000000 --- a/src/me/calendar/calendarView/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/count/index.ts b/src/me/calendar/calendarView/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarView/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarView/delta/deltaRequestBuilder.ts b/src/me/calendar/calendarView/delta/deltaRequestBuilder.ts deleted file mode 100644 index 7228dbc9b1b..00000000000 --- a/src/me/calendar/calendarView/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../models/event'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/delta/index.ts b/src/me/calendar/calendarView/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendar/calendarView/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendar/calendarView/index.ts b/src/me/calendar/calendarView/index.ts deleted file mode 100644 index 35d65d26a01..00000000000 --- a/src/me/calendar/calendarView/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarViewRequestBuilder' diff --git a/src/me/calendar/calendarView/item/accept/acceptRequestBuilder.ts b/src/me/calendar/calendarView/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 70013fb8471..00000000000 --- a/src/me/calendar/calendarView/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/accept/index.ts b/src/me/calendar/calendarView/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendar/calendarView/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendar/calendarView/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendar/calendarView/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 6e0e5221ebd..00000000000 --- a/src/me/calendar/calendarView/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/attachments/count/countRequestBuilder.ts b/src/me/calendar/calendarView/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index f8fb84ff3c3..00000000000 --- a/src/me/calendar/calendarView/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/attachments/count/index.ts b/src/me/calendar/calendarView/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarView/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendar/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index c33b5584240..00000000000 --- a/src/me/calendar/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/attachments/createUploadSession/index.ts b/src/me/calendar/calendarView/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendar/calendarView/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendar/calendarView/item/attachments/index.ts b/src/me/calendar/calendarView/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendar/calendarView/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendar/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendar/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index f12cfcc06b8..00000000000 --- a/src/me/calendar/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/attachments/item/index.ts b/src/me/calendar/calendarView/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendar/calendarView/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendar/calendarView/item/calendar/calendarRequestBuilder.ts b/src/me/calendar/calendarView/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 0e5ed9eadec..00000000000 --- a/src/me/calendar/calendarView/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../models/calendar'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/calendar/index.ts b/src/me/calendar/calendarView/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendar/calendarView/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendar/calendarView/item/cancel/cancelPostRequestBody.ts b/src/me/calendar/calendarView/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendar/calendarView/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/cancel/cancelRequestBuilder.ts b/src/me/calendar/calendarView/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 40dd1f69c71..00000000000 --- a/src/me/calendar/calendarView/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/cancel/index.ts b/src/me/calendar/calendarView/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendar/calendarView/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendar/calendarView/item/decline/declineRequestBuilder.ts b/src/me/calendar/calendarView/item/decline/declineRequestBuilder.ts deleted file mode 100644 index d9bbe3c8c93..00000000000 --- a/src/me/calendar/calendarView/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/decline/index.ts b/src/me/calendar/calendarView/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendar/calendarView/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendar/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendar/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index bc6940a1c96..00000000000 --- a/src/me/calendar/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/eventItemRequestBuilder.ts b/src/me/calendar/calendarView/item/eventItemRequestBuilder.ts deleted file mode 100644 index 172591be176..00000000000 --- a/src/me/calendar/calendarView/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../models/event'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/extensions/count/countRequestBuilder.ts b/src/me/calendar/calendarView/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index a416201fe2e..00000000000 --- a/src/me/calendar/calendarView/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/extensions/count/index.ts b/src/me/calendar/calendarView/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarView/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarView/item/extensions/extensionsRequestBuilder.ts b/src/me/calendar/calendarView/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index ec70ab3609c..00000000000 --- a/src/me/calendar/calendarView/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/extensions/index.ts b/src/me/calendar/calendarView/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendar/calendarView/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendar/calendarView/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendar/calendarView/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 2275af21b36..00000000000 --- a/src/me/calendar/calendarView/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/extensions/item/index.ts b/src/me/calendar/calendarView/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendar/calendarView/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendar/calendarView/item/forward/forwardPostRequestBody.ts b/src/me/calendar/calendarView/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 5b7e40ebb5d..00000000000 --- a/src/me/calendar/calendarView/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/forward/forwardRequestBuilder.ts b/src/me/calendar/calendarView/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 0aabed1c220..00000000000 --- a/src/me/calendar/calendarView/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/forward/index.ts b/src/me/calendar/calendarView/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendar/calendarView/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendar/calendarView/item/index.ts b/src/me/calendar/calendarView/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendar/calendarView/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/count/countRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index 42c2faca6f2..00000000000 --- a/src/me/calendar/calendarView/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/count/index.ts b/src/me/calendar/calendarView/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarView/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index a0646de022e..00000000000 --- a/src/me/calendar/calendarView/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../models/event'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/delta/index.ts b/src/me/calendar/calendarView/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendar/calendarView/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/index.ts b/src/me/calendar/calendarView/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendar/calendarView/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/instancesRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index a6603b04319..00000000000 --- a/src/me/calendar/calendarView/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 5c78b140a0f..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/accept/index.ts b/src/me/calendar/calendarView/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index a9131aba952..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index fe5ed6bed96..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/count/index.ts b/src/me/calendar/calendarView/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index bef1c938b06..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendar/calendarView/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/index.ts b/src/me/calendar/calendarView/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 27ed180d5bb..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/attachments/item/index.ts b/src/me/calendar/calendarView/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index e276e452ec7..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/calendar/index.ts b/src/me/calendar/calendarView/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendar/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index fe2d7dabd10..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/cancel/index.ts b/src/me/calendar/calendarView/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index bfdac4c79aa..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/decline/index.ts b/src/me/calendar/calendarView/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 46ac3da52af..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index dd00b3a9a8c..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../models/event'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index a87d3e3bf37..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/extensions/count/index.ts b/src/me/calendar/calendarView/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 8a7a00bb92d..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/extensions/index.ts b/src/me/calendar/calendarView/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index c4f175dbefa..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/extensions/item/index.ts b/src/me/calendar/calendarView/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendar/calendarView/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 1fd7eb4c631..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 8dcc18b4c53..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/forward/index.ts b/src/me/calendar/calendarView/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/index.ts b/src/me/calendar/calendarView/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/snoozeReminder/index.ts b/src/me/calendar/calendarView/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index d1996a73a7b..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/instances/item/tentativelyAccept/index.ts b/src/me/calendar/calendarView/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendar/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendar/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 3604dd5b98d..00000000000 --- a/src/me/calendar/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/snoozeReminder/index.ts b/src/me/calendar/calendarView/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendar/calendarView/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendar/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendar/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 49f266c0412..00000000000 --- a/src/me/calendar/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/calendarView/item/tentativelyAccept/index.ts b/src/me/calendar/calendarView/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendar/calendarView/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendar/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendar/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 1fd7ac8bce1..00000000000 --- a/src/me/calendar/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/calendarView/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/count/countRequestBuilder.ts b/src/me/calendar/events/count/countRequestBuilder.ts deleted file mode 100644 index 4c2f10e59ed..00000000000 --- a/src/me/calendar/events/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/count/index.ts b/src/me/calendar/events/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/events/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/events/delta/deltaRequestBuilder.ts b/src/me/calendar/events/delta/deltaRequestBuilder.ts deleted file mode 100644 index f1e0eaf8aa5..00000000000 --- a/src/me/calendar/events/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../models/event'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/delta/index.ts b/src/me/calendar/events/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendar/events/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendar/events/eventsRequestBuilder.ts b/src/me/calendar/events/eventsRequestBuilder.ts deleted file mode 100644 index 95a29e6ea89..00000000000 --- a/src/me/calendar/events/eventsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../models/'; -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../models/event'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ -export class EventsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new EventsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/calendar-post-events?view=graph-rest-1.0|Find more info here} - */ - public post(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a eventsRequestBuilder - */ - public withUrl(rawUrl: string) : EventsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/index.ts b/src/me/calendar/events/index.ts deleted file mode 100644 index 7a5c17c7c94..00000000000 --- a/src/me/calendar/events/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventsRequestBuilder' diff --git a/src/me/calendar/events/item/accept/acceptRequestBuilder.ts b/src/me/calendar/events/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 17723a04c10..00000000000 --- a/src/me/calendar/events/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/accept/index.ts b/src/me/calendar/events/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendar/events/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendar/events/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendar/events/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 2fdd5d00937..00000000000 --- a/src/me/calendar/events/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/attachments/count/countRequestBuilder.ts b/src/me/calendar/events/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index f8e69f02c27..00000000000 --- a/src/me/calendar/events/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/attachments/count/index.ts b/src/me/calendar/events/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/events/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendar/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index f0ad70bc5ff..00000000000 --- a/src/me/calendar/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/attachments/createUploadSession/index.ts b/src/me/calendar/events/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendar/events/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendar/events/item/attachments/index.ts b/src/me/calendar/events/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendar/events/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendar/events/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendar/events/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index b6c5582f195..00000000000 --- a/src/me/calendar/events/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/attachments/item/index.ts b/src/me/calendar/events/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendar/events/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendar/events/item/calendar/calendarRequestBuilder.ts b/src/me/calendar/events/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index e74ac735311..00000000000 --- a/src/me/calendar/events/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../models/calendar'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/calendar/index.ts b/src/me/calendar/events/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendar/events/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendar/events/item/cancel/cancelPostRequestBody.ts b/src/me/calendar/events/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendar/events/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/cancel/cancelRequestBuilder.ts b/src/me/calendar/events/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 293739ea0bc..00000000000 --- a/src/me/calendar/events/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/cancel/index.ts b/src/me/calendar/events/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendar/events/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendar/events/item/decline/declineRequestBuilder.ts b/src/me/calendar/events/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 020a47b20d6..00000000000 --- a/src/me/calendar/events/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/decline/index.ts b/src/me/calendar/events/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendar/events/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendar/events/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendar/events/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 15885ab4923..00000000000 --- a/src/me/calendar/events/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/eventItemRequestBuilder.ts b/src/me/calendar/events/item/eventItemRequestBuilder.ts deleted file mode 100644 index f6f6e0f64d3..00000000000 --- a/src/me/calendar/events/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,205 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../../models/event'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property events for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The events in the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Update an event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/group-update-event?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property events for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The events in the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update an event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/extensions/count/countRequestBuilder.ts b/src/me/calendar/events/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 7e01129fc65..00000000000 --- a/src/me/calendar/events/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/extensions/count/index.ts b/src/me/calendar/events/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/events/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/events/item/extensions/extensionsRequestBuilder.ts b/src/me/calendar/events/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 1b461979fc0..00000000000 --- a/src/me/calendar/events/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/extensions/index.ts b/src/me/calendar/events/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendar/events/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendar/events/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendar/events/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index b20cf0d2724..00000000000 --- a/src/me/calendar/events/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/extensions/item/index.ts b/src/me/calendar/events/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendar/events/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendar/events/item/forward/forwardPostRequestBody.ts b/src/me/calendar/events/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 5b7e40ebb5d..00000000000 --- a/src/me/calendar/events/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/forward/forwardRequestBuilder.ts b/src/me/calendar/events/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 2eab85c5c78..00000000000 --- a/src/me/calendar/events/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/forward/index.ts b/src/me/calendar/events/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendar/events/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendar/events/item/index.ts b/src/me/calendar/events/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendar/events/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendar/events/item/instances/count/countRequestBuilder.ts b/src/me/calendar/events/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index 476c1dc016e..00000000000 --- a/src/me/calendar/events/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/count/index.ts b/src/me/calendar/events/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/events/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/events/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendar/events/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index 6967eb57433..00000000000 --- a/src/me/calendar/events/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../models/event'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/delta/index.ts b/src/me/calendar/events/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendar/events/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendar/events/item/instances/index.ts b/src/me/calendar/events/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendar/events/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendar/events/item/instances/instancesRequestBuilder.ts b/src/me/calendar/events/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index 18cbbe0cabe..00000000000 --- a/src/me/calendar/events/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendar/events/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 36c47a1c7b5..00000000000 --- a/src/me/calendar/events/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/accept/index.ts b/src/me/calendar/events/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendar/events/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendar/events/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index fe8578baef7..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendar/events/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index e1cefd3511f..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/attachments/count/index.ts b/src/me/calendar/events/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendar/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index fd4c78c3803..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendar/events/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/attachments/index.ts b/src/me/calendar/events/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendar/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 280585b59d2..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/attachments/item/index.ts b/src/me/calendar/events/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendar/events/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendar/events/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 5418d081725..00000000000 --- a/src/me/calendar/events/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/calendar/index.ts b/src/me/calendar/events/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendar/events/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendar/events/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendar/events/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendar/events/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index ac0d81a8aab..00000000000 --- a/src/me/calendar/events/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/cancel/index.ts b/src/me/calendar/events/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendar/events/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendar/events/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 9047fa7360a..00000000000 --- a/src/me/calendar/events/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/decline/index.ts b/src/me/calendar/events/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendar/events/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendar/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index d4c889c3c65..00000000000 --- a/src/me/calendar/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendar/events/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index b3fabf07523..00000000000 --- a/src/me/calendar/events/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../models/event'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendar/events/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index fbe3efdeb7b..00000000000 --- a/src/me/calendar/events/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/extensions/count/index.ts b/src/me/calendar/events/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendar/events/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendar/events/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index a6920bf1b25..00000000000 --- a/src/me/calendar/events/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/extensions/index.ts b/src/me/calendar/events/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendar/events/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendar/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 2987aeaa00d..00000000000 --- a/src/me/calendar/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/extensions/item/index.ts b/src/me/calendar/events/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendar/events/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendar/events/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 1fd7eb4c631..00000000000 --- a/src/me/calendar/events/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendar/events/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index ce04190f621..00000000000 --- a/src/me/calendar/events/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/forward/index.ts b/src/me/calendar/events/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendar/events/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/index.ts b/src/me/calendar/events/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendar/events/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/snoozeReminder/index.ts b/src/me/calendar/events/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendar/events/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendar/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index f9d2fb11f35..00000000000 --- a/src/me/calendar/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/instances/item/tentativelyAccept/index.ts b/src/me/calendar/events/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendar/events/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendar/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendar/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 9067d445fd5..00000000000 --- a/src/me/calendar/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/snoozeReminder/index.ts b/src/me/calendar/events/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendar/events/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendar/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendar/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 661ca4e09d8..00000000000 --- a/src/me/calendar/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/events/item/tentativelyAccept/index.ts b/src/me/calendar/events/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendar/events/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendar/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendar/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index e7e3fde8386..00000000000 --- a/src/me/calendar/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/events/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/getSchedule/getSchedulePostResponse.ts b/src/me/calendar/getSchedule/getSchedulePostResponse.ts deleted file mode 100644 index a22650c70c2..00000000000 --- a/src/me/calendar/getSchedule/getSchedulePostResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { createScheduleInformationFromDiscriminatorValue, serializeScheduleInformation, type ScheduleInformation } from '../../../models/scheduleInformation'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetSchedulePostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetSchedulePostResponse; -} -export function deserializeIntoGetSchedulePostResponse(getSchedulePostResponse: GetSchedulePostResponse | undefined = {} as GetSchedulePostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getSchedulePostResponse), - "value": n => { getSchedulePostResponse.value = n.getCollectionOfObjectValues(createScheduleInformationFromDiscriminatorValue); }, - } -} -export interface GetSchedulePostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ScheduleInformation[]; -} -export function serializeGetSchedulePostResponse(writer: SerializationWriter, getSchedulePostResponse: GetSchedulePostResponse | undefined = {} as GetSchedulePostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getSchedulePostResponse) - writer.writeCollectionOfObjectValues("value", getSchedulePostResponse.value, serializeScheduleInformation); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/getSchedule/getScheduleRequestBuilder.ts b/src/me/calendar/getSchedule/getScheduleRequestBuilder.ts deleted file mode 100644 index ad16192181f..00000000000 --- a/src/me/calendar/getSchedule/getScheduleRequestBuilder.ts +++ /dev/null @@ -1,105 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createGetSchedulePostResponseFromDiscriminatorValue, deserializeIntoGetSchedulePostResponse, serializeGetSchedulePostResponse, type GetSchedulePostResponse } from './getSchedulePostResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetSchedulePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetSchedulePostRequestBody; -} -export function deserializeIntoGetSchedulePostRequestBody(getSchedulePostRequestBody: GetSchedulePostRequestBody | undefined = {} as GetSchedulePostRequestBody) : Record void> { - return { - "availabilityViewInterval": n => { getSchedulePostRequestBody.availabilityViewInterval = n.getNumberValue(); }, - "endTime": n => { getSchedulePostRequestBody.endTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - "schedules": n => { getSchedulePostRequestBody.schedules = n.getCollectionOfPrimitiveValues(); }, - "startTime": n => { getSchedulePostRequestBody.startTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export interface GetSchedulePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AvailabilityViewInterval property - */ - availabilityViewInterval?: number; - /** - * The EndTime property - */ - endTime?: DateTimeTimeZone; - /** - * The Schedules property - */ - schedules?: string[]; - /** - * The StartTime property - */ - startTime?: DateTimeTimeZone; -} -export function serializeGetSchedulePostRequestBody(writer: SerializationWriter, getSchedulePostRequestBody: GetSchedulePostRequestBody | undefined = {} as GetSchedulePostRequestBody) : void { - writer.writeNumberValue("AvailabilityViewInterval", getSchedulePostRequestBody.availabilityViewInterval); - writer.writeObjectValue("EndTime", getSchedulePostRequestBody.endTime, serializeDateTimeTimeZone); - writer.writeCollectionOfPrimitiveValues("Schedules", getSchedulePostRequestBody.schedules); - writer.writeObjectValue("StartTime", getSchedulePostRequestBody.startTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(getSchedulePostRequestBody.additionalData); -} -/** - * Provides operations to call the getSchedule method. - */ -export class GetScheduleRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetScheduleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendar/getSchedule"); - }; - /** - * Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetSchedulePostResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetSchedulePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetSchedulePostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetSchedulePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetSchedulePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getScheduleRequestBuilder - */ - public withUrl(rawUrl: string) : GetScheduleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetScheduleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendar/getSchedule/index.ts b/src/me/calendar/getSchedule/index.ts deleted file mode 100644 index 8cee025f3ef..00000000000 --- a/src/me/calendar/getSchedule/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getSchedulePostResponse' -export * from './getScheduleRequestBuilder' diff --git a/src/me/calendar/index.ts b/src/me/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarGroups/calendarGroupsRequestBuilder.ts b/src/me/calendarGroups/calendarGroupsRequestBuilder.ts deleted file mode 100644 index fe6bc05f9fa..00000000000 --- a/src/me/calendarGroups/calendarGroupsRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CalendarGroupCollectionResponse } from '../../models/'; -import { createCalendarGroupFromDiscriminatorValue, deserializeIntoCalendarGroup, serializeCalendarGroup, type CalendarGroup } from '../../models/calendarGroup'; -import { createCalendarGroupCollectionResponseFromDiscriminatorValue } from '../../models/calendarGroupCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CalendarGroupItemRequestBuilder } from './item/calendarGroupItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarGroupsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarGroups property of the microsoft.graph.user entity. - */ -export class CalendarGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarGroups property of the microsoft.graph.user entity. - * @param calendarGroupId The unique identifier of calendarGroup - * @returns a CalendarGroupItemRequestBuilder - */ - public byCalendarGroupId(calendarGroupId: string) : CalendarGroupItemRequestBuilder { - if(!calendarGroupId) throw new Error("calendarGroupId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["calendarGroup%2Did"] = calendarGroupId - return new CalendarGroupItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the user's calendar groups. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarGroupCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-calendargroups?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new CalendarGroup. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarGroup - * @see {@link https://learn.microsoft.com/graph/api/user-post-calendargroups?view=graph-rest-1.0|Find more info here} - */ - public post(body: CalendarGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Get the user's calendar groups. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarGroupsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new CalendarGroup. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CalendarGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarGroupsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/count/countRequestBuilder.ts b/src/me/calendarGroups/count/countRequestBuilder.ts deleted file mode 100644 index 10bf8d4f40f..00000000000 --- a/src/me/calendarGroups/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/count/index.ts b/src/me/calendarGroups/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/index.ts b/src/me/calendarGroups/index.ts deleted file mode 100644 index 64f3b3b61be..00000000000 --- a/src/me/calendarGroups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarGroupsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendarGroupItemRequestBuilder.ts b/src/me/calendarGroups/item/calendarGroupItemRequestBuilder.ts deleted file mode 100644 index f949167a694..00000000000 --- a/src/me/calendarGroups/item/calendarGroupItemRequestBuilder.ts +++ /dev/null @@ -1,132 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarGroupFromDiscriminatorValue, deserializeIntoCalendarGroup, serializeCalendarGroup, type CalendarGroup } from '../../../models/calendarGroup'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CalendarsRequestBuilder } from './calendars/calendarsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarGroupItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendarGroups property of the microsoft.graph.user entity. - */ -export class CalendarGroupItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the calendars property of the microsoft.graph.calendarGroup entity. - */ - public get calendars(): CalendarsRequestBuilder { - return new CalendarsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new CalendarGroupItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}{?%24select}"); - }; - /** - * Delete a calendar group other than the default calendar group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/calendargroup-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a calendar group object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarGroup - * @see {@link https://learn.microsoft.com/graph/api/calendargroup-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of calendargroup object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarGroup - * @see {@link https://learn.microsoft.com/graph/api/calendargroup-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: CalendarGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a calendar group other than the default calendar group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a calendar group object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarGroupItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of calendargroup object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: CalendarGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CalendarGroupItemRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarGroupItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarGroupItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarGroupItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/calendarsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/calendarsRequestBuilder.ts deleted file mode 100644 index 0390678f0d5..00000000000 --- a/src/me/calendarGroups/item/calendars/calendarsRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CalendarCollectionResponse } from '../../../../models/'; -import { createCalendarFromDiscriminatorValue, deserializeIntoCalendar, serializeCalendar, type Calendar } from '../../../../models/calendar'; -import { createCalendarCollectionResponseFromDiscriminatorValue } from '../../../../models/calendarCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CalendarItemRequestBuilder } from './item/calendarItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendars property of the microsoft.graph.calendarGroup entity. - */ -export class CalendarsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendars property of the microsoft.graph.calendarGroup entity. - * @param calendarId The unique identifier of calendar - * @returns a CalendarItemRequestBuilder - */ - public byCalendarId(calendarId: string) : CalendarItemRequestBuilder { - if(!calendarId) throw new Error("calendarId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["calendar%2Did"] = calendarId - return new CalendarItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Retrieve a list of calendars belonging to a calendar group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendargroup-list-calendars?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new calendar in a calendar group for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - * @see {@link https://learn.microsoft.com/graph/api/calendargroup-post-calendars?view=graph-rest-1.0|Find more info here} - */ - public post(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of calendars belonging to a calendar group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new calendar in a calendar group for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendar); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarsRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/count/countRequestBuilder.ts deleted file mode 100644 index 2e543cea88a..00000000000 --- a/src/me/calendarGroups/item/calendars/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/count/index.ts b/src/me/calendarGroups/item/calendars/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/index.ts b/src/me/calendarGroups/item/calendars/index.ts deleted file mode 100644 index 33b1bebd445..00000000000 --- a/src/me/calendarGroups/item/calendars/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts deleted file mode 100644 index 442055cc4fe..00000000000 --- a/src/me/calendarGroups/item/calendars/item/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts +++ /dev/null @@ -1,111 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../../models/baseCollectionPaginationCountResponse'; -import { CalendarRoleType } from '../../../../../../models/calendarRoleType'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AllowedCalendarSharingRolesWithUserGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: CalendarRoleType[]; -} -export interface AllowedCalendarSharingRolesWithUserRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -export function createAllowedCalendarSharingRolesWithUserGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAllowedCalendarSharingRolesWithUserGetResponse; -} -export function deserializeIntoAllowedCalendarSharingRolesWithUserGetResponse(allowedCalendarSharingRolesWithUserGetResponse: AllowedCalendarSharingRolesWithUserGetResponse | undefined = {} as AllowedCalendarSharingRolesWithUserGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(allowedCalendarSharingRolesWithUserGetResponse), - "value": n => { allowedCalendarSharingRolesWithUserGetResponse.value = n.getCollectionOfEnumValues(CalendarRoleType); }, - } -} -export function serializeAllowedCalendarSharingRolesWithUserGetResponse(writer: SerializationWriter, allowedCalendarSharingRolesWithUserGetResponse: AllowedCalendarSharingRolesWithUserGetResponse | undefined = {} as AllowedCalendarSharingRolesWithUserGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, allowedCalendarSharingRolesWithUserGetResponse) - if(allowedCalendarSharingRolesWithUserGetResponse.value) - writer.writeEnumValue("value", ...allowedCalendarSharingRolesWithUserGetResponse.value); -} -/** - * Provides operations to call the allowedCalendarSharingRoles method. - */ -export class AllowedCalendarSharingRolesWithUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AllowedCalendarSharingRolesWithUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - * @param User Usage: User='{User}' - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, user?: string | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}"); - this.pathParameters["User"] = user - }; - /** - * Invoke function allowedCalendarSharingRoles - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AllowedCalendarSharingRolesWithUserGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAllowedCalendarSharingRolesWithUserGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function allowedCalendarSharingRoles - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, allowedCalendarSharingRolesWithUserRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a allowedCalendarSharingRolesWithUserRequestBuilder - */ - public withUrl(rawUrl: string) : AllowedCalendarSharingRolesWithUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AllowedCalendarSharingRolesWithUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const allowedCalendarSharingRolesWithUserRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/allowedCalendarSharingRolesWithUser/index.ts b/src/me/calendarGroups/item/calendars/item/allowedCalendarSharingRolesWithUser/index.ts deleted file mode 100644 index f0bce8f042c..00000000000 --- a/src/me/calendarGroups/item/calendars/item/allowedCalendarSharingRolesWithUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './allowedCalendarSharingRolesWithUserRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarItemRequestBuilder.ts deleted file mode 100644 index 54f822ca30e..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarItemRequestBuilder.ts +++ /dev/null @@ -1,160 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarFromDiscriminatorValue, deserializeIntoCalendar, serializeCalendar, type Calendar } from '../../../../../models/calendar'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AllowedCalendarSharingRolesWithUserRequestBuilder } from './allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder'; -import { CalendarPermissionsRequestBuilder } from './calendarPermissions/calendarPermissionsRequestBuilder'; -import { CalendarViewRequestBuilder } from './calendarView/calendarViewRequestBuilder'; -import { EventsRequestBuilder } from './events/eventsRequestBuilder'; -import { GetScheduleRequestBuilder } from './getSchedule/getScheduleRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendars property of the microsoft.graph.calendarGroup entity. - */ -export class CalendarItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ - public get calendarPermissions(): CalendarPermissionsRequestBuilder { - return new CalendarPermissionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ - public get calendarView(): CalendarViewRequestBuilder { - return new CalendarViewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ - public get events(): EventsRequestBuilder { - return new EventsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getSchedule method. - */ - public get getSchedule(): GetScheduleRequestBuilder { - return new GetScheduleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the allowedCalendarSharingRoles method. - * @param User Usage: User='{User}' - * @returns a allowedCalendarSharingRolesWithUserRequestBuilder - */ - public allowedCalendarSharingRolesWithUser(user: string | undefined) : AllowedCalendarSharingRolesWithUserRequestBuilder { - if(!user) throw new Error("user cannot be undefined"); - return new AllowedCalendarSharingRolesWithUserRequestBuilder(this.pathParameters, this.requestAdapter, user); - }; - /** - * Instantiates a new CalendarItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}{?%24select}"); - }; - /** - * Delete navigation property calendars for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The calendars in the calendar group. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property calendars in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public patch(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property calendars for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The calendars in the calendar group. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property calendars in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendar); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CalendarItemRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarPermissions/calendarPermissionsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarPermissions/calendarPermissionsRequestBuilder.ts deleted file mode 100644 index 9b24abccd5f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarPermissions/calendarPermissionsRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CalendarPermissionCollectionResponse } from '../../../../../../models/'; -import { createCalendarPermissionFromDiscriminatorValue, deserializeIntoCalendarPermission, serializeCalendarPermission, type CalendarPermission } from '../../../../../../models/calendarPermission'; -import { createCalendarPermissionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/calendarPermissionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CalendarPermissionItemRequestBuilder } from './item/calendarPermissionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarPermissionsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ -export class CalendarPermissionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - * @param calendarPermissionId The unique identifier of calendarPermission - * @returns a CalendarPermissionItemRequestBuilder - */ - public byCalendarPermissionId(calendarPermissionId: string) : CalendarPermissionItemRequestBuilder { - if(!calendarPermissionId) throw new Error("calendarPermissionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["calendarPermission%2Did"] = calendarPermissionId - return new CalendarPermissionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarPermissionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarPermissions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermissionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendar-post-calendarpermissions?view=graph-rest-1.0|Find more info here} - */ - public post(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarPermissionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarPermission); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarPermissionsRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarPermissionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarPermissionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarPermissionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarPermissions/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarPermissions/count/countRequestBuilder.ts deleted file mode 100644 index c753bef2e40..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarPermissions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarPermissions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarPermissions/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarPermissions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarPermissions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarPermissions/index.ts b/src/me/calendarGroups/item/calendars/item/calendarPermissions/index.ts deleted file mode 100644 index 2e7d7f77cd1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarPermissions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarPermissionsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts deleted file mode 100644 index b096d940a33..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarPermissionFromDiscriminatorValue, deserializeIntoCalendarPermission, serializeCalendarPermission, type CalendarPermission } from '../../../../../../../models/calendarPermission'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarPermissionItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ -export class CalendarPermissionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarPermissionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarPermissions/{calendarPermission%2Did}{?%24select}"); - }; - /** - * Delete calendarPermission. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the specified permissions object of a user or group calendar that has been shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete calendarPermission. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the specified permissions object of a user or group calendar that has been shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarPermissionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarPermission); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CalendarPermissionItemRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarPermissionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarPermissionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarPermissionItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarPermissions/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarPermissions/item/index.ts deleted file mode 100644 index 57054f86b65..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarPermissions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarPermissionItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/calendarViewRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/calendarViewRequestBuilder.ts deleted file mode 100644 index d81a43208c6..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/calendarViewRequestBuilder.ts +++ /dev/null @@ -1,120 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarViewRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ -export class CalendarViewRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarViewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-calendarview?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the occurrences, exceptions and single instances of events in a calendar view defined by a time range,from a user's default calendar (../me/calendarView) or some other calendar of the user's. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarViewRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarViewRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarViewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarViewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarViewRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/count/countRequestBuilder.ts deleted file mode 100644 index ae6ba1d6ba2..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/delta/deltaRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/delta/deltaRequestBuilder.ts deleted file mode 100644 index e3f0ac54697..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/delta/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/index.ts deleted file mode 100644 index 35d65d26a01..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarViewRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/accept/acceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 659378ffca2..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/accept/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 227275200ff..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 1b17f536e1c..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 41c855821cd..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/createUploadSession/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index a7c3c6dd6de..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/calendar/calendarRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 2d9b7be2079..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/calendar/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/cancelPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/cancelRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 0b6891db587..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/decline/declineRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 545806ecd22..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/decline/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 06046cedbef..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/eventItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/eventItemRequestBuilder.ts deleted file mode 100644 index 10b1f8b193b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}{?%24select}"); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 5dea40478c5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/extensionsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 5d98993f83e..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index c7eace035e4..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/forwardPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 37dde22b05f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/forwardRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 50cf41d4df1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index 4ac118c2a29..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index 52b904f126c..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/delta/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/instancesRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index 92d21a85cc6..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index f5b6e09caec..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/accept/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 096a4a3adb9..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 7b324c11fd7..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 4aaef441a6e..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index b3404b9ba1a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 152ac214c7f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/calendar/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index bf52434b6cf..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index ba56ab49016..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/decline/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index dbfddde87bd..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index f7f13f4fb7b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index f7d6c3b2794..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/count/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index ad2d6744401..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index d433edd80c8..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 3a184fe91e9..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 8eb569339d0..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/snoozeReminder/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 575f42b6229..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/tentativelyAccept/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 663f4c3e3af..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/snoozeReminder/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index cfc032bcdbb..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/tentativelyAccept/index.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index d43b67ef0cd..00000000000 --- a/src/me/calendarGroups/item/calendars/item/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/calendarView/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/count/countRequestBuilder.ts deleted file mode 100644 index e2a39fa1c43..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/count/index.ts b/src/me/calendarGroups/item/calendars/item/events/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/delta/deltaRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/delta/deltaRequestBuilder.ts deleted file mode 100644 index 32f8a8282d5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/delta/index.ts b/src/me/calendarGroups/item/calendars/item/events/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/eventsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/eventsRequestBuilder.ts deleted file mode 100644 index b0f03bfdc2e..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/eventsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../../models/'; -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../../../../models/event'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ -export class EventsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new EventsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/calendar-post-events?view=graph-rest-1.0|Find more info here} - */ - public post(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a eventsRequestBuilder - */ - public withUrl(rawUrl: string) : EventsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/index.ts b/src/me/calendarGroups/item/calendars/item/events/index.ts deleted file mode 100644 index 7a5c17c7c94..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/accept/acceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index cbd21d5b6b5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/accept/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index aaec5dce083..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 6d9dcc4674f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/count/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index c22bc2b8ca3..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/createUploadSession/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 85755dcf722..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/attachments/item/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/calendar/calendarRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index ebf1dbe545b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/calendar/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/cancel/cancelPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/events/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/cancel/cancelRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 3165e2429e9..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/cancel/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/decline/declineRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 6200dd853b0..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/decline/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 46958e97a9a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/eventItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/eventItemRequestBuilder.ts deleted file mode 100644 index 6b35d5d2aa1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,205 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property events for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The events in the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Update an event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/group-update-event?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property events for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The events in the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update an event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/extensions/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 14f814dfec8..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/extensions/count/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/extensions/extensionsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 2313b04d6ee..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/extensions/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 2a699fa2252..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/extensions/item/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/forward/forwardPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/events/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 37dde22b05f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/forward/forwardRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index a8b1cfd1780..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/forward/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index 3dfc2f4f541..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/count/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index f16587e67f4..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/delta/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/instancesRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index ecd85e6ae48..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 52e738af47a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/accept/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 7462442b1b3..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index de6745aa7f2..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/count/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index deaa46d72cc..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 8e4ed430dd3..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/item/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 1025d893424..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/calendar/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 781ff2647ce..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 28298d198d8..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/decline/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 7b1b7e85507..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index 1787d47c732..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 5ed8aa3a15d..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/count/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 423a8759c52..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 2d1c041383c..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/item/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 3a184fe91e9..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 9cddda12f89..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/snoozeReminder/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 5992a831c34..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/tentativelyAccept/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 45fab48e6c4..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/snoozeReminder/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index f685339c169..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/events/item/tentativelyAccept/index.ts b/src/me/calendarGroups/item/calendars/item/events/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 47f3bed10ae..00000000000 --- a/src/me/calendarGroups/item/calendars/item/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/getSchedule/getSchedulePostResponse.ts b/src/me/calendarGroups/item/calendars/item/getSchedule/getSchedulePostResponse.ts deleted file mode 100644 index 8d357607115..00000000000 --- a/src/me/calendarGroups/item/calendars/item/getSchedule/getSchedulePostResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../../models/baseCollectionPaginationCountResponse'; -import { createScheduleInformationFromDiscriminatorValue, serializeScheduleInformation, type ScheduleInformation } from '../../../../../../models/scheduleInformation'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetSchedulePostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetSchedulePostResponse; -} -export function deserializeIntoGetSchedulePostResponse(getSchedulePostResponse: GetSchedulePostResponse | undefined = {} as GetSchedulePostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getSchedulePostResponse), - "value": n => { getSchedulePostResponse.value = n.getCollectionOfObjectValues(createScheduleInformationFromDiscriminatorValue); }, - } -} -export interface GetSchedulePostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ScheduleInformation[]; -} -export function serializeGetSchedulePostResponse(writer: SerializationWriter, getSchedulePostResponse: GetSchedulePostResponse | undefined = {} as GetSchedulePostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getSchedulePostResponse) - writer.writeCollectionOfObjectValues("value", getSchedulePostResponse.value, serializeScheduleInformation); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/getSchedule/getScheduleRequestBuilder.ts b/src/me/calendarGroups/item/calendars/item/getSchedule/getScheduleRequestBuilder.ts deleted file mode 100644 index 59fc8067395..00000000000 --- a/src/me/calendarGroups/item/calendars/item/getSchedule/getScheduleRequestBuilder.ts +++ /dev/null @@ -1,105 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createGetSchedulePostResponseFromDiscriminatorValue, deserializeIntoGetSchedulePostResponse, serializeGetSchedulePostResponse, type GetSchedulePostResponse } from './getSchedulePostResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetSchedulePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetSchedulePostRequestBody; -} -export function deserializeIntoGetSchedulePostRequestBody(getSchedulePostRequestBody: GetSchedulePostRequestBody | undefined = {} as GetSchedulePostRequestBody) : Record void> { - return { - "availabilityViewInterval": n => { getSchedulePostRequestBody.availabilityViewInterval = n.getNumberValue(); }, - "endTime": n => { getSchedulePostRequestBody.endTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - "schedules": n => { getSchedulePostRequestBody.schedules = n.getCollectionOfPrimitiveValues(); }, - "startTime": n => { getSchedulePostRequestBody.startTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export interface GetSchedulePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AvailabilityViewInterval property - */ - availabilityViewInterval?: number; - /** - * The EndTime property - */ - endTime?: DateTimeTimeZone; - /** - * The Schedules property - */ - schedules?: string[]; - /** - * The StartTime property - */ - startTime?: DateTimeTimeZone; -} -export function serializeGetSchedulePostRequestBody(writer: SerializationWriter, getSchedulePostRequestBody: GetSchedulePostRequestBody | undefined = {} as GetSchedulePostRequestBody) : void { - writer.writeNumberValue("AvailabilityViewInterval", getSchedulePostRequestBody.availabilityViewInterval); - writer.writeObjectValue("EndTime", getSchedulePostRequestBody.endTime, serializeDateTimeTimeZone); - writer.writeCollectionOfPrimitiveValues("Schedules", getSchedulePostRequestBody.schedules); - writer.writeObjectValue("StartTime", getSchedulePostRequestBody.startTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(getSchedulePostRequestBody.additionalData); -} -/** - * Provides operations to call the getSchedule method. - */ -export class GetScheduleRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetScheduleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/getSchedule"); - }; - /** - * Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetSchedulePostResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetSchedulePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetSchedulePostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetSchedulePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetSchedulePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getScheduleRequestBuilder - */ - public withUrl(rawUrl: string) : GetScheduleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetScheduleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarGroups/item/calendars/item/getSchedule/index.ts b/src/me/calendarGroups/item/calendars/item/getSchedule/index.ts deleted file mode 100644 index 8cee025f3ef..00000000000 --- a/src/me/calendarGroups/item/calendars/item/getSchedule/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getSchedulePostResponse' -export * from './getScheduleRequestBuilder' diff --git a/src/me/calendarGroups/item/calendars/item/index.ts b/src/me/calendarGroups/item/calendars/item/index.ts deleted file mode 100644 index f3e5ccdabd6..00000000000 --- a/src/me/calendarGroups/item/calendars/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarItemRequestBuilder' diff --git a/src/me/calendarGroups/item/index.ts b/src/me/calendarGroups/item/index.ts deleted file mode 100644 index b9781731b22..00000000000 --- a/src/me/calendarGroups/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarGroupItemRequestBuilder' diff --git a/src/me/calendarView/calendarViewRequestBuilder.ts b/src/me/calendarView/calendarViewRequestBuilder.ts deleted file mode 100644 index c5d65a704f6..00000000000 --- a/src/me/calendarView/calendarViewRequestBuilder.ts +++ /dev/null @@ -1,133 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../models/eventCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarViewRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Expand related entities - */ - expand?: string[]; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.user entity. - */ -export class CalendarViewRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.user entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarViewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The calendar view for the calendar. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-calendarview?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarViewRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarViewRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarViewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarViewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarViewRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/count/countRequestBuilder.ts b/src/me/calendarView/count/countRequestBuilder.ts deleted file mode 100644 index c44fb1bbef2..00000000000 --- a/src/me/calendarView/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/count/index.ts b/src/me/calendarView/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarView/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarView/delta/deltaRequestBuilder.ts b/src/me/calendarView/delta/deltaRequestBuilder.ts deleted file mode 100644 index 90797cb3029..00000000000 --- a/src/me/calendarView/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../models/event'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/delta/index.ts b/src/me/calendarView/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendarView/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendarView/index.ts b/src/me/calendarView/index.ts deleted file mode 100644 index 35d65d26a01..00000000000 --- a/src/me/calendarView/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarViewRequestBuilder' diff --git a/src/me/calendarView/item/accept/acceptRequestBuilder.ts b/src/me/calendarView/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 4c64135b6b9..00000000000 --- a/src/me/calendarView/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/accept/index.ts b/src/me/calendarView/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendarView/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendarView/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendarView/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index bfe2fd03270..00000000000 --- a/src/me/calendarView/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/attachments/count/countRequestBuilder.ts b/src/me/calendarView/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 70e6c64af9d..00000000000 --- a/src/me/calendarView/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/attachments/count/index.ts b/src/me/calendarView/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarView/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 65959ef6312..00000000000 --- a/src/me/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/attachments/createUploadSession/index.ts b/src/me/calendarView/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendarView/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendarView/item/attachments/index.ts b/src/me/calendarView/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendarView/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index e8a88529c5c..00000000000 --- a/src/me/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../models/attachment'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/attachments/item/index.ts b/src/me/calendarView/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendarView/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendarView/item/calendar/calendarRequestBuilder.ts b/src/me/calendarView/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 661cc11ef9f..00000000000 --- a/src/me/calendarView/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../models/calendar'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/calendar/index.ts b/src/me/calendarView/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendarView/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarView/item/cancel/cancelPostRequestBody.ts b/src/me/calendarView/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendarView/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/cancel/cancelRequestBuilder.ts b/src/me/calendarView/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index b383c76d685..00000000000 --- a/src/me/calendarView/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/cancel/index.ts b/src/me/calendarView/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendarView/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendarView/item/decline/declineRequestBuilder.ts b/src/me/calendarView/item/decline/declineRequestBuilder.ts deleted file mode 100644 index bd5b5f23379..00000000000 --- a/src/me/calendarView/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/decline/index.ts b/src/me/calendarView/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendarView/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 01a3fba7c15..00000000000 --- a/src/me/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/eventItemRequestBuilder.ts b/src/me/calendarView/item/eventItemRequestBuilder.ts deleted file mode 100644 index c63564442e3..00000000000 --- a/src/me/calendarView/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,158 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../models/event'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.user entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select,%24expand}"); - }; - /** - * The calendar view for the calendar. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/extensions/count/countRequestBuilder.ts b/src/me/calendarView/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 7b4895bc109..00000000000 --- a/src/me/calendarView/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/extensions/count/index.ts b/src/me/calendarView/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarView/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarView/item/extensions/extensionsRequestBuilder.ts b/src/me/calendarView/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index bcd5e943e6a..00000000000 --- a/src/me/calendarView/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/extensions/index.ts b/src/me/calendarView/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendarView/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendarView/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendarView/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 0f401b4e6dc..00000000000 --- a/src/me/calendarView/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/extensions/item/index.ts b/src/me/calendarView/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendarView/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendarView/item/forward/forwardPostRequestBody.ts b/src/me/calendarView/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 2ccd8932e99..00000000000 --- a/src/me/calendarView/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/forward/forwardRequestBuilder.ts b/src/me/calendarView/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index f8dd3df220a..00000000000 --- a/src/me/calendarView/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/forward/index.ts b/src/me/calendarView/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendarView/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendarView/item/index.ts b/src/me/calendarView/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendarView/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendarView/item/instances/count/countRequestBuilder.ts b/src/me/calendarView/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index 8d1cca561d1..00000000000 --- a/src/me/calendarView/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/count/index.ts b/src/me/calendarView/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarView/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarView/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendarView/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index f6ef834bde8..00000000000 --- a/src/me/calendarView/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/delta/index.ts b/src/me/calendarView/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendarView/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendarView/item/instances/index.ts b/src/me/calendarView/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendarView/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendarView/item/instances/instancesRequestBuilder.ts b/src/me/calendarView/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index 26bfff3d478..00000000000 --- a/src/me/calendarView/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendarView/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index d558371cac4..00000000000 --- a/src/me/calendarView/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/accept/index.ts b/src/me/calendarView/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendarView/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 86bf124a88b..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 4f64778b498..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/attachments/count/index.ts b/src/me/calendarView/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 8697779b018..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendarView/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/attachments/index.ts b/src/me/calendarView/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 57153ccc654..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/attachments/item/index.ts b/src/me/calendarView/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendarView/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 3c6c0a9dab1..00000000000 --- a/src/me/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/calendar/index.ts b/src/me/calendarView/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendarView/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 209e0641c3f..00000000000 --- a/src/me/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/cancel/index.ts b/src/me/calendarView/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendarView/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendarView/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 959fab029ed..00000000000 --- a/src/me/calendarView/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/decline/index.ts b/src/me/calendarView/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendarView/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index c573451cb1d..00000000000 --- a/src/me/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendarView/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index 6451789ccf3..00000000000 --- a/src/me/calendarView/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 4688292f0b3..00000000000 --- a/src/me/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/extensions/count/index.ts b/src/me/calendarView/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendarView/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 3a9b48ebdde..00000000000 --- a/src/me/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/extensions/index.ts b/src/me/calendarView/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendarView/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 3437c5f4a8f..00000000000 --- a/src/me/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/extensions/item/index.ts b/src/me/calendarView/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendarView/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendarView/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index c67b323605d..00000000000 --- a/src/me/calendarView/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendarView/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 732cc2e6bc8..00000000000 --- a/src/me/calendarView/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/forward/index.ts b/src/me/calendarView/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendarView/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/index.ts b/src/me/calendarView/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendarView/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/snoozeReminder/index.ts b/src/me/calendarView/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendarView/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index fa47cdfea64..00000000000 --- a/src/me/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/instances/item/tentativelyAccept/index.ts b/src/me/calendarView/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendarView/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 219b4c4e8f5..00000000000 --- a/src/me/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/snoozeReminder/index.ts b/src/me/calendarView/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendarView/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 59b4efe2dba..00000000000 --- a/src/me/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendarView/item/tentativelyAccept/index.ts b/src/me/calendarView/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendarView/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index f765ce1efe8..00000000000 --- a/src/me/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendarView/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/calendarsRequestBuilder.ts b/src/me/calendars/calendarsRequestBuilder.ts deleted file mode 100644 index d2341b7c33b..00000000000 --- a/src/me/calendars/calendarsRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CalendarCollectionResponse } from '../../models/'; -import { createCalendarFromDiscriminatorValue, deserializeIntoCalendar, serializeCalendar, type Calendar } from '../../models/calendar'; -import { createCalendarCollectionResponseFromDiscriminatorValue } from '../../models/calendarCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CalendarItemRequestBuilder } from './item/calendarItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendars property of the microsoft.graph.user entity. - */ -export class CalendarsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendars property of the microsoft.graph.user entity. - * @param calendarId The unique identifier of calendar - * @returns a CalendarItemRequestBuilder - */ - public byCalendarId(calendarId: string) : CalendarItemRequestBuilder { - if(!calendarId) throw new Error("calendarId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["calendar%2Did"] = calendarId - return new CalendarItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-calendars?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new calendar for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - * @see {@link https://learn.microsoft.com/graph/api/user-post-calendars?view=graph-rest-1.0|Find more info here} - */ - public post(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Get all the user's calendars (/calendars navigation property), get the calendars from the default calendar group or from a specific calendar group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new calendar for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendar); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarsRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/count/countRequestBuilder.ts b/src/me/calendars/count/countRequestBuilder.ts deleted file mode 100644 index 62b86bb7cef..00000000000 --- a/src/me/calendars/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/count/index.ts b/src/me/calendars/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/index.ts b/src/me/calendars/index.ts deleted file mode 100644 index 33b1bebd445..00000000000 --- a/src/me/calendars/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarsRequestBuilder' diff --git a/src/me/calendars/item/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts b/src/me/calendars/item/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts deleted file mode 100644 index d4ff515b56b..00000000000 --- a/src/me/calendars/item/allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder.ts +++ /dev/null @@ -1,111 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../models/baseCollectionPaginationCountResponse'; -import { CalendarRoleType } from '../../../../models/calendarRoleType'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AllowedCalendarSharingRolesWithUserGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: CalendarRoleType[]; -} -export interface AllowedCalendarSharingRolesWithUserRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -export function createAllowedCalendarSharingRolesWithUserGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAllowedCalendarSharingRolesWithUserGetResponse; -} -export function deserializeIntoAllowedCalendarSharingRolesWithUserGetResponse(allowedCalendarSharingRolesWithUserGetResponse: AllowedCalendarSharingRolesWithUserGetResponse | undefined = {} as AllowedCalendarSharingRolesWithUserGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(allowedCalendarSharingRolesWithUserGetResponse), - "value": n => { allowedCalendarSharingRolesWithUserGetResponse.value = n.getCollectionOfEnumValues(CalendarRoleType); }, - } -} -export function serializeAllowedCalendarSharingRolesWithUserGetResponse(writer: SerializationWriter, allowedCalendarSharingRolesWithUserGetResponse: AllowedCalendarSharingRolesWithUserGetResponse | undefined = {} as AllowedCalendarSharingRolesWithUserGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, allowedCalendarSharingRolesWithUserGetResponse) - if(allowedCalendarSharingRolesWithUserGetResponse.value) - writer.writeEnumValue("value", ...allowedCalendarSharingRolesWithUserGetResponse.value); -} -/** - * Provides operations to call the allowedCalendarSharingRoles method. - */ -export class AllowedCalendarSharingRolesWithUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AllowedCalendarSharingRolesWithUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - * @param User Usage: User='{User}' - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, user?: string | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/allowedCalendarSharingRoles(User='{User}'){?%24top,%24skip,%24search,%24filter,%24count}"); - this.pathParameters["User"] = user - }; - /** - * Invoke function allowedCalendarSharingRoles - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AllowedCalendarSharingRolesWithUserGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAllowedCalendarSharingRolesWithUserGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function allowedCalendarSharingRoles - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, allowedCalendarSharingRolesWithUserRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a allowedCalendarSharingRolesWithUserRequestBuilder - */ - public withUrl(rawUrl: string) : AllowedCalendarSharingRolesWithUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AllowedCalendarSharingRolesWithUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const allowedCalendarSharingRolesWithUserRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/allowedCalendarSharingRolesWithUser/index.ts b/src/me/calendars/item/allowedCalendarSharingRolesWithUser/index.ts deleted file mode 100644 index f0bce8f042c..00000000000 --- a/src/me/calendars/item/allowedCalendarSharingRolesWithUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './allowedCalendarSharingRolesWithUserRequestBuilder' diff --git a/src/me/calendars/item/calendarItemRequestBuilder.ts b/src/me/calendars/item/calendarItemRequestBuilder.ts deleted file mode 100644 index 0595106eba8..00000000000 --- a/src/me/calendars/item/calendarItemRequestBuilder.ts +++ /dev/null @@ -1,165 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarFromDiscriminatorValue, deserializeIntoCalendar, serializeCalendar, type Calendar } from '../../../models/calendar'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { AllowedCalendarSharingRolesWithUserRequestBuilder } from './allowedCalendarSharingRolesWithUser/allowedCalendarSharingRolesWithUserRequestBuilder'; -import { CalendarPermissionsRequestBuilder } from './calendarPermissions/calendarPermissionsRequestBuilder'; -import { CalendarViewRequestBuilder } from './calendarView/calendarViewRequestBuilder'; -import { EventsRequestBuilder } from './events/eventsRequestBuilder'; -import { GetScheduleRequestBuilder } from './getSchedule/getScheduleRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendars property of the microsoft.graph.user entity. - */ -export class CalendarItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ - public get calendarPermissions(): CalendarPermissionsRequestBuilder { - return new CalendarPermissionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ - public get calendarView(): CalendarViewRequestBuilder { - return new CalendarViewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ - public get events(): EventsRequestBuilder { - return new EventsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getSchedule method. - */ - public get getSchedule(): GetScheduleRequestBuilder { - return new GetScheduleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the allowedCalendarSharingRoles method. - * @param User Usage: User='{User}' - * @returns a allowedCalendarSharingRolesWithUserRequestBuilder - */ - public allowedCalendarSharingRolesWithUser(user: string | undefined) : AllowedCalendarSharingRolesWithUserRequestBuilder { - if(!user) throw new Error("user cannot be undefined"); - return new AllowedCalendarSharingRolesWithUserRequestBuilder(this.pathParameters, this.requestAdapter, user); - }; - /** - * Instantiates a new CalendarItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property calendars for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The user's calendars. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property calendars in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public patch(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property calendars for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The user's calendars. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property calendars in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Calendar, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendar); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CalendarItemRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarPermissions/calendarPermissionsRequestBuilder.ts b/src/me/calendars/item/calendarPermissions/calendarPermissionsRequestBuilder.ts deleted file mode 100644 index ed6168ba149..00000000000 --- a/src/me/calendars/item/calendarPermissions/calendarPermissionsRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CalendarPermissionCollectionResponse } from '../../../../models/'; -import { createCalendarPermissionFromDiscriminatorValue, deserializeIntoCalendarPermission, serializeCalendarPermission, type CalendarPermission } from '../../../../models/calendarPermission'; -import { createCalendarPermissionCollectionResponseFromDiscriminatorValue } from '../../../../models/calendarPermissionCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CalendarPermissionItemRequestBuilder } from './item/calendarPermissionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarPermissionsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ -export class CalendarPermissionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - * @param calendarPermissionId The unique identifier of calendarPermission - * @returns a CalendarPermissionItemRequestBuilder - */ - public byCalendarPermissionId(calendarPermissionId: string) : CalendarPermissionItemRequestBuilder { - if(!calendarPermissionId) throw new Error("calendarPermissionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["calendarPermission%2Did"] = calendarPermissionId - return new CalendarPermissionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarPermissionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarPermissions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermissionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-calendarpermissions?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendar-post-calendarpermissions?view=graph-rest-1.0|Find more info here} - */ - public post(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Get a collection of calendarPermission resources that describe the identity and roles of users with whom the specified calendar has been shared or delegated. Here, the calendar can be a user calendar or group calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarPermissionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a calendarPermission resource to specify the identity and role of the user with whom the specified calendar is being shared or delegated. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarPermission); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarPermissionsRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarPermissionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarPermissionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarPermissionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarPermissions/count/countRequestBuilder.ts b/src/me/calendars/item/calendarPermissions/count/countRequestBuilder.ts deleted file mode 100644 index cd107264aba..00000000000 --- a/src/me/calendars/item/calendarPermissions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarPermissions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarPermissions/count/index.ts b/src/me/calendars/item/calendarPermissions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarPermissions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarPermissions/index.ts b/src/me/calendars/item/calendarPermissions/index.ts deleted file mode 100644 index 2e7d7f77cd1..00000000000 --- a/src/me/calendars/item/calendarPermissions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarPermissionsRequestBuilder' diff --git a/src/me/calendars/item/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts b/src/me/calendars/item/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts deleted file mode 100644 index ce05de019f1..00000000000 --- a/src/me/calendars/item/calendarPermissions/item/calendarPermissionItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCalendarPermissionFromDiscriminatorValue, deserializeIntoCalendarPermission, serializeCalendarPermission, type CalendarPermission } from '../../../../../models/calendarPermission'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarPermissionItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendarPermissions property of the microsoft.graph.calendar entity. - */ -export class CalendarPermissionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarPermissionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarPermissions/{calendarPermission%2Did}{?%24select}"); - }; - /** - * Delete calendarPermission. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the specified permissions object of a user or group calendar that has been shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CalendarPermission - * @see {@link https://learn.microsoft.com/graph/api/calendarpermission-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarPermissionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete calendarPermission. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the specified permissions object of a user or group calendar that has been shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarPermissionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the permissions assigned to an existing share recipient or delegate, through the corresponding calendarPermission object for a calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: CalendarPermission, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCalendarPermission); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CalendarPermissionItemRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarPermissionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarPermissionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarPermissionItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarPermissions/item/index.ts b/src/me/calendars/item/calendarPermissions/item/index.ts deleted file mode 100644 index 57054f86b65..00000000000 --- a/src/me/calendars/item/calendarPermissions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarPermissionItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/calendarViewRequestBuilder.ts b/src/me/calendars/item/calendarView/calendarViewRequestBuilder.ts deleted file mode 100644 index f6790c37c91..00000000000 --- a/src/me/calendars/item/calendarView/calendarViewRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarViewRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ -export class CalendarViewRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CalendarViewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-calendarview?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarViewRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarViewRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarViewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarViewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarViewRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/count/countRequestBuilder.ts b/src/me/calendars/item/calendarView/count/countRequestBuilder.ts deleted file mode 100644 index e532dfaa413..00000000000 --- a/src/me/calendars/item/calendarView/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/count/index.ts b/src/me/calendars/item/calendarView/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarView/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarView/delta/deltaRequestBuilder.ts b/src/me/calendars/item/calendarView/delta/deltaRequestBuilder.ts deleted file mode 100644 index f568499e295..00000000000 --- a/src/me/calendars/item/calendarView/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/delta/index.ts b/src/me/calendars/item/calendarView/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendars/item/calendarView/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendars/item/calendarView/index.ts b/src/me/calendars/item/calendarView/index.ts deleted file mode 100644 index 35d65d26a01..00000000000 --- a/src/me/calendars/item/calendarView/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarViewRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/accept/acceptRequestBuilder.ts b/src/me/calendars/item/calendarView/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 8d39a1f6bb0..00000000000 --- a/src/me/calendars/item/calendarView/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/accept/index.ts b/src/me/calendars/item/calendarView/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendars/item/calendarView/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendars/item/calendarView/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 447717fd908..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/attachments/count/countRequestBuilder.ts b/src/me/calendars/item/calendarView/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index edb1a784213..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/attachments/count/index.ts b/src/me/calendars/item/calendarView/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendars/item/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 6497ff577df..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/attachments/createUploadSession/index.ts b/src/me/calendars/item/calendarView/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/attachments/index.ts b/src/me/calendars/item/calendarView/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendars/item/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 96ec70c8f52..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/attachments/item/index.ts b/src/me/calendars/item/calendarView/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendars/item/calendarView/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/calendar/calendarRequestBuilder.ts b/src/me/calendars/item/calendarView/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 309262919d1..00000000000 --- a/src/me/calendars/item/calendarView/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/calendar/index.ts b/src/me/calendars/item/calendarView/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendars/item/calendarView/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/cancel/cancelPostRequestBody.ts b/src/me/calendars/item/calendarView/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendars/item/calendarView/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/cancel/cancelRequestBuilder.ts b/src/me/calendars/item/calendarView/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 28f754b7848..00000000000 --- a/src/me/calendars/item/calendarView/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/cancel/index.ts b/src/me/calendars/item/calendarView/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendars/item/calendarView/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/decline/declineRequestBuilder.ts b/src/me/calendars/item/calendarView/item/decline/declineRequestBuilder.ts deleted file mode 100644 index edcbc2ad42e..00000000000 --- a/src/me/calendars/item/calendarView/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/decline/index.ts b/src/me/calendars/item/calendarView/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendars/item/calendarView/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendars/item/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 4e328c601ad..00000000000 --- a/src/me/calendars/item/calendarView/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/eventItemRequestBuilder.ts b/src/me/calendars/item/calendarView/item/eventItemRequestBuilder.ts deleted file mode 100644 index 3f5c0e41d3e..00000000000 --- a/src/me/calendars/item/calendarView/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the calendarView property of the microsoft.graph.calendar entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar view for the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/extensions/count/countRequestBuilder.ts b/src/me/calendars/item/calendarView/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index e3a6128bcc5..00000000000 --- a/src/me/calendars/item/calendarView/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/extensions/count/index.ts b/src/me/calendars/item/calendarView/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarView/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/extensions/extensionsRequestBuilder.ts b/src/me/calendars/item/calendarView/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 9cbe40cfd5f..00000000000 --- a/src/me/calendars/item/calendarView/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/extensions/index.ts b/src/me/calendars/item/calendarView/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendars/item/calendarView/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendars/item/calendarView/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index a340a0268ed..00000000000 --- a/src/me/calendars/item/calendarView/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/extensions/item/index.ts b/src/me/calendars/item/calendarView/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendars/item/calendarView/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/forward/forwardPostRequestBody.ts b/src/me/calendars/item/calendarView/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index c67b323605d..00000000000 --- a/src/me/calendars/item/calendarView/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/forward/forwardRequestBuilder.ts b/src/me/calendars/item/calendarView/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 3a0da68682c..00000000000 --- a/src/me/calendars/item/calendarView/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/forward/index.ts b/src/me/calendars/item/calendarView/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendars/item/calendarView/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/index.ts b/src/me/calendars/item/calendarView/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendars/item/calendarView/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/count/countRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index d46e25900c8..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/count/index.ts b/src/me/calendars/item/calendarView/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index 6c2a8045db9..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/delta/index.ts b/src/me/calendars/item/calendarView/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/index.ts b/src/me/calendars/item/calendarView/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/instancesRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index 07b81944f5d..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 6b59f9f34b1..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/accept/index.ts b/src/me/calendars/item/calendarView/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index e60753f6ad1..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 3075a20420a..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/count/index.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index f680ce36b92..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/index.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index a7183f47085..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/attachments/item/index.ts b/src/me/calendars/item/calendarView/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index c3cfba75733..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/calendar/index.ts b/src/me/calendars/item/calendarView/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendars/item/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 395fc3ac726..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/cancel/index.ts b/src/me/calendars/item/calendarView/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index b880f48b386..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/decline/index.ts b/src/me/calendars/item/calendarView/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index afff8416278..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index 43e2dbdfb37..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index aaae4705b8c..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/extensions/count/index.ts b/src/me/calendars/item/calendarView/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 81a2b741bf6..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/extensions/index.ts b/src/me/calendars/item/calendarView/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 8820eb27fe1..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/extensions/item/index.ts b/src/me/calendars/item/calendarView/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendars/item/calendarView/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 37dde22b05f..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index ff723a3f265..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/forward/index.ts b/src/me/calendars/item/calendarView/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/index.ts b/src/me/calendars/item/calendarView/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/snoozeReminder/index.ts b/src/me/calendars/item/calendarView/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index e123d45e517..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/instances/item/tentativelyAccept/index.ts b/src/me/calendars/item/calendarView/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendars/item/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index de43dc7d91a..00000000000 --- a/src/me/calendars/item/calendarView/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/snoozeReminder/index.ts b/src/me/calendars/item/calendarView/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendars/item/calendarView/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendars/item/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index adc0898d050..00000000000 --- a/src/me/calendars/item/calendarView/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/calendarView/item/tentativelyAccept/index.ts b/src/me/calendars/item/calendarView/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendars/item/calendarView/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendars/item/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendars/item/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 9decf71226c..00000000000 --- a/src/me/calendars/item/calendarView/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/calendarView/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/count/countRequestBuilder.ts b/src/me/calendars/item/events/count/countRequestBuilder.ts deleted file mode 100644 index 49b271bb445..00000000000 --- a/src/me/calendars/item/events/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/count/index.ts b/src/me/calendars/item/events/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/events/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/events/delta/deltaRequestBuilder.ts b/src/me/calendars/item/events/delta/deltaRequestBuilder.ts deleted file mode 100644 index 52c959be871..00000000000 --- a/src/me/calendars/item/events/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/delta/index.ts b/src/me/calendars/item/events/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendars/item/events/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendars/item/events/eventsRequestBuilder.ts b/src/me/calendars/item/events/eventsRequestBuilder.ts deleted file mode 100644 index c2464642a02..00000000000 --- a/src/me/calendars/item/events/eventsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../models/'; -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../../models/event'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ -export class EventsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new EventsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-list-events?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/calendar-post-events?view=graph-rest-1.0|Find more info here} - */ - public post(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new event in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a eventsRequestBuilder - */ - public withUrl(rawUrl: string) : EventsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/index.ts b/src/me/calendars/item/events/index.ts deleted file mode 100644 index 7a5c17c7c94..00000000000 --- a/src/me/calendars/item/events/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventsRequestBuilder' diff --git a/src/me/calendars/item/events/item/accept/acceptRequestBuilder.ts b/src/me/calendars/item/events/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 30e2fa8b1b1..00000000000 --- a/src/me/calendars/item/events/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/accept/index.ts b/src/me/calendars/item/events/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendars/item/events/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendars/item/events/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendars/item/events/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 9f282dd0a62..00000000000 --- a/src/me/calendars/item/events/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/attachments/count/countRequestBuilder.ts b/src/me/calendars/item/events/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index deb05faf2db..00000000000 --- a/src/me/calendars/item/events/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/attachments/count/index.ts b/src/me/calendars/item/events/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/events/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendars/item/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 679da2cad89..00000000000 --- a/src/me/calendars/item/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/attachments/createUploadSession/index.ts b/src/me/calendars/item/events/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendars/item/events/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendars/item/events/item/attachments/index.ts b/src/me/calendars/item/events/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendars/item/events/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendars/item/events/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendars/item/events/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 8396b881c92..00000000000 --- a/src/me/calendars/item/events/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/attachments/item/index.ts b/src/me/calendars/item/events/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendars/item/events/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendars/item/events/item/calendar/calendarRequestBuilder.ts b/src/me/calendars/item/events/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 49bcdb21580..00000000000 --- a/src/me/calendars/item/events/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/calendar/index.ts b/src/me/calendars/item/events/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendars/item/events/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendars/item/events/item/cancel/cancelPostRequestBody.ts b/src/me/calendars/item/events/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendars/item/events/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/cancel/cancelRequestBuilder.ts b/src/me/calendars/item/events/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 2d265d3d492..00000000000 --- a/src/me/calendars/item/events/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/cancel/index.ts b/src/me/calendars/item/events/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendars/item/events/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendars/item/events/item/decline/declineRequestBuilder.ts b/src/me/calendars/item/events/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 6fe89336a08..00000000000 --- a/src/me/calendars/item/events/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/decline/index.ts b/src/me/calendars/item/events/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendars/item/events/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendars/item/events/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendars/item/events/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index b3c38acf2e7..00000000000 --- a/src/me/calendars/item/events/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/eventItemRequestBuilder.ts b/src/me/calendars/item/events/item/eventItemRequestBuilder.ts deleted file mode 100644 index 54647e68676..00000000000 --- a/src/me/calendars/item/events/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,205 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the events property of the microsoft.graph.calendar entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property events for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The events in the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Update an event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/group-update-event?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property events for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The events in the calendar. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update an event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/extensions/count/countRequestBuilder.ts b/src/me/calendars/item/events/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index d840476c984..00000000000 --- a/src/me/calendars/item/events/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/extensions/count/index.ts b/src/me/calendars/item/events/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/events/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/events/item/extensions/extensionsRequestBuilder.ts b/src/me/calendars/item/events/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 9d1bd90c91f..00000000000 --- a/src/me/calendars/item/events/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/extensions/index.ts b/src/me/calendars/item/events/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendars/item/events/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendars/item/events/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendars/item/events/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 4ae7d71e55a..00000000000 --- a/src/me/calendars/item/events/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/extensions/item/index.ts b/src/me/calendars/item/events/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendars/item/events/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendars/item/events/item/forward/forwardPostRequestBody.ts b/src/me/calendars/item/events/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index c67b323605d..00000000000 --- a/src/me/calendars/item/events/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/forward/forwardRequestBuilder.ts b/src/me/calendars/item/events/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index ddcb66676c4..00000000000 --- a/src/me/calendars/item/events/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/forward/index.ts b/src/me/calendars/item/events/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendars/item/events/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendars/item/events/item/index.ts b/src/me/calendars/item/events/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendars/item/events/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/count/countRequestBuilder.ts b/src/me/calendars/item/events/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index 9a23b7ab2ec..00000000000 --- a/src/me/calendars/item/events/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/count/index.ts b/src/me/calendars/item/events/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/events/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/delta/deltaRequestBuilder.ts b/src/me/calendars/item/events/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index e4cc15c22fb..00000000000 --- a/src/me/calendars/item/events/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/delta/index.ts b/src/me/calendars/item/events/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/calendars/item/events/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/index.ts b/src/me/calendars/item/events/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/calendars/item/events/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/instancesRequestBuilder.ts b/src/me/calendars/item/events/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index ab519ef7ade..00000000000 --- a/src/me/calendars/item/events/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 476d680c949..00000000000 --- a/src/me/calendars/item/events/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/accept/index.ts b/src/me/calendars/item/events/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/calendars/item/events/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index c4b413e2c0e..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index da4ba919f2d..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/attachments/count/index.ts b/src/me/calendars/item/events/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index c9c07e9d545..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/attachments/createUploadSession/index.ts b/src/me/calendars/item/events/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/attachments/index.ts b/src/me/calendars/item/events/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index cc5c42ffe14..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/attachments/item/index.ts b/src/me/calendars/item/events/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/calendars/item/events/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 8dcb981b7de..00000000000 --- a/src/me/calendars/item/events/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/calendar/index.ts b/src/me/calendars/item/events/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/calendars/item/events/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/calendars/item/events/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/calendars/item/events/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 2b97a5f0ee1..00000000000 --- a/src/me/calendars/item/events/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/cancel/index.ts b/src/me/calendars/item/events/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/calendars/item/events/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/decline/declineRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 46ab3fd59f8..00000000000 --- a/src/me/calendars/item/events/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/decline/index.ts b/src/me/calendars/item/events/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/calendars/item/events/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 834df2d9bce..00000000000 --- a/src/me/calendars/item/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/eventItemRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index 0d1a745d06b..00000000000 --- a/src/me/calendars/item/events/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../../../models/event'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 1055ce1ca25..00000000000 --- a/src/me/calendars/item/events/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/extensions/count/index.ts b/src/me/calendars/item/events/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/calendars/item/events/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index d0f56e957cc..00000000000 --- a/src/me/calendars/item/events/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/extensions/index.ts b/src/me/calendars/item/events/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/calendars/item/events/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 78b7f55037a..00000000000 --- a/src/me/calendars/item/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/extensions/item/index.ts b/src/me/calendars/item/events/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/calendars/item/events/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/calendars/item/events/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 37dde22b05f..00000000000 --- a/src/me/calendars/item/events/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 16e74d6b473..00000000000 --- a/src/me/calendars/item/events/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/forward/index.ts b/src/me/calendars/item/events/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/calendars/item/events/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/index.ts b/src/me/calendars/item/events/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/calendars/item/events/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/snoozeReminder/index.ts b/src/me/calendars/item/events/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendars/item/events/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 28bdadc546a..00000000000 --- a/src/me/calendars/item/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/instances/item/tentativelyAccept/index.ts b/src/me/calendars/item/events/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendars/item/events/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendars/item/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendars/item/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 6c4fe265b27..00000000000 --- a/src/me/calendars/item/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/snoozeReminder/index.ts b/src/me/calendars/item/events/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/calendars/item/events/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/calendars/item/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/calendars/item/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index cd23e1e617b..00000000000 --- a/src/me/calendars/item/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/events/item/tentativelyAccept/index.ts b/src/me/calendars/item/events/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/calendars/item/events/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/calendars/item/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/calendars/item/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 45ec1f02f1f..00000000000 --- a/src/me/calendars/item/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/getSchedule/getSchedulePostResponse.ts b/src/me/calendars/item/getSchedule/getSchedulePostResponse.ts deleted file mode 100644 index 805879805a0..00000000000 --- a/src/me/calendars/item/getSchedule/getSchedulePostResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../models/baseCollectionPaginationCountResponse'; -import { createScheduleInformationFromDiscriminatorValue, serializeScheduleInformation, type ScheduleInformation } from '../../../../models/scheduleInformation'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetSchedulePostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetSchedulePostResponse; -} -export function deserializeIntoGetSchedulePostResponse(getSchedulePostResponse: GetSchedulePostResponse | undefined = {} as GetSchedulePostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getSchedulePostResponse), - "value": n => { getSchedulePostResponse.value = n.getCollectionOfObjectValues(createScheduleInformationFromDiscriminatorValue); }, - } -} -export interface GetSchedulePostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ScheduleInformation[]; -} -export function serializeGetSchedulePostResponse(writer: SerializationWriter, getSchedulePostResponse: GetSchedulePostResponse | undefined = {} as GetSchedulePostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getSchedulePostResponse) - writer.writeCollectionOfObjectValues("value", getSchedulePostResponse.value, serializeScheduleInformation); -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/getSchedule/getScheduleRequestBuilder.ts b/src/me/calendars/item/getSchedule/getScheduleRequestBuilder.ts deleted file mode 100644 index a22fafc1ff1..00000000000 --- a/src/me/calendars/item/getSchedule/getScheduleRequestBuilder.ts +++ /dev/null @@ -1,105 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createGetSchedulePostResponseFromDiscriminatorValue, deserializeIntoGetSchedulePostResponse, serializeGetSchedulePostResponse, type GetSchedulePostResponse } from './getSchedulePostResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetSchedulePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetSchedulePostRequestBody; -} -export function deserializeIntoGetSchedulePostRequestBody(getSchedulePostRequestBody: GetSchedulePostRequestBody | undefined = {} as GetSchedulePostRequestBody) : Record void> { - return { - "availabilityViewInterval": n => { getSchedulePostRequestBody.availabilityViewInterval = n.getNumberValue(); }, - "endTime": n => { getSchedulePostRequestBody.endTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - "schedules": n => { getSchedulePostRequestBody.schedules = n.getCollectionOfPrimitiveValues(); }, - "startTime": n => { getSchedulePostRequestBody.startTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export interface GetSchedulePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AvailabilityViewInterval property - */ - availabilityViewInterval?: number; - /** - * The EndTime property - */ - endTime?: DateTimeTimeZone; - /** - * The Schedules property - */ - schedules?: string[]; - /** - * The StartTime property - */ - startTime?: DateTimeTimeZone; -} -export function serializeGetSchedulePostRequestBody(writer: SerializationWriter, getSchedulePostRequestBody: GetSchedulePostRequestBody | undefined = {} as GetSchedulePostRequestBody) : void { - writer.writeNumberValue("AvailabilityViewInterval", getSchedulePostRequestBody.availabilityViewInterval); - writer.writeObjectValue("EndTime", getSchedulePostRequestBody.endTime, serializeDateTimeTimeZone); - writer.writeCollectionOfPrimitiveValues("Schedules", getSchedulePostRequestBody.schedules); - writer.writeObjectValue("StartTime", getSchedulePostRequestBody.startTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(getSchedulePostRequestBody.additionalData); -} -/** - * Provides operations to call the getSchedule method. - */ -export class GetScheduleRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetScheduleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/calendars/{calendar%2Did}/getSchedule"); - }; - /** - * Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetSchedulePostResponse - * @see {@link https://learn.microsoft.com/graph/api/calendar-getschedule?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetSchedulePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetSchedulePostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetSchedulePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetSchedulePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getScheduleRequestBuilder - */ - public withUrl(rawUrl: string) : GetScheduleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetScheduleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/calendars/item/getSchedule/index.ts b/src/me/calendars/item/getSchedule/index.ts deleted file mode 100644 index 8cee025f3ef..00000000000 --- a/src/me/calendars/item/getSchedule/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getSchedulePostResponse' -export * from './getScheduleRequestBuilder' diff --git a/src/me/calendars/item/index.ts b/src/me/calendars/item/index.ts deleted file mode 100644 index f3e5ccdabd6..00000000000 --- a/src/me/calendars/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarItemRequestBuilder' diff --git a/src/me/changePassword/changePasswordRequestBuilder.ts b/src/me/changePassword/changePasswordRequestBuilder.ts deleted file mode 100644 index 225207b2f1d..00000000000 --- a/src/me/changePassword/changePasswordRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface ChangePasswordPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The currentPassword property - */ - currentPassword?: string; - /** - * The newPassword property - */ - newPassword?: string; -} -export function createChangePasswordPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoChangePasswordPostRequestBody; -} -export function deserializeIntoChangePasswordPostRequestBody(changePasswordPostRequestBody: ChangePasswordPostRequestBody | undefined = {} as ChangePasswordPostRequestBody) : Record void> { - return { - "currentPassword": n => { changePasswordPostRequestBody.currentPassword = n.getStringValue(); }, - "newPassword": n => { changePasswordPostRequestBody.newPassword = n.getStringValue(); }, - } -} -export function serializeChangePasswordPostRequestBody(writer: SerializationWriter, changePasswordPostRequestBody: ChangePasswordPostRequestBody | undefined = {} as ChangePasswordPostRequestBody) : void { - writer.writeStringValue("currentPassword", changePasswordPostRequestBody.currentPassword); - writer.writeStringValue("newPassword", changePasswordPostRequestBody.newPassword); - writer.writeAdditionalData(changePasswordPostRequestBody.additionalData); -} -/** - * Provides operations to call the changePassword method. - */ -export class ChangePasswordRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ChangePasswordRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/changePassword"); - }; - /** - * Enable the user to update their password. Any user can update their password without belonging to any administrator role. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-changepassword?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChangePasswordPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Enable the user to update their password. Any user can update their password without belonging to any administrator role. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChangePasswordPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChangePasswordPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a changePasswordRequestBuilder - */ - public withUrl(rawUrl: string) : ChangePasswordRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChangePasswordRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/changePassword/index.ts b/src/me/changePassword/index.ts deleted file mode 100644 index 58003814fae..00000000000 --- a/src/me/changePassword/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './changePasswordRequestBuilder' diff --git a/src/me/chats/chatsRequestBuilder.ts b/src/me/chats/chatsRequestBuilder.ts deleted file mode 100644 index 3fb97fc83dd..00000000000 --- a/src/me/chats/chatsRequestBuilder.ts +++ /dev/null @@ -1,161 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatCollectionResponse } from '../../models/'; -import { createChatFromDiscriminatorValue, deserializeIntoChat, serializeChat, type Chat } from '../../models/chat'; -import { createChatCollectionResponseFromDiscriminatorValue } from '../../models/chatCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GetAllMessagesRequestBuilder } from './getAllMessages/getAllMessagesRequestBuilder'; -import { ChatItemRequestBuilder } from './item/chatItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the chats property of the microsoft.graph.user entity. - */ -export class ChatsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getAllMessages method. - */ - public get getAllMessages(): GetAllMessagesRequestBuilder { - return new GetAllMessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the chats property of the microsoft.graph.user entity. - * @param chatId The unique identifier of chat - * @returns a ChatItemRequestBuilder - */ - public byChatId(chatId: string) : ChatItemRequestBuilder { - if(!chatId) throw new Error("chatId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chat%2Did"] = chatId - return new ChatItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ChatsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chat-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to chats for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Chat - */ - public post(body: Chat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to chats for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Chat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a chatsRequestBuilder - */ - public withUrl(rawUrl: string) : ChatsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/count/countRequestBuilder.ts b/src/me/chats/count/countRequestBuilder.ts deleted file mode 100644 index 4246fdf88ec..00000000000 --- a/src/me/chats/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/count/index.ts b/src/me/chats/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/getAllMessages/getAllMessagesRequestBuilder.ts b/src/me/chats/getAllMessages/getAllMessagesRequestBuilder.ts deleted file mode 100644 index 6f7f2375ac1..00000000000 --- a/src/me/chats/getAllMessages/getAllMessagesRequestBuilder.ts +++ /dev/null @@ -1,122 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../models/chatMessage'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetAllMessagesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetAllMessagesGetResponse; -} -export function deserializeIntoGetAllMessagesGetResponse(getAllMessagesGetResponse: GetAllMessagesGetResponse | undefined = {} as GetAllMessagesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getAllMessagesGetResponse), - "value": n => { getAllMessagesGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export interface GetAllMessagesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface GetAllMessagesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * The payment model for the API - */ - model?: 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; -} -export function serializeGetAllMessagesGetResponse(writer: SerializationWriter, getAllMessagesGetResponse: GetAllMessagesGetResponse | undefined = {} as GetAllMessagesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getAllMessagesGetResponse) - writer.writeCollectionOfObjectValues("value", getAllMessagesGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the getAllMessages method. - */ -export class GetAllMessagesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetAllMessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function getAllMessages - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetAllMessagesGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetAllMessagesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function getAllMessages - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getAllMessagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getAllMessagesRequestBuilder - */ - public withUrl(rawUrl: string) : GetAllMessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetAllMessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getAllMessagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/getAllMessages/index.ts b/src/me/chats/getAllMessages/index.ts deleted file mode 100644 index 0fca0680ecb..00000000000 --- a/src/me/chats/getAllMessages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getAllMessagesRequestBuilder' diff --git a/src/me/chats/index.ts b/src/me/chats/index.ts deleted file mode 100644 index 4a81790ecf1..00000000000 --- a/src/me/chats/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatsRequestBuilder' diff --git a/src/me/chats/item/chatItemRequestBuilder.ts b/src/me/chats/item/chatItemRequestBuilder.ts deleted file mode 100644 index 0a79260b295..00000000000 --- a/src/me/chats/item/chatItemRequestBuilder.ts +++ /dev/null @@ -1,212 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatFromDiscriminatorValue, deserializeIntoChat, serializeChat, type Chat } from '../../../models/chat'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { HideForUserRequestBuilder } from './hideForUser/hideForUserRequestBuilder'; -import { InstalledAppsRequestBuilder } from './installedApps/installedAppsRequestBuilder'; -import { LastMessagePreviewRequestBuilder } from './lastMessagePreview/lastMessagePreviewRequestBuilder'; -import { MarkChatReadForUserRequestBuilder } from './markChatReadForUser/markChatReadForUserRequestBuilder'; -import { MarkChatUnreadForUserRequestBuilder } from './markChatUnreadForUser/markChatUnreadForUserRequestBuilder'; -import { MembersRequestBuilder } from './members/membersRequestBuilder'; -import { MessagesRequestBuilder } from './messages/messagesRequestBuilder'; -import { PermissionGrantsRequestBuilder } from './permissionGrants/permissionGrantsRequestBuilder'; -import { PinnedMessagesRequestBuilder } from './pinnedMessages/pinnedMessagesRequestBuilder'; -import { SendActivityNotificationRequestBuilder } from './sendActivityNotification/sendActivityNotificationRequestBuilder'; -import { TabsRequestBuilder } from './tabs/tabsRequestBuilder'; -import { UnhideForUserRequestBuilder } from './unhideForUser/unhideForUserRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the chats property of the microsoft.graph.user entity. - */ -export class ChatItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the hideForUser method. - */ - public get hideForUser(): HideForUserRequestBuilder { - return new HideForUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the installedApps property of the microsoft.graph.chat entity. - */ - public get installedApps(): InstalledAppsRequestBuilder { - return new InstalledAppsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the lastMessagePreview property of the microsoft.graph.chat entity. - */ - public get lastMessagePreview(): LastMessagePreviewRequestBuilder { - return new LastMessagePreviewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the markChatReadForUser method. - */ - public get markChatReadForUser(): MarkChatReadForUserRequestBuilder { - return new MarkChatReadForUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the markChatUnreadForUser method. - */ - public get markChatUnreadForUser(): MarkChatUnreadForUserRequestBuilder { - return new MarkChatUnreadForUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.chat entity. - */ - public get members(): MembersRequestBuilder { - return new MembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.chat entity. - */ - public get messages(): MessagesRequestBuilder { - return new MessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity. - */ - public get permissionGrants(): PermissionGrantsRequestBuilder { - return new PermissionGrantsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity. - */ - public get pinnedMessages(): PinnedMessagesRequestBuilder { - return new PinnedMessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the sendActivityNotification method. - */ - public get sendActivityNotification(): SendActivityNotificationRequestBuilder { - return new SendActivityNotificationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tabs property of the microsoft.graph.chat entity. - */ - public get tabs(): TabsRequestBuilder { - return new TabsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unhideForUser method. - */ - public get unhideForUser(): UnhideForUserRequestBuilder { - return new UnhideForUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property chats for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Chat - * @see {@link https://learn.microsoft.com/graph/api/chat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property chats in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Chat - */ - public patch(body: Chat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property chats for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property chats in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Chat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/hideForUser/hideForUserPostRequestBody.ts b/src/me/chats/item/hideForUser/hideForUserPostRequestBody.ts deleted file mode 100644 index bebac5623fb..00000000000 --- a/src/me/chats/item/hideForUser/hideForUserPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createTeamworkUserIdentityFromDiscriminatorValue, serializeTeamworkUserIdentity, type TeamworkUserIdentity } from '../../../../models/teamworkUserIdentity'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createHideForUserPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoHideForUserPostRequestBody; -} -export function deserializeIntoHideForUserPostRequestBody(hideForUserPostRequestBody: HideForUserPostRequestBody | undefined = {} as HideForUserPostRequestBody) : Record void> { - return { - "user": n => { hideForUserPostRequestBody.user = n.getObjectValue(createTeamworkUserIdentityFromDiscriminatorValue); }, - } -} -export interface HideForUserPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The user property - */ - user?: TeamworkUserIdentity; -} -export function serializeHideForUserPostRequestBody(writer: SerializationWriter, hideForUserPostRequestBody: HideForUserPostRequestBody | undefined = {} as HideForUserPostRequestBody) : void { - writer.writeObjectValue("user", hideForUserPostRequestBody.user, serializeTeamworkUserIdentity); - writer.writeAdditionalData(hideForUserPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/hideForUser/hideForUserRequestBuilder.ts b/src/me/chats/item/hideForUser/hideForUserRequestBuilder.ts deleted file mode 100644 index 0f4e48a204e..00000000000 --- a/src/me/chats/item/hideForUser/hideForUserRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoHideForUserPostRequestBody, serializeHideForUserPostRequestBody, type HideForUserPostRequestBody } from './hideForUserPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the hideForUser method. - */ -export class HideForUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new HideForUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/hideForUser"); - }; - /** - * Hide a chat for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-hideforuser?view=graph-rest-1.0|Find more info here} - */ - public post(body: HideForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Hide a chat for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: HideForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeHideForUserPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hideForUserRequestBuilder - */ - public withUrl(rawUrl: string) : HideForUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HideForUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/hideForUser/index.ts b/src/me/chats/item/hideForUser/index.ts deleted file mode 100644 index df1fd0159ab..00000000000 --- a/src/me/chats/item/hideForUser/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './hideForUserPostRequestBody' -export * from './hideForUserRequestBuilder' diff --git a/src/me/chats/item/index.ts b/src/me/chats/item/index.ts deleted file mode 100644 index aee4ff14c84..00000000000 --- a/src/me/chats/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatItemRequestBuilder' diff --git a/src/me/chats/item/installedApps/count/countRequestBuilder.ts b/src/me/chats/item/installedApps/count/countRequestBuilder.ts deleted file mode 100644 index 87099399b25..00000000000 --- a/src/me/chats/item/installedApps/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/installedApps/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/installedApps/count/index.ts b/src/me/chats/item/installedApps/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/installedApps/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/installedApps/index.ts b/src/me/chats/item/installedApps/index.ts deleted file mode 100644 index 230c18a7fbe..00000000000 --- a/src/me/chats/item/installedApps/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './installedAppsRequestBuilder' diff --git a/src/me/chats/item/installedApps/installedAppsRequestBuilder.ts b/src/me/chats/item/installedApps/installedAppsRequestBuilder.ts deleted file mode 100644 index f955fef4553..00000000000 --- a/src/me/chats/item/installedApps/installedAppsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsAppInstallationCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamsAppInstallationFromDiscriminatorValue, deserializeIntoTeamsAppInstallation, serializeTeamsAppInstallation, type TeamsAppInstallation } from '../../../../models/teamsAppInstallation'; -import { createTeamsAppInstallationCollectionResponseFromDiscriminatorValue } from '../../../../models/teamsAppInstallationCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamsAppInstallationItemRequestBuilder } from './item/teamsAppInstallationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstalledAppsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the installedApps property of the microsoft.graph.chat entity. - */ -export class InstalledAppsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the installedApps property of the microsoft.graph.chat entity. - * @param teamsAppInstallationId The unique identifier of teamsAppInstallation - * @returns a TeamsAppInstallationItemRequestBuilder - */ - public byTeamsAppInstallationId(teamsAppInstallationId: string) : TeamsAppInstallationItemRequestBuilder { - if(!teamsAppInstallationId) throw new Error("teamsAppInstallationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamsAppInstallation%2Did"] = teamsAppInstallationId - return new TeamsAppInstallationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstalledAppsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/installedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all app installations within a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallationCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chat-list-installedapps?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Install a teamsApp to the specified chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallation - * @see {@link https://learn.microsoft.com/graph/api/chat-post-installedapps?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * List all app installations within a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, installedAppsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Install a teamsApp to the specified chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsAppInstallation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a installedAppsRequestBuilder - */ - public withUrl(rawUrl: string) : InstalledAppsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstalledAppsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const installedAppsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/installedApps/item/index.ts b/src/me/chats/item/installedApps/item/index.ts deleted file mode 100644 index 68b282ab515..00000000000 --- a/src/me/chats/item/installedApps/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppInstallationItemRequestBuilder' diff --git a/src/me/chats/item/installedApps/item/teamsApp/index.ts b/src/me/chats/item/installedApps/item/teamsApp/index.ts deleted file mode 100644 index 0e775e3b0c3..00000000000 --- a/src/me/chats/item/installedApps/item/teamsApp/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppRequestBuilder' diff --git a/src/me/chats/item/installedApps/item/teamsApp/teamsAppRequestBuilder.ts b/src/me/chats/item/installedApps/item/teamsApp/teamsAppRequestBuilder.ts deleted file mode 100644 index d6dfd1e5144..00000000000 --- a/src/me/chats/item/installedApps/item/teamsApp/teamsAppRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsApp } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppFromDiscriminatorValue } from '../../../../../../models/teamsApp'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. - */ -export class TeamsAppRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}"); - }; - /** - * The app that is installed. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsApp - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppFromDiscriminatorValue, errorMapping); - }; - /** - * The app that is installed. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/installedApps/item/teamsAppDefinition/index.ts b/src/me/chats/item/installedApps/item/teamsAppDefinition/index.ts deleted file mode 100644 index e9981aa7a58..00000000000 --- a/src/me/chats/item/installedApps/item/teamsAppDefinition/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppDefinitionRequestBuilder' diff --git a/src/me/chats/item/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts b/src/me/chats/item/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts deleted file mode 100644 index 8e3db0f0dde..00000000000 --- a/src/me/chats/item/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsAppDefinition } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppDefinitionFromDiscriminatorValue } from '../../../../../../models/teamsAppDefinition'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppDefinitionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. - */ -export class TeamsAppDefinitionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}"); - }; - /** - * The details of this version of the app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppDefinition - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppDefinitionFromDiscriminatorValue, errorMapping); - }; - /** - * The details of this version of the app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppDefinitionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppDefinitionRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppDefinitionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppDefinitionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppDefinitionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/installedApps/item/teamsAppInstallationItemRequestBuilder.ts b/src/me/chats/item/installedApps/item/teamsAppInstallationItemRequestBuilder.ts deleted file mode 100644 index b89f789d17b..00000000000 --- a/src/me/chats/item/installedApps/item/teamsAppInstallationItemRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppInstallationFromDiscriminatorValue, deserializeIntoTeamsAppInstallation, serializeTeamsAppInstallation, type TeamsAppInstallation } from '../../../../../models/teamsAppInstallation'; -import { TeamsAppRequestBuilder } from './teamsApp/teamsAppRequestBuilder'; -import { TeamsAppDefinitionRequestBuilder } from './teamsAppDefinition/teamsAppDefinitionRequestBuilder'; -import { UpgradeRequestBuilder } from './upgrade/upgradeRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppInstallationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the installedApps property of the microsoft.graph.chat entity. - */ -export class TeamsAppInstallationItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. - */ - public get teamsApp(): TeamsAppRequestBuilder { - return new TeamsAppRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. - */ - public get teamsAppDefinition(): TeamsAppDefinitionRequestBuilder { - return new TeamsAppDefinitionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the upgrade method. - */ - public get upgrade(): UpgradeRequestBuilder { - return new UpgradeRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamsAppInstallationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}{?%24select,%24expand}"); - }; - /** - * Uninstall an app installed within a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-delete-installedapps?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an app installed in a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallation - * @see {@link https://learn.microsoft.com/graph/api/chat-get-installedapps?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property installedApps in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallation - */ - public patch(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Uninstall an app installed within a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an app installed in a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppInstallationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property installedApps in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsAppInstallation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamsAppInstallationItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppInstallationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppInstallationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppInstallationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/installedApps/item/upgrade/index.ts b/src/me/chats/item/installedApps/item/upgrade/index.ts deleted file mode 100644 index e5925ea0c0a..00000000000 --- a/src/me/chats/item/installedApps/item/upgrade/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './upgradePostRequestBody' -export * from './upgradeRequestBuilder' diff --git a/src/me/chats/item/installedApps/item/upgrade/upgradePostRequestBody.ts b/src/me/chats/item/installedApps/item/upgrade/upgradePostRequestBody.ts deleted file mode 100644 index c7bcfddd556..00000000000 --- a/src/me/chats/item/installedApps/item/upgrade/upgradePostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createTeamsAppPermissionSetFromDiscriminatorValue, serializeTeamsAppPermissionSet, type TeamsAppPermissionSet } from '../../../../../../models/teamsAppPermissionSet'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUpgradePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUpgradePostRequestBody; -} -export function deserializeIntoUpgradePostRequestBody(upgradePostRequestBody: UpgradePostRequestBody | undefined = {} as UpgradePostRequestBody) : Record void> { - return { - "consentedPermissionSet": n => { upgradePostRequestBody.consentedPermissionSet = n.getObjectValue(createTeamsAppPermissionSetFromDiscriminatorValue); }, - } -} -export function serializeUpgradePostRequestBody(writer: SerializationWriter, upgradePostRequestBody: UpgradePostRequestBody | undefined = {} as UpgradePostRequestBody) : void { - writer.writeObjectValue("consentedPermissionSet", upgradePostRequestBody.consentedPermissionSet, serializeTeamsAppPermissionSet); - writer.writeAdditionalData(upgradePostRequestBody.additionalData); -} -export interface UpgradePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The consentedPermissionSet property - */ - consentedPermissionSet?: TeamsAppPermissionSet; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/installedApps/item/upgrade/upgradeRequestBuilder.ts b/src/me/chats/item/installedApps/item/upgrade/upgradeRequestBuilder.ts deleted file mode 100644 index 7a8fc61ffb7..00000000000 --- a/src/me/chats/item/installedApps/item/upgrade/upgradeRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUpgradePostRequestBody, serializeUpgradePostRequestBody, type UpgradePostRequestBody } from './upgradePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the upgrade method. - */ -export class UpgradeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UpgradeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/upgrade"); - }; - /** - * Upgrade an app installation within a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-teamsappinstallation-upgrade?view=graph-rest-1.0|Find more info here} - */ - public post(body: UpgradePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Upgrade an app installation within a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UpgradePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUpgradePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a upgradeRequestBuilder - */ - public withUrl(rawUrl: string) : UpgradeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UpgradeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/lastMessagePreview/index.ts b/src/me/chats/item/lastMessagePreview/index.ts deleted file mode 100644 index d6fac8e5e1a..00000000000 --- a/src/me/chats/item/lastMessagePreview/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lastMessagePreviewRequestBuilder' diff --git a/src/me/chats/item/lastMessagePreview/lastMessagePreviewRequestBuilder.ts b/src/me/chats/item/lastMessagePreview/lastMessagePreviewRequestBuilder.ts deleted file mode 100644 index 54038ffdc4c..00000000000 --- a/src/me/chats/item/lastMessagePreview/lastMessagePreviewRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageInfoFromDiscriminatorValue, deserializeIntoChatMessageInfo, serializeChatMessageInfo, type ChatMessageInfo } from '../../../../models/chatMessageInfo'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LastMessagePreviewRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the lastMessagePreview property of the microsoft.graph.chat entity. - */ -export class LastMessagePreviewRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LastMessagePreviewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/lastMessagePreview{?%24select,%24expand}"); - }; - /** - * Delete navigation property lastMessagePreview for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageInfo - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property lastMessagePreview in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageInfo - */ - public patch(body: ChatMessageInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property lastMessagePreview for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, lastMessagePreviewRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property lastMessagePreview in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a lastMessagePreviewRequestBuilder - */ - public withUrl(rawUrl: string) : LastMessagePreviewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LastMessagePreviewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const lastMessagePreviewRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/markChatReadForUser/index.ts b/src/me/chats/item/markChatReadForUser/index.ts deleted file mode 100644 index d018580a0a5..00000000000 --- a/src/me/chats/item/markChatReadForUser/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './markChatReadForUserPostRequestBody' -export * from './markChatReadForUserRequestBuilder' diff --git a/src/me/chats/item/markChatReadForUser/markChatReadForUserPostRequestBody.ts b/src/me/chats/item/markChatReadForUser/markChatReadForUserPostRequestBody.ts deleted file mode 100644 index 535707ab066..00000000000 --- a/src/me/chats/item/markChatReadForUser/markChatReadForUserPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createTeamworkUserIdentityFromDiscriminatorValue, serializeTeamworkUserIdentity, type TeamworkUserIdentity } from '../../../../models/teamworkUserIdentity'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMarkChatReadForUserPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMarkChatReadForUserPostRequestBody; -} -export function deserializeIntoMarkChatReadForUserPostRequestBody(markChatReadForUserPostRequestBody: MarkChatReadForUserPostRequestBody | undefined = {} as MarkChatReadForUserPostRequestBody) : Record void> { - return { - "user": n => { markChatReadForUserPostRequestBody.user = n.getObjectValue(createTeamworkUserIdentityFromDiscriminatorValue); }, - } -} -export interface MarkChatReadForUserPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The user property - */ - user?: TeamworkUserIdentity; -} -export function serializeMarkChatReadForUserPostRequestBody(writer: SerializationWriter, markChatReadForUserPostRequestBody: MarkChatReadForUserPostRequestBody | undefined = {} as MarkChatReadForUserPostRequestBody) : void { - writer.writeObjectValue("user", markChatReadForUserPostRequestBody.user, serializeTeamworkUserIdentity); - writer.writeAdditionalData(markChatReadForUserPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/markChatReadForUser/markChatReadForUserRequestBuilder.ts b/src/me/chats/item/markChatReadForUser/markChatReadForUserRequestBuilder.ts deleted file mode 100644 index a6e9c07b57a..00000000000 --- a/src/me/chats/item/markChatReadForUser/markChatReadForUserRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoMarkChatReadForUserPostRequestBody, serializeMarkChatReadForUserPostRequestBody, type MarkChatReadForUserPostRequestBody } from './markChatReadForUserPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the markChatReadForUser method. - */ -export class MarkChatReadForUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MarkChatReadForUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/markChatReadForUser"); - }; - /** - * Mark a chat as read for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-markchatreadforuser?view=graph-rest-1.0|Find more info here} - */ - public post(body: MarkChatReadForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Mark a chat as read for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MarkChatReadForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMarkChatReadForUserPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a markChatReadForUserRequestBuilder - */ - public withUrl(rawUrl: string) : MarkChatReadForUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MarkChatReadForUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/markChatUnreadForUser/index.ts b/src/me/chats/item/markChatUnreadForUser/index.ts deleted file mode 100644 index f6d8303b752..00000000000 --- a/src/me/chats/item/markChatUnreadForUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './markChatUnreadForUserRequestBuilder' diff --git a/src/me/chats/item/markChatUnreadForUser/markChatUnreadForUserRequestBuilder.ts b/src/me/chats/item/markChatUnreadForUser/markChatUnreadForUserRequestBuilder.ts deleted file mode 100644 index a045e57ed2c..00000000000 --- a/src/me/chats/item/markChatUnreadForUser/markChatUnreadForUserRequestBuilder.ts +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamworkUserIdentityFromDiscriminatorValue, serializeTeamworkUserIdentity, type TeamworkUserIdentity } from '../../../../models/teamworkUserIdentity'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMarkChatUnreadForUserPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMarkChatUnreadForUserPostRequestBody; -} -export function deserializeIntoMarkChatUnreadForUserPostRequestBody(markChatUnreadForUserPostRequestBody: MarkChatUnreadForUserPostRequestBody | undefined = {} as MarkChatUnreadForUserPostRequestBody) : Record void> { - return { - "lastMessageReadDateTime": n => { markChatUnreadForUserPostRequestBody.lastMessageReadDateTime = n.getDateValue(); }, - "user": n => { markChatUnreadForUserPostRequestBody.user = n.getObjectValue(createTeamworkUserIdentityFromDiscriminatorValue); }, - } -} -export interface MarkChatUnreadForUserPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The lastMessageReadDateTime property - */ - lastMessageReadDateTime?: Date; - /** - * The user property - */ - user?: TeamworkUserIdentity; -} -export function serializeMarkChatUnreadForUserPostRequestBody(writer: SerializationWriter, markChatUnreadForUserPostRequestBody: MarkChatUnreadForUserPostRequestBody | undefined = {} as MarkChatUnreadForUserPostRequestBody) : void { - writer.writeDateValue("lastMessageReadDateTime", markChatUnreadForUserPostRequestBody.lastMessageReadDateTime); - writer.writeObjectValue("user", markChatUnreadForUserPostRequestBody.user, serializeTeamworkUserIdentity); - writer.writeAdditionalData(markChatUnreadForUserPostRequestBody.additionalData); -} -/** - * Provides operations to call the markChatUnreadForUser method. - */ -export class MarkChatUnreadForUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MarkChatUnreadForUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/markChatUnreadForUser"); - }; - /** - * Mark a chat as unread for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-markchatunreadforuser?view=graph-rest-1.0|Find more info here} - */ - public post(body: MarkChatUnreadForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Mark a chat as unread for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MarkChatUnreadForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMarkChatUnreadForUserPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a markChatUnreadForUserRequestBuilder - */ - public withUrl(rawUrl: string) : MarkChatUnreadForUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MarkChatUnreadForUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/members/add/addRequestBuilder.ts b/src/me/chats/item/members/add/addRequestBuilder.ts deleted file mode 100644 index 1412d7f436e..00000000000 --- a/src/me/chats/item/members/add/addRequestBuilder.ts +++ /dev/null @@ -1,108 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createActionResultPartFromDiscriminatorValue, serializeActionResultPart, type ActionResultPart } from '../../../../../models/actionResultPart'; -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../models/baseCollectionPaginationCountResponse'; -import { createConversationMemberFromDiscriminatorValue, serializeConversationMember, type ConversationMember } from '../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AddPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The values property - */ - values?: ConversationMember[]; -} -export interface AddPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ActionResultPart[]; -} -export function createAddPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostRequestBody; -} -export function createAddPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostResponse; -} -export function deserializeIntoAddPostRequestBody(addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : Record void> { - return { - "values": n => { addPostRequestBody.values = n.getCollectionOfObjectValues(createConversationMemberFromDiscriminatorValue); }, - } -} -export function deserializeIntoAddPostResponse(addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(addPostResponse), - "value": n => { addPostResponse.value = n.getCollectionOfObjectValues(createActionResultPartFromDiscriminatorValue); }, - } -} -export function serializeAddPostRequestBody(writer: SerializationWriter, addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : void { - writer.writeCollectionOfObjectValues("values", addPostRequestBody.values, serializeConversationMember); - writer.writeAdditionalData(addPostRequestBody.additionalData); -} -export function serializeAddPostResponse(writer: SerializationWriter, addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, addPostResponse) - writer.writeCollectionOfObjectValues("value", addPostResponse.value, serializeActionResultPart); -} -/** - * Provides operations to call the add method. - */ -export class AddRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AddRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/members/add"); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AddPostResponse - * @see {@link https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0|Find more info here} - */ - public post(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAddPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAddPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a addRequestBuilder - */ - public withUrl(rawUrl: string) : AddRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AddRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/members/add/index.ts b/src/me/chats/item/members/add/index.ts deleted file mode 100644 index 438ff809197..00000000000 --- a/src/me/chats/item/members/add/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './addRequestBuilder' diff --git a/src/me/chats/item/members/count/countRequestBuilder.ts b/src/me/chats/item/members/count/countRequestBuilder.ts deleted file mode 100644 index a19c86c1989..00000000000 --- a/src/me/chats/item/members/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/members/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/members/count/index.ts b/src/me/chats/item/members/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/members/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/members/index.ts b/src/me/chats/item/members/index.ts deleted file mode 100644 index 3f3fccb5478..00000000000 --- a/src/me/chats/item/members/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './membersRequestBuilder' diff --git a/src/me/chats/item/members/item/conversationMemberItemRequestBuilder.ts b/src/me/chats/item/members/item/conversationMemberItemRequestBuilder.ts deleted file mode 100644 index 244cd5b7d29..00000000000 --- a/src/me/chats/item/members/item/conversationMemberItemRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ConversationMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the members property of the microsoft.graph.chat entity. - */ -export class ConversationMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ConversationMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/members/{conversationMember%2Did}{?%24select,%24expand}"); - }; - /** - * Remove a conversationMember from a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-delete-members?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a conversationMember from a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property members in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - */ - public patch(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Remove a conversationMember from a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a conversationMember from a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, conversationMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property members in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ConversationMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : ConversationMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ConversationMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const conversationMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/members/item/index.ts b/src/me/chats/item/members/item/index.ts deleted file mode 100644 index f1ff703d6b4..00000000000 --- a/src/me/chats/item/members/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './conversationMemberItemRequestBuilder' diff --git a/src/me/chats/item/members/membersRequestBuilder.ts b/src/me/chats/item/members/membersRequestBuilder.ts deleted file mode 100644 index 7b85f900c08..00000000000 --- a/src/me/chats/item/members/membersRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMemberCollectionResponse } from '../../../../models/'; -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../models/conversationMember'; -import { createConversationMemberCollectionResponseFromDiscriminatorValue } from '../../../../models/conversationMemberCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { AddRequestBuilder } from './add/addRequestBuilder'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ConversationMemberItemRequestBuilder } from './item/conversationMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the members property of the microsoft.graph.chat entity. - */ -export class MembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the add method. - */ - public get add(): AddRequestBuilder { - return new AddRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.chat entity. - * @param conversationMemberId The unique identifier of conversationMember - * @returns a ConversationMemberItemRequestBuilder - */ - public byConversationMemberId(conversationMemberId: string) : ConversationMemberItemRequestBuilder { - if(!conversationMemberId) throw new Error("conversationMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["conversationMember%2Did"] = conversationMemberId - return new ConversationMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all conversation members in a chat or channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/conversationmember-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a conversationMember to a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/chat-post-members?view=graph-rest-1.0|Find more info here} - */ - public post(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * List all conversation members in a chat or channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, membersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a conversationMember to a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a membersRequestBuilder - */ - public withUrl(rawUrl: string) : MembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const membersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/count/countRequestBuilder.ts b/src/me/chats/item/messages/count/countRequestBuilder.ts deleted file mode 100644 index 12dda001c57..00000000000 --- a/src/me/chats/item/messages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/count/index.ts b/src/me/chats/item/messages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/messages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/messages/delta/deltaRequestBuilder.ts b/src/me/chats/item/messages/delta/deltaRequestBuilder.ts deleted file mode 100644 index a5ad4bea801..00000000000 --- a/src/me/chats/item/messages/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/delta/index.ts b/src/me/chats/item/messages/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/chats/item/messages/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/chats/item/messages/index.ts b/src/me/chats/item/messages/index.ts deleted file mode 100644 index 9f6fd0b319b..00000000000 --- a/src/me/chats/item/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messagesRequestBuilder' diff --git a/src/me/chats/item/messages/item/chatMessageItemRequestBuilder.ts b/src/me/chats/item/messages/item/chatMessageItemRequestBuilder.ts deleted file mode 100644 index 59b894b3387..00000000000 --- a/src/me/chats/item/messages/item/chatMessageItemRequestBuilder.ts +++ /dev/null @@ -1,170 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { HostedContentsRequestBuilder } from './hostedContents/hostedContentsRequestBuilder'; -import { RepliesRequestBuilder } from './replies/repliesRequestBuilder'; -import { SetReactionRequestBuilder } from './setReaction/setReactionRequestBuilder'; -import { SoftDeleteRequestBuilder } from './softDelete/softDeleteRequestBuilder'; -import { UndoSoftDeleteRequestBuilder } from './undoSoftDelete/undoSoftDeleteRequestBuilder'; -import { UnsetReactionRequestBuilder } from './unsetReaction/unsetReactionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.chat entity. - */ -export class ChatMessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ - public get hostedContents(): HostedContentsRequestBuilder { - return new HostedContentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ - public get replies(): RepliesRequestBuilder { - return new RepliesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setReaction method. - */ - public get setReaction(): SetReactionRequestBuilder { - return new SetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the softDelete method. - */ - public get softDelete(): SoftDeleteRequestBuilder { - return new SoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the undoSoftDelete method. - */ - public get undoSoftDelete(): UndoSoftDeleteRequestBuilder { - return new UndoSoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unsetReaction method. - */ - public get unsetReaction(): UnsetReactionRequestBuilder { - return new UnsetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property messages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - */ - public patch(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property messages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/hostedContents/count/countRequestBuilder.ts b/src/me/chats/item/messages/item/hostedContents/count/countRequestBuilder.ts deleted file mode 100644 index d128f1c7a02..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/hostedContents/count/index.ts b/src/me/chats/item/messages/item/hostedContents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/messages/item/hostedContents/hostedContentsRequestBuilder.ts b/src/me/chats/item/messages/item/hostedContents/hostedContentsRequestBuilder.ts deleted file mode 100644 index d0aa619e3de..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/hostedContentsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageHostedContentCollectionResponse } from '../../../../../../models/'; -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../models/chatMessageHostedContent'; -import { createChatMessageHostedContentCollectionResponseFromDiscriminatorValue } from '../../../../../../models/chatMessageHostedContentCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChatMessageHostedContentItemRequestBuilder } from './item/chatMessageHostedContentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HostedContentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class HostedContentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - * @param chatMessageHostedContentId The unique identifier of chatMessageHostedContent - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public byChatMessageHostedContentId(chatMessageHostedContentId: string) : ChatMessageHostedContentItemRequestBuilder { - if(!chatMessageHostedContentId) throw new Error("chatMessageHostedContentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessageHostedContent%2Did"] = chatMessageHostedContentId - return new ChatMessageHostedContentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HostedContentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public post(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, hostedContentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hostedContentsRequestBuilder - */ - public withUrl(rawUrl: string) : HostedContentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HostedContentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const hostedContentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/hostedContents/index.ts b/src/me/chats/item/messages/item/hostedContents/index.ts deleted file mode 100644 index 63545aedbd6..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hostedContentsRequestBuilder' diff --git a/src/me/chats/item/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts b/src/me/chats/item/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts deleted file mode 100644 index 84bc874196a..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../models/chatMessageHostedContent'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageHostedContentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageHostedContentItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - * @see {@link https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public patch(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageHostedContentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageHostedContentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/hostedContents/item/index.ts b/src/me/chats/item/messages/item/hostedContents/item/index.ts deleted file mode 100644 index ab90c6b72b8..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageHostedContentItemRequestBuilder' diff --git a/src/me/chats/item/messages/item/hostedContents/item/value/contentRequestBuilder.ts b/src/me/chats/item/messages/item/hostedContents/item/value/contentRequestBuilder.ts deleted file mode 100644 index 0af834ba88e..00000000000 --- a/src/me/chats/item/messages/item/hostedContents/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}/$value"); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/index.ts b/src/me/chats/item/messages/item/index.ts deleted file mode 100644 index 52f34603070..00000000000 --- a/src/me/chats/item/messages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageItemRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/count/countRequestBuilder.ts b/src/me/chats/item/messages/item/replies/count/countRequestBuilder.ts deleted file mode 100644 index ca061609b4e..00000000000 --- a/src/me/chats/item/messages/item/replies/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/count/index.ts b/src/me/chats/item/messages/item/replies/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/messages/item/replies/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/delta/deltaRequestBuilder.ts b/src/me/chats/item/messages/item/replies/delta/deltaRequestBuilder.ts deleted file mode 100644 index 43e4dc59f3d..00000000000 --- a/src/me/chats/item/messages/item/replies/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/delta/index.ts b/src/me/chats/item/messages/item/replies/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/chats/item/messages/item/replies/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/index.ts b/src/me/chats/item/messages/item/replies/index.ts deleted file mode 100644 index 7e1a882ddac..00000000000 --- a/src/me/chats/item/messages/item/replies/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './repliesRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/chatMessageItemRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/chatMessageItemRequestBuilder.ts deleted file mode 100644 index c083ba5422d..00000000000 --- a/src/me/chats/item/messages/item/replies/item/chatMessageItemRequestBuilder.ts +++ /dev/null @@ -1,163 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { HostedContentsRequestBuilder } from './hostedContents/hostedContentsRequestBuilder'; -import { SetReactionRequestBuilder } from './setReaction/setReactionRequestBuilder'; -import { SoftDeleteRequestBuilder } from './softDelete/softDeleteRequestBuilder'; -import { UndoSoftDeleteRequestBuilder } from './undoSoftDelete/undoSoftDeleteRequestBuilder'; -import { UnsetReactionRequestBuilder } from './unsetReaction/unsetReactionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ - public get hostedContents(): HostedContentsRequestBuilder { - return new HostedContentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setReaction method. - */ - public get setReaction(): SetReactionRequestBuilder { - return new SetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the softDelete method. - */ - public get softDelete(): SoftDeleteRequestBuilder { - return new SoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the undoSoftDelete method. - */ - public get undoSoftDelete(): UndoSoftDeleteRequestBuilder { - return new UndoSoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unsetReaction method. - */ - public get unsetReaction(): UnsetReactionRequestBuilder { - return new UnsetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}{?%24select,%24expand}"); - }; - /** - * Delete navigation property replies for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property replies in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - */ - public patch(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property replies for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property replies in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts deleted file mode 100644 index 54a8fe4f660..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/count/index.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts deleted file mode 100644 index a2769858168..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageHostedContentCollectionResponse } from '../../../../../../../../models/'; -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../models/chatMessageHostedContent'; -import { createChatMessageHostedContentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/chatMessageHostedContentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChatMessageHostedContentItemRequestBuilder } from './item/chatMessageHostedContentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HostedContentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class HostedContentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - * @param chatMessageHostedContentId The unique identifier of chatMessageHostedContent - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public byChatMessageHostedContentId(chatMessageHostedContentId: string) : ChatMessageHostedContentItemRequestBuilder { - if(!chatMessageHostedContentId) throw new Error("chatMessageHostedContentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessageHostedContent%2Did"] = chatMessageHostedContentId - return new ChatMessageHostedContentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HostedContentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public post(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, hostedContentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hostedContentsRequestBuilder - */ - public withUrl(rawUrl: string) : HostedContentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HostedContentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const hostedContentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/index.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/index.ts deleted file mode 100644 index 63545aedbd6..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hostedContentsRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts deleted file mode 100644 index dc5a817c5e7..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../../models/chatMessageHostedContent'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageHostedContentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageHostedContentItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - * @see {@link https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public patch(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageHostedContentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageHostedContentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/item/index.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/item/index.ts deleted file mode 100644 index ab90c6b72b8..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageHostedContentItemRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts deleted file mode 100644 index 666f5dc9dbb..00000000000 --- a/src/me/chats/item/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}/$value"); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/index.ts b/src/me/chats/item/messages/item/replies/item/index.ts deleted file mode 100644 index 52f34603070..00000000000 --- a/src/me/chats/item/messages/item/replies/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageItemRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/setReaction/index.ts b/src/me/chats/item/messages/item/replies/item/setReaction/index.ts deleted file mode 100644 index 9429e817eeb..00000000000 --- a/src/me/chats/item/messages/item/replies/item/setReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setReactionPostRequestBody' -export * from './setReactionRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts b/src/me/chats/item/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts deleted file mode 100644 index 35ae79e93e8..00000000000 --- a/src/me/chats/item/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetReactionPostRequestBody; -} -export function deserializeIntoSetReactionPostRequestBody(setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { setReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeSetReactionPostRequestBody(writer: SerializationWriter, setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", setReactionPostRequestBody.reactionType); - writer.writeAdditionalData(setReactionPostRequestBody.additionalData); -} -export interface SetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts deleted file mode 100644 index eef99ae9095..00000000000 --- a/src/me/chats/item/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetReactionPostRequestBody, serializeSetReactionPostRequestBody, type SetReactionPostRequestBody } from './setReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setReaction method. - */ -export class SetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/setReaction"); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setReactionRequestBuilder - */ - public withUrl(rawUrl: string) : SetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts deleted file mode 100644 index b1b8df7d664..00000000000 --- a/src/me/chats/item/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the softDelete method. - */ -export class SoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/softDelete"); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : SoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts deleted file mode 100644 index 9ce31a1ecd7..00000000000 --- a/src/me/chats/item/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the undoSoftDelete method. - */ -export class UndoSoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UndoSoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/undoSoftDelete"); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a undoSoftDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : UndoSoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UndoSoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/unsetReaction/index.ts b/src/me/chats/item/messages/item/replies/item/unsetReaction/index.ts deleted file mode 100644 index 08e2e9f8a95..00000000000 --- a/src/me/chats/item/messages/item/replies/item/unsetReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unsetReactionPostRequestBody' -export * from './unsetReactionRequestBuilder' diff --git a/src/me/chats/item/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts b/src/me/chats/item/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts deleted file mode 100644 index cec6476d233..00000000000 --- a/src/me/chats/item/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnsetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnsetReactionPostRequestBody; -} -export function deserializeIntoUnsetReactionPostRequestBody(unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { unsetReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeUnsetReactionPostRequestBody(writer: SerializationWriter, unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", unsetReactionPostRequestBody.reactionType); - writer.writeAdditionalData(unsetReactionPostRequestBody.additionalData); -} -export interface UnsetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts b/src/me/chats/item/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts deleted file mode 100644 index 2785baf47a3..00000000000 --- a/src/me/chats/item/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnsetReactionPostRequestBody, serializeUnsetReactionPostRequestBody, type UnsetReactionPostRequestBody } from './unsetReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unsetReaction method. - */ -export class UnsetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnsetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/unsetReaction"); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnsetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unsetReactionRequestBuilder - */ - public withUrl(rawUrl: string) : UnsetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnsetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/replies/repliesRequestBuilder.ts b/src/me/chats/item/messages/item/replies/repliesRequestBuilder.ts deleted file mode 100644 index ef67fb9dfd4..00000000000 --- a/src/me/chats/item/messages/item/replies/repliesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageCollectionResponse } from '../../../../../../models/'; -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../models/chatMessage'; -import { createChatMessageCollectionResponseFromDiscriminatorValue } from '../../../../../../models/chatMessageCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ChatMessageItemRequestBuilder } from './item/chatMessageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface RepliesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ -export class RepliesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - * @param chatMessageId1 The unique identifier of chatMessage - * @returns a ChatMessageItemRequestBuilder - */ - public byChatMessageId1(chatMessageId1: string) : ChatMessageItemRequestBuilder { - if(!chatMessageId1) throw new Error("chatMessageId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessage%2Did1"] = chatMessageId1 - return new ChatMessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new RepliesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Send a new reply to a chatMessage in a specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, repliesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Send a new reply to a chatMessage in a specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a repliesRequestBuilder - */ - public withUrl(rawUrl: string) : RepliesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RepliesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const repliesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/setReaction/index.ts b/src/me/chats/item/messages/item/setReaction/index.ts deleted file mode 100644 index 9429e817eeb..00000000000 --- a/src/me/chats/item/messages/item/setReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setReactionPostRequestBody' -export * from './setReactionRequestBuilder' diff --git a/src/me/chats/item/messages/item/setReaction/setReactionPostRequestBody.ts b/src/me/chats/item/messages/item/setReaction/setReactionPostRequestBody.ts deleted file mode 100644 index 35ae79e93e8..00000000000 --- a/src/me/chats/item/messages/item/setReaction/setReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetReactionPostRequestBody; -} -export function deserializeIntoSetReactionPostRequestBody(setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { setReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeSetReactionPostRequestBody(writer: SerializationWriter, setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", setReactionPostRequestBody.reactionType); - writer.writeAdditionalData(setReactionPostRequestBody.additionalData); -} -export interface SetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/setReaction/setReactionRequestBuilder.ts b/src/me/chats/item/messages/item/setReaction/setReactionRequestBuilder.ts deleted file mode 100644 index c8c8a8a2126..00000000000 --- a/src/me/chats/item/messages/item/setReaction/setReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetReactionPostRequestBody, serializeSetReactionPostRequestBody, type SetReactionPostRequestBody } from './setReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setReaction method. - */ -export class SetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/setReaction"); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setReactionRequestBuilder - */ - public withUrl(rawUrl: string) : SetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/softDelete/softDeleteRequestBuilder.ts b/src/me/chats/item/messages/item/softDelete/softDeleteRequestBuilder.ts deleted file mode 100644 index ff34e8583f5..00000000000 --- a/src/me/chats/item/messages/item/softDelete/softDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the softDelete method. - */ -export class SoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/softDelete"); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : SoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts b/src/me/chats/item/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts deleted file mode 100644 index 5976e4abecf..00000000000 --- a/src/me/chats/item/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the undoSoftDelete method. - */ -export class UndoSoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UndoSoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/undoSoftDelete"); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a undoSoftDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : UndoSoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UndoSoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/unsetReaction/index.ts b/src/me/chats/item/messages/item/unsetReaction/index.ts deleted file mode 100644 index 08e2e9f8a95..00000000000 --- a/src/me/chats/item/messages/item/unsetReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unsetReactionPostRequestBody' -export * from './unsetReactionRequestBuilder' diff --git a/src/me/chats/item/messages/item/unsetReaction/unsetReactionPostRequestBody.ts b/src/me/chats/item/messages/item/unsetReaction/unsetReactionPostRequestBody.ts deleted file mode 100644 index cec6476d233..00000000000 --- a/src/me/chats/item/messages/item/unsetReaction/unsetReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnsetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnsetReactionPostRequestBody; -} -export function deserializeIntoUnsetReactionPostRequestBody(unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { unsetReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeUnsetReactionPostRequestBody(writer: SerializationWriter, unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", unsetReactionPostRequestBody.reactionType); - writer.writeAdditionalData(unsetReactionPostRequestBody.additionalData); -} -export interface UnsetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/item/unsetReaction/unsetReactionRequestBuilder.ts b/src/me/chats/item/messages/item/unsetReaction/unsetReactionRequestBuilder.ts deleted file mode 100644 index 0279a075c97..00000000000 --- a/src/me/chats/item/messages/item/unsetReaction/unsetReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnsetReactionPostRequestBody, serializeUnsetReactionPostRequestBody, type UnsetReactionPostRequestBody } from './unsetReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unsetReaction method. - */ -export class UnsetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnsetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages/{chatMessage%2Did}/unsetReaction"); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnsetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unsetReactionRequestBuilder - */ - public withUrl(rawUrl: string) : UnsetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnsetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/messages/messagesRequestBuilder.ts b/src/me/chats/item/messages/messagesRequestBuilder.ts deleted file mode 100644 index a26ef0ff830..00000000000 --- a/src/me/chats/item/messages/messagesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageCollectionResponse } from '../../../../models/'; -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../models/chatMessage'; -import { createChatMessageCollectionResponseFromDiscriminatorValue } from '../../../../models/chatMessageCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ChatMessageItemRequestBuilder } from './item/chatMessageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.chat entity. - */ -export class MessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.chat entity. - * @param chatMessageId The unique identifier of chatMessage - * @returns a ChatMessageItemRequestBuilder - */ - public byChatMessageId(chatMessageId: string) : ChatMessageItemRequestBuilder { - if(!chatMessageId) throw new Error("chatMessageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessage%2Did"] = chatMessageId - return new ChatMessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chat-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Send a new chatMessage in the specified channel or a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Send a new chatMessage in the specified channel or a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messagesRequestBuilder - */ - public withUrl(rawUrl: string) : MessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/permissionGrants/count/countRequestBuilder.ts b/src/me/chats/item/permissionGrants/count/countRequestBuilder.ts deleted file mode 100644 index 77d6930aa17..00000000000 --- a/src/me/chats/item/permissionGrants/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/permissionGrants/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/permissionGrants/count/index.ts b/src/me/chats/item/permissionGrants/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/permissionGrants/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/permissionGrants/index.ts b/src/me/chats/item/permissionGrants/index.ts deleted file mode 100644 index 67d4977019b..00000000000 --- a/src/me/chats/item/permissionGrants/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './permissionGrantsRequestBuilder' diff --git a/src/me/chats/item/permissionGrants/item/index.ts b/src/me/chats/item/permissionGrants/item/index.ts deleted file mode 100644 index 6f0f704c8ff..00000000000 --- a/src/me/chats/item/permissionGrants/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './resourceSpecificPermissionGrantItemRequestBuilder' diff --git a/src/me/chats/item/permissionGrants/item/resourceSpecificPermissionGrantItemRequestBuilder.ts b/src/me/chats/item/permissionGrants/item/resourceSpecificPermissionGrantItemRequestBuilder.ts deleted file mode 100644 index 364a1d30bb3..00000000000 --- a/src/me/chats/item/permissionGrants/item/resourceSpecificPermissionGrantItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createResourceSpecificPermissionGrantFromDiscriminatorValue, deserializeIntoResourceSpecificPermissionGrant, serializeResourceSpecificPermissionGrant, type ResourceSpecificPermissionGrant } from '../../../../../models/resourceSpecificPermissionGrant'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ResourceSpecificPermissionGrantItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity. - */ -export class ResourceSpecificPermissionGrantItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResourceSpecificPermissionGrantItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property permissionGrants for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * A collection of permissions granted to apps for the chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrant - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property permissionGrants in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrant - */ - public patch(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property permissionGrants for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * A collection of permissions granted to apps for the chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, resourceSpecificPermissionGrantItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property permissionGrants in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeResourceSpecificPermissionGrant); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ResourceSpecificPermissionGrantItemRequestBuilder - */ - public withUrl(rawUrl: string) : ResourceSpecificPermissionGrantItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResourceSpecificPermissionGrantItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const resourceSpecificPermissionGrantItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/permissionGrants/permissionGrantsRequestBuilder.ts b/src/me/chats/item/permissionGrants/permissionGrantsRequestBuilder.ts deleted file mode 100644 index 4d73a8dd2c4..00000000000 --- a/src/me/chats/item/permissionGrants/permissionGrantsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ResourceSpecificPermissionGrantCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createResourceSpecificPermissionGrantFromDiscriminatorValue, deserializeIntoResourceSpecificPermissionGrant, serializeResourceSpecificPermissionGrant, type ResourceSpecificPermissionGrant } from '../../../../models/resourceSpecificPermissionGrant'; -import { createResourceSpecificPermissionGrantCollectionResponseFromDiscriminatorValue } from '../../../../models/resourceSpecificPermissionGrantCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ResourceSpecificPermissionGrantItemRequestBuilder } from './item/resourceSpecificPermissionGrantItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PermissionGrantsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity. - */ -export class PermissionGrantsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity. - * @param resourceSpecificPermissionGrantId The unique identifier of resourceSpecificPermissionGrant - * @returns a ResourceSpecificPermissionGrantItemRequestBuilder - */ - public byResourceSpecificPermissionGrantId(resourceSpecificPermissionGrantId: string) : ResourceSpecificPermissionGrantItemRequestBuilder { - if(!resourceSpecificPermissionGrantId) throw new Error("resourceSpecificPermissionGrantId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["resourceSpecificPermissionGrant%2Did"] = resourceSpecificPermissionGrantId - return new ResourceSpecificPermissionGrantItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PermissionGrantsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/permissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrantCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chat-list-permissiongrants?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to permissionGrants for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrant - */ - public post(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding kind of resource-specific access that each app has. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, permissionGrantsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to permissionGrants for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeResourceSpecificPermissionGrant); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a permissionGrantsRequestBuilder - */ - public withUrl(rawUrl: string) : PermissionGrantsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PermissionGrantsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const permissionGrantsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/pinnedMessages/count/countRequestBuilder.ts b/src/me/chats/item/pinnedMessages/count/countRequestBuilder.ts deleted file mode 100644 index 2296b79f33e..00000000000 --- a/src/me/chats/item/pinnedMessages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/pinnedMessages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/pinnedMessages/count/index.ts b/src/me/chats/item/pinnedMessages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/pinnedMessages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/pinnedMessages/index.ts b/src/me/chats/item/pinnedMessages/index.ts deleted file mode 100644 index 6d9d0ebbbd3..00000000000 --- a/src/me/chats/item/pinnedMessages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pinnedMessagesRequestBuilder' diff --git a/src/me/chats/item/pinnedMessages/item/index.ts b/src/me/chats/item/pinnedMessages/item/index.ts deleted file mode 100644 index a7b6e978e23..00000000000 --- a/src/me/chats/item/pinnedMessages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pinnedChatMessageInfoItemRequestBuilder' diff --git a/src/me/chats/item/pinnedMessages/item/message/index.ts b/src/me/chats/item/pinnedMessages/item/message/index.ts deleted file mode 100644 index 0b87ff4c141..00000000000 --- a/src/me/chats/item/pinnedMessages/item/message/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageRequestBuilder' diff --git a/src/me/chats/item/pinnedMessages/item/message/messageRequestBuilder.ts b/src/me/chats/item/pinnedMessages/item/message/messageRequestBuilder.ts deleted file mode 100644 index 1ca7d60812e..00000000000 --- a/src/me/chats/item/pinnedMessages/item/message/messageRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessage } from '../../../../../../models/'; -import { createChatMessageFromDiscriminatorValue } from '../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the message property of the microsoft.graph.pinnedChatMessageInfo entity. - */ -export class MessageRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MessageRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/pinnedMessages/{pinnedChatMessageInfo%2Did}/message{?%24select,%24expand}"); - }; - /** - * Represents details about the chat message that is pinned. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Represents details about the chat message that is pinned. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messageRequestBuilder - */ - public withUrl(rawUrl: string) : MessageRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/pinnedMessages/item/pinnedChatMessageInfoItemRequestBuilder.ts b/src/me/chats/item/pinnedMessages/item/pinnedChatMessageInfoItemRequestBuilder.ts deleted file mode 100644 index b6dbf1c0b35..00000000000 --- a/src/me/chats/item/pinnedMessages/item/pinnedChatMessageInfoItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPinnedChatMessageInfoFromDiscriminatorValue, deserializeIntoPinnedChatMessageInfo, serializePinnedChatMessageInfo, type PinnedChatMessageInfo } from '../../../../../models/pinnedChatMessageInfo'; -import { MessageRequestBuilder } from './message/messageRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PinnedChatMessageInfoItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity. - */ -export class PinnedChatMessageInfoItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the message property of the microsoft.graph.pinnedChatMessageInfo entity. - */ - public get message(): MessageRequestBuilder { - return new MessageRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PinnedChatMessageInfoItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/pinnedMessages/{pinnedChatMessageInfo%2Did}{?%24select,%24expand}"); - }; - /** - * Unpin a message from a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-delete-pinnedmessages?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * A collection of all the pinned messages in the chat. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PinnedChatMessageInfo - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPinnedChatMessageInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property pinnedMessages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PinnedChatMessageInfo - */ - public patch(body: PinnedChatMessageInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPinnedChatMessageInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Unpin a message from a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * A collection of all the pinned messages in the chat. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pinnedChatMessageInfoItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property pinnedMessages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PinnedChatMessageInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePinnedChatMessageInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PinnedChatMessageInfoItemRequestBuilder - */ - public withUrl(rawUrl: string) : PinnedChatMessageInfoItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PinnedChatMessageInfoItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pinnedChatMessageInfoItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/pinnedMessages/pinnedMessagesRequestBuilder.ts b/src/me/chats/item/pinnedMessages/pinnedMessagesRequestBuilder.ts deleted file mode 100644 index 71031a4e52c..00000000000 --- a/src/me/chats/item/pinnedMessages/pinnedMessagesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PinnedChatMessageInfoCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createPinnedChatMessageInfoFromDiscriminatorValue, deserializeIntoPinnedChatMessageInfo, serializePinnedChatMessageInfo, type PinnedChatMessageInfo } from '../../../../models/pinnedChatMessageInfo'; -import { createPinnedChatMessageInfoCollectionResponseFromDiscriminatorValue } from '../../../../models/pinnedChatMessageInfoCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PinnedChatMessageInfoItemRequestBuilder } from './item/pinnedChatMessageInfoItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PinnedMessagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity. - */ -export class PinnedMessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity. - * @param pinnedChatMessageInfoId The unique identifier of pinnedChatMessageInfo - * @returns a PinnedChatMessageInfoItemRequestBuilder - */ - public byPinnedChatMessageInfoId(pinnedChatMessageInfoId: string) : PinnedChatMessageInfoItemRequestBuilder { - if(!pinnedChatMessageInfoId) throw new Error("pinnedChatMessageInfoId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["pinnedChatMessageInfo%2Did"] = pinnedChatMessageInfoId - return new PinnedChatMessageInfoItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PinnedMessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/pinnedMessages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of pinnedChatMessages in a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PinnedChatMessageInfoCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chat-list-pinnedmessages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPinnedChatMessageInfoCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PinnedChatMessageInfo - * @see {@link https://learn.microsoft.com/graph/api/chat-post-pinnedmessages?view=graph-rest-1.0|Find more info here} - */ - public post(body: PinnedChatMessageInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPinnedChatMessageInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of pinnedChatMessages in a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pinnedMessagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Pin a chat message in the specified chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can pin a chat message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PinnedChatMessageInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePinnedChatMessageInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a pinnedMessagesRequestBuilder - */ - public withUrl(rawUrl: string) : PinnedMessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PinnedMessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pinnedMessagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/sendActivityNotification/index.ts b/src/me/chats/item/sendActivityNotification/index.ts deleted file mode 100644 index bfd7d6ecfe6..00000000000 --- a/src/me/chats/item/sendActivityNotification/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './sendActivityNotificationPostRequestBody' -export * from './sendActivityNotificationRequestBuilder' diff --git a/src/me/chats/item/sendActivityNotification/sendActivityNotificationPostRequestBody.ts b/src/me/chats/item/sendActivityNotification/sendActivityNotificationPostRequestBody.ts deleted file mode 100644 index 528829b98da..00000000000 --- a/src/me/chats/item/sendActivityNotification/sendActivityNotificationPostRequestBody.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createItemBodyFromDiscriminatorValue, serializeItemBody, type ItemBody } from '../../../../models/itemBody'; -import { createKeyValuePairFromDiscriminatorValue, serializeKeyValuePair, type KeyValuePair } from '../../../../models/keyValuePair'; -import { createTeamworkActivityTopicFromDiscriminatorValue, serializeTeamworkActivityTopic, type TeamworkActivityTopic } from '../../../../models/teamworkActivityTopic'; -import { createTeamworkNotificationRecipientFromDiscriminatorValue, serializeTeamworkNotificationRecipient, type TeamworkNotificationRecipient } from '../../../../models/teamworkNotificationRecipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSendActivityNotificationPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSendActivityNotificationPostRequestBody; -} -export function deserializeIntoSendActivityNotificationPostRequestBody(sendActivityNotificationPostRequestBody: SendActivityNotificationPostRequestBody | undefined = {} as SendActivityNotificationPostRequestBody) : Record void> { - return { - "activityType": n => { sendActivityNotificationPostRequestBody.activityType = n.getStringValue(); }, - "chainId": n => { sendActivityNotificationPostRequestBody.chainId = n.getNumberValue(); }, - "previewText": n => { sendActivityNotificationPostRequestBody.previewText = n.getObjectValue(createItemBodyFromDiscriminatorValue); }, - "recipient": n => { sendActivityNotificationPostRequestBody.recipient = n.getObjectValue(createTeamworkNotificationRecipientFromDiscriminatorValue); }, - "templateParameters": n => { sendActivityNotificationPostRequestBody.templateParameters = n.getCollectionOfObjectValues(createKeyValuePairFromDiscriminatorValue); }, - "topic": n => { sendActivityNotificationPostRequestBody.topic = n.getObjectValue(createTeamworkActivityTopicFromDiscriminatorValue); }, - } -} -export interface SendActivityNotificationPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * The activityType property - */ - activityType?: string; - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The chainId property - */ - chainId?: number; - /** - * The previewText property - */ - previewText?: ItemBody; - /** - * The recipient property - */ - recipient?: TeamworkNotificationRecipient; - /** - * The templateParameters property - */ - templateParameters?: KeyValuePair[]; - /** - * The topic property - */ - topic?: TeamworkActivityTopic; -} -export function serializeSendActivityNotificationPostRequestBody(writer: SerializationWriter, sendActivityNotificationPostRequestBody: SendActivityNotificationPostRequestBody | undefined = {} as SendActivityNotificationPostRequestBody) : void { - writer.writeStringValue("activityType", sendActivityNotificationPostRequestBody.activityType); - writer.writeNumberValue("chainId", sendActivityNotificationPostRequestBody.chainId); - writer.writeObjectValue("previewText", sendActivityNotificationPostRequestBody.previewText, serializeItemBody); - writer.writeObjectValue("recipient", sendActivityNotificationPostRequestBody.recipient, serializeTeamworkNotificationRecipient); - writer.writeCollectionOfObjectValues("templateParameters", sendActivityNotificationPostRequestBody.templateParameters, serializeKeyValuePair); - writer.writeObjectValue("topic", sendActivityNotificationPostRequestBody.topic, serializeTeamworkActivityTopic); - writer.writeAdditionalData(sendActivityNotificationPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/sendActivityNotification/sendActivityNotificationRequestBuilder.ts b/src/me/chats/item/sendActivityNotification/sendActivityNotificationRequestBuilder.ts deleted file mode 100644 index 4286d7b864e..00000000000 --- a/src/me/chats/item/sendActivityNotification/sendActivityNotificationRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSendActivityNotificationPostRequestBody, serializeSendActivityNotificationPostRequestBody, type SendActivityNotificationPostRequestBody } from './sendActivityNotificationPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the sendActivityNotification method. - */ -export class SendActivityNotificationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendActivityNotificationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/sendActivityNotification"); - }; - /** - * Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-sendactivitynotification?view=graph-rest-1.0|Find more info here} - */ - public post(body: SendActivityNotificationPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SendActivityNotificationPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSendActivityNotificationPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendActivityNotificationRequestBuilder - */ - public withUrl(rawUrl: string) : SendActivityNotificationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendActivityNotificationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/tabs/count/countRequestBuilder.ts b/src/me/chats/item/tabs/count/countRequestBuilder.ts deleted file mode 100644 index 5fb1f00870c..00000000000 --- a/src/me/chats/item/tabs/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/tabs/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/tabs/count/index.ts b/src/me/chats/item/tabs/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/chats/item/tabs/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/chats/item/tabs/index.ts b/src/me/chats/item/tabs/index.ts deleted file mode 100644 index 4e808651757..00000000000 --- a/src/me/chats/item/tabs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tabsRequestBuilder' diff --git a/src/me/chats/item/tabs/item/index.ts b/src/me/chats/item/tabs/item/index.ts deleted file mode 100644 index 2a6e3981df6..00000000000 --- a/src/me/chats/item/tabs/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsTabItemRequestBuilder' diff --git a/src/me/chats/item/tabs/item/teamsApp/index.ts b/src/me/chats/item/tabs/item/teamsApp/index.ts deleted file mode 100644 index 0e775e3b0c3..00000000000 --- a/src/me/chats/item/tabs/item/teamsApp/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppRequestBuilder' diff --git a/src/me/chats/item/tabs/item/teamsApp/teamsAppRequestBuilder.ts b/src/me/chats/item/tabs/item/teamsApp/teamsAppRequestBuilder.ts deleted file mode 100644 index 37192c00c94..00000000000 --- a/src/me/chats/item/tabs/item/teamsApp/teamsAppRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsApp } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppFromDiscriminatorValue } from '../../../../../../models/teamsApp'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsTab entity. - */ -export class TeamsAppRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/tabs/{teamsTab%2Did}/teamsApp{?%24select,%24expand}"); - }; - /** - * The application that is linked to the tab. This can't be changed after tab creation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsApp - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppFromDiscriminatorValue, errorMapping); - }; - /** - * The application that is linked to the tab. This can't be changed after tab creation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/tabs/item/teamsTabItemRequestBuilder.ts b/src/me/chats/item/tabs/item/teamsTabItemRequestBuilder.ts deleted file mode 100644 index ecb5cff2281..00000000000 --- a/src/me/chats/item/tabs/item/teamsTabItemRequestBuilder.ts +++ /dev/null @@ -1,137 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsTabFromDiscriminatorValue, deserializeIntoTeamsTab, serializeTeamsTab, type TeamsTab } from '../../../../../models/teamsTab'; -import { TeamsAppRequestBuilder } from './teamsApp/teamsAppRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsTabItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tabs property of the microsoft.graph.chat entity. - */ -export class TeamsTabItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsTab entity. - */ - public get teamsApp(): TeamsAppRequestBuilder { - return new TeamsAppRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamsTabItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/tabs/{teamsTab%2Did}{?%24select,%24expand}"); - }; - /** - * Remove (unpin) a tab from the specified chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-delete-tabs?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of the specified tab in a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/chat-get-tabs?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/chat-patch-tabs?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Remove (unpin) a tab from the specified chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of the specified tab in a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsTabItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the specified tab in a chat. This can be used to configure the content of the tab. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsTab); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamsTabItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsTabItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsTabItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsTabItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/tabs/tabsRequestBuilder.ts b/src/me/chats/item/tabs/tabsRequestBuilder.ts deleted file mode 100644 index bab3c32500d..00000000000 --- a/src/me/chats/item/tabs/tabsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsTabCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamsTabFromDiscriminatorValue, deserializeIntoTeamsTab, serializeTeamsTab, type TeamsTab } from '../../../../models/teamsTab'; -import { createTeamsTabCollectionResponseFromDiscriminatorValue } from '../../../../models/teamsTabCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamsTabItemRequestBuilder } from './item/teamsTabItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TabsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tabs property of the microsoft.graph.chat entity. - */ -export class TabsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tabs property of the microsoft.graph.chat entity. - * @param teamsTabId The unique identifier of teamsTab - * @returns a TeamsTabItemRequestBuilder - */ - public byTeamsTabId(teamsTabId: string) : TeamsTabItemRequestBuilder { - if(!teamsTabId) throw new Error("teamsTabId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamsTab%2Did"] = teamsTabId - return new TeamsTabItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TabsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/tabs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of tabs in the specified chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTabCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chat-list-tabs?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/chat-post-tabs?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of tabs in the specified chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tabsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add (pin) a tab to the specified chat. The corresponding app must already be installed in the chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsTab); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tabsRequestBuilder - */ - public withUrl(rawUrl: string) : TabsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TabsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tabsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/unhideForUser/index.ts b/src/me/chats/item/unhideForUser/index.ts deleted file mode 100644 index dbae32d0a2c..00000000000 --- a/src/me/chats/item/unhideForUser/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unhideForUserPostRequestBody' -export * from './unhideForUserRequestBuilder' diff --git a/src/me/chats/item/unhideForUser/unhideForUserPostRequestBody.ts b/src/me/chats/item/unhideForUser/unhideForUserPostRequestBody.ts deleted file mode 100644 index 9d3bc3801de..00000000000 --- a/src/me/chats/item/unhideForUser/unhideForUserPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createTeamworkUserIdentityFromDiscriminatorValue, serializeTeamworkUserIdentity, type TeamworkUserIdentity } from '../../../../models/teamworkUserIdentity'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnhideForUserPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnhideForUserPostRequestBody; -} -export function deserializeIntoUnhideForUserPostRequestBody(unhideForUserPostRequestBody: UnhideForUserPostRequestBody | undefined = {} as UnhideForUserPostRequestBody) : Record void> { - return { - "user": n => { unhideForUserPostRequestBody.user = n.getObjectValue(createTeamworkUserIdentityFromDiscriminatorValue); }, - } -} -export function serializeUnhideForUserPostRequestBody(writer: SerializationWriter, unhideForUserPostRequestBody: UnhideForUserPostRequestBody | undefined = {} as UnhideForUserPostRequestBody) : void { - writer.writeObjectValue("user", unhideForUserPostRequestBody.user, serializeTeamworkUserIdentity); - writer.writeAdditionalData(unhideForUserPostRequestBody.additionalData); -} -export interface UnhideForUserPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The user property - */ - user?: TeamworkUserIdentity; -} -// tslint:enable -// eslint-enable diff --git a/src/me/chats/item/unhideForUser/unhideForUserRequestBuilder.ts b/src/me/chats/item/unhideForUser/unhideForUserRequestBuilder.ts deleted file mode 100644 index 203fe5ac4ca..00000000000 --- a/src/me/chats/item/unhideForUser/unhideForUserRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnhideForUserPostRequestBody, serializeUnhideForUserPostRequestBody, type UnhideForUserPostRequestBody } from './unhideForUserPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unhideForUser method. - */ -export class UnhideForUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnhideForUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/chats/{chat%2Did}/unhideForUser"); - }; - /** - * Unhide a chat for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-unhideforuser?view=graph-rest-1.0|Find more info here} - */ - public post(body: UnhideForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Unhide a chat for a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnhideForUserPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnhideForUserPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unhideForUserRequestBuilder - */ - public withUrl(rawUrl: string) : UnhideForUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnhideForUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/checkMemberGroups/checkMemberGroupsPostRequestBody.ts b/src/me/checkMemberGroups/checkMemberGroupsPostRequestBody.ts deleted file mode 100644 index 6dd26b4ab1c..00000000000 --- a/src/me/checkMemberGroups/checkMemberGroupsPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CheckMemberGroupsPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupIds property - */ - groupIds?: string[]; -} -export function createCheckMemberGroupsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCheckMemberGroupsPostRequestBody; -} -export function deserializeIntoCheckMemberGroupsPostRequestBody(checkMemberGroupsPostRequestBody: CheckMemberGroupsPostRequestBody | undefined = {} as CheckMemberGroupsPostRequestBody) : Record void> { - return { - "groupIds": n => { checkMemberGroupsPostRequestBody.groupIds = n.getCollectionOfPrimitiveValues(); }, - } -} -export function serializeCheckMemberGroupsPostRequestBody(writer: SerializationWriter, checkMemberGroupsPostRequestBody: CheckMemberGroupsPostRequestBody | undefined = {} as CheckMemberGroupsPostRequestBody) : void { - writer.writeCollectionOfPrimitiveValues("groupIds", checkMemberGroupsPostRequestBody.groupIds); - writer.writeAdditionalData(checkMemberGroupsPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/checkMemberGroups/checkMemberGroupsRequestBuilder.ts b/src/me/checkMemberGroups/checkMemberGroupsRequestBuilder.ts deleted file mode 100644 index 76524e8b98a..00000000000 --- a/src/me/checkMemberGroups/checkMemberGroupsRequestBuilder.ts +++ /dev/null @@ -1,84 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { deserializeIntoCheckMemberGroupsPostRequestBody, serializeCheckMemberGroupsPostRequestBody, type CheckMemberGroupsPostRequestBody } from './checkMemberGroupsPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CheckMemberGroupsPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: string[]; -} -export function createCheckMemberGroupsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCheckMemberGroupsPostResponse; -} -export function deserializeIntoCheckMemberGroupsPostResponse(checkMemberGroupsPostResponse: CheckMemberGroupsPostResponse | undefined = {} as CheckMemberGroupsPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(checkMemberGroupsPostResponse), - "value": n => { checkMemberGroupsPostResponse.value = n.getCollectionOfPrimitiveValues(); }, - } -} -export function serializeCheckMemberGroupsPostResponse(writer: SerializationWriter, checkMemberGroupsPostResponse: CheckMemberGroupsPostResponse | undefined = {} as CheckMemberGroupsPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, checkMemberGroupsPostResponse) - writer.writeCollectionOfPrimitiveValues("value", checkMemberGroupsPostResponse.value); -} -/** - * Provides operations to call the checkMemberGroups method. - */ -export class CheckMemberGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/checkMemberGroups"); - }; - /** - * Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CheckMemberGroupsPostResponse - * @see {@link https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0|Find more info here} - */ - public post(body: CheckMemberGroupsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCheckMemberGroupsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CheckMemberGroupsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCheckMemberGroupsPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a checkMemberGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : CheckMemberGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CheckMemberGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/checkMemberGroups/index.ts b/src/me/checkMemberGroups/index.ts deleted file mode 100644 index d78e56f27cf..00000000000 --- a/src/me/checkMemberGroups/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './checkMemberGroupsPostRequestBody' -export * from './checkMemberGroupsRequestBuilder' diff --git a/src/me/checkMemberObjects/checkMemberObjectsRequestBuilder.ts b/src/me/checkMemberObjects/checkMemberObjectsRequestBuilder.ts deleted file mode 100644 index c5fe34f2a7f..00000000000 --- a/src/me/checkMemberObjects/checkMemberObjectsRequestBuilder.ts +++ /dev/null @@ -1,105 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CheckMemberObjectsPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The ids property - */ - ids?: string[]; -} -export interface CheckMemberObjectsPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: string[]; -} -export function createCheckMemberObjectsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCheckMemberObjectsPostRequestBody; -} -export function createCheckMemberObjectsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCheckMemberObjectsPostResponse; -} -export function deserializeIntoCheckMemberObjectsPostRequestBody(checkMemberObjectsPostRequestBody: CheckMemberObjectsPostRequestBody | undefined = {} as CheckMemberObjectsPostRequestBody) : Record void> { - return { - "ids": n => { checkMemberObjectsPostRequestBody.ids = n.getCollectionOfPrimitiveValues(); }, - } -} -export function deserializeIntoCheckMemberObjectsPostResponse(checkMemberObjectsPostResponse: CheckMemberObjectsPostResponse | undefined = {} as CheckMemberObjectsPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(checkMemberObjectsPostResponse), - "value": n => { checkMemberObjectsPostResponse.value = n.getCollectionOfPrimitiveValues(); }, - } -} -export function serializeCheckMemberObjectsPostRequestBody(writer: SerializationWriter, checkMemberObjectsPostRequestBody: CheckMemberObjectsPostRequestBody | undefined = {} as CheckMemberObjectsPostRequestBody) : void { - writer.writeCollectionOfPrimitiveValues("ids", checkMemberObjectsPostRequestBody.ids); - writer.writeAdditionalData(checkMemberObjectsPostRequestBody.additionalData); -} -export function serializeCheckMemberObjectsPostResponse(writer: SerializationWriter, checkMemberObjectsPostResponse: CheckMemberObjectsPostResponse | undefined = {} as CheckMemberObjectsPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, checkMemberObjectsPostResponse) - writer.writeCollectionOfPrimitiveValues("value", checkMemberObjectsPostResponse.value); -} -/** - * Provides operations to call the checkMemberObjects method. - */ -export class CheckMemberObjectsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/checkMemberObjects"); - }; - /** - * Invoke action checkMemberObjects - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CheckMemberObjectsPostResponse - */ - public post(body: CheckMemberObjectsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCheckMemberObjectsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke action checkMemberObjects - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CheckMemberObjectsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCheckMemberObjectsPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a checkMemberObjectsRequestBuilder - */ - public withUrl(rawUrl: string) : CheckMemberObjectsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CheckMemberObjectsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/checkMemberObjects/index.ts b/src/me/checkMemberObjects/index.ts deleted file mode 100644 index 0f3986e2b2a..00000000000 --- a/src/me/checkMemberObjects/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './checkMemberObjectsRequestBuilder' diff --git a/src/me/contactFolders/contactFoldersRequestBuilder.ts b/src/me/contactFolders/contactFoldersRequestBuilder.ts deleted file mode 100644 index 1028e939966..00000000000 --- a/src/me/contactFolders/contactFoldersRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ContactFolderCollectionResponse } from '../../models/'; -import { createContactFolderFromDiscriminatorValue, deserializeIntoContactFolder, serializeContactFolder, type ContactFolder } from '../../models/contactFolder'; -import { createContactFolderCollectionResponseFromDiscriminatorValue } from '../../models/contactFolderCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ContactFolderItemRequestBuilder } from './item/contactFolderItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactFoldersRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the contactFolders property of the microsoft.graph.user entity. - */ -export class ContactFoldersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contactFolders property of the microsoft.graph.user entity. - * @param contactFolderId The unique identifier of contactFolder - * @returns a ContactFolderItemRequestBuilder - */ - public byContactFolderId(contactFolderId: string) : ContactFolderItemRequestBuilder { - if(!contactFolderId) throw new Error("contactFolderId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["contactFolder%2Did"] = contactFolderId - return new ContactFolderItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ContactFoldersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the contact folder collection in the default Contacts folder of the signed-in user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolderCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-contactfolders?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new contactFolder under the user's default contacts folder. You can also create a new contactfolder as a child of any specified contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolder - * @see {@link https://learn.microsoft.com/graph/api/user-post-contactfolders?view=graph-rest-1.0|Find more info here} - */ - public post(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Get the contact folder collection in the default Contacts folder of the signed-in user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactFoldersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new contactFolder under the user's default contacts folder. You can also create a new contactfolder as a child of any specified contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContactFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contactFoldersRequestBuilder - */ - public withUrl(rawUrl: string) : ContactFoldersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactFoldersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactFoldersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/count/countRequestBuilder.ts b/src/me/contactFolders/count/countRequestBuilder.ts deleted file mode 100644 index 0b5597b915f..00000000000 --- a/src/me/contactFolders/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/count/index.ts b/src/me/contactFolders/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contactFolders/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contactFolders/delta/deltaRequestBuilder.ts b/src/me/contactFolders/delta/deltaRequestBuilder.ts deleted file mode 100644 index 9a660614ffe..00000000000 --- a/src/me/contactFolders/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../models/baseDeltaFunctionResponse'; -import { createContactFolderFromDiscriminatorValue, serializeContactFolder, type ContactFolder } from '../../../models/contactFolder'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ContactFolder[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createContactFolderFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeContactFolder); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/delta/index.ts b/src/me/contactFolders/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/contactFolders/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/contactFolders/index.ts b/src/me/contactFolders/index.ts deleted file mode 100644 index fb7c2960b13..00000000000 --- a/src/me/contactFolders/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactFoldersRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/childFoldersRequestBuilder.ts b/src/me/contactFolders/item/childFolders/childFoldersRequestBuilder.ts deleted file mode 100644 index 464ef3671ea..00000000000 --- a/src/me/contactFolders/item/childFolders/childFoldersRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ContactFolderCollectionResponse } from '../../../../models/'; -import { createContactFolderFromDiscriminatorValue, deserializeIntoContactFolder, serializeContactFolder, type ContactFolder } from '../../../../models/contactFolder'; -import { createContactFolderCollectionResponseFromDiscriminatorValue } from '../../../../models/contactFolderCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ContactFolderItemRequestBuilder } from './item/contactFolderItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChildFoldersRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the childFolders property of the microsoft.graph.contactFolder entity. - */ -export class ChildFoldersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the childFolders property of the microsoft.graph.contactFolder entity. - * @param contactFolderId1 The unique identifier of contactFolder - * @returns a ContactFolderItemRequestBuilder - */ - public byContactFolderId1(contactFolderId1: string) : ContactFolderItemRequestBuilder { - if(!contactFolderId1) throw new Error("contactFolderId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["contactFolder%2Did1"] = contactFolderId1 - return new ContactFolderItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ChildFoldersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a collection of child folders under the specified contact folder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolderCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-list-childfolders?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new contactFolder as a child of a specified folder. You can also create a new contactFolder under the user's default contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolder - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-post-childfolders?view=graph-rest-1.0|Find more info here} - */ - public post(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Get a collection of child folders under the specified contact folder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, childFoldersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new contactFolder as a child of a specified folder. You can also create a new contactFolder under the user's default contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContactFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a childFoldersRequestBuilder - */ - public withUrl(rawUrl: string) : ChildFoldersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChildFoldersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const childFoldersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/count/countRequestBuilder.ts b/src/me/contactFolders/item/childFolders/count/countRequestBuilder.ts deleted file mode 100644 index 51d30364df3..00000000000 --- a/src/me/contactFolders/item/childFolders/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/count/index.ts b/src/me/contactFolders/item/childFolders/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contactFolders/item/childFolders/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/delta/deltaRequestBuilder.ts b/src/me/contactFolders/item/childFolders/delta/deltaRequestBuilder.ts deleted file mode 100644 index b948537cd3b..00000000000 --- a/src/me/contactFolders/item/childFolders/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createContactFolderFromDiscriminatorValue, serializeContactFolder, type ContactFolder } from '../../../../../models/contactFolder'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ContactFolder[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createContactFolderFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeContactFolder); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of contact folders that have been added, deleted, or removed from the user's mailbox. A delta function call for contact folders in a mailbox is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contact folders. This allows you to maintain and synchronize a local store of a user's contact folders without having to fetch all the contact folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/delta/index.ts b/src/me/contactFolders/item/childFolders/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/contactFolders/item/childFolders/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/index.ts b/src/me/contactFolders/item/childFolders/index.ts deleted file mode 100644 index f1b45c76176..00000000000 --- a/src/me/contactFolders/item/childFolders/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './childFoldersRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contactFolderItemRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contactFolderItemRequestBuilder.ts deleted file mode 100644 index e6593a3b3ed..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contactFolderItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createContactFolderFromDiscriminatorValue, deserializeIntoContactFolder, serializeContactFolder, type ContactFolder } from '../../../../../models/contactFolder'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { ContactsRequestBuilder } from './contacts/contactsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactFolderItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the childFolders property of the microsoft.graph.contactFolder entity. - */ -export class ContactFolderItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - */ - public get contacts(): ContactsRequestBuilder { - return new ContactsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ContactFolderItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}{?%24select,%24expand}"); - }; - /** - * Delete navigation property childFolders for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of child folders in the folder. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolder - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property childFolders in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolder - */ - public patch(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property childFolders for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of child folders in the folder. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactFolderItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property childFolders in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContactFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContactFolderItemRequestBuilder - */ - public withUrl(rawUrl: string) : ContactFolderItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactFolderItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactFolderItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/contactsRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/contactsRequestBuilder.ts deleted file mode 100644 index 4e24117b418..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/contactsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ContactCollectionResponse } from '../../../../../../models/'; -import { createContactFromDiscriminatorValue, deserializeIntoContact, serializeContact, type Contact } from '../../../../../../models/contact'; -import { createContactCollectionResponseFromDiscriminatorValue } from '../../../../../../models/contactCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ContactItemRequestBuilder } from './item/contactItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - */ -export class ContactsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - * @param contactId The unique identifier of contact - * @returns a ContactItemRequestBuilder - */ - public byContactId(contactId: string) : ContactItemRequestBuilder { - if(!contactId) throw new Error("contactId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["contact%2Did"] = contactId - return new ContactItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ContactsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-list-contacts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-post-contacts?view=graph-rest-1.0|Find more info here} - */ - public post(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContact); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contactsRequestBuilder - */ - public withUrl(rawUrl: string) : ContactsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/count/countRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/count/countRequestBuilder.ts deleted file mode 100644 index 45f3c7b9542..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/count/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/delta/deltaRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/delta/deltaRequestBuilder.ts deleted file mode 100644 index da543a876a0..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createContactFromDiscriminatorValue, serializeContact, type Contact } from '../../../../../../../models/contact'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Contact[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createContactFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeContact); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/contact-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/delta/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/index.ts deleted file mode 100644 index e85d517bdc3..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactsRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/contactItemRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/contactItemRequestBuilder.ts deleted file mode 100644 index 9e5cbc60902..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/contactItemRequestBuilder.ts +++ /dev/null @@ -1,141 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createContactFromDiscriminatorValue, deserializeIntoContact, serializeContact, type Contact } from '../../../../../../../models/contact'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { PhotoRequestBuilder } from './photo/photoRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - */ -export class ContactItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the photo property of the microsoft.graph.contact entity. - */ - public get photo(): PhotoRequestBuilder { - return new PhotoRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ContactItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/{contact%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property contacts for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The contacts in the folder. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property contacts in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - */ - public patch(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property contacts for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The contacts in the folder. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property contacts in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContact); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContactItemRequestBuilder - */ - public withUrl(rawUrl: string) : ContactItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/count/countRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index bc6b83ed32c..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/{contact%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/count/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/extensionsRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 0fa08e009c3..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/{contact%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 06dcf21cf3b..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/{contact%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/item/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/index.ts deleted file mode 100644 index b56a8378ef6..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactItemRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/photo/index.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/photo/index.ts deleted file mode 100644 index 447456bf7ef..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/photo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './photoRequestBuilder' diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/photo/photoRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/photo/photoRequestBuilder.ts deleted file mode 100644 index 5c0ea4dd30d..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/photo/photoRequestBuilder.ts +++ /dev/null @@ -1,104 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createProfilePhotoFromDiscriminatorValue, deserializeIntoProfilePhoto, serializeProfilePhoto, type ProfilePhoto } from '../../../../../../../../models/profilePhoto'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhotoRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the photo property of the microsoft.graph.contact entity. - */ -export class PhotoRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PhotoRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/{contact%2Did}/photo{?%24select}"); - }; - /** - * Optional contact picture. You can get or set a photo for a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public patch(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Optional contact picture. You can get or set a photo for a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, photoRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeProfilePhoto); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a photoRequestBuilder - */ - public withUrl(rawUrl: string) : PhotoRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhotoRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const photoRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/contacts/item/photo/value/contentRequestBuilder.ts b/src/me/contactFolders/item/childFolders/item/contacts/item/photo/value/contentRequestBuilder.ts deleted file mode 100644 index 929e2ff6ed0..00000000000 --- a/src/me/contactFolders/item/childFolders/item/contacts/item/photo/value/contentRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/childFolders/{contactFolder%2Did1}/contacts/{contact%2Did}/photo/$value"); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/childFolders/item/index.ts b/src/me/contactFolders/item/childFolders/item/index.ts deleted file mode 100644 index 8af84aa9963..00000000000 --- a/src/me/contactFolders/item/childFolders/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactFolderItemRequestBuilder' diff --git a/src/me/contactFolders/item/contactFolderItemRequestBuilder.ts b/src/me/contactFolders/item/contactFolderItemRequestBuilder.ts deleted file mode 100644 index 4c2a3c3a955..00000000000 --- a/src/me/contactFolders/item/contactFolderItemRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createContactFolderFromDiscriminatorValue, deserializeIntoContactFolder, serializeContactFolder, type ContactFolder } from '../../../models/contactFolder'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { ChildFoldersRequestBuilder } from './childFolders/childFoldersRequestBuilder'; -import { ContactsRequestBuilder } from './contacts/contactsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactFolderItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the contactFolders property of the microsoft.graph.user entity. - */ -export class ContactFolderItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the childFolders property of the microsoft.graph.contactFolder entity. - */ - public get childFolders(): ChildFoldersRequestBuilder { - return new ChildFoldersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - */ - public get contacts(): ContactsRequestBuilder { - return new ContactsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ContactFolderItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}{?%24select,%24expand}"); - }; - /** - * Delete contactFolder other than the default contactFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolder - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of contactfolder object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactFolder - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Delete contactFolder other than the default contactFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a contact folder by using the contact folder ID. There are two scenarios where an app can get another user's contact folder: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactFolderItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of contactfolder object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ContactFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContactFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContactFolderItemRequestBuilder - */ - public withUrl(rawUrl: string) : ContactFolderItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactFolderItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactFolderItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/contactsRequestBuilder.ts b/src/me/contactFolders/item/contacts/contactsRequestBuilder.ts deleted file mode 100644 index 0ee38bffb83..00000000000 --- a/src/me/contactFolders/item/contacts/contactsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ContactCollectionResponse } from '../../../../models/'; -import { createContactFromDiscriminatorValue, deserializeIntoContact, serializeContact, type Contact } from '../../../../models/contact'; -import { createContactCollectionResponseFromDiscriminatorValue } from '../../../../models/contactCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ContactItemRequestBuilder } from './item/contactItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - */ -export class ContactsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - * @param contactId The unique identifier of contact - * @returns a ContactItemRequestBuilder - */ - public byContactId(contactId: string) : ContactItemRequestBuilder { - if(!contactId) throw new Error("contactId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["contact%2Did"] = contactId - return new ContactItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ContactsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-list-contacts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - * @see {@link https://learn.microsoft.com/graph/api/contactfolder-post-contacts?view=graph-rest-1.0|Find more info here} - */ - public post(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContact); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contactsRequestBuilder - */ - public withUrl(rawUrl: string) : ContactsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/count/countRequestBuilder.ts b/src/me/contactFolders/item/contacts/count/countRequestBuilder.ts deleted file mode 100644 index 32a55aaf98c..00000000000 --- a/src/me/contactFolders/item/contacts/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/count/index.ts b/src/me/contactFolders/item/contacts/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contactFolders/item/contacts/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/delta/deltaRequestBuilder.ts b/src/me/contactFolders/item/contacts/delta/deltaRequestBuilder.ts deleted file mode 100644 index 86e49d5709c..00000000000 --- a/src/me/contactFolders/item/contacts/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createContactFromDiscriminatorValue, serializeContact, type Contact } from '../../../../../models/contact'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Contact[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createContactFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeContact); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/contact-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/delta/index.ts b/src/me/contactFolders/item/contacts/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/contactFolders/item/contacts/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/index.ts b/src/me/contactFolders/item/contacts/index.ts deleted file mode 100644 index e85d517bdc3..00000000000 --- a/src/me/contactFolders/item/contacts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactsRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/item/contactItemRequestBuilder.ts b/src/me/contactFolders/item/contacts/item/contactItemRequestBuilder.ts deleted file mode 100644 index ade006cf195..00000000000 --- a/src/me/contactFolders/item/contacts/item/contactItemRequestBuilder.ts +++ /dev/null @@ -1,141 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createContactFromDiscriminatorValue, deserializeIntoContact, serializeContact, type Contact } from '../../../../../models/contact'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { PhotoRequestBuilder } from './photo/photoRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the contacts property of the microsoft.graph.contactFolder entity. - */ -export class ContactItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the photo property of the microsoft.graph.contact entity. - */ - public get photo(): PhotoRequestBuilder { - return new PhotoRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ContactItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/{contact%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property contacts for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The contacts in the folder. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property contacts in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - */ - public patch(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property contacts for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The contacts in the folder. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property contacts in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContact); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContactItemRequestBuilder - */ - public withUrl(rawUrl: string) : ContactItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/item/extensions/count/countRequestBuilder.ts b/src/me/contactFolders/item/contacts/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 0307a08f040..00000000000 --- a/src/me/contactFolders/item/contacts/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/{contact%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/item/extensions/count/index.ts b/src/me/contactFolders/item/contacts/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contactFolders/item/contacts/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/item/extensions/extensionsRequestBuilder.ts b/src/me/contactFolders/item/contacts/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index cc5a1181729..00000000000 --- a/src/me/contactFolders/item/contacts/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/{contact%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/item/extensions/index.ts b/src/me/contactFolders/item/contacts/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/contactFolders/item/contacts/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/contactFolders/item/contacts/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 8b9ca236490..00000000000 --- a/src/me/contactFolders/item/contacts/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/{contact%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/item/extensions/item/index.ts b/src/me/contactFolders/item/contacts/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/contactFolders/item/contacts/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/item/index.ts b/src/me/contactFolders/item/contacts/item/index.ts deleted file mode 100644 index b56a8378ef6..00000000000 --- a/src/me/contactFolders/item/contacts/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactItemRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/item/photo/index.ts b/src/me/contactFolders/item/contacts/item/photo/index.ts deleted file mode 100644 index 447456bf7ef..00000000000 --- a/src/me/contactFolders/item/contacts/item/photo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './photoRequestBuilder' diff --git a/src/me/contactFolders/item/contacts/item/photo/photoRequestBuilder.ts b/src/me/contactFolders/item/contacts/item/photo/photoRequestBuilder.ts deleted file mode 100644 index 8039976f360..00000000000 --- a/src/me/contactFolders/item/contacts/item/photo/photoRequestBuilder.ts +++ /dev/null @@ -1,104 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createProfilePhotoFromDiscriminatorValue, deserializeIntoProfilePhoto, serializeProfilePhoto, type ProfilePhoto } from '../../../../../../models/profilePhoto'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhotoRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the photo property of the microsoft.graph.contact entity. - */ -export class PhotoRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PhotoRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/{contact%2Did}/photo{?%24select}"); - }; - /** - * Optional contact picture. You can get or set a photo for a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public patch(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Optional contact picture. You can get or set a photo for a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, photoRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeProfilePhoto); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a photoRequestBuilder - */ - public withUrl(rawUrl: string) : PhotoRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhotoRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const photoRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/contacts/item/photo/value/contentRequestBuilder.ts b/src/me/contactFolders/item/contacts/item/photo/value/contentRequestBuilder.ts deleted file mode 100644 index 99205d62bc2..00000000000 --- a/src/me/contactFolders/item/contacts/item/photo/value/contentRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contactFolders/{contactFolder%2Did}/contacts/{contact%2Did}/photo/$value"); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/contactFolders/item/index.ts b/src/me/contactFolders/item/index.ts deleted file mode 100644 index 8af84aa9963..00000000000 --- a/src/me/contactFolders/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactFolderItemRequestBuilder' diff --git a/src/me/contacts/contactsRequestBuilder.ts b/src/me/contacts/contactsRequestBuilder.ts deleted file mode 100644 index c292f95350e..00000000000 --- a/src/me/contacts/contactsRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ContactCollectionResponse } from '../../models/'; -import { createContactFromDiscriminatorValue, deserializeIntoContact, serializeContact, type Contact } from '../../models/contact'; -import { createContactCollectionResponseFromDiscriminatorValue } from '../../models/contactCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ContactItemRequestBuilder } from './item/contactItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the contacts property of the microsoft.graph.user entity. - */ -export class ContactsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contacts property of the microsoft.graph.user entity. - * @param contactId The unique identifier of contact - * @returns a ContactItemRequestBuilder - */ - public byContactId(contactId: string) : ContactItemRequestBuilder { - if(!contactId) throw new Error("contactId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["contact%2Did"] = contactId - return new ContactItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ContactsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ContactCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-contacts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - * @see {@link https://learn.microsoft.com/graph/api/user-post-contacts?view=graph-rest-1.0|Find more info here} - */ - public post(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Get a contact collection from the default contacts folder of the signed-in user. There are two scenarios where an app can get contacts in another user's contact folder: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContact); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contactsRequestBuilder - */ - public withUrl(rawUrl: string) : ContactsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/count/countRequestBuilder.ts b/src/me/contacts/count/countRequestBuilder.ts deleted file mode 100644 index fad61e5a98c..00000000000 --- a/src/me/contacts/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/count/index.ts b/src/me/contacts/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contacts/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contacts/delta/deltaRequestBuilder.ts b/src/me/contacts/delta/deltaRequestBuilder.ts deleted file mode 100644 index 7521524ba40..00000000000 --- a/src/me/contacts/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../models/baseDeltaFunctionResponse'; -import { createContactFromDiscriminatorValue, serializeContact, type Contact } from '../../../models/contact'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Contact[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createContactFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeContact); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/contact-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of contacts that have been added, deleted, or updated in a specified folder. A delta function call for contacts in a folder is similar to a GET request, except that by appropriately applying state tokens in one or more of these calls, you can query for incremental changes in the contacts in that folder. This allows you to maintain and synchronize a local store of a user's contacts without having to fetch the entire set of contacts from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/delta/index.ts b/src/me/contacts/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/contacts/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/contacts/index.ts b/src/me/contacts/index.ts deleted file mode 100644 index e85d517bdc3..00000000000 --- a/src/me/contacts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactsRequestBuilder' diff --git a/src/me/contacts/item/contactItemRequestBuilder.ts b/src/me/contacts/item/contactItemRequestBuilder.ts deleted file mode 100644 index 6b8da038e16..00000000000 --- a/src/me/contacts/item/contactItemRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createContactFromDiscriminatorValue, deserializeIntoContact, serializeContact, type Contact } from '../../../models/contact'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { PhotoRequestBuilder } from './photo/photoRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ContactItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the contacts property of the microsoft.graph.user entity. - */ -export class ContactItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the photo property of the microsoft.graph.contact entity. - */ - public get photo(): PhotoRequestBuilder { - return new PhotoRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ContactItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/{contact%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/contact-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - * @see {@link https://learn.microsoft.com/graph/api/contact-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a contact object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Contact - * @see {@link https://learn.microsoft.com/graph/api/contact-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createContactFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a contact object. There are two scenarios where an app can get a contact in another user's contact folder: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, contactItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a contact object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Contact, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeContact); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContactItemRequestBuilder - */ - public withUrl(rawUrl: string) : ContactItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContactItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const contactItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/item/extensions/count/countRequestBuilder.ts b/src/me/contacts/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 4b013550672..00000000000 --- a/src/me/contacts/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/{contact%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/item/extensions/count/index.ts b/src/me/contacts/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/contacts/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/contacts/item/extensions/extensionsRequestBuilder.ts b/src/me/contacts/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index eb15200528a..00000000000 --- a/src/me/contacts/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/{contact%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/item/extensions/index.ts b/src/me/contacts/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/contacts/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/contacts/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/contacts/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 842d49c8810..00000000000 --- a/src/me/contacts/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.contact entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/{contact%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of open extensions defined for the contact. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/item/extensions/item/index.ts b/src/me/contacts/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/contacts/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/contacts/item/index.ts b/src/me/contacts/item/index.ts deleted file mode 100644 index b56a8378ef6..00000000000 --- a/src/me/contacts/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contactItemRequestBuilder' diff --git a/src/me/contacts/item/photo/index.ts b/src/me/contacts/item/photo/index.ts deleted file mode 100644 index 447456bf7ef..00000000000 --- a/src/me/contacts/item/photo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './photoRequestBuilder' diff --git a/src/me/contacts/item/photo/photoRequestBuilder.ts b/src/me/contacts/item/photo/photoRequestBuilder.ts deleted file mode 100644 index 46518d0f3d5..00000000000 --- a/src/me/contacts/item/photo/photoRequestBuilder.ts +++ /dev/null @@ -1,104 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createProfilePhotoFromDiscriminatorValue, deserializeIntoProfilePhoto, serializeProfilePhoto, type ProfilePhoto } from '../../../../models/profilePhoto'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhotoRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the photo property of the microsoft.graph.contact entity. - */ -export class PhotoRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PhotoRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/{contact%2Did}/photo{?%24select}"); - }; - /** - * Optional contact picture. You can get or set a photo for a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public patch(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Optional contact picture. You can get or set a photo for a contact. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, photoRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeProfilePhoto); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a photoRequestBuilder - */ - public withUrl(rawUrl: string) : PhotoRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhotoRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const photoRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/contacts/item/photo/value/contentRequestBuilder.ts b/src/me/contacts/item/photo/value/contentRequestBuilder.ts deleted file mode 100644 index 8884c8e941b..00000000000 --- a/src/me/contacts/item/photo/value/contentRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/contacts/{contact%2Did}/photo/$value"); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/count/countRequestBuilder.ts b/src/me/createdObjects/count/countRequestBuilder.ts deleted file mode 100644 index c9b7e2a9378..00000000000 --- a/src/me/createdObjects/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/createdObjects/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/count/index.ts b/src/me/createdObjects/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/createdObjects/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/createdObjects/createdObjectsRequestBuilder.ts b/src/me/createdObjects/createdObjectsRequestBuilder.ts deleted file mode 100644 index 6a24fe3e740..00000000000 --- a/src/me/createdObjects/createdObjectsRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphServicePrincipalRequestBuilder } from './graphServicePrincipal/graphServicePrincipalRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CreatedObjectsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the createdObjects property of the microsoft.graph.user entity. - */ -export class CreatedObjectsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to servicePrincipal. - */ - public get graphServicePrincipal(): GraphServicePrincipalRequestBuilder { - return new GraphServicePrincipalRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the createdObjects property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new CreatedObjectsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/createdObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-createdobjects?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, createdObjectsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createdObjectsRequestBuilder - */ - public withUrl(rawUrl: string) : CreatedObjectsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreatedObjectsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const createdObjectsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/graphServicePrincipal/count/countRequestBuilder.ts b/src/me/createdObjects/graphServicePrincipal/count/countRequestBuilder.ts deleted file mode 100644 index 0b215e1495b..00000000000 --- a/src/me/createdObjects/graphServicePrincipal/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/createdObjects/graph.servicePrincipal/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/graphServicePrincipal/count/index.ts b/src/me/createdObjects/graphServicePrincipal/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/createdObjects/graphServicePrincipal/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/createdObjects/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts b/src/me/createdObjects/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts deleted file mode 100644 index 2cbc8d1310f..00000000000 --- a/src/me/createdObjects/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ServicePrincipalCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createServicePrincipalCollectionResponseFromDiscriminatorValue } from '../../../models/servicePrincipalCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphServicePrincipalRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to servicePrincipal. - */ -export class GraphServicePrincipalRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphServicePrincipalRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/createdObjects/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ServicePrincipalCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createServicePrincipalCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphServicePrincipalRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphServicePrincipalRequestBuilder - */ - public withUrl(rawUrl: string) : GraphServicePrincipalRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphServicePrincipalRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphServicePrincipalRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/graphServicePrincipal/index.ts b/src/me/createdObjects/graphServicePrincipal/index.ts deleted file mode 100644 index 9f1db600668..00000000000 --- a/src/me/createdObjects/graphServicePrincipal/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphServicePrincipalRequestBuilder' diff --git a/src/me/createdObjects/index.ts b/src/me/createdObjects/index.ts deleted file mode 100644 index a0ed88e87cf..00000000000 --- a/src/me/createdObjects/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createdObjectsRequestBuilder' diff --git a/src/me/createdObjects/item/directoryObjectItemRequestBuilder.ts b/src/me/createdObjects/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index 5ddf78d9c86..00000000000 --- a/src/me/createdObjects/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,80 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphServicePrincipalRequestBuilder } from './graphServicePrincipal/graphServicePrincipalRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the createdObjects property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to servicePrincipal. - */ - public get graphServicePrincipal(): GraphServicePrincipalRequestBuilder { - return new GraphServicePrincipalRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/createdObjects/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * Directory objects that the user created. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * Directory objects that the user created. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/item/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts b/src/me/createdObjects/item/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts deleted file mode 100644 index ebc7b33bcfe..00000000000 --- a/src/me/createdObjects/item/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ServicePrincipal } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createServicePrincipalFromDiscriminatorValue } from '../../../../models/servicePrincipal'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphServicePrincipalRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to servicePrincipal. - */ -export class GraphServicePrincipalRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphServicePrincipalRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/createdObjects/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ServicePrincipal - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createServicePrincipalFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphServicePrincipalRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphServicePrincipalRequestBuilder - */ - public withUrl(rawUrl: string) : GraphServicePrincipalRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphServicePrincipalRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphServicePrincipalRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/createdObjects/item/graphServicePrincipal/index.ts b/src/me/createdObjects/item/graphServicePrincipal/index.ts deleted file mode 100644 index 9f1db600668..00000000000 --- a/src/me/createdObjects/item/graphServicePrincipal/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphServicePrincipalRequestBuilder' diff --git a/src/me/createdObjects/item/index.ts b/src/me/createdObjects/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/createdObjects/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/deviceManagementTroubleshootingEvents/count/countRequestBuilder.ts b/src/me/deviceManagementTroubleshootingEvents/count/countRequestBuilder.ts deleted file mode 100644 index a65093e1b5d..00000000000 --- a/src/me/deviceManagementTroubleshootingEvents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/deviceManagementTroubleshootingEvents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/deviceManagementTroubleshootingEvents/count/index.ts b/src/me/deviceManagementTroubleshootingEvents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/deviceManagementTroubleshootingEvents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/deviceManagementTroubleshootingEvents/deviceManagementTroubleshootingEventsRequestBuilder.ts b/src/me/deviceManagementTroubleshootingEvents/deviceManagementTroubleshootingEventsRequestBuilder.ts deleted file mode 100644 index 2774e466eae..00000000000 --- a/src/me/deviceManagementTroubleshootingEvents/deviceManagementTroubleshootingEventsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceManagementTroubleshootingEventCollectionResponse } from '../../models/'; -import { createDeviceManagementTroubleshootingEventFromDiscriminatorValue, deserializeIntoDeviceManagementTroubleshootingEvent, serializeDeviceManagementTroubleshootingEvent, type DeviceManagementTroubleshootingEvent } from '../../models/deviceManagementTroubleshootingEvent'; -import { createDeviceManagementTroubleshootingEventCollectionResponseFromDiscriminatorValue } from '../../models/deviceManagementTroubleshootingEventCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeviceManagementTroubleshootingEventItemRequestBuilder } from './item/deviceManagementTroubleshootingEventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceManagementTroubleshootingEventsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the deviceManagementTroubleshootingEvents property of the microsoft.graph.user entity. - */ -export class DeviceManagementTroubleshootingEventsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceManagementTroubleshootingEvents property of the microsoft.graph.user entity. - * @param deviceManagementTroubleshootingEventId The unique identifier of deviceManagementTroubleshootingEvent - * @returns a DeviceManagementTroubleshootingEventItemRequestBuilder - */ - public byDeviceManagementTroubleshootingEventId(deviceManagementTroubleshootingEventId: string) : DeviceManagementTroubleshootingEventItemRequestBuilder { - if(!deviceManagementTroubleshootingEventId) throw new Error("deviceManagementTroubleshootingEventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["deviceManagementTroubleshootingEvent%2Did"] = deviceManagementTroubleshootingEventId - return new DeviceManagementTroubleshootingEventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new DeviceManagementTroubleshootingEventsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/deviceManagementTroubleshootingEvents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The list of troubleshooting events for this user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceManagementTroubleshootingEventCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceManagementTroubleshootingEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to deviceManagementTroubleshootingEvents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceManagementTroubleshootingEvent - */ - public post(body: DeviceManagementTroubleshootingEvent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceManagementTroubleshootingEventFromDiscriminatorValue, errorMapping); - }; - /** - * The list of troubleshooting events for this user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceManagementTroubleshootingEventsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to deviceManagementTroubleshootingEvents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeviceManagementTroubleshootingEvent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceManagementTroubleshootingEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deviceManagementTroubleshootingEventsRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceManagementTroubleshootingEventsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceManagementTroubleshootingEventsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceManagementTroubleshootingEventsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/deviceManagementTroubleshootingEvents/index.ts b/src/me/deviceManagementTroubleshootingEvents/index.ts deleted file mode 100644 index 2d60fc900bb..00000000000 --- a/src/me/deviceManagementTroubleshootingEvents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceManagementTroubleshootingEventsRequestBuilder' diff --git a/src/me/deviceManagementTroubleshootingEvents/item/deviceManagementTroubleshootingEventItemRequestBuilder.ts b/src/me/deviceManagementTroubleshootingEvents/item/deviceManagementTroubleshootingEventItemRequestBuilder.ts deleted file mode 100644 index f0e8c331b1a..00000000000 --- a/src/me/deviceManagementTroubleshootingEvents/item/deviceManagementTroubleshootingEventItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDeviceManagementTroubleshootingEventFromDiscriminatorValue, deserializeIntoDeviceManagementTroubleshootingEvent, serializeDeviceManagementTroubleshootingEvent, type DeviceManagementTroubleshootingEvent } from '../../../models/deviceManagementTroubleshootingEvent'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceManagementTroubleshootingEventItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the deviceManagementTroubleshootingEvents property of the microsoft.graph.user entity. - */ -export class DeviceManagementTroubleshootingEventItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeviceManagementTroubleshootingEventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/deviceManagementTroubleshootingEvents/{deviceManagementTroubleshootingEvent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property deviceManagementTroubleshootingEvents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The list of troubleshooting events for this user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceManagementTroubleshootingEvent - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceManagementTroubleshootingEventFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property deviceManagementTroubleshootingEvents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceManagementTroubleshootingEvent - */ - public patch(body: DeviceManagementTroubleshootingEvent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceManagementTroubleshootingEventFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property deviceManagementTroubleshootingEvents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The list of troubleshooting events for this user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceManagementTroubleshootingEventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property deviceManagementTroubleshootingEvents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: DeviceManagementTroubleshootingEvent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceManagementTroubleshootingEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DeviceManagementTroubleshootingEventItemRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceManagementTroubleshootingEventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceManagementTroubleshootingEventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceManagementTroubleshootingEventItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/deviceManagementTroubleshootingEvents/item/index.ts b/src/me/deviceManagementTroubleshootingEvents/item/index.ts deleted file mode 100644 index ba840019269..00000000000 --- a/src/me/deviceManagementTroubleshootingEvents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceManagementTroubleshootingEventItemRequestBuilder' diff --git a/src/me/directReports/count/countRequestBuilder.ts b/src/me/directReports/count/countRequestBuilder.ts deleted file mode 100644 index 45097370c15..00000000000 --- a/src/me/directReports/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/count/index.ts b/src/me/directReports/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/directReports/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/directReports/directReportsRequestBuilder.ts b/src/me/directReports/directReportsRequestBuilder.ts deleted file mode 100644 index f28596d5412..00000000000 --- a/src/me/directReports/directReportsRequestBuilder.ts +++ /dev/null @@ -1,137 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphOrgContactRequestBuilder } from './graphOrgContact/graphOrgContactRequestBuilder'; -import { GraphUserRequestBuilder } from './graphUser/graphUserRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectReportsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the directReports property of the microsoft.graph.user entity. - */ -export class DirectReportsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to orgContact. - */ - public get graphOrgContact(): GraphOrgContactRequestBuilder { - return new GraphOrgContactRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to user. - */ - public get graphUser(): GraphUserRequestBuilder { - return new GraphUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the directReports property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new DirectReportsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-directreports?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directReportsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a directReportsRequestBuilder - */ - public withUrl(rawUrl: string) : DirectReportsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectReportsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directReportsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/graphOrgContact/count/countRequestBuilder.ts b/src/me/directReports/graphOrgContact/count/countRequestBuilder.ts deleted file mode 100644 index b3d4fd1e710..00000000000 --- a/src/me/directReports/graphOrgContact/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/graph.orgContact/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/graphOrgContact/count/index.ts b/src/me/directReports/graphOrgContact/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/directReports/graphOrgContact/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/directReports/graphOrgContact/graphOrgContactRequestBuilder.ts b/src/me/directReports/graphOrgContact/graphOrgContactRequestBuilder.ts deleted file mode 100644 index 1ceb45f84bb..00000000000 --- a/src/me/directReports/graphOrgContact/graphOrgContactRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OrgContactCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOrgContactCollectionResponseFromDiscriminatorValue } from '../../../models/orgContactCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphOrgContactRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to orgContact. - */ -export class GraphOrgContactRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphOrgContactRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/graph.orgContact{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OrgContactCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOrgContactCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphOrgContactRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphOrgContactRequestBuilder - */ - public withUrl(rawUrl: string) : GraphOrgContactRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphOrgContactRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphOrgContactRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/graphOrgContact/index.ts b/src/me/directReports/graphOrgContact/index.ts deleted file mode 100644 index 2049e367bad..00000000000 --- a/src/me/directReports/graphOrgContact/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphOrgContactRequestBuilder' diff --git a/src/me/directReports/graphUser/count/countRequestBuilder.ts b/src/me/directReports/graphUser/count/countRequestBuilder.ts deleted file mode 100644 index 08a1d012476..00000000000 --- a/src/me/directReports/graphUser/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/graph.user/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/graphUser/count/index.ts b/src/me/directReports/graphUser/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/directReports/graphUser/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/directReports/graphUser/graphUserRequestBuilder.ts b/src/me/directReports/graphUser/graphUserRequestBuilder.ts deleted file mode 100644 index 8dbcb0d80c9..00000000000 --- a/src/me/directReports/graphUser/graphUserRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type UserCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createUserCollectionResponseFromDiscriminatorValue } from '../../../models/userCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphUserRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to user. - */ -export class GraphUserRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphUserRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphUserRequestBuilder - */ - public withUrl(rawUrl: string) : GraphUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphUserRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/graphUser/index.ts b/src/me/directReports/graphUser/index.ts deleted file mode 100644 index db6e5ad25bf..00000000000 --- a/src/me/directReports/graphUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphUserRequestBuilder' diff --git a/src/me/directReports/index.ts b/src/me/directReports/index.ts deleted file mode 100644 index 347d395202f..00000000000 --- a/src/me/directReports/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directReportsRequestBuilder' diff --git a/src/me/directReports/item/directoryObjectItemRequestBuilder.ts b/src/me/directReports/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index c15fbf135e4..00000000000 --- a/src/me/directReports/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphOrgContactRequestBuilder } from './graphOrgContact/graphOrgContactRequestBuilder'; -import { GraphUserRequestBuilder } from './graphUser/graphUserRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the directReports property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to orgContact. - */ - public get graphOrgContact(): GraphOrgContactRequestBuilder { - return new GraphOrgContactRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to user. - */ - public get graphUser(): GraphUserRequestBuilder { - return new GraphUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/item/graphOrgContact/graphOrgContactRequestBuilder.ts b/src/me/directReports/item/graphOrgContact/graphOrgContactRequestBuilder.ts deleted file mode 100644 index 2dd13362cb0..00000000000 --- a/src/me/directReports/item/graphOrgContact/graphOrgContactRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OrgContact } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createOrgContactFromDiscriminatorValue } from '../../../../models/orgContact'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphOrgContactRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to orgContact. - */ -export class GraphOrgContactRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphOrgContactRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/{directoryObject%2Did}/graph.orgContact{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OrgContact - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOrgContactFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphOrgContactRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphOrgContactRequestBuilder - */ - public withUrl(rawUrl: string) : GraphOrgContactRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphOrgContactRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphOrgContactRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/item/graphOrgContact/index.ts b/src/me/directReports/item/graphOrgContact/index.ts deleted file mode 100644 index 2049e367bad..00000000000 --- a/src/me/directReports/item/graphOrgContact/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphOrgContactRequestBuilder' diff --git a/src/me/directReports/item/graphUser/graphUserRequestBuilder.ts b/src/me/directReports/item/graphUser/graphUserRequestBuilder.ts deleted file mode 100644 index 944e17d0c5a..00000000000 --- a/src/me/directReports/item/graphUser/graphUserRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type User } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createUserFromDiscriminatorValue } from '../../../../models/user'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphUserRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to user. - */ -export class GraphUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/directReports/{directoryObject%2Did}/graph.user{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.user - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of User - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.user - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphUserRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphUserRequestBuilder - */ - public withUrl(rawUrl: string) : GraphUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphUserRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/directReports/item/graphUser/index.ts b/src/me/directReports/item/graphUser/index.ts deleted file mode 100644 index db6e5ad25bf..00000000000 --- a/src/me/directReports/item/graphUser/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphUserRequestBuilder' diff --git a/src/me/directReports/item/index.ts b/src/me/directReports/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/directReports/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/drive/driveRequestBuilder.ts b/src/me/drive/driveRequestBuilder.ts deleted file mode 100644 index bd7a56a840d..00000000000 --- a/src/me/drive/driveRequestBuilder.ts +++ /dev/null @@ -1,74 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Drive } from '../../models/'; -import { createDriveFromDiscriminatorValue } from '../../models/drive'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DriveRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the drive property of the microsoft.graph.user entity. - */ -export class DriveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DriveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/drive{?%24select,%24expand}"); - }; - /** - * Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Drive - * @see {@link https://learn.microsoft.com/graph/api/drive-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the properties and relationships of a Drive resource. A Drive is the top-level container for a file system, such as OneDrive or SharePoint document libraries. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, driveRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a driveRequestBuilder - */ - public withUrl(rawUrl: string) : DriveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DriveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const driveRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/drive/index.ts b/src/me/drive/index.ts deleted file mode 100644 index ee8f31feea5..00000000000 --- a/src/me/drive/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './driveRequestBuilder' diff --git a/src/me/drives/count/countRequestBuilder.ts b/src/me/drives/count/countRequestBuilder.ts deleted file mode 100644 index fbeb93b877c..00000000000 --- a/src/me/drives/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/drives/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/drives/count/index.ts b/src/me/drives/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/drives/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/drives/drivesRequestBuilder.ts b/src/me/drives/drivesRequestBuilder.ts deleted file mode 100644 index 1d01ddeccd3..00000000000 --- a/src/me/drives/drivesRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DriveCollectionResponse } from '../../models/'; -import { createDriveCollectionResponseFromDiscriminatorValue } from '../../models/driveCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DriveItemRequestBuilder } from './item/driveItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DrivesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the drives property of the microsoft.graph.user entity. - */ -export class DrivesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the drives property of the microsoft.graph.user entity. - * @param driveId The unique identifier of drive - * @returns a DriveItemRequestBuilder - */ - public byDriveId(driveId: string) : DriveItemRequestBuilder { - if(!driveId) throw new Error("driveId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["drive%2Did"] = driveId - return new DriveItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new DrivesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/drives{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of Drive resources available for a target User, Group, or Site. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DriveCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/drive-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of Drive resources available for a target User, Group, or Site. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, drivesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a drivesRequestBuilder - */ - public withUrl(rawUrl: string) : DrivesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DrivesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const drivesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/drives/index.ts b/src/me/drives/index.ts deleted file mode 100644 index 2fce61603ee..00000000000 --- a/src/me/drives/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './drivesRequestBuilder' diff --git a/src/me/drives/item/driveItemRequestBuilder.ts b/src/me/drives/item/driveItemRequestBuilder.ts deleted file mode 100644 index 0201c394aaa..00000000000 --- a/src/me/drives/item/driveItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Drive } from '../../../models/'; -import { createDriveFromDiscriminatorValue } from '../../../models/drive'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DriveItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the drives property of the microsoft.graph.user entity. - */ -export class DriveItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DriveItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/drives/{drive%2Did}{?%24select,%24expand}"); - }; - /** - * A collection of drives available for this user. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Drive - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveFromDiscriminatorValue, errorMapping); - }; - /** - * A collection of drives available for this user. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, driveItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DriveItemRequestBuilder - */ - public withUrl(rawUrl: string) : DriveItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DriveItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const driveItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/drives/item/index.ts b/src/me/drives/item/index.ts deleted file mode 100644 index 91f7568f46e..00000000000 --- a/src/me/drives/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './driveItemRequestBuilder' diff --git a/src/me/employeeExperience/employeeExperienceRequestBuilder.ts b/src/me/employeeExperience/employeeExperienceRequestBuilder.ts deleted file mode 100644 index 69a340fb7c0..00000000000 --- a/src/me/employeeExperience/employeeExperienceRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createEmployeeExperienceUserFromDiscriminatorValue, deserializeIntoEmployeeExperienceUser, serializeEmployeeExperienceUser, type EmployeeExperienceUser } from '../../models/employeeExperienceUser'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { LearningCourseActivitiesRequestBuilder } from './learningCourseActivities/learningCourseActivitiesRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EmployeeExperienceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the employeeExperience property of the microsoft.graph.user entity. - */ -export class EmployeeExperienceRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. - */ - public get learningCourseActivities(): LearningCourseActivitiesRequestBuilder { - return new LearningCourseActivitiesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EmployeeExperienceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/employeeExperience{?%24select,%24expand}"); - }; - /** - * Delete navigation property employeeExperience for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get employeeExperience from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EmployeeExperienceUser - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEmployeeExperienceUserFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property employeeExperience in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EmployeeExperienceUser - */ - public patch(body: EmployeeExperienceUser, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEmployeeExperienceUserFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property employeeExperience for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get employeeExperience from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, employeeExperienceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property employeeExperience in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: EmployeeExperienceUser, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEmployeeExperienceUser); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a employeeExperienceRequestBuilder - */ - public withUrl(rawUrl: string) : EmployeeExperienceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EmployeeExperienceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const employeeExperienceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/employeeExperience/index.ts b/src/me/employeeExperience/index.ts deleted file mode 100644 index f8af0d7d5c5..00000000000 --- a/src/me/employeeExperience/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './employeeExperienceRequestBuilder' diff --git a/src/me/employeeExperience/learningCourseActivities/count/countRequestBuilder.ts b/src/me/employeeExperience/learningCourseActivities/count/countRequestBuilder.ts deleted file mode 100644 index 9147ff673f0..00000000000 --- a/src/me/employeeExperience/learningCourseActivities/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/employeeExperience/learningCourseActivities/count/index.ts b/src/me/employeeExperience/learningCourseActivities/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/employeeExperience/learningCourseActivities/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/employeeExperience/learningCourseActivities/index.ts b/src/me/employeeExperience/learningCourseActivities/index.ts deleted file mode 100644 index 6653dd733e8..00000000000 --- a/src/me/employeeExperience/learningCourseActivities/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './learningCourseActivitiesRequestBuilder' diff --git a/src/me/employeeExperience/learningCourseActivities/item/index.ts b/src/me/employeeExperience/learningCourseActivities/item/index.ts deleted file mode 100644 index 88d064fcdf2..00000000000 --- a/src/me/employeeExperience/learningCourseActivities/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './learningCourseActivityItemRequestBuilder' diff --git a/src/me/employeeExperience/learningCourseActivities/item/learningCourseActivityItemRequestBuilder.ts b/src/me/employeeExperience/learningCourseActivities/item/learningCourseActivityItemRequestBuilder.ts deleted file mode 100644 index 1adf875cce6..00000000000 --- a/src/me/employeeExperience/learningCourseActivities/item/learningCourseActivityItemRequestBuilder.ts +++ /dev/null @@ -1,74 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type LearningCourseActivity } from '../../../../models/'; -import { createLearningCourseActivityFromDiscriminatorValue } from '../../../../models/learningCourseActivity'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LearningCourseActivityItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. - */ -export class LearningCourseActivityItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LearningCourseActivityItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities/{learningCourseActivity%2Did}{?%24select,%24expand}"); - }; - /** - * Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LearningCourseActivity - * @see {@link https://learn.microsoft.com/graph/api/learningcourseactivity-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLearningCourseActivityFromDiscriminatorValue, errorMapping); - }; - /** - * Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, learningCourseActivityItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a LearningCourseActivityItemRequestBuilder - */ - public withUrl(rawUrl: string) : LearningCourseActivityItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LearningCourseActivityItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const learningCourseActivityItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/employeeExperience/learningCourseActivities/learningCourseActivitiesRequestBuilder.ts b/src/me/employeeExperience/learningCourseActivities/learningCourseActivitiesRequestBuilder.ts deleted file mode 100644 index 11aa8beb5cc..00000000000 --- a/src/me/employeeExperience/learningCourseActivities/learningCourseActivitiesRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type LearningCourseActivityCollectionResponse } from '../../../models/'; -import { createLearningCourseActivityCollectionResponseFromDiscriminatorValue } from '../../../models/learningCourseActivityCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { LearningCourseActivityItemRequestBuilder } from './item/learningCourseActivityItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LearningCourseActivitiesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. - */ -export class LearningCourseActivitiesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. - * @param learningCourseActivityId The unique identifier of learningCourseActivity - * @returns a LearningCourseActivityItemRequestBuilder - */ - public byLearningCourseActivityId(learningCourseActivityId: string) : LearningCourseActivityItemRequestBuilder { - if(!learningCourseActivityId) throw new Error("learningCourseActivityId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["learningCourseActivity%2Did"] = learningCourseActivityId - return new LearningCourseActivityItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new LearningCourseActivitiesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/employeeExperience/learningCourseActivities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LearningCourseActivityCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/learningcourseactivity-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLearningCourseActivityCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, learningCourseActivitiesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a learningCourseActivitiesRequestBuilder - */ - public withUrl(rawUrl: string) : LearningCourseActivitiesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LearningCourseActivitiesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const learningCourseActivitiesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/count/countRequestBuilder.ts b/src/me/events/count/countRequestBuilder.ts deleted file mode 100644 index 7a1c4601a39..00000000000 --- a/src/me/events/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/count/index.ts b/src/me/events/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/events/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/events/delta/deltaRequestBuilder.ts b/src/me/events/delta/deltaRequestBuilder.ts deleted file mode 100644 index 0ba3235b02c..00000000000 --- a/src/me/events/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../models/event'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/delta/index.ts b/src/me/events/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/events/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/events/eventsRequestBuilder.ts b/src/me/events/eventsRequestBuilder.ts deleted file mode 100644 index df0b2aad192..00000000000 --- a/src/me/events/eventsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../models/'; -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../models/event'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../models/eventCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the events property of the microsoft.graph.user entity. - */ -export class EventsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.user entity. - * @param eventId The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId(eventId: string) : EventItemRequestBuilder { - if(!eventId) throw new Error("eventId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did"] = eventId - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new EventsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-events?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create one or more single-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources: See Extended properties overview for more information about when to useopen extensions or extended properties, and how to specify extended properties. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/singlevaluelegacyextendedproperty-post-singlevalueextendedproperties?view=graph-rest-1.0|Find more info here} - */ - public post(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create one or more single-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources: See Extended properties overview for more information about when to useopen extensions or extended properties, and how to specify extended properties. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a eventsRequestBuilder - */ - public withUrl(rawUrl: string) : EventsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/index.ts b/src/me/events/index.ts deleted file mode 100644 index 7a5c17c7c94..00000000000 --- a/src/me/events/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventsRequestBuilder' diff --git a/src/me/events/item/accept/acceptRequestBuilder.ts b/src/me/events/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index dff892b3a86..00000000000 --- a/src/me/events/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/accept/index.ts b/src/me/events/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/events/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/events/item/attachments/attachmentsRequestBuilder.ts b/src/me/events/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index dc210b4aa04..00000000000 --- a/src/me/events/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/attachments/count/countRequestBuilder.ts b/src/me/events/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index c068784e721..00000000000 --- a/src/me/events/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/attachments/count/index.ts b/src/me/events/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/events/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index bc9a168317b..00000000000 --- a/src/me/events/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/attachments/createUploadSession/index.ts b/src/me/events/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/events/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/events/item/attachments/index.ts b/src/me/events/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/events/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/events/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/events/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 99a1fc1ac21..00000000000 --- a/src/me/events/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../models/attachment'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/attachments/item/index.ts b/src/me/events/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/events/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/events/item/calendar/calendarRequestBuilder.ts b/src/me/events/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index c0588cb28a7..00000000000 --- a/src/me/events/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../models/calendar'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/calendar/index.ts b/src/me/events/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/events/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/events/item/cancel/cancelPostRequestBody.ts b/src/me/events/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/events/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/cancel/cancelRequestBuilder.ts b/src/me/events/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 5ef0b61f9e4..00000000000 --- a/src/me/events/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/cancel/index.ts b/src/me/events/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/events/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/events/item/decline/declineRequestBuilder.ts b/src/me/events/item/decline/declineRequestBuilder.ts deleted file mode 100644 index 135cc501409..00000000000 --- a/src/me/events/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/decline/index.ts b/src/me/events/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/events/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/events/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/events/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index 71d4be23bc3..00000000000 --- a/src/me/events/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/eventItemRequestBuilder.ts b/src/me/events/item/eventItemRequestBuilder.ts deleted file mode 100644 index 5b5ea5dac12..00000000000 --- a/src/me/events/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,207 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createEventFromDiscriminatorValue, deserializeIntoEvent, serializeEvent, type Event } from '../../../models/event'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { InstancesRequestBuilder } from './instances/instancesRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the events property of the microsoft.graph.user entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ - public get instances(): InstancesRequestBuilder { - return new InstancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}{?%24select,%24expand}"); - }; - /** - * Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/event-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - * @see {@link https://learn.microsoft.com/graph/api/event-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Event, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the event object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Event, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEvent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/extensions/count/countRequestBuilder.ts b/src/me/events/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 3574441c1f6..00000000000 --- a/src/me/events/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/extensions/count/index.ts b/src/me/events/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/events/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/events/item/extensions/extensionsRequestBuilder.ts b/src/me/events/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 077f84024d3..00000000000 --- a/src/me/events/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/extensions/index.ts b/src/me/events/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/events/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/events/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/events/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 1effd5e898c..00000000000 --- a/src/me/events/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/extensions/item/index.ts b/src/me/events/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/events/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/events/item/forward/forwardPostRequestBody.ts b/src/me/events/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 2ccd8932e99..00000000000 --- a/src/me/events/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/forward/forwardRequestBuilder.ts b/src/me/events/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 1ee2f1fdd67..00000000000 --- a/src/me/events/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/forward/index.ts b/src/me/events/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/events/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/events/item/index.ts b/src/me/events/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/events/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/events/item/instances/count/countRequestBuilder.ts b/src/me/events/item/instances/count/countRequestBuilder.ts deleted file mode 100644 index cd6d0cdb499..00000000000 --- a/src/me/events/item/instances/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/count/index.ts b/src/me/events/item/instances/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/events/item/instances/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/events/item/instances/delta/deltaRequestBuilder.ts b/src/me/events/item/instances/delta/deltaRequestBuilder.ts deleted file mode 100644 index eb835c78357..00000000000 --- a/src/me/events/item/instances/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createEventFromDiscriminatorValue, serializeEvent, type Event } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Event[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: 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; - /** - * The start date and time of the time range in the function, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createEventFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeEvent); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/delta(){?startDateTime*,endDateTime*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/event-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of event resources that have been added, deleted, or updated in a calendarView (a range of events defined by start and end dates) of the user's primary calendar. Typically, synchronizing events in a calendarView in a local store entails a round of multiple delta function calls. The initial call is a full synchronization, and every subsequent delta call in the same round gets the incremental changes (additions, deletions, or updates). This allows you to maintain and synchronize a local store of events in the specified calendarView, without having to fetch all the events of that calendar from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/delta/index.ts b/src/me/events/item/instances/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/events/item/instances/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/events/item/instances/index.ts b/src/me/events/item/instances/index.ts deleted file mode 100644 index 5e69bc4559b..00000000000 --- a/src/me/events/item/instances/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './instancesRequestBuilder' diff --git a/src/me/events/item/instances/instancesRequestBuilder.ts b/src/me/events/item/instances/instancesRequestBuilder.ts deleted file mode 100644 index 16ac94dca41..00000000000 --- a/src/me/events/item/instances/instancesRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EventCollectionResponse } from '../../../../models/'; -import { createEventCollectionResponseFromDiscriminatorValue } from '../../../../models/eventCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { EventItemRequestBuilder } from './item/eventItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstancesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class InstancesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - * @param eventId1 The unique identifier of event - * @returns a EventItemRequestBuilder - */ - public byEventId1(eventId1: string) : EventItemRequestBuilder { - if(!eventId1) throw new Error("eventId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["event%2Did1"] = eventId1 - return new EventItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstancesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EventCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-instances?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, instancesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a instancesRequestBuilder - */ - public withUrl(rawUrl: string) : InstancesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstancesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const instancesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/accept/acceptRequestBuilder.ts b/src/me/events/item/instances/item/accept/acceptRequestBuilder.ts deleted file mode 100644 index 5e74851c49d..00000000000 --- a/src/me/events/item/instances/item/accept/acceptRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAcceptPostRequestBody; -} -export function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : Record void> { - return { - "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); }, - "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeAcceptPostRequestBody(writer: SerializationWriter, acceptPostRequestBody: AcceptPostRequestBody | undefined = {} as AcceptPostRequestBody) : void { - writer.writeStringValue("Comment", acceptPostRequestBody.comment); - writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse); - writer.writeAdditionalData(acceptPostRequestBody.additionalData); -} -/** - * Provides operations to call the accept method. - */ -export class AcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/accept"); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-accept?view=graph-rest-1.0|Find more info here} - */ - public post(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Accept the specified event in a user calendar. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a acceptRequestBuilder - */ - public withUrl(rawUrl: string) : AcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/accept/index.ts b/src/me/events/item/instances/item/accept/index.ts deleted file mode 100644 index a6c691f8da0..00000000000 --- a/src/me/events/item/instances/item/accept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './acceptRequestBuilder' diff --git a/src/me/events/item/instances/item/attachments/attachmentsRequestBuilder.ts b/src/me/events/item/instances/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index b37c8e91775..00000000000 --- a/src/me/events/item/instances/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,157 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/event-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to an event. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/attachments/count/countRequestBuilder.ts b/src/me/events/item/instances/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 5f651858963..00000000000 --- a/src/me/events/item/instances/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/attachments/count/index.ts b/src/me/events/item/instances/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/events/item/instances/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 05f66ae6642..00000000000 --- a/src/me/events/item/instances/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/attachments/createUploadSession/index.ts b/src/me/events/item/instances/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/events/item/instances/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/events/item/instances/item/attachments/index.ts b/src/me/events/item/instances/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/events/item/instances/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 327e9518f6a..00000000000 --- a/src/me/events/item/instances/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/attachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an attachment from a user calendar event, mail message, or group post. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/attachments/item/index.ts b/src/me/events/item/instances/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/events/item/instances/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/events/item/instances/item/calendar/calendarRequestBuilder.ts b/src/me/events/item/instances/item/calendar/calendarRequestBuilder.ts deleted file mode 100644 index 0cb279028cc..00000000000 --- a/src/me/events/item/instances/item/calendar/calendarRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Calendar } from '../../../../../../models/'; -import { createCalendarFromDiscriminatorValue } from '../../../../../../models/calendar'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CalendarRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ -export class CalendarRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CalendarRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/calendar{?%24select}"); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Calendar - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCalendarFromDiscriminatorValue, errorMapping); - }; - /** - * The calendar that contains the event. Navigation property. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, calendarRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a calendarRequestBuilder - */ - public withUrl(rawUrl: string) : CalendarRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CalendarRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const calendarRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/calendar/index.ts b/src/me/events/item/instances/item/calendar/index.ts deleted file mode 100644 index bf787f70a91..00000000000 --- a/src/me/events/item/instances/item/calendar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './calendarRequestBuilder' diff --git a/src/me/events/item/instances/item/cancel/cancelPostRequestBody.ts b/src/me/events/item/instances/item/cancel/cancelPostRequestBody.ts deleted file mode 100644 index 97a3c945851..00000000000 --- a/src/me/events/item/instances/item/cancel/cancelPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CancelPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; -} -export function createCancelPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCancelPostRequestBody; -} -export function deserializeIntoCancelPostRequestBody(cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : Record void> { - return { - "comment": n => { cancelPostRequestBody.comment = n.getStringValue(); }, - } -} -export function serializeCancelPostRequestBody(writer: SerializationWriter, cancelPostRequestBody: CancelPostRequestBody | undefined = {} as CancelPostRequestBody) : void { - writer.writeStringValue("Comment", cancelPostRequestBody.comment); - writer.writeAdditionalData(cancelPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/cancel/cancelRequestBuilder.ts b/src/me/events/item/instances/item/cancel/cancelRequestBuilder.ts deleted file mode 100644 index 84775751227..00000000000 --- a/src/me/events/item/instances/item/cancel/cancelRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCancelPostRequestBody, serializeCancelPostRequestBody, type CancelPostRequestBody } from './cancelPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cancel method. - */ -export class CancelRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CancelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/cancel"); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-cancel?view=graph-rest-1.0|Find more info here} - */ - public post(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the followingerror message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and letsthe organizer send a custom message to the attendees about the cancellation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CancelPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCancelPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cancelRequestBuilder - */ - public withUrl(rawUrl: string) : CancelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CancelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/cancel/index.ts b/src/me/events/item/instances/item/cancel/index.ts deleted file mode 100644 index 050d8979463..00000000000 --- a/src/me/events/item/instances/item/cancel/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cancelPostRequestBody' -export * from './cancelRequestBuilder' diff --git a/src/me/events/item/instances/item/decline/declineRequestBuilder.ts b/src/me/events/item/instances/item/decline/declineRequestBuilder.ts deleted file mode 100644 index ff5aec0bf50..00000000000 --- a/src/me/events/item/instances/item/decline/declineRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeclinePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeclinePostRequestBody; -} -export interface DeclinePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -export function deserializeIntoDeclinePostRequestBody(declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : Record void> { - return { - "comment": n => { declinePostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { declinePostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { declinePostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeDeclinePostRequestBody(writer: SerializationWriter, declinePostRequestBody: DeclinePostRequestBody | undefined = {} as DeclinePostRequestBody) : void { - writer.writeStringValue("Comment", declinePostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", declinePostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", declinePostRequestBody.sendResponse); - writer.writeAdditionalData(declinePostRequestBody.additionalData); -} -/** - * Provides operations to call the decline method. - */ -export class DeclineRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeclineRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/decline"); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-decline?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeclinePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeclinePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a declineRequestBuilder - */ - public withUrl(rawUrl: string) : DeclineRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeclineRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/decline/index.ts b/src/me/events/item/instances/item/decline/index.ts deleted file mode 100644 index c85b122b96a..00000000000 --- a/src/me/events/item/instances/item/decline/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './declineRequestBuilder' diff --git a/src/me/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts b/src/me/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts deleted file mode 100644 index e36c7a94fa1..00000000000 --- a/src/me/events/item/instances/item/dismissReminder/dismissReminderRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the dismissReminder method. - */ -export class DismissReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DismissReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/dismissReminder"); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-dismissreminder?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Dismiss a reminder that has been triggered for an event in a user calendar. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a dismissReminderRequestBuilder - */ - public withUrl(rawUrl: string) : DismissReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DismissReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/eventItemRequestBuilder.ts b/src/me/events/item/instances/item/eventItemRequestBuilder.ts deleted file mode 100644 index ee5be9826d7..00000000000 --- a/src/me/events/item/instances/item/eventItemRequestBuilder.ts +++ /dev/null @@ -1,146 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Event } from '../../../../../models/'; -import { createEventFromDiscriminatorValue } from '../../../../../models/event'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AcceptRequestBuilder } from './accept/acceptRequestBuilder'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CancelRequestBuilder } from './cancel/cancelRequestBuilder'; -import { DeclineRequestBuilder } from './decline/declineRequestBuilder'; -import { DismissReminderRequestBuilder } from './dismissReminder/dismissReminderRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { SnoozeReminderRequestBuilder } from './snoozeReminder/snoozeReminderRequestBuilder'; -import { TentativelyAcceptRequestBuilder } from './tentativelyAccept/tentativelyAcceptRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface EventItemRequestBuilderGetQueryParameters { - /** - * The end date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T20:00:00-08:00 - */ - endDateTime?: string; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * The start date and time of the time range, represented in ISO 8601 format. For example, 2019-11-08T19:00:00-08:00 - */ - startDateTime?: string; -} -/** - * Provides operations to manage the instances property of the microsoft.graph.event entity. - */ -export class EventItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the accept method. - */ - public get accept(): AcceptRequestBuilder { - return new AcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.event entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.event entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cancel method. - */ - public get cancel(): CancelRequestBuilder { - return new CancelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the decline method. - */ - public get decline(): DeclineRequestBuilder { - return new DeclineRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the dismissReminder method. - */ - public get dismissReminder(): DismissReminderRequestBuilder { - return new DismissReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the snoozeReminder method. - */ - public get snoozeReminder(): SnoozeReminderRequestBuilder { - return new SnoozeReminderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the tentativelyAccept method. - */ - public get tentativelyAccept(): TentativelyAcceptRequestBuilder { - return new TentativelyAcceptRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new EventItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}{?startDateTime*,endDateTime*,%24select}"); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Event - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEventFromDiscriminatorValue, errorMapping); - }; - /** - * The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, eventItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a EventItemRequestBuilder - */ - public withUrl(rawUrl: string) : EventItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new EventItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const eventItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/extensions/count/countRequestBuilder.ts b/src/me/events/item/instances/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index e0f8f22da00..00000000000 --- a/src/me/events/item/instances/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/extensions/count/index.ts b/src/me/events/item/instances/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/events/item/instances/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/events/item/instances/item/extensions/extensionsRequestBuilder.ts b/src/me/events/item/instances/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index c4c067565f8..00000000000 --- a/src/me/events/item/instances/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/extensions/index.ts b/src/me/events/item/instances/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/events/item/instances/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 312b6521a4a..00000000000 --- a/src/me/events/item/instances/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.event entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/extensions/item/index.ts b/src/me/events/item/instances/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/events/item/instances/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/events/item/instances/item/forward/forwardPostRequestBody.ts b/src/me/events/item/instances/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index c67b323605d..00000000000 --- a/src/me/events/item/instances/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/forward/forwardRequestBuilder.ts b/src/me/events/item/instances/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 1f5fed20332..00000000000 --- a/src/me/events/item/instances/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/forward"); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/forward/index.ts b/src/me/events/item/instances/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/events/item/instances/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/events/item/instances/item/index.ts b/src/me/events/item/instances/item/index.ts deleted file mode 100644 index 44639a672cb..00000000000 --- a/src/me/events/item/instances/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './eventItemRequestBuilder' diff --git a/src/me/events/item/instances/item/snoozeReminder/index.ts b/src/me/events/item/instances/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/events/item/instances/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 4976ce5ed02..00000000000 --- a/src/me/events/item/instances/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/instances/item/tentativelyAccept/index.ts b/src/me/events/item/instances/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/events/item/instances/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 15dbedb23d8..00000000000 --- a/src/me/events/item/instances/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/instances/{event%2Did1}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/snoozeReminder/index.ts b/src/me/events/item/snoozeReminder/index.ts deleted file mode 100644 index ced20db0a20..00000000000 --- a/src/me/events/item/snoozeReminder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './snoozeReminderRequestBuilder' diff --git a/src/me/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts b/src/me/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts deleted file mode 100644 index 17dc7347747..00000000000 --- a/src/me/events/item/snoozeReminder/snoozeReminderRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDateTimeTimeZoneFromDiscriminatorValue, serializeDateTimeTimeZone, type DateTimeTimeZone } from '../../../../models/dateTimeTimeZone'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSnoozeReminderPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSnoozeReminderPostRequestBody; -} -export function deserializeIntoSnoozeReminderPostRequestBody(snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : Record void> { - return { - "newReminderTime": n => { snoozeReminderPostRequestBody.newReminderTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); }, - } -} -export function serializeSnoozeReminderPostRequestBody(writer: SerializationWriter, snoozeReminderPostRequestBody: SnoozeReminderPostRequestBody | undefined = {} as SnoozeReminderPostRequestBody) : void { - writer.writeObjectValue("NewReminderTime", snoozeReminderPostRequestBody.newReminderTime, serializeDateTimeTimeZone); - writer.writeAdditionalData(snoozeReminderPostRequestBody.additionalData); -} -export interface SnoozeReminderPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The NewReminderTime property - */ - newReminderTime?: DateTimeTimeZone; -} -/** - * Provides operations to call the snoozeReminder method. - */ -export class SnoozeReminderRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SnoozeReminderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/snoozeReminder"); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-snoozereminder?view=graph-rest-1.0|Find more info here} - */ - public post(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Postpone a reminder for an event in a user calendar until a new time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SnoozeReminderPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSnoozeReminderPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a snoozeReminderRequestBuilder - */ - public withUrl(rawUrl: string) : SnoozeReminderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SnoozeReminderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/events/item/tentativelyAccept/index.ts b/src/me/events/item/tentativelyAccept/index.ts deleted file mode 100644 index fc7fd3b1941..00000000000 --- a/src/me/events/item/tentativelyAccept/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tentativelyAcceptRequestBuilder' diff --git a/src/me/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts b/src/me/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts deleted file mode 100644 index 55dbdc42ec5..00000000000 --- a/src/me/events/item/tentativelyAccept/tentativelyAcceptRequestBuilder.ts +++ /dev/null @@ -1,97 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTimeSlotFromDiscriminatorValue, serializeTimeSlot, type TimeSlot } from '../../../../models/timeSlot'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTentativelyAcceptPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTentativelyAcceptPostRequestBody; -} -export function deserializeIntoTentativelyAcceptPostRequestBody(tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : Record void> { - return { - "comment": n => { tentativelyAcceptPostRequestBody.comment = n.getStringValue(); }, - "proposedNewTime": n => { tentativelyAcceptPostRequestBody.proposedNewTime = n.getObjectValue(createTimeSlotFromDiscriminatorValue); }, - "sendResponse": n => { tentativelyAcceptPostRequestBody.sendResponse = n.getBooleanValue(); }, - } -} -export function serializeTentativelyAcceptPostRequestBody(writer: SerializationWriter, tentativelyAcceptPostRequestBody: TentativelyAcceptPostRequestBody | undefined = {} as TentativelyAcceptPostRequestBody) : void { - writer.writeStringValue("Comment", tentativelyAcceptPostRequestBody.comment); - writer.writeObjectValue("ProposedNewTime", tentativelyAcceptPostRequestBody.proposedNewTime, serializeTimeSlot); - writer.writeBooleanValue("SendResponse", tentativelyAcceptPostRequestBody.sendResponse); - writer.writeAdditionalData(tentativelyAcceptPostRequestBody.additionalData); -} -export interface TentativelyAcceptPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The ProposedNewTime property - */ - proposedNewTime?: TimeSlot; - /** - * The SendResponse property - */ - sendResponse?: boolean; -} -/** - * Provides operations to call the tentativelyAccept method. - */ -export class TentativelyAcceptRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TentativelyAcceptRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/events/{event%2Did}/tentativelyAccept"); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/event-tentativelyaccept?view=graph-rest-1.0|Find more info here} - */ - public post(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TentativelyAcceptPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTentativelyAcceptPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tentativelyAcceptRequestBuilder - */ - public withUrl(rawUrl: string) : TentativelyAcceptRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TentativelyAcceptRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/exportDeviceAndAppManagementData/exportDeviceAndAppManagementDataRequestBuilder.ts b/src/me/exportDeviceAndAppManagementData/exportDeviceAndAppManagementDataRequestBuilder.ts deleted file mode 100644 index b837d3d904c..00000000000 --- a/src/me/exportDeviceAndAppManagementData/exportDeviceAndAppManagementDataRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceAndAppManagementData } from '../../models/'; -import { createDeviceAndAppManagementDataFromDiscriminatorValue } from '../../models/deviceAndAppManagementData'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the exportDeviceAndAppManagementData method. - */ -export class ExportDeviceAndAppManagementDataRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExportDeviceAndAppManagementDataRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/exportDeviceAndAppManagementData()"); - }; - /** - * Invoke function exportDeviceAndAppManagementData - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceAndAppManagementData - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceAndAppManagementDataFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function exportDeviceAndAppManagementData - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a exportDeviceAndAppManagementDataRequestBuilder - */ - public withUrl(rawUrl: string) : ExportDeviceAndAppManagementDataRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExportDeviceAndAppManagementDataRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/exportDeviceAndAppManagementDataWithSkipWithTop/exportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder.ts b/src/me/exportDeviceAndAppManagementDataWithSkipWithTop/exportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder.ts deleted file mode 100644 index 124e2a17503..00000000000 --- a/src/me/exportDeviceAndAppManagementDataWithSkipWithTop/exportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder.ts +++ /dev/null @@ -1,63 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceAndAppManagementData } from '../../models/'; -import { createDeviceAndAppManagementDataFromDiscriminatorValue } from '../../models/deviceAndAppManagementData'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the exportDeviceAndAppManagementData method. - */ -export class ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - * @param skip Usage: skip={skip} - * @param top Usage: top={top} - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, skip?: number | undefined, top?: number | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/exportDeviceAndAppManagementData(skip={skip},top={top})"); - this.pathParameters["skip"] = skip - this.pathParameters["top"] = top - }; - /** - * Invoke function exportDeviceAndAppManagementData - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceAndAppManagementData - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceAndAppManagementDataFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function exportDeviceAndAppManagementData - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a exportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder - */ - public withUrl(rawUrl: string) : ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/exportPersonalData/exportPersonalDataRequestBuilder.ts b/src/me/exportPersonalData/exportPersonalDataRequestBuilder.ts deleted file mode 100644 index 3ff37282f77..00000000000 --- a/src/me/exportPersonalData/exportPersonalDataRequestBuilder.ts +++ /dev/null @@ -1,84 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createExportPersonalDataPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoExportPersonalDataPostRequestBody; -} -export function deserializeIntoExportPersonalDataPostRequestBody(exportPersonalDataPostRequestBody: ExportPersonalDataPostRequestBody | undefined = {} as ExportPersonalDataPostRequestBody) : Record void> { - return { - "storageLocation": n => { exportPersonalDataPostRequestBody.storageLocation = n.getStringValue(); }, - } -} -export interface ExportPersonalDataPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The storageLocation property - */ - storageLocation?: string; -} -export function serializeExportPersonalDataPostRequestBody(writer: SerializationWriter, exportPersonalDataPostRequestBody: ExportPersonalDataPostRequestBody | undefined = {} as ExportPersonalDataPostRequestBody) : void { - writer.writeStringValue("storageLocation", exportPersonalDataPostRequestBody.storageLocation); - writer.writeAdditionalData(exportPersonalDataPostRequestBody.additionalData); -} -/** - * Provides operations to call the exportPersonalData method. - */ -export class ExportPersonalDataRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExportPersonalDataRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/exportPersonalData"); - }; - /** - * Submit a data policy operation request from a company administrator or an application to export an organizational user's data. This data includes the user's data stored in OneDrive and their activity reports. For more guidance about exporting data while complying with regulations, see Data Subject Requests and the GDPR and CCPA. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-exportpersonaldata?view=graph-rest-1.0|Find more info here} - */ - public post(body: ExportPersonalDataPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Submit a data policy operation request from a company administrator or an application to export an organizational user's data. This data includes the user's data stored in OneDrive and their activity reports. For more guidance about exporting data while complying with regulations, see Data Subject Requests and the GDPR and CCPA. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ExportPersonalDataPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExportPersonalDataPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a exportPersonalDataRequestBuilder - */ - public withUrl(rawUrl: string) : ExportPersonalDataRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExportPersonalDataRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/exportPersonalData/index.ts b/src/me/exportPersonalData/index.ts deleted file mode 100644 index d60ea67e56a..00000000000 --- a/src/me/exportPersonalData/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './exportPersonalDataRequestBuilder' diff --git a/src/me/extensions/count/countRequestBuilder.ts b/src/me/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 0d82d35722c..00000000000 --- a/src/me/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/extensions/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/extensions/count/index.ts b/src/me/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/extensions/extensionsRequestBuilder.ts b/src/me/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 6f83e86efd8..00000000000 --- a/src/me/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../models/extensionCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.user entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.user entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/extensions/index.ts b/src/me/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/extensions/item/extensionItemRequestBuilder.ts b/src/me/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 743c1266552..00000000000 --- a/src/me/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../models/extension'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.user entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/extensions/item/index.ts b/src/me/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/findMeetingTimes/findMeetingTimesPostRequestBody.ts b/src/me/findMeetingTimes/findMeetingTimesPostRequestBody.ts deleted file mode 100644 index dbc3b4d969e..00000000000 --- a/src/me/findMeetingTimes/findMeetingTimesPostRequestBody.ts +++ /dev/null @@ -1,75 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttendeeBaseFromDiscriminatorValue, serializeAttendeeBase, type AttendeeBase } from '../../models/attendeeBase'; -import { createLocationConstraintFromDiscriminatorValue, serializeLocationConstraint, type LocationConstraint } from '../../models/locationConstraint'; -import { createTimeConstraintFromDiscriminatorValue, serializeTimeConstraint, type TimeConstraint } from '../../models/timeConstraint'; -import { type AdditionalDataHolder, type Duration, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createFindMeetingTimesPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoFindMeetingTimesPostRequestBody; -} -export function deserializeIntoFindMeetingTimesPostRequestBody(findMeetingTimesPostRequestBody: FindMeetingTimesPostRequestBody | undefined = {} as FindMeetingTimesPostRequestBody) : Record void> { - return { - "attendees": n => { findMeetingTimesPostRequestBody.attendees = n.getCollectionOfObjectValues(createAttendeeBaseFromDiscriminatorValue); }, - "isOrganizerOptional": n => { findMeetingTimesPostRequestBody.isOrganizerOptional = n.getBooleanValue(); }, - "locationConstraint": n => { findMeetingTimesPostRequestBody.locationConstraint = n.getObjectValue(createLocationConstraintFromDiscriminatorValue); }, - "maxCandidates": n => { findMeetingTimesPostRequestBody.maxCandidates = n.getNumberValue(); }, - "meetingDuration": n => { findMeetingTimesPostRequestBody.meetingDuration = n.getDurationValue(); }, - "minimumAttendeePercentage": n => { findMeetingTimesPostRequestBody.minimumAttendeePercentage = n.getNumberValue(); }, - "returnSuggestionReasons": n => { findMeetingTimesPostRequestBody.returnSuggestionReasons = n.getBooleanValue(); }, - "timeConstraint": n => { findMeetingTimesPostRequestBody.timeConstraint = n.getObjectValue(createTimeConstraintFromDiscriminatorValue); }, - } -} -export interface FindMeetingTimesPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The attendees property - */ - attendees?: AttendeeBase[]; - /** - * The isOrganizerOptional property - */ - isOrganizerOptional?: boolean; - /** - * The locationConstraint property - */ - locationConstraint?: LocationConstraint; - /** - * The maxCandidates property - */ - maxCandidates?: number; - /** - * The meetingDuration property - */ - meetingDuration?: Duration; - /** - * The minimumAttendeePercentage property - */ - minimumAttendeePercentage?: number; - /** - * The returnSuggestionReasons property - */ - returnSuggestionReasons?: boolean; - /** - * The timeConstraint property - */ - timeConstraint?: TimeConstraint; -} -export function serializeFindMeetingTimesPostRequestBody(writer: SerializationWriter, findMeetingTimesPostRequestBody: FindMeetingTimesPostRequestBody | undefined = {} as FindMeetingTimesPostRequestBody) : void { - writer.writeCollectionOfObjectValues("attendees", findMeetingTimesPostRequestBody.attendees, serializeAttendeeBase); - writer.writeBooleanValue("isOrganizerOptional", findMeetingTimesPostRequestBody.isOrganizerOptional); - writer.writeObjectValue("locationConstraint", findMeetingTimesPostRequestBody.locationConstraint, serializeLocationConstraint); - writer.writeNumberValue("maxCandidates", findMeetingTimesPostRequestBody.maxCandidates); - writer.writeDurationValue("meetingDuration", findMeetingTimesPostRequestBody.meetingDuration); - writer.writeNumberValue("minimumAttendeePercentage", findMeetingTimesPostRequestBody.minimumAttendeePercentage); - writer.writeBooleanValue("returnSuggestionReasons", findMeetingTimesPostRequestBody.returnSuggestionReasons); - writer.writeObjectValue("timeConstraint", findMeetingTimesPostRequestBody.timeConstraint, serializeTimeConstraint); - writer.writeAdditionalData(findMeetingTimesPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/findMeetingTimes/findMeetingTimesRequestBuilder.ts b/src/me/findMeetingTimes/findMeetingTimesRequestBuilder.ts deleted file mode 100644 index 9434d11460a..00000000000 --- a/src/me/findMeetingTimes/findMeetingTimesRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMeetingTimeSuggestionsResultFromDiscriminatorValue, deserializeIntoMeetingTimeSuggestionsResult, serializeMeetingTimeSuggestionsResult, type MeetingTimeSuggestionsResult } from '../../models/meetingTimeSuggestionsResult'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { deserializeIntoFindMeetingTimesPostRequestBody, serializeFindMeetingTimesPostRequestBody, type FindMeetingTimesPostRequestBody } from './findMeetingTimesPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the findMeetingTimes method. - */ -export class FindMeetingTimesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new FindMeetingTimesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/findMeetingTimes"); - }; - /** - * Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters. If findMeetingTimes cannot return any meeting suggestions, the response would indicate a reason in the emptySuggestionsReason property. Based on this value, you can better adjust the parameters and call findMeetingTimes again. The algorithm used to suggest meeting times and locations undergoes fine-tuning from time to time. In scenarios like test environments where the input parameters and calendar data remain static, expect that the suggested results may differ over time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MeetingTimeSuggestionsResult - * @see {@link https://learn.microsoft.com/graph/api/user-findmeetingtimes?view=graph-rest-1.0|Find more info here} - */ - public post(body: FindMeetingTimesPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMeetingTimeSuggestionsResultFromDiscriminatorValue, errorMapping); - }; - /** - * Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints specified as parameters. If findMeetingTimes cannot return any meeting suggestions, the response would indicate a reason in the emptySuggestionsReason property. Based on this value, you can better adjust the parameters and call findMeetingTimes again. The algorithm used to suggest meeting times and locations undergoes fine-tuning from time to time. In scenarios like test environments where the input parameters and calendar data remain static, expect that the suggested results may differ over time. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: FindMeetingTimesPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeFindMeetingTimesPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a findMeetingTimesRequestBuilder - */ - public withUrl(rawUrl: string) : FindMeetingTimesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new FindMeetingTimesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/findMeetingTimes/index.ts b/src/me/findMeetingTimes/index.ts deleted file mode 100644 index efc33385355..00000000000 --- a/src/me/findMeetingTimes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './findMeetingTimesPostRequestBody' -export * from './findMeetingTimesRequestBuilder' diff --git a/src/me/followedSites/count/countRequestBuilder.ts b/src/me/followedSites/count/countRequestBuilder.ts deleted file mode 100644 index 62afb77a7ea..00000000000 --- a/src/me/followedSites/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/followedSites/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/followedSites/count/index.ts b/src/me/followedSites/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/followedSites/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/followedSites/followedSitesRequestBuilder.ts b/src/me/followedSites/followedSitesRequestBuilder.ts deleted file mode 100644 index 8fa68da7c4a..00000000000 --- a/src/me/followedSites/followedSitesRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SiteCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createSiteCollectionResponseFromDiscriminatorValue } from '../../models/siteCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SiteItemRequestBuilder } from './item/siteItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface FollowedSitesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the followedSites property of the microsoft.graph.user entity. - */ -export class FollowedSitesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the followedSites property of the microsoft.graph.user entity. - * @param siteId The unique identifier of site - * @returns a SiteItemRequestBuilder - */ - public bySiteId(siteId: string) : SiteItemRequestBuilder { - if(!siteId) throw new Error("siteId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["site%2Did"] = siteId - return new SiteItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new FollowedSitesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/followedSites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List the sites that have been followed by the signed in user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SiteCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sites-list-followed?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSiteCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * List the sites that have been followed by the signed in user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, followedSitesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a followedSitesRequestBuilder - */ - public withUrl(rawUrl: string) : FollowedSitesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new FollowedSitesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const followedSitesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/followedSites/index.ts b/src/me/followedSites/index.ts deleted file mode 100644 index c4e85d23f85..00000000000 --- a/src/me/followedSites/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './followedSitesRequestBuilder' diff --git a/src/me/followedSites/item/index.ts b/src/me/followedSites/item/index.ts deleted file mode 100644 index 8efcb69a18c..00000000000 --- a/src/me/followedSites/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './siteItemRequestBuilder' diff --git a/src/me/followedSites/item/siteItemRequestBuilder.ts b/src/me/followedSites/item/siteItemRequestBuilder.ts deleted file mode 100644 index 52b407d3816..00000000000 --- a/src/me/followedSites/item/siteItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Site } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createSiteFromDiscriminatorValue } from '../../../models/site'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SiteItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the followedSites property of the microsoft.graph.user entity. - */ -export class SiteItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SiteItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/followedSites/{site%2Did}{?%24select,%24expand}"); - }; - /** - * Get followedSites from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Site - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSiteFromDiscriminatorValue, errorMapping); - }; - /** - * Get followedSites from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, siteItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SiteItemRequestBuilder - */ - public withUrl(rawUrl: string) : SiteItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SiteItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const siteItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/getMailTips/getMailTipsPostRequestBody.ts b/src/me/getMailTips/getMailTipsPostRequestBody.ts deleted file mode 100644 index b2553de41a6..00000000000 --- a/src/me/getMailTips/getMailTipsPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { MailTipsType } from '../../models/mailTipsType'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetMailTipsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetMailTipsPostRequestBody; -} -export function deserializeIntoGetMailTipsPostRequestBody(getMailTipsPostRequestBody: GetMailTipsPostRequestBody | undefined = {} as GetMailTipsPostRequestBody) : Record void> { - return { - "emailAddresses": n => { getMailTipsPostRequestBody.emailAddresses = n.getCollectionOfPrimitiveValues(); }, - "mailTipsOptions": n => { getMailTipsPostRequestBody.mailTipsOptions = n.getCollectionOfEnumValues(MailTipsType); }, - } -} -export interface GetMailTipsPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The EmailAddresses property - */ - emailAddresses?: string[]; - /** - * The MailTipsOptions property - */ - mailTipsOptions?: MailTipsType[]; -} -export function serializeGetMailTipsPostRequestBody(writer: SerializationWriter, getMailTipsPostRequestBody: GetMailTipsPostRequestBody | undefined = {} as GetMailTipsPostRequestBody) : void { - writer.writeCollectionOfPrimitiveValues("EmailAddresses", getMailTipsPostRequestBody.emailAddresses); - writer.writeEnumValue("MailTipsOptions", getMailTipsPostRequestBody.mailTipsOptions); - writer.writeAdditionalData(getMailTipsPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/getMailTips/getMailTipsRequestBuilder.ts b/src/me/getMailTips/getMailTipsRequestBuilder.ts deleted file mode 100644 index 79a7c91c759..00000000000 --- a/src/me/getMailTips/getMailTipsRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { createMailTipsFromDiscriminatorValue, serializeMailTips, type MailTips } from '../../models/mailTips'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { deserializeIntoGetMailTipsPostRequestBody, serializeGetMailTipsPostRequestBody, type GetMailTipsPostRequestBody } from './getMailTipsPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetMailTipsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetMailTipsPostResponse; -} -export function deserializeIntoGetMailTipsPostResponse(getMailTipsPostResponse: GetMailTipsPostResponse | undefined = {} as GetMailTipsPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getMailTipsPostResponse), - "value": n => { getMailTipsPostResponse.value = n.getCollectionOfObjectValues(createMailTipsFromDiscriminatorValue); }, - } -} -export interface GetMailTipsPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: MailTips[]; -} -export function serializeGetMailTipsPostResponse(writer: SerializationWriter, getMailTipsPostResponse: GetMailTipsPostResponse | undefined = {} as GetMailTipsPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getMailTipsPostResponse) - writer.writeCollectionOfObjectValues("value", getMailTipsPostResponse.value, serializeMailTips); -} -/** - * Provides operations to call the getMailTips method. - */ -export class GetMailTipsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetMailTipsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/getMailTips"); - }; - /** - * Get the MailTips of one or more recipients as available to the signed-in user. Note that by making a POST call to the getMailTips action, you can request specific types of MailTips tobe returned for more than one recipient at one time. The requested MailTips are returned in a mailTips collection. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetMailTipsPostResponse - * @see {@link https://learn.microsoft.com/graph/api/user-getmailtips?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetMailTipsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetMailTipsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the MailTips of one or more recipients as available to the signed-in user. Note that by making a POST call to the getMailTips action, you can request specific types of MailTips tobe returned for more than one recipient at one time. The requested MailTips are returned in a mailTips collection. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetMailTipsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetMailTipsPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getMailTipsRequestBuilder - */ - public withUrl(rawUrl: string) : GetMailTipsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetMailTipsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/getMailTips/index.ts b/src/me/getMailTips/index.ts deleted file mode 100644 index 6ecd3b9ce5e..00000000000 --- a/src/me/getMailTips/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getMailTipsPostRequestBody' -export * from './getMailTipsRequestBuilder' diff --git a/src/me/getManagedAppDiagnosticStatuses/getManagedAppDiagnosticStatusesRequestBuilder.ts b/src/me/getManagedAppDiagnosticStatuses/getManagedAppDiagnosticStatusesRequestBuilder.ts deleted file mode 100644 index 9d9999abe6c..00000000000 --- a/src/me/getManagedAppDiagnosticStatuses/getManagedAppDiagnosticStatusesRequestBuilder.ts +++ /dev/null @@ -1,108 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { createManagedAppDiagnosticStatusFromDiscriminatorValue, serializeManagedAppDiagnosticStatus, type ManagedAppDiagnosticStatus } from '../../models/managedAppDiagnosticStatus'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetManagedAppDiagnosticStatusesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetManagedAppDiagnosticStatusesGetResponse; -} -export function deserializeIntoGetManagedAppDiagnosticStatusesGetResponse(getManagedAppDiagnosticStatusesGetResponse: GetManagedAppDiagnosticStatusesGetResponse | undefined = {} as GetManagedAppDiagnosticStatusesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getManagedAppDiagnosticStatusesGetResponse), - "value": n => { getManagedAppDiagnosticStatusesGetResponse.value = n.getCollectionOfObjectValues(createManagedAppDiagnosticStatusFromDiscriminatorValue); }, - } -} -export interface GetManagedAppDiagnosticStatusesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ManagedAppDiagnosticStatus[]; -} -export interface GetManagedAppDiagnosticStatusesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -export function serializeGetManagedAppDiagnosticStatusesGetResponse(writer: SerializationWriter, getManagedAppDiagnosticStatusesGetResponse: GetManagedAppDiagnosticStatusesGetResponse | undefined = {} as GetManagedAppDiagnosticStatusesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getManagedAppDiagnosticStatusesGetResponse) - writer.writeCollectionOfObjectValues("value", getManagedAppDiagnosticStatusesGetResponse.value, serializeManagedAppDiagnosticStatus); -} -/** - * Provides operations to call the getManagedAppDiagnosticStatuses method. - */ -export class GetManagedAppDiagnosticStatusesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetManagedAppDiagnosticStatusesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/getManagedAppDiagnosticStatuses(){?%24top,%24skip,%24search,%24filter,%24count}"); - }; - /** - * Gets diagnostics validation status for a given user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetManagedAppDiagnosticStatusesGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetManagedAppDiagnosticStatusesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Gets diagnostics validation status for a given user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getManagedAppDiagnosticStatusesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getManagedAppDiagnosticStatusesRequestBuilder - */ - public withUrl(rawUrl: string) : GetManagedAppDiagnosticStatusesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetManagedAppDiagnosticStatusesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getManagedAppDiagnosticStatusesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/getManagedAppDiagnosticStatuses/index.ts b/src/me/getManagedAppDiagnosticStatuses/index.ts deleted file mode 100644 index 556e8d9a3b9..00000000000 --- a/src/me/getManagedAppDiagnosticStatuses/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getManagedAppDiagnosticStatusesRequestBuilder' diff --git a/src/me/getManagedAppPolicies/getManagedAppPoliciesRequestBuilder.ts b/src/me/getManagedAppPolicies/getManagedAppPoliciesRequestBuilder.ts deleted file mode 100644 index 960cdd89c09..00000000000 --- a/src/me/getManagedAppPolicies/getManagedAppPoliciesRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { createManagedAppPolicyFromDiscriminatorValue, serializeManagedAppPolicy, type ManagedAppPolicy } from '../../models/managedAppPolicy'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetManagedAppPoliciesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetManagedAppPoliciesGetResponse; -} -export function deserializeIntoGetManagedAppPoliciesGetResponse(getManagedAppPoliciesGetResponse: GetManagedAppPoliciesGetResponse | undefined = {} as GetManagedAppPoliciesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getManagedAppPoliciesGetResponse), - "value": n => { getManagedAppPoliciesGetResponse.value = n.getCollectionOfObjectValues(createManagedAppPolicyFromDiscriminatorValue); }, - } -} -export interface GetManagedAppPoliciesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ManagedAppPolicy[]; -} -export interface GetManagedAppPoliciesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function serializeGetManagedAppPoliciesGetResponse(writer: SerializationWriter, getManagedAppPoliciesGetResponse: GetManagedAppPoliciesGetResponse | undefined = {} as GetManagedAppPoliciesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getManagedAppPoliciesGetResponse) - writer.writeCollectionOfObjectValues("value", getManagedAppPoliciesGetResponse.value, serializeManagedAppPolicy); -} -/** - * Provides operations to call the getManagedAppPolicies method. - */ -export class GetManagedAppPoliciesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetManagedAppPoliciesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/getManagedAppPolicies(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Gets app restrictions for a given user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetManagedAppPoliciesGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetManagedAppPoliciesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Gets app restrictions for a given user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getManagedAppPoliciesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getManagedAppPoliciesRequestBuilder - */ - public withUrl(rawUrl: string) : GetManagedAppPoliciesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetManagedAppPoliciesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getManagedAppPoliciesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/getManagedAppPolicies/index.ts b/src/me/getManagedAppPolicies/index.ts deleted file mode 100644 index 076da55e360..00000000000 --- a/src/me/getManagedAppPolicies/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getManagedAppPoliciesRequestBuilder' diff --git a/src/me/getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresGetResponse.ts b/src/me/getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresGetResponse.ts deleted file mode 100644 index 9e60f506e02..00000000000 --- a/src/me/getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresGetResponse.ts +++ /dev/null @@ -1,28 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetManagedDevicesWithAppFailuresGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetManagedDevicesWithAppFailuresGetResponse; -} -export function deserializeIntoGetManagedDevicesWithAppFailuresGetResponse(getManagedDevicesWithAppFailuresGetResponse: GetManagedDevicesWithAppFailuresGetResponse | undefined = {} as GetManagedDevicesWithAppFailuresGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getManagedDevicesWithAppFailuresGetResponse), - "value": n => { getManagedDevicesWithAppFailuresGetResponse.value = n.getCollectionOfPrimitiveValues(); }, - } -} -export interface GetManagedDevicesWithAppFailuresGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: string[]; -} -export function serializeGetManagedDevicesWithAppFailuresGetResponse(writer: SerializationWriter, getManagedDevicesWithAppFailuresGetResponse: GetManagedDevicesWithAppFailuresGetResponse | undefined = {} as GetManagedDevicesWithAppFailuresGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getManagedDevicesWithAppFailuresGetResponse) - writer.writeCollectionOfPrimitiveValues("value", getManagedDevicesWithAppFailuresGetResponse.value); -} -// tslint:enable -// eslint-enable diff --git a/src/me/getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresRequestBuilder.ts b/src/me/getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresRequestBuilder.ts deleted file mode 100644 index 999bbf46c43..00000000000 --- a/src/me/getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createGetManagedDevicesWithAppFailuresGetResponseFromDiscriminatorValue } from './getManagedDevicesWithAppFailuresGetResponse'; -import { type GetManagedDevicesWithAppFailuresGetResponse } from './index'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GetManagedDevicesWithAppFailuresRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to call the getManagedDevicesWithAppFailures method. - */ -export class GetManagedDevicesWithAppFailuresRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetManagedDevicesWithAppFailuresRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/getManagedDevicesWithAppFailures(){?%24top,%24skip,%24search,%24filter,%24count}"); - }; - /** - * Retrieves the list of devices with failed apps - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetManagedDevicesWithAppFailuresGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetManagedDevicesWithAppFailuresGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieves the list of devices with failed apps - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getManagedDevicesWithAppFailuresRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getManagedDevicesWithAppFailuresRequestBuilder - */ - public withUrl(rawUrl: string) : GetManagedDevicesWithAppFailuresRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetManagedDevicesWithAppFailuresRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getManagedDevicesWithAppFailuresRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/getManagedDevicesWithAppFailures/index.ts b/src/me/getManagedDevicesWithAppFailures/index.ts deleted file mode 100644 index 5112460cc8e..00000000000 --- a/src/me/getManagedDevicesWithAppFailures/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getManagedDevicesWithAppFailuresGetResponse' -export * from './getManagedDevicesWithAppFailuresRequestBuilder' diff --git a/src/me/getMemberGroups/getMemberGroupsPostResponse.ts b/src/me/getMemberGroups/getMemberGroupsPostResponse.ts deleted file mode 100644 index ab2c42e796e..00000000000 --- a/src/me/getMemberGroups/getMemberGroupsPostResponse.ts +++ /dev/null @@ -1,28 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetMemberGroupsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetMemberGroupsPostResponse; -} -export function deserializeIntoGetMemberGroupsPostResponse(getMemberGroupsPostResponse: GetMemberGroupsPostResponse | undefined = {} as GetMemberGroupsPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getMemberGroupsPostResponse), - "value": n => { getMemberGroupsPostResponse.value = n.getCollectionOfPrimitiveValues(); }, - } -} -export interface GetMemberGroupsPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: string[]; -} -export function serializeGetMemberGroupsPostResponse(writer: SerializationWriter, getMemberGroupsPostResponse: GetMemberGroupsPostResponse | undefined = {} as GetMemberGroupsPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getMemberGroupsPostResponse) - writer.writeCollectionOfPrimitiveValues("value", getMemberGroupsPostResponse.value); -} -// tslint:enable -// eslint-enable diff --git a/src/me/getMemberGroups/getMemberGroupsRequestBuilder.ts b/src/me/getMemberGroups/getMemberGroupsRequestBuilder.ts deleted file mode 100644 index 88fbe65b3ed..00000000000 --- a/src/me/getMemberGroups/getMemberGroupsRequestBuilder.ts +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createGetMemberGroupsPostResponseFromDiscriminatorValue, deserializeIntoGetMemberGroupsPostResponse, serializeGetMemberGroupsPostResponse, type GetMemberGroupsPostResponse } from './getMemberGroupsPostResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetMemberGroupsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetMemberGroupsPostRequestBody; -} -export function deserializeIntoGetMemberGroupsPostRequestBody(getMemberGroupsPostRequestBody: GetMemberGroupsPostRequestBody | undefined = {} as GetMemberGroupsPostRequestBody) : Record void> { - return { - "securityEnabledOnly": n => { getMemberGroupsPostRequestBody.securityEnabledOnly = n.getBooleanValue(); }, - } -} -export interface GetMemberGroupsPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The securityEnabledOnly property - */ - securityEnabledOnly?: boolean; -} -export function serializeGetMemberGroupsPostRequestBody(writer: SerializationWriter, getMemberGroupsPostRequestBody: GetMemberGroupsPostRequestBody | undefined = {} as GetMemberGroupsPostRequestBody) : void { - writer.writeBooleanValue("securityEnabledOnly", getMemberGroupsPostRequestBody.securityEnabledOnly); - writer.writeAdditionalData(getMemberGroupsPostRequestBody.additionalData); -} -/** - * Provides operations to call the getMemberGroups method. - */ -export class GetMemberGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/getMemberGroups"); - }; - /** - * Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetMemberGroupsPostResponse - * @see {@link https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetMemberGroupsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetMemberGroupsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the Directory_ResultSizeLimitExceeded error code. As a workaround, use the List group transitive memberOf API. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetMemberGroupsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetMemberGroupsPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getMemberGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : GetMemberGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetMemberGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/getMemberGroups/index.ts b/src/me/getMemberGroups/index.ts deleted file mode 100644 index e704ed6ca6d..00000000000 --- a/src/me/getMemberGroups/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getMemberGroupsPostResponse' -export * from './getMemberGroupsRequestBuilder' diff --git a/src/me/getMemberObjects/getMemberObjectsRequestBuilder.ts b/src/me/getMemberObjects/getMemberObjectsRequestBuilder.ts deleted file mode 100644 index 58e10eb86e1..00000000000 --- a/src/me/getMemberObjects/getMemberObjectsRequestBuilder.ts +++ /dev/null @@ -1,106 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetMemberObjectsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetMemberObjectsPostRequestBody; -} -export function createGetMemberObjectsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetMemberObjectsPostResponse; -} -export function deserializeIntoGetMemberObjectsPostRequestBody(getMemberObjectsPostRequestBody: GetMemberObjectsPostRequestBody | undefined = {} as GetMemberObjectsPostRequestBody) : Record void> { - return { - "securityEnabledOnly": n => { getMemberObjectsPostRequestBody.securityEnabledOnly = n.getBooleanValue(); }, - } -} -export function deserializeIntoGetMemberObjectsPostResponse(getMemberObjectsPostResponse: GetMemberObjectsPostResponse | undefined = {} as GetMemberObjectsPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getMemberObjectsPostResponse), - "value": n => { getMemberObjectsPostResponse.value = n.getCollectionOfPrimitiveValues(); }, - } -} -export interface GetMemberObjectsPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The securityEnabledOnly property - */ - securityEnabledOnly?: boolean; -} -export interface GetMemberObjectsPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: string[]; -} -export function serializeGetMemberObjectsPostRequestBody(writer: SerializationWriter, getMemberObjectsPostRequestBody: GetMemberObjectsPostRequestBody | undefined = {} as GetMemberObjectsPostRequestBody) : void { - writer.writeBooleanValue("securityEnabledOnly", getMemberObjectsPostRequestBody.securityEnabledOnly); - writer.writeAdditionalData(getMemberObjectsPostRequestBody.additionalData); -} -export function serializeGetMemberObjectsPostResponse(writer: SerializationWriter, getMemberObjectsPostResponse: GetMemberObjectsPostResponse | undefined = {} as GetMemberObjectsPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getMemberObjectsPostResponse) - writer.writeCollectionOfPrimitiveValues("value", getMemberObjectsPostResponse.value); -} -/** - * Provides operations to call the getMemberObjects method. - */ -export class GetMemberObjectsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/getMemberObjects"); - }; - /** - * Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetMemberObjectsPostResponse - * @see {@link https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetMemberObjectsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetMemberObjectsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetMemberObjectsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetMemberObjectsPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getMemberObjectsRequestBuilder - */ - public withUrl(rawUrl: string) : GetMemberObjectsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetMemberObjectsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/getMemberObjects/index.ts b/src/me/getMemberObjects/index.ts deleted file mode 100644 index 86cfa20411c..00000000000 --- a/src/me/getMemberObjects/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getMemberObjectsRequestBuilder' diff --git a/src/me/index.ts b/src/me/index.ts deleted file mode 100644 index 7fa4db9df83..00000000000 --- a/src/me/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './meRequestBuilder' diff --git a/src/me/inferenceClassification/index.ts b/src/me/inferenceClassification/index.ts deleted file mode 100644 index 5be9cac4e1e..00000000000 --- a/src/me/inferenceClassification/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './inferenceClassificationRequestBuilder' diff --git a/src/me/inferenceClassification/inferenceClassificationRequestBuilder.ts b/src/me/inferenceClassification/inferenceClassificationRequestBuilder.ts deleted file mode 100644 index 8d4461de118..00000000000 --- a/src/me/inferenceClassification/inferenceClassificationRequestBuilder.ts +++ /dev/null @@ -1,104 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createInferenceClassificationFromDiscriminatorValue, deserializeIntoInferenceClassification, serializeInferenceClassification, type InferenceClassification } from '../../models/inferenceClassification'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { OverridesRequestBuilder } from './overrides/overridesRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InferenceClassificationRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the inferenceClassification property of the microsoft.graph.user entity. - */ -export class InferenceClassificationRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the overrides property of the microsoft.graph.inferenceClassification entity. - */ - public get overrides(): OverridesRequestBuilder { - return new OverridesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new InferenceClassificationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/inferenceClassification{?%24select}"); - }; - /** - * Relevance classification of the user's messages based on explicit designations that override inferred relevance or importance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of InferenceClassification - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createInferenceClassificationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property inferenceClassification in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of InferenceClassification - */ - public patch(body: InferenceClassification, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createInferenceClassificationFromDiscriminatorValue, errorMapping); - }; - /** - * Relevance classification of the user's messages based on explicit designations that override inferred relevance or importance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, inferenceClassificationRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property inferenceClassification in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: InferenceClassification, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeInferenceClassification); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a inferenceClassificationRequestBuilder - */ - public withUrl(rawUrl: string) : InferenceClassificationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InferenceClassificationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const inferenceClassificationRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/inferenceClassification/overrides/count/countRequestBuilder.ts b/src/me/inferenceClassification/overrides/count/countRequestBuilder.ts deleted file mode 100644 index d806320f257..00000000000 --- a/src/me/inferenceClassification/overrides/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/inferenceClassification/overrides/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/inferenceClassification/overrides/count/index.ts b/src/me/inferenceClassification/overrides/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/inferenceClassification/overrides/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/inferenceClassification/overrides/index.ts b/src/me/inferenceClassification/overrides/index.ts deleted file mode 100644 index 014ab01fe05..00000000000 --- a/src/me/inferenceClassification/overrides/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './overridesRequestBuilder' diff --git a/src/me/inferenceClassification/overrides/item/index.ts b/src/me/inferenceClassification/overrides/item/index.ts deleted file mode 100644 index 60c8a8909e8..00000000000 --- a/src/me/inferenceClassification/overrides/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './inferenceClassificationOverrideItemRequestBuilder' diff --git a/src/me/inferenceClassification/overrides/item/inferenceClassificationOverrideItemRequestBuilder.ts b/src/me/inferenceClassification/overrides/item/inferenceClassificationOverrideItemRequestBuilder.ts deleted file mode 100644 index 2f3f89c6179..00000000000 --- a/src/me/inferenceClassification/overrides/item/inferenceClassificationOverrideItemRequestBuilder.ts +++ /dev/null @@ -1,124 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createInferenceClassificationOverrideFromDiscriminatorValue, deserializeIntoInferenceClassificationOverride, serializeInferenceClassificationOverride, type InferenceClassificationOverride } from '../../../../models/inferenceClassificationOverride'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InferenceClassificationOverrideItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the overrides property of the microsoft.graph.inferenceClassification entity. - */ -export class InferenceClassificationOverrideItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new InferenceClassificationOverrideItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/inferenceClassification/overrides/{inferenceClassificationOverride%2Did}{?%24select}"); - }; - /** - * Delete an override specified by its ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/inferenceclassificationoverride-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of InferenceClassificationOverride - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createInferenceClassificationOverrideFromDiscriminatorValue, errorMapping); - }; - /** - * Change the classifyAs field of an override as specified. You cannot use PATCH to change any other fields in an inferenceClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use POST to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one withthe new SMTP address is the only way to 'update' the override for this sender. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of InferenceClassificationOverride - * @see {@link https://learn.microsoft.com/graph/api/inferenceclassificationoverride-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: InferenceClassificationOverride, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createInferenceClassificationOverrideFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an override specified by its ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, inferenceClassificationOverrideItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Change the classifyAs field of an override as specified. You cannot use PATCH to change any other fields in an inferenceClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use POST to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one withthe new SMTP address is the only way to 'update' the override for this sender. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: InferenceClassificationOverride, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeInferenceClassificationOverride); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a InferenceClassificationOverrideItemRequestBuilder - */ - public withUrl(rawUrl: string) : InferenceClassificationOverrideItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InferenceClassificationOverrideItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const inferenceClassificationOverrideItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/inferenceClassification/overrides/overridesRequestBuilder.ts b/src/me/inferenceClassification/overrides/overridesRequestBuilder.ts deleted file mode 100644 index 5f0531bf21e..00000000000 --- a/src/me/inferenceClassification/overrides/overridesRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type InferenceClassificationOverrideCollectionResponse } from '../../../models/'; -import { createInferenceClassificationOverrideFromDiscriminatorValue, deserializeIntoInferenceClassificationOverride, serializeInferenceClassificationOverride, type InferenceClassificationOverride } from '../../../models/inferenceClassificationOverride'; -import { createInferenceClassificationOverrideCollectionResponseFromDiscriminatorValue } from '../../../models/inferenceClassificationOverrideCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { InferenceClassificationOverrideItemRequestBuilder } from './item/inferenceClassificationOverrideItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OverridesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the overrides property of the microsoft.graph.inferenceClassification entity. - */ -export class OverridesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the overrides property of the microsoft.graph.inferenceClassification entity. - * @param inferenceClassificationOverrideId The unique identifier of inferenceClassificationOverride - * @returns a InferenceClassificationOverrideItemRequestBuilder - */ - public byInferenceClassificationOverrideId(inferenceClassificationOverrideId: string) : InferenceClassificationOverrideItemRequestBuilder { - if(!inferenceClassificationOverrideId) throw new Error("inferenceClassificationOverrideId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["inferenceClassificationOverride%2Did"] = inferenceClassificationOverrideId - return new InferenceClassificationOverrideItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OverridesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/inferenceClassification/overrides{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of InferenceClassificationOverrideCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/inferenceclassification-list-overrides?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createInferenceClassificationOverrideCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classifiedas specified in the override. Note - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of InferenceClassificationOverride - * @see {@link https://learn.microsoft.com/graph/api/inferenceclassification-post-overrides?view=graph-rest-1.0|Find more info here} - */ - public post(body: InferenceClassificationOverride, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createInferenceClassificationOverrideFromDiscriminatorValue, errorMapping); - }; - /** - * Get the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender. Initially, a user does not have any overrides. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, overridesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classifiedas specified in the override. Note - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: InferenceClassificationOverride, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeInferenceClassificationOverride); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a overridesRequestBuilder - */ - public withUrl(rawUrl: string) : OverridesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OverridesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const overridesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/index.ts b/src/me/insights/index.ts deleted file mode 100644 index 2a35c413c56..00000000000 --- a/src/me/insights/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './insightsRequestBuilder' diff --git a/src/me/insights/insightsRequestBuilder.ts b/src/me/insights/insightsRequestBuilder.ts deleted file mode 100644 index 0fdd3e16ef8..00000000000 --- a/src/me/insights/insightsRequestBuilder.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createOfficeGraphInsightsFromDiscriminatorValue, deserializeIntoOfficeGraphInsights, serializeOfficeGraphInsights, type OfficeGraphInsights } from '../../models/officeGraphInsights'; -import { SharedRequestBuilder } from './shared/sharedRequestBuilder'; -import { TrendingRequestBuilder } from './trending/trendingRequestBuilder'; -import { UsedRequestBuilder } from './used/usedRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InsightsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the insights property of the microsoft.graph.user entity. - */ -export class InsightsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the shared property of the microsoft.graph.officeGraphInsights entity. - */ - public get shared(): SharedRequestBuilder { - return new SharedRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the trending property of the microsoft.graph.officeGraphInsights entity. - */ - public get trending(): TrendingRequestBuilder { - return new TrendingRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the used property of the microsoft.graph.officeGraphInsights entity. - */ - public get used(): UsedRequestBuilder { - return new UsedRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new InsightsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights{?%24select,%24expand}"); - }; - /** - * Delete navigation property insights for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get insights from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OfficeGraphInsights - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOfficeGraphInsightsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property insights in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OfficeGraphInsights - */ - public patch(body: OfficeGraphInsights, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOfficeGraphInsightsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property insights for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get insights from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, insightsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property insights in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OfficeGraphInsights, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOfficeGraphInsights); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a insightsRequestBuilder - */ - public withUrl(rawUrl: string) : InsightsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InsightsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const insightsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/shared/count/countRequestBuilder.ts b/src/me/insights/shared/count/countRequestBuilder.ts deleted file mode 100644 index a976034d803..00000000000 --- a/src/me/insights/shared/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/shared/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/shared/count/index.ts b/src/me/insights/shared/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/insights/shared/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/insights/shared/index.ts b/src/me/insights/shared/index.ts deleted file mode 100644 index a6c5f3b3bc2..00000000000 --- a/src/me/insights/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sharedRequestBuilder' diff --git a/src/me/insights/shared/item/index.ts b/src/me/insights/shared/item/index.ts deleted file mode 100644 index 38d80aa85fc..00000000000 --- a/src/me/insights/shared/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sharedInsightItemRequestBuilder' diff --git a/src/me/insights/shared/item/lastSharedMethod/index.ts b/src/me/insights/shared/item/lastSharedMethod/index.ts deleted file mode 100644 index 276b82c130e..00000000000 --- a/src/me/insights/shared/item/lastSharedMethod/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './lastSharedMethodRequestBuilder' diff --git a/src/me/insights/shared/item/lastSharedMethod/lastSharedMethodRequestBuilder.ts b/src/me/insights/shared/item/lastSharedMethod/lastSharedMethodRequestBuilder.ts deleted file mode 100644 index a16a44456ae..00000000000 --- a/src/me/insights/shared/item/lastSharedMethod/lastSharedMethodRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Entity } from '../../../../../models/'; -import { createEntityFromDiscriminatorValue } from '../../../../../models/entity'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LastSharedMethodRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the lastSharedMethod property of the microsoft.graph.sharedInsight entity. - */ -export class LastSharedMethodRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LastSharedMethodRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/shared/{sharedInsight%2Did}/lastSharedMethod{?%24select,%24expand}"); - }; - /** - * Get lastSharedMethod from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Entity - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEntityFromDiscriminatorValue, errorMapping); - }; - /** - * Get lastSharedMethod from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, lastSharedMethodRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a lastSharedMethodRequestBuilder - */ - public withUrl(rawUrl: string) : LastSharedMethodRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LastSharedMethodRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const lastSharedMethodRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/shared/item/resource/index.ts b/src/me/insights/shared/item/resource/index.ts deleted file mode 100644 index 6e2679ea836..00000000000 --- a/src/me/insights/shared/item/resource/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './resourceRequestBuilder' diff --git a/src/me/insights/shared/item/resource/resourceRequestBuilder.ts b/src/me/insights/shared/item/resource/resourceRequestBuilder.ts deleted file mode 100644 index 6a22b5e7063..00000000000 --- a/src/me/insights/shared/item/resource/resourceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Entity } from '../../../../../models/'; -import { createEntityFromDiscriminatorValue } from '../../../../../models/entity'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ResourceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the resource property of the microsoft.graph.sharedInsight entity. - */ -export class ResourceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResourceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/shared/{sharedInsight%2Did}/resource{?%24select,%24expand}"); - }; - /** - * Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Entity - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEntityFromDiscriminatorValue, errorMapping); - }; - /** - * Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, resourceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a resourceRequestBuilder - */ - public withUrl(rawUrl: string) : ResourceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResourceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const resourceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/shared/item/sharedInsightItemRequestBuilder.ts b/src/me/insights/shared/item/sharedInsightItemRequestBuilder.ts deleted file mode 100644 index 974ff6e51ec..00000000000 --- a/src/me/insights/shared/item/sharedInsightItemRequestBuilder.ts +++ /dev/null @@ -1,141 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createSharedInsightFromDiscriminatorValue, deserializeIntoSharedInsight, serializeSharedInsight, type SharedInsight } from '../../../../models/sharedInsight'; -import { LastSharedMethodRequestBuilder } from './lastSharedMethod/lastSharedMethodRequestBuilder'; -import { ResourceRequestBuilder } from './resource/resourceRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SharedInsightItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the shared property of the microsoft.graph.officeGraphInsights entity. - */ -export class SharedInsightItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the lastSharedMethod property of the microsoft.graph.sharedInsight entity. - */ - public get lastSharedMethod(): LastSharedMethodRequestBuilder { - return new LastSharedMethodRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the resource property of the microsoft.graph.sharedInsight entity. - */ - public get resource(): ResourceRequestBuilder { - return new ResourceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new SharedInsightItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/shared/{sharedInsight%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property shared for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Calculated relationship identifying documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for Business and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedInsight - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedInsightFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property shared in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedInsight - */ - public patch(body: SharedInsight, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedInsightFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property shared for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Calculated relationship identifying documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for Business and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sharedInsightItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property shared in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SharedInsight, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharedInsight); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SharedInsightItemRequestBuilder - */ - public withUrl(rawUrl: string) : SharedInsightItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SharedInsightItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sharedInsightItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/shared/sharedRequestBuilder.ts b/src/me/insights/shared/sharedRequestBuilder.ts deleted file mode 100644 index 00609aa3dd7..00000000000 --- a/src/me/insights/shared/sharedRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SharedInsightCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createSharedInsightFromDiscriminatorValue, deserializeIntoSharedInsight, serializeSharedInsight, type SharedInsight } from '../../../models/sharedInsight'; -import { createSharedInsightCollectionResponseFromDiscriminatorValue } from '../../../models/sharedInsightCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SharedInsightItemRequestBuilder } from './item/sharedInsightItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SharedRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the shared property of the microsoft.graph.officeGraphInsights entity. - */ -export class SharedRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the shared property of the microsoft.graph.officeGraphInsights entity. - * @param sharedInsightId The unique identifier of sharedInsight - * @returns a SharedInsightItemRequestBuilder - */ - public bySharedInsightId(sharedInsightId: string) : SharedInsightItemRequestBuilder { - if(!sharedInsightId) throw new Error("sharedInsightId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sharedInsight%2Did"] = sharedInsightId - return new SharedInsightItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SharedRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/shared{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedInsightCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/insights-list-shared?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedInsightCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to shared for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedInsight - */ - public post(body: SharedInsight, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedInsightFromDiscriminatorValue, errorMapping); - }; - /** - * Calculated insight that includes the list of documents shared with a user. This insight includes documents hosted on OneDrive/SharePoint in the user's Microsoft 365 tenant that are shared with the user, and documents that are attached as files and sent to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sharedRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to shared for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SharedInsight, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharedInsight); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sharedRequestBuilder - */ - public withUrl(rawUrl: string) : SharedRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SharedRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sharedRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/trending/count/countRequestBuilder.ts b/src/me/insights/trending/count/countRequestBuilder.ts deleted file mode 100644 index 87a3e95ce83..00000000000 --- a/src/me/insights/trending/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/trending/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/trending/count/index.ts b/src/me/insights/trending/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/insights/trending/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/insights/trending/index.ts b/src/me/insights/trending/index.ts deleted file mode 100644 index b809b4736dd..00000000000 --- a/src/me/insights/trending/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './trendingRequestBuilder' diff --git a/src/me/insights/trending/item/index.ts b/src/me/insights/trending/item/index.ts deleted file mode 100644 index b879fee05bd..00000000000 --- a/src/me/insights/trending/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './trendingItemRequestBuilder' diff --git a/src/me/insights/trending/item/resource/index.ts b/src/me/insights/trending/item/resource/index.ts deleted file mode 100644 index 6e2679ea836..00000000000 --- a/src/me/insights/trending/item/resource/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './resourceRequestBuilder' diff --git a/src/me/insights/trending/item/resource/resourceRequestBuilder.ts b/src/me/insights/trending/item/resource/resourceRequestBuilder.ts deleted file mode 100644 index 581cf408e4c..00000000000 --- a/src/me/insights/trending/item/resource/resourceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Entity } from '../../../../../models/'; -import { createEntityFromDiscriminatorValue } from '../../../../../models/entity'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ResourceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the resource property of the microsoft.graph.trending entity. - */ -export class ResourceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResourceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/trending/{trending%2Did}/resource{?%24select,%24expand}"); - }; - /** - * Used for navigating to the trending document. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Entity - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEntityFromDiscriminatorValue, errorMapping); - }; - /** - * Used for navigating to the trending document. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, resourceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a resourceRequestBuilder - */ - public withUrl(rawUrl: string) : ResourceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResourceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const resourceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/trending/item/trendingItemRequestBuilder.ts b/src/me/insights/trending/item/trendingItemRequestBuilder.ts deleted file mode 100644 index 1a98df6c0ca..00000000000 --- a/src/me/insights/trending/item/trendingItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTrendingFromDiscriminatorValue, deserializeIntoTrending, serializeTrending, type Trending } from '../../../../models/trending'; -import { ResourceRequestBuilder } from './resource/resourceRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TrendingItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the trending property of the microsoft.graph.officeGraphInsights entity. - */ -export class TrendingItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the resource property of the microsoft.graph.trending entity. - */ - public get resource(): ResourceRequestBuilder { - return new ResourceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TrendingItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/trending/{trending%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property trending for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Calculated relationship identifying documents trending around a user. Trending documents are calculated based on activity of the user's closest network of people and include files stored in OneDrive for Business and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Trending - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTrendingFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property trending in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Trending - */ - public patch(body: Trending, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTrendingFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property trending for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Calculated relationship identifying documents trending around a user. Trending documents are calculated based on activity of the user's closest network of people and include files stored in OneDrive for Business and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, trendingItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property trending in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Trending, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTrending); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TrendingItemRequestBuilder - */ - public withUrl(rawUrl: string) : TrendingItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TrendingItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const trendingItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/trending/trendingRequestBuilder.ts b/src/me/insights/trending/trendingRequestBuilder.ts deleted file mode 100644 index 3d70587a731..00000000000 --- a/src/me/insights/trending/trendingRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TrendingCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createTrendingFromDiscriminatorValue, deserializeIntoTrending, serializeTrending, type Trending } from '../../../models/trending'; -import { createTrendingCollectionResponseFromDiscriminatorValue } from '../../../models/trendingCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TrendingItemRequestBuilder } from './item/trendingItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TrendingRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the trending property of the microsoft.graph.officeGraphInsights entity. - */ -export class TrendingRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the trending property of the microsoft.graph.officeGraphInsights entity. - * @param trendingId The unique identifier of trending - * @returns a TrendingItemRequestBuilder - */ - public byTrendingId(trendingId: string) : TrendingItemRequestBuilder { - if(!trendingId) throw new Error("trendingId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["trending%2Did"] = trendingId - return new TrendingItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TrendingRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/trending{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Calculated insight that includes a list of documents trending around the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TrendingCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/insights-list-trending?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTrendingCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to trending for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Trending - */ - public post(body: Trending, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTrendingFromDiscriminatorValue, errorMapping); - }; - /** - * Calculated insight that includes a list of documents trending around the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, trendingRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to trending for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Trending, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTrending); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a trendingRequestBuilder - */ - public withUrl(rawUrl: string) : TrendingRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TrendingRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const trendingRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/used/count/countRequestBuilder.ts b/src/me/insights/used/count/countRequestBuilder.ts deleted file mode 100644 index 771400f8ef2..00000000000 --- a/src/me/insights/used/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/used/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/used/count/index.ts b/src/me/insights/used/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/insights/used/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/insights/used/index.ts b/src/me/insights/used/index.ts deleted file mode 100644 index 9288c829192..00000000000 --- a/src/me/insights/used/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './usedRequestBuilder' diff --git a/src/me/insights/used/item/index.ts b/src/me/insights/used/item/index.ts deleted file mode 100644 index 70188a6026a..00000000000 --- a/src/me/insights/used/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './usedInsightItemRequestBuilder' diff --git a/src/me/insights/used/item/resource/index.ts b/src/me/insights/used/item/resource/index.ts deleted file mode 100644 index 6e2679ea836..00000000000 --- a/src/me/insights/used/item/resource/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './resourceRequestBuilder' diff --git a/src/me/insights/used/item/resource/resourceRequestBuilder.ts b/src/me/insights/used/item/resource/resourceRequestBuilder.ts deleted file mode 100644 index bf774dff1de..00000000000 --- a/src/me/insights/used/item/resource/resourceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Entity } from '../../../../../models/'; -import { createEntityFromDiscriminatorValue } from '../../../../../models/entity'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ResourceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the resource property of the microsoft.graph.usedInsight entity. - */ -export class ResourceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResourceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/used/{usedInsight%2Did}/resource{?%24select,%24expand}"); - }; - /** - * Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Entity - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEntityFromDiscriminatorValue, errorMapping); - }; - /** - * Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, resourceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a resourceRequestBuilder - */ - public withUrl(rawUrl: string) : ResourceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResourceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const resourceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/used/item/usedInsightItemRequestBuilder.ts b/src/me/insights/used/item/usedInsightItemRequestBuilder.ts deleted file mode 100644 index 10d2ec4ba8f..00000000000 --- a/src/me/insights/used/item/usedInsightItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createUsedInsightFromDiscriminatorValue, deserializeIntoUsedInsight, serializeUsedInsight, type UsedInsight } from '../../../../models/usedInsight'; -import { ResourceRequestBuilder } from './resource/resourceRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface UsedInsightItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the used property of the microsoft.graph.officeGraphInsights entity. - */ -export class UsedInsightItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the resource property of the microsoft.graph.usedInsight entity. - */ - public get resource(): ResourceRequestBuilder { - return new ResourceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new UsedInsightItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/used/{usedInsight%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property used for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Calculated relationship identifying the latest documents viewed or modified by a user, including OneDrive for Business and SharePoint documents, ranked by recency of use. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UsedInsight - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUsedInsightFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property used in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UsedInsight - */ - public patch(body: UsedInsight, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUsedInsightFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property used for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Calculated relationship identifying the latest documents viewed or modified by a user, including OneDrive for Business and SharePoint documents, ranked by recency of use. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, usedInsightItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property used in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: UsedInsight, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUsedInsight); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a UsedInsightItemRequestBuilder - */ - public withUrl(rawUrl: string) : UsedInsightItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UsedInsightItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const usedInsightItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/insights/used/usedRequestBuilder.ts b/src/me/insights/used/usedRequestBuilder.ts deleted file mode 100644 index fd19dcaed7f..00000000000 --- a/src/me/insights/used/usedRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type UsedInsightCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createUsedInsightFromDiscriminatorValue, deserializeIntoUsedInsight, serializeUsedInsight, type UsedInsight } from '../../../models/usedInsight'; -import { createUsedInsightCollectionResponseFromDiscriminatorValue } from '../../../models/usedInsightCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { UsedInsightItemRequestBuilder } from './item/usedInsightItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface UsedRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the used property of the microsoft.graph.officeGraphInsights entity. - */ -export class UsedRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the used property of the microsoft.graph.officeGraphInsights entity. - * @param usedInsightId The unique identifier of usedInsight - * @returns a UsedInsightItemRequestBuilder - */ - public byUsedInsightId(usedInsightId: string) : UsedInsightItemRequestBuilder { - if(!usedInsightId) throw new Error("usedInsightId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["usedInsight%2Did"] = usedInsightId - return new UsedInsightItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new UsedRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/insights/used{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UsedInsightCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/insights-list-used?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUsedInsightCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to used for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UsedInsight - */ - public post(body: UsedInsight, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUsedInsightFromDiscriminatorValue, errorMapping); - }; - /** - * Calculate and list the documents that a user has viewed or modified. For the signed-in user:- This method includes documents that the user has modified; see example 1. - Using an $orderby query parameter on the lastAccessedDateTime property returns the most recently viewed documents that the user might or might not not have modified; see example 2. For other users, this method includes only documents that the user has modified. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, usedRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to used for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UsedInsight, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUsedInsight); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a usedRequestBuilder - */ - public withUrl(rawUrl: string) : UsedRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UsedRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const usedRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/count/countRequestBuilder.ts b/src/me/joinedTeams/count/countRequestBuilder.ts deleted file mode 100644 index 0daac9fdaad..00000000000 --- a/src/me/joinedTeams/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/count/index.ts b/src/me/joinedTeams/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/getAllMessages/getAllMessagesRequestBuilder.ts b/src/me/joinedTeams/getAllMessages/getAllMessagesRequestBuilder.ts deleted file mode 100644 index 2919e4da96b..00000000000 --- a/src/me/joinedTeams/getAllMessages/getAllMessagesRequestBuilder.ts +++ /dev/null @@ -1,122 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../models/chatMessage'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetAllMessagesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetAllMessagesGetResponse; -} -export function deserializeIntoGetAllMessagesGetResponse(getAllMessagesGetResponse: GetAllMessagesGetResponse | undefined = {} as GetAllMessagesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getAllMessagesGetResponse), - "value": n => { getAllMessagesGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export interface GetAllMessagesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface GetAllMessagesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * The payment model for the API - */ - model?: 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; -} -export function serializeGetAllMessagesGetResponse(writer: SerializationWriter, getAllMessagesGetResponse: GetAllMessagesGetResponse | undefined = {} as GetAllMessagesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getAllMessagesGetResponse) - writer.writeCollectionOfObjectValues("value", getAllMessagesGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the getAllMessages method. - */ -export class GetAllMessagesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetAllMessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function getAllMessages - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetAllMessagesGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetAllMessagesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function getAllMessages - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getAllMessagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getAllMessagesRequestBuilder - */ - public withUrl(rawUrl: string) : GetAllMessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetAllMessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getAllMessagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/getAllMessages/index.ts b/src/me/joinedTeams/getAllMessages/index.ts deleted file mode 100644 index 0fca0680ecb..00000000000 --- a/src/me/joinedTeams/getAllMessages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getAllMessagesRequestBuilder' diff --git a/src/me/joinedTeams/index.ts b/src/me/joinedTeams/index.ts deleted file mode 100644 index 4456cdf983c..00000000000 --- a/src/me/joinedTeams/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './joinedTeamsRequestBuilder' diff --git a/src/me/joinedTeams/item/allChannels/allChannelsRequestBuilder.ts b/src/me/joinedTeams/item/allChannels/allChannelsRequestBuilder.ts deleted file mode 100644 index f52896d9dd9..00000000000 --- a/src/me/joinedTeams/item/allChannels/allChannelsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChannelCollectionResponse } from '../../../../models/'; -import { createChannelCollectionResponseFromDiscriminatorValue } from '../../../../models/channelCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChannelItemRequestBuilder } from './item/channelItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AllChannelsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the allChannels property of the microsoft.graph.team entity. - */ -export class AllChannelsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the allChannels property of the microsoft.graph.team entity. - * @param channelId The unique identifier of channel - * @returns a ChannelItemRequestBuilder - */ - public byChannelId(channelId: string) : ChannelItemRequestBuilder { - if(!channelId) throw new Error("channelId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["channel%2Did"] = channelId - return new ChannelItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AllChannelsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/allChannels{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of channels either in this team or shared with this team (incoming channels). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChannelCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/team-list-allchannels?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of channels either in this team or shared with this team (incoming channels). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, allChannelsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a allChannelsRequestBuilder - */ - public withUrl(rawUrl: string) : AllChannelsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AllChannelsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const allChannelsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/allChannels/count/countRequestBuilder.ts b/src/me/joinedTeams/item/allChannels/count/countRequestBuilder.ts deleted file mode 100644 index 04097decde1..00000000000 --- a/src/me/joinedTeams/item/allChannels/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/allChannels/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/allChannels/count/index.ts b/src/me/joinedTeams/item/allChannels/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/allChannels/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/allChannels/index.ts b/src/me/joinedTeams/item/allChannels/index.ts deleted file mode 100644 index 150bdce4069..00000000000 --- a/src/me/joinedTeams/item/allChannels/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './allChannelsRequestBuilder' diff --git a/src/me/joinedTeams/item/allChannels/item/channelItemRequestBuilder.ts b/src/me/joinedTeams/item/allChannels/item/channelItemRequestBuilder.ts deleted file mode 100644 index 912ae1ffdb1..00000000000 --- a/src/me/joinedTeams/item/allChannels/item/channelItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Channel } from '../../../../../models/'; -import { createChannelFromDiscriminatorValue } from '../../../../../models/channel'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChannelItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the allChannels property of the microsoft.graph.team entity. - */ -export class ChannelItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ChannelItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/allChannels/{channel%2Did}{?%24select,%24expand}"); - }; - /** - * List of channels either hosted in or shared with the team (incoming channels). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * List of channels either hosted in or shared with the team (incoming channels). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, channelItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChannelItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChannelItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChannelItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const channelItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/allChannels/item/index.ts b/src/me/joinedTeams/item/allChannels/item/index.ts deleted file mode 100644 index 9e1a13643c3..00000000000 --- a/src/me/joinedTeams/item/allChannels/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './channelItemRequestBuilder' diff --git a/src/me/joinedTeams/item/archive/archiveRequestBuilder.ts b/src/me/joinedTeams/item/archive/archiveRequestBuilder.ts deleted file mode 100644 index cb5090403d4..00000000000 --- a/src/me/joinedTeams/item/archive/archiveRequestBuilder.ts +++ /dev/null @@ -1,84 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface ArchivePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The shouldSetSpoSiteReadOnlyForMembers property - */ - shouldSetSpoSiteReadOnlyForMembers?: boolean; -} -export function createArchivePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoArchivePostRequestBody; -} -export function deserializeIntoArchivePostRequestBody(archivePostRequestBody: ArchivePostRequestBody | undefined = {} as ArchivePostRequestBody) : Record void> { - return { - "shouldSetSpoSiteReadOnlyForMembers": n => { archivePostRequestBody.shouldSetSpoSiteReadOnlyForMembers = n.getBooleanValue(); }, - } -} -export function serializeArchivePostRequestBody(writer: SerializationWriter, archivePostRequestBody: ArchivePostRequestBody | undefined = {} as ArchivePostRequestBody) : void { - writer.writeBooleanValue("shouldSetSpoSiteReadOnlyForMembers", archivePostRequestBody.shouldSetSpoSiteReadOnlyForMembers); - writer.writeAdditionalData(archivePostRequestBody.additionalData); -} -/** - * Provides operations to call the archive method. - */ -export class ArchiveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ArchiveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/archive"); - }; - /** - * Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-archive?view=graph-rest-1.0|Find more info here} - */ - public post(body: ArchivePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Archive the specified team. When a team is archived, users can no longer send or like messages on any channel in the team, edit the team's name, description, or other settings, or in general make most changes to the team.Membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which may occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ArchivePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeArchivePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a archiveRequestBuilder - */ - public withUrl(rawUrl: string) : ArchiveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ArchiveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/archive/index.ts b/src/me/joinedTeams/item/archive/index.ts deleted file mode 100644 index 00025d8e9de..00000000000 --- a/src/me/joinedTeams/item/archive/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './archiveRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/channelsRequestBuilder.ts b/src/me/joinedTeams/item/channels/channelsRequestBuilder.ts deleted file mode 100644 index 4ccd24e2a13..00000000000 --- a/src/me/joinedTeams/item/channels/channelsRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChannelCollectionResponse } from '../../../../models/'; -import { createChannelFromDiscriminatorValue, deserializeIntoChannel, serializeChannel, type Channel } from '../../../../models/channel'; -import { createChannelCollectionResponseFromDiscriminatorValue } from '../../../../models/channelCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GetAllMessagesRequestBuilder } from './getAllMessages/getAllMessagesRequestBuilder'; -import { ChannelItemRequestBuilder } from './item/channelItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChannelsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the channels property of the microsoft.graph.team entity. - */ -export class ChannelsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getAllMessages method. - */ - public get getAllMessages(): GetAllMessagesRequestBuilder { - return new GetAllMessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the channels property of the microsoft.graph.team entity. - * @param channelId The unique identifier of channel - * @returns a ChannelItemRequestBuilder - */ - public byChannelId(channelId: string) : ChannelItemRequestBuilder { - if(!channelId) throw new Error("channelId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["channel%2Did"] = channelId - return new ChannelItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ChannelsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of channels in this team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChannelCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - * @see {@link https://learn.microsoft.com/graph/api/channel-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: Channel, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of channels in this team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, channelsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new channel in a team, as specified in the request body. When you create a channel, the maximum length of the channel's displayName is 50 characters. This is the name that appears to the user in Microsoft Teams. If you're creating a private channel, you can add a maximum of 200 members. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Channel, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChannel); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a channelsRequestBuilder - */ - public withUrl(rawUrl: string) : ChannelsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChannelsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const channelsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/count/countRequestBuilder.ts deleted file mode 100644 index e70f357d564..00000000000 --- a/src/me/joinedTeams/item/channels/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/count/index.ts b/src/me/joinedTeams/item/channels/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/getAllMessages/getAllMessagesRequestBuilder.ts b/src/me/joinedTeams/item/channels/getAllMessages/getAllMessagesRequestBuilder.ts deleted file mode 100644 index 7afb4a445ce..00000000000 --- a/src/me/joinedTeams/item/channels/getAllMessages/getAllMessagesRequestBuilder.ts +++ /dev/null @@ -1,122 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../models/baseCollectionPaginationCountResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetAllMessagesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetAllMessagesGetResponse; -} -export function deserializeIntoGetAllMessagesGetResponse(getAllMessagesGetResponse: GetAllMessagesGetResponse | undefined = {} as GetAllMessagesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getAllMessagesGetResponse), - "value": n => { getAllMessagesGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export interface GetAllMessagesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface GetAllMessagesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * The payment model for the API - */ - model?: 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; -} -export function serializeGetAllMessagesGetResponse(writer: SerializationWriter, getAllMessagesGetResponse: GetAllMessagesGetResponse | undefined = {} as GetAllMessagesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getAllMessagesGetResponse) - writer.writeCollectionOfObjectValues("value", getAllMessagesGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the getAllMessages method. - */ -export class GetAllMessagesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetAllMessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function getAllMessages - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetAllMessagesGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetAllMessagesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function getAllMessages - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getAllMessagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getAllMessagesRequestBuilder - */ - public withUrl(rawUrl: string) : GetAllMessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetAllMessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getAllMessagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/getAllMessages/index.ts b/src/me/joinedTeams/item/channels/getAllMessages/index.ts deleted file mode 100644 index 0fca0680ecb..00000000000 --- a/src/me/joinedTeams/item/channels/getAllMessages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './getAllMessagesRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/index.ts b/src/me/joinedTeams/item/channels/index.ts deleted file mode 100644 index 580bdc3b377..00000000000 --- a/src/me/joinedTeams/item/channels/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './channelsRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/channelItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/channelItemRequestBuilder.ts deleted file mode 100644 index 92fc8e67c99..00000000000 --- a/src/me/joinedTeams/item/channels/item/channelItemRequestBuilder.ts +++ /dev/null @@ -1,193 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChannelFromDiscriminatorValue, deserializeIntoChannel, serializeChannel, type Channel } from '../../../../../models/channel'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CompleteMigrationRequestBuilder } from './completeMigration/completeMigrationRequestBuilder'; -import { DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder } from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder'; -import { FilesFolderRequestBuilder } from './filesFolder/filesFolderRequestBuilder'; -import { MembersRequestBuilder } from './members/membersRequestBuilder'; -import { MessagesRequestBuilder } from './messages/messagesRequestBuilder'; -import { ProvisionEmailRequestBuilder } from './provisionEmail/provisionEmailRequestBuilder'; -import { RemoveEmailRequestBuilder } from './removeEmail/removeEmailRequestBuilder'; -import { SharedWithTeamsRequestBuilder } from './sharedWithTeams/sharedWithTeamsRequestBuilder'; -import { TabsRequestBuilder } from './tabs/tabsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChannelItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the channels property of the microsoft.graph.team entity. - */ -export class ChannelItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the completeMigration method. - */ - public get completeMigration(): CompleteMigrationRequestBuilder { - return new CompleteMigrationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the doesUserHaveAccess method. - */ - public get doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName(): DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder { - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the filesFolder property of the microsoft.graph.channel entity. - */ - public get filesFolder(): FilesFolderRequestBuilder { - return new FilesFolderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - */ - public get members(): MembersRequestBuilder { - return new MembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - */ - public get messages(): MessagesRequestBuilder { - return new MessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the provisionEmail method. - */ - public get provisionEmail(): ProvisionEmailRequestBuilder { - return new ProvisionEmailRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the removeEmail method. - */ - public get removeEmail(): RemoveEmailRequestBuilder { - return new RemoveEmailRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - */ - public get sharedWithTeams(): SharedWithTeamsRequestBuilder { - return new SharedWithTeamsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - */ - public get tabs(): TabsRequestBuilder { - return new TabsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChannelItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}{?%24select,%24expand}"); - }; - /** - * Delete the channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - * @see {@link https://learn.microsoft.com/graph/api/channel-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - * @see {@link https://learn.microsoft.com/graph/api/channel-patch?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Channel, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * Delete the channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve channel information. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, channelItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Channel, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChannel); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChannelItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChannelItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChannelItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const channelItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/completeMigration/completeMigrationRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/completeMigration/completeMigrationRequestBuilder.ts deleted file mode 100644 index fb758c81e97..00000000000 --- a/src/me/joinedTeams/item/channels/item/completeMigration/completeMigrationRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the completeMigration method. - */ -export class CompleteMigrationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CompleteMigrationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/completeMigration"); - }; - /** - * Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-completemigration?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a completeMigrationRequestBuilder - */ - public withUrl(rawUrl: string) : CompleteMigrationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CompleteMigrationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.ts b/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.ts deleted file mode 100644 index 1de9a049b82..00000000000 --- a/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse; -} -export function deserializeIntoDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse | undefined = {} as DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse) : Record void> { - return { - "value": n => { doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.value = n.getBooleanValue(); }, - } -} -export interface DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The value property - */ - value?: boolean; -} -export function serializeDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(writer: SerializationWriter, doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse | undefined = {} as DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse) : void { - writer.writeBooleanValue("value", doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.value); - writer.writeAdditionalData(doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.ts deleted file mode 100644 index d5e3b32b45c..00000000000 --- a/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.ts +++ /dev/null @@ -1,75 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponseFromDiscriminatorValue } from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse'; -import { type DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse } from './index'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /** - * Usage: tenantId='@tenantId' - */ - tenantId?: string; - /** - * Usage: userId='@userId' - */ - userId?: string; - /** - * Usage: userPrincipalName='@userPrincipalName' - */ - userPrincipalName?: string; -} -/** - * Provides operations to call the doesUserHaveAccess method. - */ -export class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}"); - }; - /** - * Invoke function doesUserHaveAccess - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function doesUserHaveAccess - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder - */ - public withUrl(rawUrl: string) : DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParametersMapper: Record = { -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/index.ts b/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/index.ts deleted file mode 100644 index e79b3ed63c1..00000000000 --- a/src/me/joinedTeams/item/channels/item/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse' -export * from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/filesFolder/content/contentRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/filesFolder/content/contentRequestBuilder.ts deleted file mode 100644 index 0e953a9fae6..00000000000 --- a/src/me/joinedTeams/item/channels/item/filesFolder/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DriveItem } from '../../../../../../../models/'; -import { createDriveItemFromDiscriminatorValue } from '../../../../../../../models/driveItem'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/filesFolder/content"); - }; - /** - * The content stream, if the item represents a file. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/channel-get-filesfolder?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The content stream, if the item represents a file. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DriveItem - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveItemFromDiscriminatorValue, errorMapping); - }; - /** - * The content stream, if the item represents a file. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The content stream, if the item represents a file. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/filesFolder/filesFolderRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/filesFolder/filesFolderRequestBuilder.ts deleted file mode 100644 index 574625f3f53..00000000000 --- a/src/me/joinedTeams/item/channels/item/filesFolder/filesFolderRequestBuilder.ts +++ /dev/null @@ -1,81 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DriveItem } from '../../../../../../models/'; -import { createDriveItemFromDiscriminatorValue } from '../../../../../../models/driveItem'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface FilesFolderRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the filesFolder property of the microsoft.graph.channel entity. - */ -export class FilesFolderRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new FilesFolderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/filesFolder{?%24select,%24expand}"); - }; - /** - * Get the metadata for the location where the files of a channel are stored. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DriveItem - * @see {@link https://learn.microsoft.com/graph/api/channel-get-filesfolder?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveItemFromDiscriminatorValue, errorMapping); - }; - /** - * Get the metadata for the location where the files of a channel are stored. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, filesFolderRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a filesFolderRequestBuilder - */ - public withUrl(rawUrl: string) : FilesFolderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new FilesFolderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const filesFolderRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/filesFolder/index.ts b/src/me/joinedTeams/item/channels/item/filesFolder/index.ts deleted file mode 100644 index bbb732ec59f..00000000000 --- a/src/me/joinedTeams/item/channels/item/filesFolder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './filesFolderRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/index.ts b/src/me/joinedTeams/item/channels/item/index.ts deleted file mode 100644 index 9e1a13643c3..00000000000 --- a/src/me/joinedTeams/item/channels/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './channelItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/members/add/addRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/members/add/addRequestBuilder.ts deleted file mode 100644 index 21a60857010..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/add/addRequestBuilder.ts +++ /dev/null @@ -1,108 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createActionResultPartFromDiscriminatorValue, serializeActionResultPart, type ActionResultPart } from '../../../../../../../models/actionResultPart'; -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../../../models/baseCollectionPaginationCountResponse'; -import { createConversationMemberFromDiscriminatorValue, serializeConversationMember, type ConversationMember } from '../../../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AddPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The values property - */ - values?: ConversationMember[]; -} -export interface AddPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ActionResultPart[]; -} -export function createAddPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostRequestBody; -} -export function createAddPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostResponse; -} -export function deserializeIntoAddPostRequestBody(addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : Record void> { - return { - "values": n => { addPostRequestBody.values = n.getCollectionOfObjectValues(createConversationMemberFromDiscriminatorValue); }, - } -} -export function deserializeIntoAddPostResponse(addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(addPostResponse), - "value": n => { addPostResponse.value = n.getCollectionOfObjectValues(createActionResultPartFromDiscriminatorValue); }, - } -} -export function serializeAddPostRequestBody(writer: SerializationWriter, addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : void { - writer.writeCollectionOfObjectValues("values", addPostRequestBody.values, serializeConversationMember); - writer.writeAdditionalData(addPostRequestBody.additionalData); -} -export function serializeAddPostResponse(writer: SerializationWriter, addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, addPostResponse) - writer.writeCollectionOfObjectValues("value", addPostResponse.value, serializeActionResultPart); -} -/** - * Provides operations to call the add method. - */ -export class AddRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AddRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/members/add"); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AddPostResponse - * @see {@link https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0|Find more info here} - */ - public post(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAddPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAddPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a addRequestBuilder - */ - public withUrl(rawUrl: string) : AddRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AddRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/members/add/index.ts b/src/me/joinedTeams/item/channels/item/members/add/index.ts deleted file mode 100644 index 438ff809197..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/add/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './addRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/members/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/members/count/countRequestBuilder.ts deleted file mode 100644 index 03e90e7c473..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/members/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/members/count/index.ts b/src/me/joinedTeams/item/channels/item/members/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/members/index.ts b/src/me/joinedTeams/item/channels/item/members/index.ts deleted file mode 100644 index 3f3fccb5478..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './membersRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/members/item/conversationMemberItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/members/item/conversationMemberItemRequestBuilder.ts deleted file mode 100644 index 48319e2d06d..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/item/conversationMemberItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ConversationMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - */ -export class ConversationMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ConversationMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/members/{conversationMember%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a conversationMember from a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-delete-members?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a conversationMember from a channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a conversationMember from a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a conversationMember from a channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, conversationMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ConversationMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : ConversationMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ConversationMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const conversationMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/members/item/index.ts b/src/me/joinedTeams/item/channels/item/members/item/index.ts deleted file mode 100644 index f1ff703d6b4..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './conversationMemberItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/members/membersRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/members/membersRequestBuilder.ts deleted file mode 100644 index 16b6586d67d..00000000000 --- a/src/me/joinedTeams/item/channels/item/members/membersRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMemberCollectionResponse } from '../../../../../../models/'; -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../../../models/conversationMember'; -import { createConversationMemberCollectionResponseFromDiscriminatorValue } from '../../../../../../models/conversationMemberCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { AddRequestBuilder } from './add/addRequestBuilder'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ConversationMemberItemRequestBuilder } from './item/conversationMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - */ -export class MembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the add method. - */ - public get add(): AddRequestBuilder { - return new AddRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - * @param conversationMemberId The unique identifier of conversationMember - * @returns a ConversationMemberItemRequestBuilder - */ - public byConversationMemberId(conversationMemberId: string) : ConversationMemberItemRequestBuilder { - if(!conversationMemberId) throw new Error("conversationMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["conversationMember%2Did"] = conversationMemberId - return new ConversationMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0|Find more info here} - */ - public post(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, membersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a membersRequestBuilder - */ - public withUrl(rawUrl: string) : MembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const membersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/count/countRequestBuilder.ts deleted file mode 100644 index d543dcb56b0..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/count/index.ts b/src/me/joinedTeams/item/channels/item/messages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/delta/deltaRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/delta/deltaRequestBuilder.ts deleted file mode 100644 index 55cc3075fc5..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/delta/index.ts b/src/me/joinedTeams/item/channels/item/messages/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/index.ts b/src/me/joinedTeams/item/channels/item/messages/index.ts deleted file mode 100644 index 9f6fd0b319b..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messagesRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/chatMessageItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/chatMessageItemRequestBuilder.ts deleted file mode 100644 index 2a04cdc4bbd..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/chatMessageItemRequestBuilder.ts +++ /dev/null @@ -1,171 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { HostedContentsRequestBuilder } from './hostedContents/hostedContentsRequestBuilder'; -import { RepliesRequestBuilder } from './replies/repliesRequestBuilder'; -import { SetReactionRequestBuilder } from './setReaction/setReactionRequestBuilder'; -import { SoftDeleteRequestBuilder } from './softDelete/softDeleteRequestBuilder'; -import { UndoSoftDeleteRequestBuilder } from './undoSoftDelete/undoSoftDeleteRequestBuilder'; -import { UnsetReactionRequestBuilder } from './unsetReaction/unsetReactionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - */ -export class ChatMessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ - public get hostedContents(): HostedContentsRequestBuilder { - return new HostedContentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ - public get replies(): RepliesRequestBuilder { - return new RepliesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setReaction method. - */ - public get setReaction(): SetReactionRequestBuilder { - return new SetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the softDelete method. - */ - public get softDelete(): SoftDeleteRequestBuilder { - return new SoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the undoSoftDelete method. - */ - public get undoSoftDelete(): UndoSoftDeleteRequestBuilder { - return new UndoSoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unsetReaction method. - */ - public get unsetReaction(): UnsetReactionRequestBuilder { - return new UnsetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/count/countRequestBuilder.ts deleted file mode 100644 index 2bd1bbe982a..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/hostedContents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/count/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/hostedContentsRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/hostedContentsRequestBuilder.ts deleted file mode 100644 index 33499455d99..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/hostedContentsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageHostedContentCollectionResponse } from '../../../../../../../../models/'; -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../models/chatMessageHostedContent'; -import { createChatMessageHostedContentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/chatMessageHostedContentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChatMessageHostedContentItemRequestBuilder } from './item/chatMessageHostedContentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HostedContentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class HostedContentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - * @param chatMessageHostedContentId The unique identifier of chatMessageHostedContent - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public byChatMessageHostedContentId(chatMessageHostedContentId: string) : ChatMessageHostedContentItemRequestBuilder { - if(!chatMessageHostedContentId) throw new Error("chatMessageHostedContentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessageHostedContent%2Did"] = chatMessageHostedContentId - return new ChatMessageHostedContentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HostedContentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public post(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, hostedContentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hostedContentsRequestBuilder - */ - public withUrl(rawUrl: string) : HostedContentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HostedContentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const hostedContentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/index.ts deleted file mode 100644 index 63545aedbd6..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hostedContentsRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts deleted file mode 100644 index 24061304214..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../../models/chatMessageHostedContent'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageHostedContentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageHostedContentItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - * @see {@link https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public patch(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageHostedContentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageHostedContentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/index.ts deleted file mode 100644 index ab90c6b72b8..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageHostedContentItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/value/contentRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/value/contentRequestBuilder.ts deleted file mode 100644 index 0f4f46be680..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/hostedContents/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}/$value"); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/index.ts deleted file mode 100644 index 52f34603070..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/count/countRequestBuilder.ts deleted file mode 100644 index 1ba77ee665e..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/count/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/delta/deltaRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/delta/deltaRequestBuilder.ts deleted file mode 100644 index 1bfd38e3ba2..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../../../models/baseDeltaFunctionResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/delta/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/index.ts deleted file mode 100644 index 7e1a882ddac..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './repliesRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/chatMessageItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/chatMessageItemRequestBuilder.ts deleted file mode 100644 index 2e91d650962..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/chatMessageItemRequestBuilder.ts +++ /dev/null @@ -1,163 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { HostedContentsRequestBuilder } from './hostedContents/hostedContentsRequestBuilder'; -import { SetReactionRequestBuilder } from './setReaction/setReactionRequestBuilder'; -import { SoftDeleteRequestBuilder } from './softDelete/softDeleteRequestBuilder'; -import { UndoSoftDeleteRequestBuilder } from './undoSoftDelete/undoSoftDeleteRequestBuilder'; -import { UnsetReactionRequestBuilder } from './unsetReaction/unsetReactionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ - public get hostedContents(): HostedContentsRequestBuilder { - return new HostedContentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setReaction method. - */ - public get setReaction(): SetReactionRequestBuilder { - return new SetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the softDelete method. - */ - public get softDelete(): SoftDeleteRequestBuilder { - return new SoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the undoSoftDelete method. - */ - public get undoSoftDelete(): UndoSoftDeleteRequestBuilder { - return new UndoSoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unsetReaction method. - */ - public get unsetReaction(): UnsetReactionRequestBuilder { - return new UnsetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}{?%24select,%24expand}"); - }; - /** - * Delete navigation property replies for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property replies in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - */ - public patch(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property replies for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property replies in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts deleted file mode 100644 index 42b356b7313..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/count/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts deleted file mode 100644 index 8ca8c9b6ab0..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageHostedContentCollectionResponse } from '../../../../../../../../../../models/'; -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../../../models/chatMessageHostedContent'; -import { createChatMessageHostedContentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../../models/chatMessageHostedContentCollectionResponse'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChatMessageHostedContentItemRequestBuilder } from './item/chatMessageHostedContentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HostedContentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class HostedContentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - * @param chatMessageHostedContentId The unique identifier of chatMessageHostedContent - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public byChatMessageHostedContentId(chatMessageHostedContentId: string) : ChatMessageHostedContentItemRequestBuilder { - if(!chatMessageHostedContentId) throw new Error("chatMessageHostedContentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessageHostedContent%2Did"] = chatMessageHostedContentId - return new ChatMessageHostedContentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HostedContentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public post(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, hostedContentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hostedContentsRequestBuilder - */ - public withUrl(rawUrl: string) : HostedContentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HostedContentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const hostedContentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/index.ts deleted file mode 100644 index 63545aedbd6..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hostedContentsRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts deleted file mode 100644 index c618bfef477..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../../../../models/chatMessageHostedContent'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageHostedContentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageHostedContentItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - * @see {@link https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public patch(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageHostedContentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageHostedContentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/index.ts deleted file mode 100644 index ab90c6b72b8..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageHostedContentItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts deleted file mode 100644 index 94840ba1528..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}/$value"); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/index.ts deleted file mode 100644 index 52f34603070..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/index.ts deleted file mode 100644 index 9429e817eeb..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setReactionPostRequestBody' -export * from './setReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts deleted file mode 100644 index 35ae79e93e8..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetReactionPostRequestBody; -} -export function deserializeIntoSetReactionPostRequestBody(setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { setReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeSetReactionPostRequestBody(writer: SerializationWriter, setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", setReactionPostRequestBody.reactionType); - writer.writeAdditionalData(setReactionPostRequestBody.additionalData); -} -export interface SetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts deleted file mode 100644 index 4ca57af3ffd..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetReactionPostRequestBody, serializeSetReactionPostRequestBody, type SetReactionPostRequestBody } from './setReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setReaction method. - */ -export class SetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/setReaction"); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setReactionRequestBuilder - */ - public withUrl(rawUrl: string) : SetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts deleted file mode 100644 index 83e3e4251c3..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the softDelete method. - */ -export class SoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/softDelete"); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : SoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts deleted file mode 100644 index aa0f461eae5..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the undoSoftDelete method. - */ -export class UndoSoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UndoSoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/undoSoftDelete"); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a undoSoftDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : UndoSoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UndoSoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/index.ts deleted file mode 100644 index 08e2e9f8a95..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unsetReactionPostRequestBody' -export * from './unsetReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts deleted file mode 100644 index cec6476d233..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnsetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnsetReactionPostRequestBody; -} -export function deserializeIntoUnsetReactionPostRequestBody(unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { unsetReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeUnsetReactionPostRequestBody(writer: SerializationWriter, unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", unsetReactionPostRequestBody.reactionType); - writer.writeAdditionalData(unsetReactionPostRequestBody.additionalData); -} -export interface UnsetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts deleted file mode 100644 index 819571afc2f..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnsetReactionPostRequestBody, serializeUnsetReactionPostRequestBody, type UnsetReactionPostRequestBody } from './unsetReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unsetReaction method. - */ -export class UnsetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnsetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/unsetReaction"); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnsetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unsetReactionRequestBuilder - */ - public withUrl(rawUrl: string) : UnsetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnsetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/replies/repliesRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/replies/repliesRequestBuilder.ts deleted file mode 100644 index b58e499750b..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/replies/repliesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageCollectionResponse } from '../../../../../../../../models/'; -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../../../models/chatMessage'; -import { createChatMessageCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/chatMessageCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ChatMessageItemRequestBuilder } from './item/chatMessageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface RepliesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ -export class RepliesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - * @param chatMessageId1 The unique identifier of chatMessage - * @returns a ChatMessageItemRequestBuilder - */ - public byChatMessageId1(chatMessageId1: string) : ChatMessageItemRequestBuilder { - if(!chatMessageId1) throw new Error("chatMessageId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessage%2Did1"] = chatMessageId1 - return new ChatMessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new RepliesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/replies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Send a new reply to a chatMessage in a specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, repliesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Send a new reply to a chatMessage in a specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a repliesRequestBuilder - */ - public withUrl(rawUrl: string) : RepliesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RepliesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const repliesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/setReaction/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/setReaction/index.ts deleted file mode 100644 index 9429e817eeb..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/setReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setReactionPostRequestBody' -export * from './setReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/setReaction/setReactionPostRequestBody.ts b/src/me/joinedTeams/item/channels/item/messages/item/setReaction/setReactionPostRequestBody.ts deleted file mode 100644 index 35ae79e93e8..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/setReaction/setReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetReactionPostRequestBody; -} -export function deserializeIntoSetReactionPostRequestBody(setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { setReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeSetReactionPostRequestBody(writer: SerializationWriter, setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", setReactionPostRequestBody.reactionType); - writer.writeAdditionalData(setReactionPostRequestBody.additionalData); -} -export interface SetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/setReaction/setReactionRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/setReaction/setReactionRequestBuilder.ts deleted file mode 100644 index fbf08d3aa93..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/setReaction/setReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetReactionPostRequestBody, serializeSetReactionPostRequestBody, type SetReactionPostRequestBody } from './setReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setReaction method. - */ -export class SetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/setReaction"); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setReactionRequestBuilder - */ - public withUrl(rawUrl: string) : SetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/softDelete/softDeleteRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/softDelete/softDeleteRequestBuilder.ts deleted file mode 100644 index af9127ae20a..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/softDelete/softDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the softDelete method. - */ -export class SoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/softDelete"); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : SoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts deleted file mode 100644 index 10b0e857a5b..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the undoSoftDelete method. - */ -export class UndoSoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UndoSoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/undoSoftDelete"); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a undoSoftDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : UndoSoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UndoSoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/index.ts b/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/index.ts deleted file mode 100644 index 08e2e9f8a95..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unsetReactionPostRequestBody' -export * from './unsetReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/unsetReactionPostRequestBody.ts b/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/unsetReactionPostRequestBody.ts deleted file mode 100644 index cec6476d233..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/unsetReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnsetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnsetReactionPostRequestBody; -} -export function deserializeIntoUnsetReactionPostRequestBody(unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { unsetReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeUnsetReactionPostRequestBody(writer: SerializationWriter, unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", unsetReactionPostRequestBody.reactionType); - writer.writeAdditionalData(unsetReactionPostRequestBody.additionalData); -} -export interface UnsetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/unsetReactionRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/unsetReactionRequestBuilder.ts deleted file mode 100644 index e58995524a4..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/item/unsetReaction/unsetReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnsetReactionPostRequestBody, serializeUnsetReactionPostRequestBody, type UnsetReactionPostRequestBody } from './unsetReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unsetReaction method. - */ -export class UnsetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnsetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages/{chatMessage%2Did}/unsetReaction"); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnsetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unsetReactionRequestBuilder - */ - public withUrl(rawUrl: string) : UnsetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnsetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/messages/messagesRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/messages/messagesRequestBuilder.ts deleted file mode 100644 index 89f1f68083d..00000000000 --- a/src/me/joinedTeams/item/channels/item/messages/messagesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageCollectionResponse } from '../../../../../../models/'; -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../models/chatMessage'; -import { createChatMessageCollectionResponseFromDiscriminatorValue } from '../../../../../../models/chatMessageCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ChatMessageItemRequestBuilder } from './item/chatMessageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - */ -export class MessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - * @param chatMessageId The unique identifier of chatMessage - * @returns a ChatMessageItemRequestBuilder - */ - public byChatMessageId(chatMessageId: string) : ChatMessageItemRequestBuilder { - if(!chatMessageId) throw new Error("chatMessageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessage%2Did"] = chatMessageId - return new ChatMessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Send a new chatMessage in the specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Send a new chatMessage in the specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messagesRequestBuilder - */ - public withUrl(rawUrl: string) : MessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/provisionEmail/provisionEmailRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/provisionEmail/provisionEmailRequestBuilder.ts deleted file mode 100644 index 14f4aa09c6b..00000000000 --- a/src/me/joinedTeams/item/channels/item/provisionEmail/provisionEmailRequestBuilder.ts +++ /dev/null @@ -1,60 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ProvisionChannelEmailResult } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createProvisionChannelEmailResultFromDiscriminatorValue } from '../../../../../../models/provisionChannelEmailResult'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the provisionEmail method. - */ -export class ProvisionEmailRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ProvisionEmailRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/provisionEmail"); - }; - /** - * Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProvisionChannelEmailResult - * @see {@link https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProvisionChannelEmailResultFromDiscriminatorValue, errorMapping); - }; - /** - * Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a provisionEmailRequestBuilder - */ - public withUrl(rawUrl: string) : ProvisionEmailRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ProvisionEmailRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/removeEmail/removeEmailRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/removeEmail/removeEmailRequestBuilder.ts deleted file mode 100644 index e39b629caf7..00000000000 --- a/src/me/joinedTeams/item/channels/item/removeEmail/removeEmailRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the removeEmail method. - */ -export class RemoveEmailRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RemoveEmailRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/removeEmail"); - }; - /** - * Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-removeemail?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a removeEmailRequestBuilder - */ - public withUrl(rawUrl: string) : RemoveEmailRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RemoveEmailRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/count/countRequestBuilder.ts deleted file mode 100644 index 27c898ea23c..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/count/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/index.ts deleted file mode 100644 index d11a3f2c6d3..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sharedWithTeamsRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/allowedMembersRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/allowedMembersRequestBuilder.ts deleted file mode 100644 index d9a6a663426..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/allowedMembersRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMemberCollectionResponse } from '../../../../../../../../models/'; -import { createConversationMemberCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/conversationMemberCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ConversationMemberItemRequestBuilder } from './item/conversationMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AllowedMembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - */ -export class AllowedMembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - * @param conversationMemberId The unique identifier of conversationMember - * @returns a ConversationMemberItemRequestBuilder - */ - public byConversationMemberId(conversationMemberId: string) : ConversationMemberItemRequestBuilder { - if(!conversationMemberId) throw new Error("conversationMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["conversationMember%2Did"] = conversationMemberId - return new ConversationMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AllowedMembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/allowedMembers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, allowedMembersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a allowedMembersRequestBuilder - */ - public withUrl(rawUrl: string) : AllowedMembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AllowedMembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const allowedMembersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/count/countRequestBuilder.ts deleted file mode 100644 index 92e2e686707..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/allowedMembers/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/count/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/index.ts deleted file mode 100644 index f32891d1001..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './allowedMembersRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/item/conversationMemberItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/item/conversationMemberItemRequestBuilder.ts deleted file mode 100644 index 7c65fe95e00..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/item/conversationMemberItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMember } from '../../../../../../../../../models/'; -import { createConversationMemberFromDiscriminatorValue } from '../../../../../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ConversationMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - */ -export class ConversationMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ConversationMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/allowedMembers/{conversationMember%2Did}{?%24select,%24expand}"); - }; - /** - * A collection of team members who have access to the shared channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * A collection of team members who have access to the shared channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, conversationMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ConversationMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : ConversationMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ConversationMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const conversationMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/item/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/item/index.ts deleted file mode 100644 index f1ff703d6b4..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/allowedMembers/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './conversationMemberItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/index.ts deleted file mode 100644 index 356706841a3..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sharedWithChannelTeamInfoItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/sharedWithChannelTeamInfoItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/sharedWithChannelTeamInfoItemRequestBuilder.ts deleted file mode 100644 index 89a8c14b4bc..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/sharedWithChannelTeamInfoItemRequestBuilder.ts +++ /dev/null @@ -1,143 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createSharedWithChannelTeamInfoFromDiscriminatorValue, deserializeIntoSharedWithChannelTeamInfo, serializeSharedWithChannelTeamInfo, type SharedWithChannelTeamInfo } from '../../../../../../../models/sharedWithChannelTeamInfo'; -import { AllowedMembersRequestBuilder } from './allowedMembers/allowedMembersRequestBuilder'; -import { TeamRequestBuilder } from './team/teamRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - */ -export class SharedWithChannelTeamInfoItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - */ - public get allowedMembers(): AllowedMembersRequestBuilder { - return new AllowedMembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the team property of the microsoft.graph.teamInfo entity. - */ - public get team(): TeamRequestBuilder { - return new TeamRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}{?%24select,%24expand}"); - }; - /** - * Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfo - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sharedWithTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfo - */ - public patch(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sharedWithChannelTeamInfoItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sharedWithTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharedWithChannelTeamInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SharedWithChannelTeamInfoItemRequestBuilder - */ - public withUrl(rawUrl: string) : SharedWithChannelTeamInfoItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SharedWithChannelTeamInfoItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sharedWithChannelTeamInfoItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/team/index.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/team/index.ts deleted file mode 100644 index 7da2dc0bf0d..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/team/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/team/teamRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/team/teamRequestBuilder.ts deleted file mode 100644 index 589bffbad71..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/item/team/teamRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Team } from '../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTeamFromDiscriminatorValue } from '../../../../../../../../models/team'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the team property of the microsoft.graph.teamInfo entity. - */ -export class TeamRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}"); - }; - /** - * Get team from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Team - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamFromDiscriminatorValue, errorMapping); - }; - /** - * Get team from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamRequestBuilder - */ - public withUrl(rawUrl: string) : TeamRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/sharedWithTeams/sharedWithTeamsRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/sharedWithTeams/sharedWithTeamsRequestBuilder.ts deleted file mode 100644 index 4b716e4db68..00000000000 --- a/src/me/joinedTeams/item/channels/item/sharedWithTeams/sharedWithTeamsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SharedWithChannelTeamInfoCollectionResponse } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createSharedWithChannelTeamInfoFromDiscriminatorValue, deserializeIntoSharedWithChannelTeamInfo, serializeSharedWithChannelTeamInfo, type SharedWithChannelTeamInfo } from '../../../../../../models/sharedWithChannelTeamInfo'; -import { createSharedWithChannelTeamInfoCollectionResponseFromDiscriminatorValue } from '../../../../../../models/sharedWithChannelTeamInfoCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SharedWithChannelTeamInfoItemRequestBuilder } from './item/sharedWithChannelTeamInfoItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SharedWithTeamsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - */ -export class SharedWithTeamsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - * @param sharedWithChannelTeamInfoId The unique identifier of sharedWithChannelTeamInfo - * @returns a SharedWithChannelTeamInfoItemRequestBuilder - */ - public bySharedWithChannelTeamInfoId(sharedWithChannelTeamInfoId: string) : SharedWithChannelTeamInfoItemRequestBuilder { - if(!sharedWithChannelTeamInfoId) throw new Error("sharedWithChannelTeamInfoId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sharedWithChannelTeamInfo%2Did"] = sharedWithChannelTeamInfoId - return new SharedWithChannelTeamInfoItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SharedWithTeamsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/sharedWithTeams{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfoCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to sharedWithTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfo - */ - public post(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sharedWithTeamsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to sharedWithTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharedWithChannelTeamInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sharedWithTeamsRequestBuilder - */ - public withUrl(rawUrl: string) : SharedWithTeamsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SharedWithTeamsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sharedWithTeamsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/tabs/count/countRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/tabs/count/countRequestBuilder.ts deleted file mode 100644 index 925f9f66c0f..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/tabs/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/tabs/count/index.ts b/src/me/joinedTeams/item/channels/item/tabs/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/tabs/index.ts b/src/me/joinedTeams/item/channels/item/tabs/index.ts deleted file mode 100644 index 4e808651757..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tabsRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/tabs/item/index.ts b/src/me/joinedTeams/item/channels/item/tabs/item/index.ts deleted file mode 100644 index 2a6e3981df6..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsTabItemRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/tabs/item/teamsApp/index.ts b/src/me/joinedTeams/item/channels/item/tabs/item/teamsApp/index.ts deleted file mode 100644 index 0e775e3b0c3..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/item/teamsApp/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppRequestBuilder' diff --git a/src/me/joinedTeams/item/channels/item/tabs/item/teamsApp/teamsAppRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/tabs/item/teamsApp/teamsAppRequestBuilder.ts deleted file mode 100644 index 10177f99e53..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/item/teamsApp/teamsAppRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsApp } from '../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppFromDiscriminatorValue } from '../../../../../../../../models/teamsApp'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsTab entity. - */ -export class TeamsAppRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/tabs/{teamsTab%2Did}/teamsApp{?%24select,%24expand}"); - }; - /** - * The application that is linked to the tab. This can't be changed after tab creation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsApp - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppFromDiscriminatorValue, errorMapping); - }; - /** - * The application that is linked to the tab. This can't be changed after tab creation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/tabs/item/teamsTabItemRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/tabs/item/teamsTabItemRequestBuilder.ts deleted file mode 100644 index 19ebbd33756..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/item/teamsTabItemRequestBuilder.ts +++ /dev/null @@ -1,137 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTeamsTabFromDiscriminatorValue, deserializeIntoTeamsTab, serializeTeamsTab, type TeamsTab } from '../../../../../../../models/teamsTab'; -import { TeamsAppRequestBuilder } from './teamsApp/teamsAppRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsTabItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - */ -export class TeamsTabItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsTab entity. - */ - public get teamsApp(): TeamsAppRequestBuilder { - return new TeamsAppRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamsTabItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/tabs/{teamsTab%2Did}{?%24select,%24expand}"); - }; - /** - * Removes (unpins) a tab from the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-delete-tabs?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of the specified tab in a channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the specified tab.This can be used to configure the content of the tab. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/channel-patch-tabs?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Removes (unpins) a tab from the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of the specified tab in a channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsTabItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the specified tab.This can be used to configure the content of the tab. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsTab); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamsTabItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsTabItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsTabItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsTabItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/channels/item/tabs/tabsRequestBuilder.ts b/src/me/joinedTeams/item/channels/item/tabs/tabsRequestBuilder.ts deleted file mode 100644 index 1fc37fef874..00000000000 --- a/src/me/joinedTeams/item/channels/item/tabs/tabsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsTabCollectionResponse } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsTabFromDiscriminatorValue, deserializeIntoTeamsTab, serializeTeamsTab, type TeamsTab } from '../../../../../../models/teamsTab'; -import { createTeamsTabCollectionResponseFromDiscriminatorValue } from '../../../../../../models/teamsTabCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamsTabItemRequestBuilder } from './item/teamsTabItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TabsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - */ -export class TabsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - * @param teamsTabId The unique identifier of teamsTab - * @returns a TeamsTabItemRequestBuilder - */ - public byTeamsTabId(teamsTabId: string) : TeamsTabItemRequestBuilder { - if(!teamsTabId) throw new Error("teamsTabId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamsTab%2Did"] = teamsTabId - return new TeamsTabItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TabsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/channels/{channel%2Did}/tabs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of tabs in the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTabCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/channel-post-tabs?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of tabs in the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tabsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsTab); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tabsRequestBuilder - */ - public withUrl(rawUrl: string) : TabsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TabsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tabsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/clone/clonePostRequestBody.ts b/src/me/joinedTeams/item/clone/clonePostRequestBody.ts deleted file mode 100644 index 5a12a0ae555..00000000000 --- a/src/me/joinedTeams/item/clone/clonePostRequestBody.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { ClonableTeamParts } from '../../../../models/clonableTeamParts'; -import { TeamVisibilityType } from '../../../../models/teamVisibilityType'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface ClonePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The classification property - */ - classification?: string; - /** - * The description property - */ - description?: string; - /** - * The displayName property - */ - displayName?: string; - /** - * The mailNickname property - */ - mailNickname?: string; - /** - * The partsToClone property - */ - partsToClone?: ClonableTeamParts[]; - /** - * The visibility property - */ - visibility?: TeamVisibilityType; -} -export function createClonePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoClonePostRequestBody; -} -export function deserializeIntoClonePostRequestBody(clonePostRequestBody: ClonePostRequestBody | undefined = {} as ClonePostRequestBody) : Record void> { - return { - "classification": n => { clonePostRequestBody.classification = n.getStringValue(); }, - "description": n => { clonePostRequestBody.description = n.getStringValue(); }, - "displayName": n => { clonePostRequestBody.displayName = n.getStringValue(); }, - "mailNickname": n => { clonePostRequestBody.mailNickname = n.getStringValue(); }, - "partsToClone": n => { clonePostRequestBody.partsToClone = n.getCollectionOfEnumValues(ClonableTeamParts); }, - "visibility": n => { clonePostRequestBody.visibility = n.getEnumValue(TeamVisibilityType); }, - } -} -export function serializeClonePostRequestBody(writer: SerializationWriter, clonePostRequestBody: ClonePostRequestBody | undefined = {} as ClonePostRequestBody) : void { - writer.writeStringValue("classification", clonePostRequestBody.classification); - writer.writeStringValue("description", clonePostRequestBody.description); - writer.writeStringValue("displayName", clonePostRequestBody.displayName); - writer.writeStringValue("mailNickname", clonePostRequestBody.mailNickname); - writer.writeEnumValue("partsToClone", clonePostRequestBody.partsToClone); - writer.writeEnumValue("visibility", clonePostRequestBody.visibility); - writer.writeAdditionalData(clonePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/clone/cloneRequestBuilder.ts b/src/me/joinedTeams/item/clone/cloneRequestBuilder.ts deleted file mode 100644 index 41f49e5609c..00000000000 --- a/src/me/joinedTeams/item/clone/cloneRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoClonePostRequestBody, serializeClonePostRequestBody, type ClonePostRequestBody } from './clonePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the clone method. - */ -export class CloneRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CloneRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/clone"); - }; - /** - * Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-clone?view=graph-rest-1.0|Find more info here} - */ - public post(body: ClonePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Create a copy of a team. This operation also creates a copy of the corresponding group.You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they'll see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ClonePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeClonePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cloneRequestBuilder - */ - public withUrl(rawUrl: string) : CloneRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CloneRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/clone/index.ts b/src/me/joinedTeams/item/clone/index.ts deleted file mode 100644 index 436e201ee79..00000000000 --- a/src/me/joinedTeams/item/clone/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './clonePostRequestBody' -export * from './cloneRequestBuilder' diff --git a/src/me/joinedTeams/item/completeMigration/completeMigrationRequestBuilder.ts b/src/me/joinedTeams/item/completeMigration/completeMigrationRequestBuilder.ts deleted file mode 100644 index e4912912e6a..00000000000 --- a/src/me/joinedTeams/item/completeMigration/completeMigrationRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the completeMigration method. - */ -export class CompleteMigrationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CompleteMigrationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/completeMigration"); - }; - /** - * Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-completemigration?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a completeMigrationRequestBuilder - */ - public withUrl(rawUrl: string) : CompleteMigrationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CompleteMigrationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/group/groupRequestBuilder.ts b/src/me/joinedTeams/item/group/groupRequestBuilder.ts deleted file mode 100644 index da907133a57..00000000000 --- a/src/me/joinedTeams/item/group/groupRequestBuilder.ts +++ /dev/null @@ -1,80 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Group } from '../../../../models/'; -import { createGroupFromDiscriminatorValue } from '../../../../models/group'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { ServiceProvisioningErrorsRequestBuilder } from './serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the group property of the microsoft.graph.team entity. - */ -export class GroupRequestBuilder extends BaseRequestBuilder { - /** - * The serviceProvisioningErrors property - */ - public get serviceProvisioningErrors(): ServiceProvisioningErrorsRequestBuilder { - return new ServiceProvisioningErrorsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/group{?%24select,%24expand}"); - }; - /** - * Get group from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Group - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Get group from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, groupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a groupRequestBuilder - */ - public withUrl(rawUrl: string) : GroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const groupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/group/index.ts b/src/me/joinedTeams/item/group/index.ts deleted file mode 100644 index 41879c7a11f..00000000000 --- a/src/me/joinedTeams/item/group/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './groupRequestBuilder' diff --git a/src/me/joinedTeams/item/group/serviceProvisioningErrors/count/countRequestBuilder.ts b/src/me/joinedTeams/item/group/serviceProvisioningErrors/count/countRequestBuilder.ts deleted file mode 100644 index 2c4664bb6af..00000000000 --- a/src/me/joinedTeams/item/group/serviceProvisioningErrors/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/group/serviceProvisioningErrors/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/group/serviceProvisioningErrors/count/index.ts b/src/me/joinedTeams/item/group/serviceProvisioningErrors/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/group/serviceProvisioningErrors/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/group/serviceProvisioningErrors/index.ts b/src/me/joinedTeams/item/group/serviceProvisioningErrors/index.ts deleted file mode 100644 index 1855ccd93ff..00000000000 --- a/src/me/joinedTeams/item/group/serviceProvisioningErrors/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './serviceProvisioningErrorsRequestBuilder' diff --git a/src/me/joinedTeams/item/group/serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder.ts b/src/me/joinedTeams/item/group/serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder.ts deleted file mode 100644 index 3f8d9269a00..00000000000 --- a/src/me/joinedTeams/item/group/serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ServiceProvisioningErrorCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createServiceProvisioningErrorCollectionResponseFromDiscriminatorValue } from '../../../../../models/serviceProvisioningErrorCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ServiceProvisioningErrorsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Builds and executes requests for operations under /me/joinedTeams/{team-id}/group/serviceProvisioningErrors - */ -export class ServiceProvisioningErrorsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/group/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get serviceProvisioningErrors property value - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ServiceProvisioningErrorCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get serviceProvisioningErrors property value - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, serviceProvisioningErrorsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a serviceProvisioningErrorsRequestBuilder - */ - public withUrl(rawUrl: string) : ServiceProvisioningErrorsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ServiceProvisioningErrorsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const serviceProvisioningErrorsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/incomingChannels/count/countRequestBuilder.ts b/src/me/joinedTeams/item/incomingChannels/count/countRequestBuilder.ts deleted file mode 100644 index 233ac781c9e..00000000000 --- a/src/me/joinedTeams/item/incomingChannels/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/incomingChannels/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/incomingChannels/count/index.ts b/src/me/joinedTeams/item/incomingChannels/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/incomingChannels/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/incomingChannels/incomingChannelsRequestBuilder.ts b/src/me/joinedTeams/item/incomingChannels/incomingChannelsRequestBuilder.ts deleted file mode 100644 index 8385a70ebae..00000000000 --- a/src/me/joinedTeams/item/incomingChannels/incomingChannelsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChannelCollectionResponse } from '../../../../models/'; -import { createChannelCollectionResponseFromDiscriminatorValue } from '../../../../models/channelCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChannelItemRequestBuilder } from './item/channelItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface IncomingChannelsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the incomingChannels property of the microsoft.graph.team entity. - */ -export class IncomingChannelsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the incomingChannels property of the microsoft.graph.team entity. - * @param channelId The unique identifier of channel - * @returns a ChannelItemRequestBuilder - */ - public byChannelId(channelId: string) : ChannelItemRequestBuilder { - if(!channelId) throw new Error("channelId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["channel%2Did"] = channelId - return new ChannelItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new IncomingChannelsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/incomingChannels{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of incoming channels (channels shared with a team). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChannelCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/team-list-incomingchannels?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of incoming channels (channels shared with a team). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, incomingChannelsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a incomingChannelsRequestBuilder - */ - public withUrl(rawUrl: string) : IncomingChannelsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new IncomingChannelsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const incomingChannelsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/incomingChannels/index.ts b/src/me/joinedTeams/item/incomingChannels/index.ts deleted file mode 100644 index ee950d95a60..00000000000 --- a/src/me/joinedTeams/item/incomingChannels/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './incomingChannelsRequestBuilder' diff --git a/src/me/joinedTeams/item/incomingChannels/item/channelItemRequestBuilder.ts b/src/me/joinedTeams/item/incomingChannels/item/channelItemRequestBuilder.ts deleted file mode 100644 index 02ad5f9a397..00000000000 --- a/src/me/joinedTeams/item/incomingChannels/item/channelItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Channel } from '../../../../../models/'; -import { createChannelFromDiscriminatorValue } from '../../../../../models/channel'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChannelItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the incomingChannels property of the microsoft.graph.team entity. - */ -export class ChannelItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ChannelItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/incomingChannels/{channel%2Did}{?%24select,%24expand}"); - }; - /** - * Remove an incoming channel (a channel shared with a team) from a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-delete-incomingchannels?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * List of channels shared with the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * Remove an incoming channel (a channel shared with a team) from a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * List of channels shared with the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, channelItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChannelItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChannelItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChannelItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const channelItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/incomingChannels/item/index.ts b/src/me/joinedTeams/item/incomingChannels/item/index.ts deleted file mode 100644 index 9e1a13643c3..00000000000 --- a/src/me/joinedTeams/item/incomingChannels/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './channelItemRequestBuilder' diff --git a/src/me/joinedTeams/item/index.ts b/src/me/joinedTeams/item/index.ts deleted file mode 100644 index dae83e3fafb..00000000000 --- a/src/me/joinedTeams/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamItemRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/count/countRequestBuilder.ts b/src/me/joinedTeams/item/installedApps/count/countRequestBuilder.ts deleted file mode 100644 index 636021e1924..00000000000 --- a/src/me/joinedTeams/item/installedApps/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/installedApps/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/installedApps/count/index.ts b/src/me/joinedTeams/item/installedApps/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/installedApps/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/index.ts b/src/me/joinedTeams/item/installedApps/index.ts deleted file mode 100644 index 230c18a7fbe..00000000000 --- a/src/me/joinedTeams/item/installedApps/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './installedAppsRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/installedAppsRequestBuilder.ts b/src/me/joinedTeams/item/installedApps/installedAppsRequestBuilder.ts deleted file mode 100644 index edd119277c3..00000000000 --- a/src/me/joinedTeams/item/installedApps/installedAppsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsAppInstallationCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamsAppInstallationFromDiscriminatorValue, deserializeIntoTeamsAppInstallation, serializeTeamsAppInstallation, type TeamsAppInstallation } from '../../../../models/teamsAppInstallation'; -import { createTeamsAppInstallationCollectionResponseFromDiscriminatorValue } from '../../../../models/teamsAppInstallationCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamsAppInstallationItemRequestBuilder } from './item/teamsAppInstallationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstalledAppsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the installedApps property of the microsoft.graph.team entity. - */ -export class InstalledAppsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the installedApps property of the microsoft.graph.team entity. - * @param teamsAppInstallationId The unique identifier of teamsAppInstallation - * @returns a TeamsAppInstallationItemRequestBuilder - */ - public byTeamsAppInstallationId(teamsAppInstallationId: string) : TeamsAppInstallationItemRequestBuilder { - if(!teamsAppInstallationId) throw new Error("teamsAppInstallationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamsAppInstallation%2Did"] = teamsAppInstallationId - return new TeamsAppInstallationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstalledAppsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/installedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of apps installed in the specified team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallationCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/team-list-installedapps?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Install an app to the specified team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallation - * @see {@link https://learn.microsoft.com/graph/api/team-post-installedapps?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of apps installed in the specified team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, installedAppsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Install an app to the specified team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsAppInstallation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a installedAppsRequestBuilder - */ - public withUrl(rawUrl: string) : InstalledAppsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstalledAppsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const installedAppsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/installedApps/item/index.ts b/src/me/joinedTeams/item/installedApps/item/index.ts deleted file mode 100644 index 68b282ab515..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppInstallationItemRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/item/teamsApp/index.ts b/src/me/joinedTeams/item/installedApps/item/teamsApp/index.ts deleted file mode 100644 index 0e775e3b0c3..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/teamsApp/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/item/teamsApp/teamsAppRequestBuilder.ts b/src/me/joinedTeams/item/installedApps/item/teamsApp/teamsAppRequestBuilder.ts deleted file mode 100644 index cb4712d6ad9..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/teamsApp/teamsAppRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsApp } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppFromDiscriminatorValue } from '../../../../../../models/teamsApp'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. - */ -export class TeamsAppRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}"); - }; - /** - * The app that is installed. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsApp - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppFromDiscriminatorValue, errorMapping); - }; - /** - * The app that is installed. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/installedApps/item/teamsAppDefinition/index.ts b/src/me/joinedTeams/item/installedApps/item/teamsAppDefinition/index.ts deleted file mode 100644 index e9981aa7a58..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/teamsAppDefinition/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppDefinitionRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts b/src/me/joinedTeams/item/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts deleted file mode 100644 index 232b871840d..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsAppDefinition } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppDefinitionFromDiscriminatorValue } from '../../../../../../models/teamsAppDefinition'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppDefinitionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. - */ -export class TeamsAppDefinitionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}"); - }; - /** - * The details of this version of the app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppDefinition - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppDefinitionFromDiscriminatorValue, errorMapping); - }; - /** - * The details of this version of the app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppDefinitionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppDefinitionRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppDefinitionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppDefinitionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppDefinitionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/installedApps/item/teamsAppInstallationItemRequestBuilder.ts b/src/me/joinedTeams/item/installedApps/item/teamsAppInstallationItemRequestBuilder.ts deleted file mode 100644 index b281ec2bf9d..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/teamsAppInstallationItemRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppInstallationFromDiscriminatorValue, deserializeIntoTeamsAppInstallation, serializeTeamsAppInstallation, type TeamsAppInstallation } from '../../../../../models/teamsAppInstallation'; -import { TeamsAppRequestBuilder } from './teamsApp/teamsAppRequestBuilder'; -import { TeamsAppDefinitionRequestBuilder } from './teamsAppDefinition/teamsAppDefinitionRequestBuilder'; -import { UpgradeRequestBuilder } from './upgrade/upgradeRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppInstallationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the installedApps property of the microsoft.graph.team entity. - */ -export class TeamsAppInstallationItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. - */ - public get teamsApp(): TeamsAppRequestBuilder { - return new TeamsAppRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. - */ - public get teamsAppDefinition(): TeamsAppDefinitionRequestBuilder { - return new TeamsAppDefinitionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the upgrade method. - */ - public get upgrade(): UpgradeRequestBuilder { - return new UpgradeRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamsAppInstallationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/installedApps/{teamsAppInstallation%2Did}{?%24select,%24expand}"); - }; - /** - * Uninstalls an app from the specified team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-delete-installedapps?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the app installed in the specified team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallation - * @see {@link https://learn.microsoft.com/graph/api/team-get-installedapps?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property installedApps in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppInstallation - */ - public patch(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Uninstalls an app from the specified team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the app installed in the specified team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppInstallationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property installedApps in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsAppInstallation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamsAppInstallationItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppInstallationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppInstallationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppInstallationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/installedApps/item/upgrade/index.ts b/src/me/joinedTeams/item/installedApps/item/upgrade/index.ts deleted file mode 100644 index e5925ea0c0a..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/upgrade/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './upgradePostRequestBody' -export * from './upgradeRequestBuilder' diff --git a/src/me/joinedTeams/item/installedApps/item/upgrade/upgradePostRequestBody.ts b/src/me/joinedTeams/item/installedApps/item/upgrade/upgradePostRequestBody.ts deleted file mode 100644 index c7bcfddd556..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/upgrade/upgradePostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createTeamsAppPermissionSetFromDiscriminatorValue, serializeTeamsAppPermissionSet, type TeamsAppPermissionSet } from '../../../../../../models/teamsAppPermissionSet'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUpgradePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUpgradePostRequestBody; -} -export function deserializeIntoUpgradePostRequestBody(upgradePostRequestBody: UpgradePostRequestBody | undefined = {} as UpgradePostRequestBody) : Record void> { - return { - "consentedPermissionSet": n => { upgradePostRequestBody.consentedPermissionSet = n.getObjectValue(createTeamsAppPermissionSetFromDiscriminatorValue); }, - } -} -export function serializeUpgradePostRequestBody(writer: SerializationWriter, upgradePostRequestBody: UpgradePostRequestBody | undefined = {} as UpgradePostRequestBody) : void { - writer.writeObjectValue("consentedPermissionSet", upgradePostRequestBody.consentedPermissionSet, serializeTeamsAppPermissionSet); - writer.writeAdditionalData(upgradePostRequestBody.additionalData); -} -export interface UpgradePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The consentedPermissionSet property - */ - consentedPermissionSet?: TeamsAppPermissionSet; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/installedApps/item/upgrade/upgradeRequestBuilder.ts b/src/me/joinedTeams/item/installedApps/item/upgrade/upgradeRequestBuilder.ts deleted file mode 100644 index 5dc6dc63136..00000000000 --- a/src/me/joinedTeams/item/installedApps/item/upgrade/upgradeRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUpgradePostRequestBody, serializeUpgradePostRequestBody, type UpgradePostRequestBody } from './upgradePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the upgrade method. - */ -export class UpgradeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UpgradeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/installedApps/{teamsAppInstallation%2Did}/upgrade"); - }; - /** - * Upgrade an app installation within a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chat-teamsappinstallation-upgrade?view=graph-rest-1.0|Find more info here} - */ - public post(body: UpgradePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Upgrade an app installation within a chat. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UpgradePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUpgradePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a upgradeRequestBuilder - */ - public withUrl(rawUrl: string) : UpgradeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UpgradeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/members/add/addRequestBuilder.ts b/src/me/joinedTeams/item/members/add/addRequestBuilder.ts deleted file mode 100644 index ece34163c13..00000000000 --- a/src/me/joinedTeams/item/members/add/addRequestBuilder.ts +++ /dev/null @@ -1,108 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createActionResultPartFromDiscriminatorValue, serializeActionResultPart, type ActionResultPart } from '../../../../../models/actionResultPart'; -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../models/baseCollectionPaginationCountResponse'; -import { createConversationMemberFromDiscriminatorValue, serializeConversationMember, type ConversationMember } from '../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AddPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The values property - */ - values?: ConversationMember[]; -} -export interface AddPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ActionResultPart[]; -} -export function createAddPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostRequestBody; -} -export function createAddPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostResponse; -} -export function deserializeIntoAddPostRequestBody(addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : Record void> { - return { - "values": n => { addPostRequestBody.values = n.getCollectionOfObjectValues(createConversationMemberFromDiscriminatorValue); }, - } -} -export function deserializeIntoAddPostResponse(addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(addPostResponse), - "value": n => { addPostResponse.value = n.getCollectionOfObjectValues(createActionResultPartFromDiscriminatorValue); }, - } -} -export function serializeAddPostRequestBody(writer: SerializationWriter, addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : void { - writer.writeCollectionOfObjectValues("values", addPostRequestBody.values, serializeConversationMember); - writer.writeAdditionalData(addPostRequestBody.additionalData); -} -export function serializeAddPostResponse(writer: SerializationWriter, addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, addPostResponse) - writer.writeCollectionOfObjectValues("value", addPostResponse.value, serializeActionResultPart); -} -/** - * Provides operations to call the add method. - */ -export class AddRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AddRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/members/add"); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AddPostResponse - * @see {@link https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0|Find more info here} - */ - public post(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAddPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAddPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a addRequestBuilder - */ - public withUrl(rawUrl: string) : AddRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AddRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/members/add/index.ts b/src/me/joinedTeams/item/members/add/index.ts deleted file mode 100644 index 438ff809197..00000000000 --- a/src/me/joinedTeams/item/members/add/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './addRequestBuilder' diff --git a/src/me/joinedTeams/item/members/count/countRequestBuilder.ts b/src/me/joinedTeams/item/members/count/countRequestBuilder.ts deleted file mode 100644 index dcc4a103f38..00000000000 --- a/src/me/joinedTeams/item/members/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/members/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/members/count/index.ts b/src/me/joinedTeams/item/members/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/members/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/members/index.ts b/src/me/joinedTeams/item/members/index.ts deleted file mode 100644 index 3f3fccb5478..00000000000 --- a/src/me/joinedTeams/item/members/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './membersRequestBuilder' diff --git a/src/me/joinedTeams/item/members/item/conversationMemberItemRequestBuilder.ts b/src/me/joinedTeams/item/members/item/conversationMemberItemRequestBuilder.ts deleted file mode 100644 index 2a5a7ee29fe..00000000000 --- a/src/me/joinedTeams/item/members/item/conversationMemberItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ConversationMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the members property of the microsoft.graph.team entity. - */ -export class ConversationMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ConversationMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/members/{conversationMember%2Did}{?%24select,%24expand}"); - }; - /** - * Remove a conversationMember from a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-delete-members?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a conversationMember from a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/team-get-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Update the role of a conversationMember in a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/team-update-members?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Remove a conversationMember from a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a conversationMember from a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, conversationMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the role of a conversationMember in a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ConversationMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : ConversationMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ConversationMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const conversationMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/members/item/index.ts b/src/me/joinedTeams/item/members/item/index.ts deleted file mode 100644 index f1ff703d6b4..00000000000 --- a/src/me/joinedTeams/item/members/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './conversationMemberItemRequestBuilder' diff --git a/src/me/joinedTeams/item/members/membersRequestBuilder.ts b/src/me/joinedTeams/item/members/membersRequestBuilder.ts deleted file mode 100644 index fecb5bb01c6..00000000000 --- a/src/me/joinedTeams/item/members/membersRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMemberCollectionResponse } from '../../../../models/'; -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../models/conversationMember'; -import { createConversationMemberCollectionResponseFromDiscriminatorValue } from '../../../../models/conversationMemberCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { AddRequestBuilder } from './add/addRequestBuilder'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ConversationMemberItemRequestBuilder } from './item/conversationMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the members property of the microsoft.graph.team entity. - */ -export class MembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the add method. - */ - public get add(): AddRequestBuilder { - return new AddRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.team entity. - * @param conversationMemberId The unique identifier of conversationMember - * @returns a ConversationMemberItemRequestBuilder - */ - public byConversationMemberId(conversationMemberId: string) : ConversationMemberItemRequestBuilder { - if(!conversationMemberId) throw new Error("conversationMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["conversationMember%2Did"] = conversationMemberId - return new ConversationMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/team-list-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a new conversationMember to a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/team-post-members?view=graph-rest-1.0|Find more info here} - */ - public post(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Get the conversationMember collection of a team. The membership IDs returned by the server must be treated as opaque strings. The client should not try to parse or make assumptions about these resource IDs. In the future, membership results may include users from various tenants, as indicated in the response. Clients should avoid assuming that all members exclusively belong to the current tenant. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, membersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a new conversationMember to a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a membersRequestBuilder - */ - public withUrl(rawUrl: string) : MembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const membersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/operations/count/countRequestBuilder.ts b/src/me/joinedTeams/item/operations/count/countRequestBuilder.ts deleted file mode 100644 index f93eac43089..00000000000 --- a/src/me/joinedTeams/item/operations/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/operations/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/operations/count/index.ts b/src/me/joinedTeams/item/operations/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/operations/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/operations/index.ts b/src/me/joinedTeams/item/operations/index.ts deleted file mode 100644 index c1fc87253ad..00000000000 --- a/src/me/joinedTeams/item/operations/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './operationsRequestBuilder' diff --git a/src/me/joinedTeams/item/operations/item/index.ts b/src/me/joinedTeams/item/operations/item/index.ts deleted file mode 100644 index 13f74b315d5..00000000000 --- a/src/me/joinedTeams/item/operations/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAsyncOperationItemRequestBuilder' diff --git a/src/me/joinedTeams/item/operations/item/teamsAsyncOperationItemRequestBuilder.ts b/src/me/joinedTeams/item/operations/item/teamsAsyncOperationItemRequestBuilder.ts deleted file mode 100644 index 82e2791e36e..00000000000 --- a/src/me/joinedTeams/item/operations/item/teamsAsyncOperationItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsAsyncOperationFromDiscriminatorValue, deserializeIntoTeamsAsyncOperation, serializeTeamsAsyncOperation, type TeamsAsyncOperation } from '../../../../../models/teamsAsyncOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAsyncOperationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the operations property of the microsoft.graph.team entity. - */ -export class TeamsAsyncOperationItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAsyncOperationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/operations/{teamsAsyncOperation%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property operations for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The async operations that ran or are running on this team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAsyncOperation - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAsyncOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property operations in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAsyncOperation - */ - public patch(body: TeamsAsyncOperation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAsyncOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property operations for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The async operations that ran or are running on this team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAsyncOperationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property operations in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamsAsyncOperation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsAsyncOperation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamsAsyncOperationItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAsyncOperationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAsyncOperationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAsyncOperationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/operations/operationsRequestBuilder.ts b/src/me/joinedTeams/item/operations/operationsRequestBuilder.ts deleted file mode 100644 index a2e14a56852..00000000000 --- a/src/me/joinedTeams/item/operations/operationsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsAsyncOperationCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamsAsyncOperationFromDiscriminatorValue, deserializeIntoTeamsAsyncOperation, serializeTeamsAsyncOperation, type TeamsAsyncOperation } from '../../../../models/teamsAsyncOperation'; -import { createTeamsAsyncOperationCollectionResponseFromDiscriminatorValue } from '../../../../models/teamsAsyncOperationCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamsAsyncOperationItemRequestBuilder } from './item/teamsAsyncOperationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OperationsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the operations property of the microsoft.graph.team entity. - */ -export class OperationsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the operations property of the microsoft.graph.team entity. - * @param teamsAsyncOperationId The unique identifier of teamsAsyncOperation - * @returns a TeamsAsyncOperationItemRequestBuilder - */ - public byTeamsAsyncOperationId(teamsAsyncOperationId: string) : TeamsAsyncOperationItemRequestBuilder { - if(!teamsAsyncOperationId) throw new Error("teamsAsyncOperationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamsAsyncOperation%2Did"] = teamsAsyncOperationId - return new TeamsAsyncOperationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OperationsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The async operations that ran or are running on this team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAsyncOperationCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAsyncOperationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to operations for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAsyncOperation - */ - public post(body: TeamsAsyncOperation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAsyncOperationFromDiscriminatorValue, errorMapping); - }; - /** - * The async operations that ran or are running on this team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, operationsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to operations for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamsAsyncOperation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsAsyncOperation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a operationsRequestBuilder - */ - public withUrl(rawUrl: string) : OperationsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OperationsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const operationsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/permissionGrants/count/countRequestBuilder.ts b/src/me/joinedTeams/item/permissionGrants/count/countRequestBuilder.ts deleted file mode 100644 index f53c510dd5b..00000000000 --- a/src/me/joinedTeams/item/permissionGrants/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/permissionGrants/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/permissionGrants/count/index.ts b/src/me/joinedTeams/item/permissionGrants/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/permissionGrants/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/permissionGrants/index.ts b/src/me/joinedTeams/item/permissionGrants/index.ts deleted file mode 100644 index 67d4977019b..00000000000 --- a/src/me/joinedTeams/item/permissionGrants/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './permissionGrantsRequestBuilder' diff --git a/src/me/joinedTeams/item/permissionGrants/item/index.ts b/src/me/joinedTeams/item/permissionGrants/item/index.ts deleted file mode 100644 index 6f0f704c8ff..00000000000 --- a/src/me/joinedTeams/item/permissionGrants/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './resourceSpecificPermissionGrantItemRequestBuilder' diff --git a/src/me/joinedTeams/item/permissionGrants/item/resourceSpecificPermissionGrantItemRequestBuilder.ts b/src/me/joinedTeams/item/permissionGrants/item/resourceSpecificPermissionGrantItemRequestBuilder.ts deleted file mode 100644 index 41f9f74c1c7..00000000000 --- a/src/me/joinedTeams/item/permissionGrants/item/resourceSpecificPermissionGrantItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createResourceSpecificPermissionGrantFromDiscriminatorValue, deserializeIntoResourceSpecificPermissionGrant, serializeResourceSpecificPermissionGrant, type ResourceSpecificPermissionGrant } from '../../../../../models/resourceSpecificPermissionGrant'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ResourceSpecificPermissionGrantItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the permissionGrants property of the microsoft.graph.team entity. - */ -export class ResourceSpecificPermissionGrantItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResourceSpecificPermissionGrantItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property permissionGrants for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * A collection of permissions granted to apps to access the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrant - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property permissionGrants in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrant - */ - public patch(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property permissionGrants for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * A collection of permissions granted to apps to access the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, resourceSpecificPermissionGrantItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property permissionGrants in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeResourceSpecificPermissionGrant); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ResourceSpecificPermissionGrantItemRequestBuilder - */ - public withUrl(rawUrl: string) : ResourceSpecificPermissionGrantItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResourceSpecificPermissionGrantItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const resourceSpecificPermissionGrantItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/permissionGrants/permissionGrantsRequestBuilder.ts b/src/me/joinedTeams/item/permissionGrants/permissionGrantsRequestBuilder.ts deleted file mode 100644 index f129beadfad..00000000000 --- a/src/me/joinedTeams/item/permissionGrants/permissionGrantsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ResourceSpecificPermissionGrantCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createResourceSpecificPermissionGrantFromDiscriminatorValue, deserializeIntoResourceSpecificPermissionGrant, serializeResourceSpecificPermissionGrant, type ResourceSpecificPermissionGrant } from '../../../../models/resourceSpecificPermissionGrant'; -import { createResourceSpecificPermissionGrantCollectionResponseFromDiscriminatorValue } from '../../../../models/resourceSpecificPermissionGrantCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ResourceSpecificPermissionGrantItemRequestBuilder } from './item/resourceSpecificPermissionGrantItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PermissionGrantsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the permissionGrants property of the microsoft.graph.team entity. - */ -export class PermissionGrantsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the permissionGrants property of the microsoft.graph.team entity. - * @param resourceSpecificPermissionGrantId The unique identifier of resourceSpecificPermissionGrant - * @returns a ResourceSpecificPermissionGrantItemRequestBuilder - */ - public byResourceSpecificPermissionGrantId(resourceSpecificPermissionGrantId: string) : ResourceSpecificPermissionGrantItemRequestBuilder { - if(!resourceSpecificPermissionGrantId) throw new Error("resourceSpecificPermissionGrantId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["resourceSpecificPermissionGrant%2Did"] = resourceSpecificPermissionGrantId - return new ResourceSpecificPermissionGrantItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PermissionGrantsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/permissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrantCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/team-list-permissiongrants?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to permissionGrants for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ResourceSpecificPermissionGrant - */ - public post(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createResourceSpecificPermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * List all resource-specific permission grants on the team. This list specifies the Microsoft Entra apps that have access to the team, along with each app's corresponding type of resource-specific access. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, permissionGrantsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to permissionGrants for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ResourceSpecificPermissionGrant, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeResourceSpecificPermissionGrant); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a permissionGrantsRequestBuilder - */ - public withUrl(rawUrl: string) : PermissionGrantsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PermissionGrantsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const permissionGrantsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/photo/index.ts b/src/me/joinedTeams/item/photo/index.ts deleted file mode 100644 index 447456bf7ef..00000000000 --- a/src/me/joinedTeams/item/photo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './photoRequestBuilder' diff --git a/src/me/joinedTeams/item/photo/photoRequestBuilder.ts b/src/me/joinedTeams/item/photo/photoRequestBuilder.ts deleted file mode 100644 index 3ce11462c14..00000000000 --- a/src/me/joinedTeams/item/photo/photoRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createProfilePhotoFromDiscriminatorValue, deserializeIntoProfilePhoto, serializeProfilePhoto, type ProfilePhoto } from '../../../../models/profilePhoto'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhotoRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the photo property of the microsoft.graph.team entity. - */ -export class PhotoRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PhotoRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/photo{?%24select,%24expand}"); - }; - /** - * Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they're stored in Microsoft Entra ID. You can get the metadata of the largest available photo or specify a size to get the metadata for that photo size.If the size you request is unavailable, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of the photo is available for download. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - * @see {@link https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public patch(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they're stored in Microsoft Entra ID. You can get the metadata of the largest available photo or specify a size to get the metadata for that photo size.If the size you request is unavailable, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of the photo is available for download. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, photoRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeProfilePhoto); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a photoRequestBuilder - */ - public withUrl(rawUrl: string) : PhotoRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhotoRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const photoRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/photo/value/contentRequestBuilder.ts b/src/me/joinedTeams/item/photo/value/contentRequestBuilder.ts deleted file mode 100644 index c9454988e53..00000000000 --- a/src/me/joinedTeams/item/photo/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/photo/$value"); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/completeMigration/completeMigrationRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/completeMigration/completeMigrationRequestBuilder.ts deleted file mode 100644 index 08004ca926e..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/completeMigration/completeMigrationRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the completeMigration method. - */ -export class CompleteMigrationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CompleteMigrationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/completeMigration"); - }; - /** - * Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-completemigration?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Complete the message migration process by removing migration mode from a channel in a team. Migration mode is a special state that prevents certain operations, like sending messages and adding members, during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a completeMigrationRequestBuilder - */ - public withUrl(rawUrl: string) : CompleteMigrationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CompleteMigrationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.ts b/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.ts deleted file mode 100644 index 1de9a049b82..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse; -} -export function deserializeIntoDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse | undefined = {} as DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse) : Record void> { - return { - "value": n => { doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.value = n.getBooleanValue(); }, - } -} -export interface DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The value property - */ - value?: boolean; -} -export function serializeDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(writer: SerializationWriter, doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse: DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse | undefined = {} as DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse) : void { - writer.writeBooleanValue("value", doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.value); - writer.writeAdditionalData(doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.ts deleted file mode 100644 index deb410822cc..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder.ts +++ /dev/null @@ -1,75 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponseFromDiscriminatorValue } from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse'; -import { type DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse } from './index'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParameters { - /** - * Usage: tenantId='@tenantId' - */ - tenantId?: string; - /** - * Usage: userId='@userId' - */ - userId?: string; - /** - * Usage: userPrincipalName='@userPrincipalName' - */ - userPrincipalName?: string; -} -/** - * Provides operations to call the doesUserHaveAccess method. - */ -export class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName'){?userId*,tenantId*,userPrincipalName*}"); - }; - /** - * Invoke function doesUserHaveAccess - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function doesUserHaveAccess - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder - */ - public withUrl(rawUrl: string) : DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilderGetQueryParametersMapper: Record = { -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/index.ts b/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/index.ts deleted file mode 100644 index e79b3ed63c1..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse' -export * from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/filesFolder/content/contentRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/filesFolder/content/contentRequestBuilder.ts deleted file mode 100644 index 0f63a919045..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/filesFolder/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DriveItem } from '../../../../../../models/'; -import { createDriveItemFromDiscriminatorValue } from '../../../../../../models/driveItem'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/filesFolder/content"); - }; - /** - * The content stream, if the item represents a file. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/channel-get-filesfolder?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The content stream, if the item represents a file. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DriveItem - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveItemFromDiscriminatorValue, errorMapping); - }; - /** - * The content stream, if the item represents a file. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The content stream, if the item represents a file. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/filesFolder/filesFolderRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/filesFolder/filesFolderRequestBuilder.ts deleted file mode 100644 index 624d31b92b7..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/filesFolder/filesFolderRequestBuilder.ts +++ /dev/null @@ -1,81 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DriveItem } from '../../../../../models/'; -import { createDriveItemFromDiscriminatorValue } from '../../../../../models/driveItem'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface FilesFolderRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the filesFolder property of the microsoft.graph.channel entity. - */ -export class FilesFolderRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new FilesFolderRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/filesFolder{?%24select,%24expand}"); - }; - /** - * Get the metadata for the location where the files of a channel are stored. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DriveItem - * @see {@link https://learn.microsoft.com/graph/api/channel-get-filesfolder?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDriveItemFromDiscriminatorValue, errorMapping); - }; - /** - * Get the metadata for the location where the files of a channel are stored. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, filesFolderRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a filesFolderRequestBuilder - */ - public withUrl(rawUrl: string) : FilesFolderRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new FilesFolderRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const filesFolderRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/filesFolder/index.ts b/src/me/joinedTeams/item/primaryChannel/filesFolder/index.ts deleted file mode 100644 index bbb732ec59f..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/filesFolder/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './filesFolderRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/index.ts b/src/me/joinedTeams/item/primaryChannel/index.ts deleted file mode 100644 index 19ee5549951..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './primaryChannelRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/members/add/addRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/members/add/addRequestBuilder.ts deleted file mode 100644 index 89b4598ba56..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/add/addRequestBuilder.ts +++ /dev/null @@ -1,108 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createActionResultPartFromDiscriminatorValue, serializeActionResultPart, type ActionResultPart } from '../../../../../../models/actionResultPart'; -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../../../models/baseCollectionPaginationCountResponse'; -import { createConversationMemberFromDiscriminatorValue, serializeConversationMember, type ConversationMember } from '../../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface AddPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The values property - */ - values?: ConversationMember[]; -} -export interface AddPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ActionResultPart[]; -} -export function createAddPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostRequestBody; -} -export function createAddPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoAddPostResponse; -} -export function deserializeIntoAddPostRequestBody(addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : Record void> { - return { - "values": n => { addPostRequestBody.values = n.getCollectionOfObjectValues(createConversationMemberFromDiscriminatorValue); }, - } -} -export function deserializeIntoAddPostResponse(addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(addPostResponse), - "value": n => { addPostResponse.value = n.getCollectionOfObjectValues(createActionResultPartFromDiscriminatorValue); }, - } -} -export function serializeAddPostRequestBody(writer: SerializationWriter, addPostRequestBody: AddPostRequestBody | undefined = {} as AddPostRequestBody) : void { - writer.writeCollectionOfObjectValues("values", addPostRequestBody.values, serializeConversationMember); - writer.writeAdditionalData(addPostRequestBody.additionalData); -} -export function serializeAddPostResponse(writer: SerializationWriter, addPostResponse: AddPostResponse | undefined = {} as AddPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, addPostResponse) - writer.writeCollectionOfObjectValues("value", addPostResponse.value, serializeActionResultPart); -} -/** - * Provides operations to call the add method. - */ -export class AddRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AddRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/members/add"); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AddPostResponse - * @see {@link https://learn.microsoft.com/graph/api/conversationmembers-add?view=graph-rest-1.0|Find more info here} - */ - public post(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAddPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AddPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAddPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a addRequestBuilder - */ - public withUrl(rawUrl: string) : AddRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AddRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/members/add/index.ts b/src/me/joinedTeams/item/primaryChannel/members/add/index.ts deleted file mode 100644 index 438ff809197..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/add/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './addRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/members/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/members/count/countRequestBuilder.ts deleted file mode 100644 index db45381efee..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/members/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/members/count/index.ts b/src/me/joinedTeams/item/primaryChannel/members/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/members/index.ts b/src/me/joinedTeams/item/primaryChannel/members/index.ts deleted file mode 100644 index 3f3fccb5478..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './membersRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/members/item/conversationMemberItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/members/item/conversationMemberItemRequestBuilder.ts deleted file mode 100644 index 8c130528191..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/item/conversationMemberItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ConversationMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - */ -export class ConversationMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ConversationMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/members/{conversationMember%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a conversationMember from a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-delete-members?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a conversationMember from a channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/channel-get-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a conversationMember from a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a conversationMember from a channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, conversationMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ConversationMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : ConversationMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ConversationMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const conversationMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/members/item/index.ts b/src/me/joinedTeams/item/primaryChannel/members/item/index.ts deleted file mode 100644 index f1ff703d6b4..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './conversationMemberItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/members/membersRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/members/membersRequestBuilder.ts deleted file mode 100644 index a037a2b0bdf..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/members/membersRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMemberCollectionResponse } from '../../../../../models/'; -import { createConversationMemberFromDiscriminatorValue, deserializeIntoConversationMember, serializeConversationMember, type ConversationMember } from '../../../../../models/conversationMember'; -import { createConversationMemberCollectionResponseFromDiscriminatorValue } from '../../../../../models/conversationMemberCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AddRequestBuilder } from './add/addRequestBuilder'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ConversationMemberItemRequestBuilder } from './item/conversationMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - */ -export class MembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the add method. - */ - public get add(): AddRequestBuilder { - return new AddRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - * @param conversationMemberId The unique identifier of conversationMember - * @returns a ConversationMemberItemRequestBuilder - */ - public byConversationMemberId(conversationMemberId: string) : ConversationMemberItemRequestBuilder { - if(!conversationMemberId) throw new Error("conversationMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["conversationMember%2Did"] = conversationMemberId - return new ConversationMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - * @see {@link https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0|Find more info here} - */ - public post(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of conversationMembers from a channel. This method supports federation. Only a user who is a member of the shared channel can retrieve the channel member list. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, membersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeConversationMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a membersRequestBuilder - */ - public withUrl(rawUrl: string) : MembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const membersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/count/countRequestBuilder.ts deleted file mode 100644 index 41c450395dc..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/count/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/delta/deltaRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/delta/deltaRequestBuilder.ts deleted file mode 100644 index ac3fe62ab25..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../models/baseDeltaFunctionResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/delta/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/index.ts deleted file mode 100644 index 9f6fd0b319b..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messagesRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/chatMessageItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/chatMessageItemRequestBuilder.ts deleted file mode 100644 index d5d35dcdf4d..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/chatMessageItemRequestBuilder.ts +++ /dev/null @@ -1,171 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { HostedContentsRequestBuilder } from './hostedContents/hostedContentsRequestBuilder'; -import { RepliesRequestBuilder } from './replies/repliesRequestBuilder'; -import { SetReactionRequestBuilder } from './setReaction/setReactionRequestBuilder'; -import { SoftDeleteRequestBuilder } from './softDelete/softDeleteRequestBuilder'; -import { UndoSoftDeleteRequestBuilder } from './undoSoftDelete/undoSoftDeleteRequestBuilder'; -import { UnsetReactionRequestBuilder } from './unsetReaction/unsetReactionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - */ -export class ChatMessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ - public get hostedContents(): HostedContentsRequestBuilder { - return new HostedContentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ - public get replies(): RepliesRequestBuilder { - return new RepliesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setReaction method. - */ - public get setReaction(): SetReactionRequestBuilder { - return new SetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the softDelete method. - */ - public get softDelete(): SoftDeleteRequestBuilder { - return new SoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the undoSoftDelete method. - */ - public get undoSoftDelete(): UndoSoftDeleteRequestBuilder { - return new UndoSoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unsetReaction method. - */ - public get unsetReaction(): UnsetReactionRequestBuilder { - return new UnsetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update a chatMessage object. With the exception of the policyViolation property, all properties of a chatMessage can be updated in delegated permissions scenarios.Only the policyViolation property of a chatMessage can be updated in application permissions scenarios. The update only works for chats where members are Microsoft Teams users. If one of the participants is using Skype, the operation will fail. This method does not support federation. Only the user in the tenant who sent the message can perform data loss prevention (DLP) updates on the specified chat message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/count/countRequestBuilder.ts deleted file mode 100644 index d65ec05164e..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/hostedContents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/count/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/hostedContentsRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/hostedContentsRequestBuilder.ts deleted file mode 100644 index fc79745566e..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/hostedContentsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageHostedContentCollectionResponse } from '../../../../../../../models/'; -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../models/chatMessageHostedContent'; -import { createChatMessageHostedContentCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/chatMessageHostedContentCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChatMessageHostedContentItemRequestBuilder } from './item/chatMessageHostedContentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HostedContentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class HostedContentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - * @param chatMessageHostedContentId The unique identifier of chatMessageHostedContent - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public byChatMessageHostedContentId(chatMessageHostedContentId: string) : ChatMessageHostedContentItemRequestBuilder { - if(!chatMessageHostedContentId) throw new Error("chatMessageHostedContentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessageHostedContent%2Did"] = chatMessageHostedContentId - return new ChatMessageHostedContentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HostedContentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public post(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, hostedContentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hostedContentsRequestBuilder - */ - public withUrl(rawUrl: string) : HostedContentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HostedContentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const hostedContentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/index.ts deleted file mode 100644 index 63545aedbd6..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hostedContentsRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts deleted file mode 100644 index 523d016fea7..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../models/chatMessageHostedContent'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageHostedContentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageHostedContentItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - * @see {@link https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public patch(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageHostedContentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageHostedContentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/index.ts deleted file mode 100644 index ab90c6b72b8..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageHostedContentItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/value/contentRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/value/contentRequestBuilder.ts deleted file mode 100644 index 9219b88e5bf..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/hostedContents/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}/$value"); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/index.ts deleted file mode 100644 index 52f34603070..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/count/countRequestBuilder.ts deleted file mode 100644 index 9c5f06feffb..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/count/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/delta/deltaRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/delta/deltaRequestBuilder.ts deleted file mode 100644 index 45b5da2eb00..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../../models/baseDeltaFunctionResponse'; -import { createChatMessageFromDiscriminatorValue, serializeChatMessage, type ChatMessage } from '../../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: ChatMessage[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createChatMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeChatMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/delta/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/index.ts deleted file mode 100644 index 7e1a882ddac..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './repliesRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/chatMessageItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/chatMessageItemRequestBuilder.ts deleted file mode 100644 index c58cf0b4003..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/chatMessageItemRequestBuilder.ts +++ /dev/null @@ -1,163 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../../../models/chatMessage'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { HostedContentsRequestBuilder } from './hostedContents/hostedContentsRequestBuilder'; -import { SetReactionRequestBuilder } from './setReaction/setReactionRequestBuilder'; -import { SoftDeleteRequestBuilder } from './softDelete/softDeleteRequestBuilder'; -import { UndoSoftDeleteRequestBuilder } from './undoSoftDelete/undoSoftDeleteRequestBuilder'; -import { UnsetReactionRequestBuilder } from './unsetReaction/unsetReactionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ - public get hostedContents(): HostedContentsRequestBuilder { - return new HostedContentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setReaction method. - */ - public get setReaction(): SetReactionRequestBuilder { - return new SetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the softDelete method. - */ - public get softDelete(): SoftDeleteRequestBuilder { - return new SoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the undoSoftDelete method. - */ - public get undoSoftDelete(): UndoSoftDeleteRequestBuilder { - return new UndoSoftDeleteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unsetReaction method. - */ - public get unsetReaction(): UnsetReactionRequestBuilder { - return new UnsetReactionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}{?%24select,%24expand}"); - }; - /** - * Delete navigation property replies for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property replies in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - */ - public patch(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property replies for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a single message or a message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property replies in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts deleted file mode 100644 index 0c38f54be1c..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/count/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts deleted file mode 100644 index 9b2171ff36f..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/hostedContentsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageHostedContentCollectionResponse } from '../../../../../../../../../models/'; -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../../models/chatMessageHostedContent'; -import { createChatMessageHostedContentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../models/chatMessageHostedContentCollectionResponse'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChatMessageHostedContentItemRequestBuilder } from './item/chatMessageHostedContentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface HostedContentsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class HostedContentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - * @param chatMessageHostedContentId The unique identifier of chatMessageHostedContent - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public byChatMessageHostedContentId(chatMessageHostedContentId: string) : ChatMessageHostedContentItemRequestBuilder { - if(!chatMessageHostedContentId) throw new Error("chatMessageHostedContentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessageHostedContent%2Did"] = chatMessageHostedContentId - return new ChatMessageHostedContentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new HostedContentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public post(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, hostedContentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to hostedContents for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a hostedContentsRequestBuilder - */ - public withUrl(rawUrl: string) : HostedContentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new HostedContentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const hostedContentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/index.ts deleted file mode 100644 index 63545aedbd6..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hostedContentsRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts deleted file mode 100644 index 7321e27216d..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/chatMessageHostedContentItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatMessageHostedContentFromDiscriminatorValue, deserializeIntoChatMessageHostedContent, serializeChatMessageHostedContent, type ChatMessageHostedContent } from '../../../../../../../../../../models/chatMessageHostedContent'; -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatMessageHostedContentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the hostedContents property of the microsoft.graph.chatMessage entity. - */ -export class ChatMessageHostedContentItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ChatMessageHostedContentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - * @see {@link https://learn.microsoft.com/graph/api/chatmessagehostedcontent-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageHostedContent - */ - public patch(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageHostedContentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property hostedContents for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of chatMessageHostedContent object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property hostedContents in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChatMessageHostedContent, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessageHostedContent); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChatMessageHostedContentItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChatMessageHostedContentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatMessageHostedContentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatMessageHostedContentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/index.ts deleted file mode 100644 index ab90c6b72b8..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageHostedContentItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts deleted file mode 100644 index 05aedfedbdc..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/hostedContents/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}/$value"); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-hostedcontents?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property hostedContents from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property hostedContents in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/index.ts deleted file mode 100644 index 52f34603070..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatMessageItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/index.ts deleted file mode 100644 index 9429e817eeb..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setReactionPostRequestBody' -export * from './setReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts deleted file mode 100644 index 35ae79e93e8..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/setReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetReactionPostRequestBody; -} -export function deserializeIntoSetReactionPostRequestBody(setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { setReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeSetReactionPostRequestBody(writer: SerializationWriter, setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", setReactionPostRequestBody.reactionType); - writer.writeAdditionalData(setReactionPostRequestBody.additionalData); -} -export interface SetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts deleted file mode 100644 index 68853b7b6ed..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/setReaction/setReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetReactionPostRequestBody, serializeSetReactionPostRequestBody, type SetReactionPostRequestBody } from './setReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setReaction method. - */ -export class SetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/setReaction"); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setReactionRequestBuilder - */ - public withUrl(rawUrl: string) : SetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts deleted file mode 100644 index 84ea55b8396..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/softDelete/softDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the softDelete method. - */ -export class SoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/softDelete"); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : SoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts deleted file mode 100644 index 8a2c12e69da..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the undoSoftDelete method. - */ -export class UndoSoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UndoSoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/undoSoftDelete"); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a undoSoftDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : UndoSoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UndoSoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/index.ts deleted file mode 100644 index 08e2e9f8a95..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unsetReactionPostRequestBody' -export * from './unsetReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts deleted file mode 100644 index cec6476d233..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/unsetReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnsetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnsetReactionPostRequestBody; -} -export function deserializeIntoUnsetReactionPostRequestBody(unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { unsetReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeUnsetReactionPostRequestBody(writer: SerializationWriter, unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", unsetReactionPostRequestBody.reactionType); - writer.writeAdditionalData(unsetReactionPostRequestBody.additionalData); -} -export interface UnsetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts deleted file mode 100644 index a3b0d1be265..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/item/unsetReaction/unsetReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnsetReactionPostRequestBody, serializeUnsetReactionPostRequestBody, type UnsetReactionPostRequestBody } from './unsetReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unsetReaction method. - */ -export class UnsetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnsetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/unsetReaction"); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnsetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unsetReactionRequestBuilder - */ - public withUrl(rawUrl: string) : UnsetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnsetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/repliesRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/replies/repliesRequestBuilder.ts deleted file mode 100644 index 281c61d7b6f..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/replies/repliesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageCollectionResponse } from '../../../../../../../models/'; -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../../../models/chatMessage'; -import { createChatMessageCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/chatMessageCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ChatMessageItemRequestBuilder } from './item/chatMessageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface RepliesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - */ -export class RepliesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the replies property of the microsoft.graph.chatMessage entity. - * @param chatMessageId1 The unique identifier of chatMessage - * @returns a ChatMessageItemRequestBuilder - */ - public byChatMessageId1(chatMessageId1: string) : ChatMessageItemRequestBuilder { - if(!chatMessageId1) throw new Error("chatMessageId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessage%2Did1"] = chatMessageId1 - return new ChatMessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new RepliesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/replies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-list-replies?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Send a new reply to a chatMessage in a specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, repliesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Send a new reply to a chatMessage in a specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a repliesRequestBuilder - */ - public withUrl(rawUrl: string) : RepliesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RepliesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const repliesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/index.ts deleted file mode 100644 index 9429e817eeb..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setReactionPostRequestBody' -export * from './setReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/setReactionPostRequestBody.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/setReactionPostRequestBody.ts deleted file mode 100644 index 35ae79e93e8..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/setReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetReactionPostRequestBody; -} -export function deserializeIntoSetReactionPostRequestBody(setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { setReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeSetReactionPostRequestBody(writer: SerializationWriter, setReactionPostRequestBody: SetReactionPostRequestBody | undefined = {} as SetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", setReactionPostRequestBody.reactionType); - writer.writeAdditionalData(setReactionPostRequestBody.additionalData); -} -export interface SetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/setReactionRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/setReactionRequestBuilder.ts deleted file mode 100644 index 4fe8668e7f9..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/setReaction/setReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetReactionPostRequestBody, serializeSetReactionPostRequestBody, type SetReactionPostRequestBody } from './setReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setReaction method. - */ -export class SetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/setReaction"); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action setReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setReactionRequestBuilder - */ - public withUrl(rawUrl: string) : SetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/softDelete/softDeleteRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/softDelete/softDeleteRequestBuilder.ts deleted file mode 100644 index 71baba005f6..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/softDelete/softDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the softDelete method. - */ -export class SoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/softDelete"); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-softdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a softDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : SoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts deleted file mode 100644 index 14dd3fef72c..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/undoSoftDelete/undoSoftDeleteRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the undoSoftDelete method. - */ -export class UndoSoftDeleteRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UndoSoftDeleteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/undoSoftDelete"); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a undoSoftDeleteRequestBuilder - */ - public withUrl(rawUrl: string) : UndoSoftDeleteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UndoSoftDeleteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/index.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/index.ts deleted file mode 100644 index 08e2e9f8a95..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './unsetReactionPostRequestBody' -export * from './unsetReactionRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/unsetReactionPostRequestBody.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/unsetReactionPostRequestBody.ts deleted file mode 100644 index cec6476d233..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/unsetReactionPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUnsetReactionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUnsetReactionPostRequestBody; -} -export function deserializeIntoUnsetReactionPostRequestBody(unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : Record void> { - return { - "reactionType": n => { unsetReactionPostRequestBody.reactionType = n.getStringValue(); }, - } -} -export function serializeUnsetReactionPostRequestBody(writer: SerializationWriter, unsetReactionPostRequestBody: UnsetReactionPostRequestBody | undefined = {} as UnsetReactionPostRequestBody) : void { - writer.writeStringValue("reactionType", unsetReactionPostRequestBody.reactionType); - writer.writeAdditionalData(unsetReactionPostRequestBody.additionalData); -} -export interface UnsetReactionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The reactionType property - */ - reactionType?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/unsetReactionRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/unsetReactionRequestBuilder.ts deleted file mode 100644 index 018072de837..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/item/unsetReaction/unsetReactionRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUnsetReactionPostRequestBody, serializeUnsetReactionPostRequestBody, type UnsetReactionPostRequestBody } from './unsetReactionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unsetReaction method. - */ -export class UnsetReactionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnsetReactionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages/{chatMessage%2Did}/unsetReaction"); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action unsetReaction - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UnsetReactionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUnsetReactionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unsetReactionRequestBuilder - */ - public withUrl(rawUrl: string) : UnsetReactionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnsetReactionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/messages/messagesRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/messages/messagesRequestBuilder.ts deleted file mode 100644 index e8b2f9c5f9c..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/messages/messagesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChatMessageCollectionResponse } from '../../../../../models/'; -import { createChatMessageFromDiscriminatorValue, deserializeIntoChatMessage, serializeChatMessage, type ChatMessage } from '../../../../../models/chatMessage'; -import { createChatMessageCollectionResponseFromDiscriminatorValue } from '../../../../../models/chatMessageCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { ChatMessageItemRequestBuilder } from './item/chatMessageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - */ -export class MessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - * @param chatMessageId The unique identifier of chatMessage - * @returns a ChatMessageItemRequestBuilder - */ - public byChatMessageId(chatMessageId: string) : ChatMessageItemRequestBuilder { - if(!chatMessageId) throw new Error("chatMessageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["chatMessage%2Did"] = chatMessageId - return new ChatMessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Send a new chatMessage in the specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChatMessage - * @see {@link https://learn.microsoft.com/graph/api/channel-post-messages?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API. This method supports federation. To list channel messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Send a new chatMessage in the specified channel. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChatMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messagesRequestBuilder - */ - public withUrl(rawUrl: string) : MessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/primaryChannelRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/primaryChannelRequestBuilder.ts deleted file mode 100644 index bd4843bd91e..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/primaryChannelRequestBuilder.ts +++ /dev/null @@ -1,191 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChannelFromDiscriminatorValue, deserializeIntoChannel, serializeChannel, type Channel } from '../../../../models/channel'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CompleteMigrationRequestBuilder } from './completeMigration/completeMigrationRequestBuilder'; -import { DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder } from './doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder'; -import { FilesFolderRequestBuilder } from './filesFolder/filesFolderRequestBuilder'; -import { MembersRequestBuilder } from './members/membersRequestBuilder'; -import { MessagesRequestBuilder } from './messages/messagesRequestBuilder'; -import { ProvisionEmailRequestBuilder } from './provisionEmail/provisionEmailRequestBuilder'; -import { RemoveEmailRequestBuilder } from './removeEmail/removeEmailRequestBuilder'; -import { SharedWithTeamsRequestBuilder } from './sharedWithTeams/sharedWithTeamsRequestBuilder'; -import { TabsRequestBuilder } from './tabs/tabsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PrimaryChannelRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the primaryChannel property of the microsoft.graph.team entity. - */ -export class PrimaryChannelRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the completeMigration method. - */ - public get completeMigration(): CompleteMigrationRequestBuilder { - return new CompleteMigrationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the doesUserHaveAccess method. - */ - public get doesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName(): DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder { - return new DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the filesFolder property of the microsoft.graph.channel entity. - */ - public get filesFolder(): FilesFolderRequestBuilder { - return new FilesFolderRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.channel entity. - */ - public get members(): MembersRequestBuilder { - return new MembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.channel entity. - */ - public get messages(): MessagesRequestBuilder { - return new MessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the provisionEmail method. - */ - public get provisionEmail(): ProvisionEmailRequestBuilder { - return new ProvisionEmailRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the removeEmail method. - */ - public get removeEmail(): RemoveEmailRequestBuilder { - return new RemoveEmailRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - */ - public get sharedWithTeams(): SharedWithTeamsRequestBuilder { - return new SharedWithTeamsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - */ - public get tabs(): TabsRequestBuilder { - return new TabsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PrimaryChannelRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel{?%24select,%24expand}"); - }; - /** - * Delete navigation property primaryChannel for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the default channel, General, of a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - * @see {@link https://learn.microsoft.com/graph/api/team-get-primarychannel?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property primaryChannel in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Channel - */ - public patch(body: Channel, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChannelFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property primaryChannel for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the default channel, General, of a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, primaryChannelRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property primaryChannel in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Channel, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChannel); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a primaryChannelRequestBuilder - */ - public withUrl(rawUrl: string) : PrimaryChannelRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PrimaryChannelRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const primaryChannelRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/provisionEmail/provisionEmailRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/provisionEmail/provisionEmailRequestBuilder.ts deleted file mode 100644 index 8a2f32566e3..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/provisionEmail/provisionEmailRequestBuilder.ts +++ /dev/null @@ -1,60 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ProvisionChannelEmailResult } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createProvisionChannelEmailResultFromDiscriminatorValue } from '../../../../../models/provisionChannelEmailResult'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the provisionEmail method. - */ -export class ProvisionEmailRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ProvisionEmailRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/provisionEmail"); - }; - /** - * Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProvisionChannelEmailResult - * @see {@link https://learn.microsoft.com/graph/api/channel-provisionemail?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProvisionChannelEmailResultFromDiscriminatorValue, errorMapping); - }; - /** - * Provision an email address for a channel. Microsoft Teams doesn't automatically provision an email address for a channel by default. To have Teams provision an email address, you can call provisionEmail, or through the Teams user interface, select Get email address, which triggers Teams to generate an email address if it has not already provisioned one. To remove the email address of a channel, use the removeEmail method. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a provisionEmailRequestBuilder - */ - public withUrl(rawUrl: string) : ProvisionEmailRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ProvisionEmailRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/removeEmail/removeEmailRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/removeEmail/removeEmailRequestBuilder.ts deleted file mode 100644 index a907d591302..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/removeEmail/removeEmailRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the removeEmail method. - */ -export class RemoveEmailRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RemoveEmailRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/removeEmail"); - }; - /** - * Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-removeemail?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Remove the email address of a channel. You can remove an email address only if it was provisioned using the provisionEmail method or through the Microsoft Teams client. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a removeEmailRequestBuilder - */ - public withUrl(rawUrl: string) : RemoveEmailRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RemoveEmailRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/count/countRequestBuilder.ts deleted file mode 100644 index 02e6a8089f1..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/count/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/index.ts deleted file mode 100644 index d11a3f2c6d3..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sharedWithTeamsRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/allowedMembersRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/allowedMembersRequestBuilder.ts deleted file mode 100644 index 34ecba2941a..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/allowedMembersRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMemberCollectionResponse } from '../../../../../../../models/'; -import { createConversationMemberCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/conversationMemberCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ConversationMemberItemRequestBuilder } from './item/conversationMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AllowedMembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - */ -export class AllowedMembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - * @param conversationMemberId The unique identifier of conversationMember - * @returns a ConversationMemberItemRequestBuilder - */ - public byConversationMemberId(conversationMemberId: string) : ConversationMemberItemRequestBuilder { - if(!conversationMemberId) throw new Error("conversationMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["conversationMember%2Did"] = conversationMemberId - return new ConversationMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AllowedMembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/allowedMembers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list-allowedmembers?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of conversationMembers who can access a shared channel. This method does not return the following conversationMembers from the team:- Users with Guest role- Users who are externally authenticated in the tenant - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, allowedMembersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a allowedMembersRequestBuilder - */ - public withUrl(rawUrl: string) : AllowedMembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AllowedMembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const allowedMembersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/count/countRequestBuilder.ts deleted file mode 100644 index 9a8ae642354..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/allowedMembers/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/count/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/index.ts deleted file mode 100644 index f32891d1001..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './allowedMembersRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/item/conversationMemberItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/item/conversationMemberItemRequestBuilder.ts deleted file mode 100644 index c94724f6362..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/item/conversationMemberItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ConversationMember } from '../../../../../../../../models/'; -import { createConversationMemberFromDiscriminatorValue } from '../../../../../../../../models/conversationMember'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ConversationMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - */ -export class ConversationMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ConversationMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/allowedMembers/{conversationMember%2Did}{?%24select,%24expand}"); - }; - /** - * A collection of team members who have access to the shared channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ConversationMember - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createConversationMemberFromDiscriminatorValue, errorMapping); - }; - /** - * A collection of team members who have access to the shared channel. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, conversationMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ConversationMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : ConversationMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ConversationMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const conversationMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/item/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/item/index.ts deleted file mode 100644 index f1ff703d6b4..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/allowedMembers/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './conversationMemberItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/index.ts deleted file mode 100644 index 356706841a3..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sharedWithChannelTeamInfoItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/sharedWithChannelTeamInfoItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/sharedWithChannelTeamInfoItemRequestBuilder.ts deleted file mode 100644 index a3ff6e51a84..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/sharedWithChannelTeamInfoItemRequestBuilder.ts +++ /dev/null @@ -1,143 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createSharedWithChannelTeamInfoFromDiscriminatorValue, deserializeIntoSharedWithChannelTeamInfo, serializeSharedWithChannelTeamInfo, type SharedWithChannelTeamInfo } from '../../../../../../models/sharedWithChannelTeamInfo'; -import { AllowedMembersRequestBuilder } from './allowedMembers/allowedMembersRequestBuilder'; -import { TeamRequestBuilder } from './team/teamRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SharedWithChannelTeamInfoItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - */ -export class SharedWithChannelTeamInfoItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the allowedMembers property of the microsoft.graph.sharedWithChannelTeamInfo entity. - */ - public get allowedMembers(): AllowedMembersRequestBuilder { - return new AllowedMembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the team property of the microsoft.graph.teamInfo entity. - */ - public get team(): TeamRequestBuilder { - return new TeamRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new SharedWithChannelTeamInfoItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}{?%24select,%24expand}"); - }; - /** - * Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfo - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sharedWithTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfo - */ - public patch(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Unshare a channel with a team by deleting the corresponding sharedWithChannelTeamInfo resource. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a team that has been shared with a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sharedWithChannelTeamInfoItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sharedWithTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharedWithChannelTeamInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SharedWithChannelTeamInfoItemRequestBuilder - */ - public withUrl(rawUrl: string) : SharedWithChannelTeamInfoItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SharedWithChannelTeamInfoItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sharedWithChannelTeamInfoItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/team/index.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/team/index.ts deleted file mode 100644 index 7da2dc0bf0d..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/team/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/team/teamRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/team/teamRequestBuilder.ts deleted file mode 100644 index 68eee5f70f0..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/item/team/teamRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Team } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTeamFromDiscriminatorValue } from '../../../../../../../models/team'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the team property of the microsoft.graph.teamInfo entity. - */ -export class TeamRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams/{sharedWithChannelTeamInfo%2Did}/team{?%24select,%24expand}"); - }; - /** - * Get team from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Team - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamFromDiscriminatorValue, errorMapping); - }; - /** - * Get team from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamRequestBuilder - */ - public withUrl(rawUrl: string) : TeamRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/sharedWithTeamsRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/sharedWithTeamsRequestBuilder.ts deleted file mode 100644 index 863edeb4bc2..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/sharedWithTeams/sharedWithTeamsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SharedWithChannelTeamInfoCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSharedWithChannelTeamInfoFromDiscriminatorValue, deserializeIntoSharedWithChannelTeamInfo, serializeSharedWithChannelTeamInfo, type SharedWithChannelTeamInfo } from '../../../../../models/sharedWithChannelTeamInfo'; -import { createSharedWithChannelTeamInfoCollectionResponseFromDiscriminatorValue } from '../../../../../models/sharedWithChannelTeamInfoCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SharedWithChannelTeamInfoItemRequestBuilder } from './item/sharedWithChannelTeamInfoItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SharedWithTeamsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - */ -export class SharedWithTeamsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sharedWithTeams property of the microsoft.graph.channel entity. - * @param sharedWithChannelTeamInfoId The unique identifier of sharedWithChannelTeamInfo - * @returns a SharedWithChannelTeamInfoItemRequestBuilder - */ - public bySharedWithChannelTeamInfoId(sharedWithChannelTeamInfoId: string) : SharedWithChannelTeamInfoItemRequestBuilder { - if(!sharedWithChannelTeamInfoId) throw new Error("sharedWithChannelTeamInfoId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sharedWithChannelTeamInfo%2Did"] = sharedWithChannelTeamInfoId - return new SharedWithChannelTeamInfoItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SharedWithTeamsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/sharedWithTeams{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfoCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sharedwithchannelteaminfo-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to sharedWithTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SharedWithChannelTeamInfo - */ - public post(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSharedWithChannelTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of teams that has been shared a specified channel. This operation is allowed only for channels with a membershipType value of shared. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sharedWithTeamsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to sharedWithTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SharedWithChannelTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharedWithChannelTeamInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sharedWithTeamsRequestBuilder - */ - public withUrl(rawUrl: string) : SharedWithTeamsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SharedWithTeamsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sharedWithTeamsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/count/countRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/tabs/count/countRequestBuilder.ts deleted file mode 100644 index 4841a3eed56..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/tabs/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/count/index.ts b/src/me/joinedTeams/item/primaryChannel/tabs/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/index.ts b/src/me/joinedTeams/item/primaryChannel/tabs/index.ts deleted file mode 100644 index 4e808651757..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tabsRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/item/index.ts b/src/me/joinedTeams/item/primaryChannel/tabs/item/index.ts deleted file mode 100644 index 2a6e3981df6..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsTabItemRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsApp/index.ts b/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsApp/index.ts deleted file mode 100644 index 0e775e3b0c3..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsApp/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppRequestBuilder' diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsApp/teamsAppRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsApp/teamsAppRequestBuilder.ts deleted file mode 100644 index de50ff9c47b..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsApp/teamsAppRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsApp } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppFromDiscriminatorValue } from '../../../../../../../models/teamsApp'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsTab entity. - */ -export class TeamsAppRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/tabs/{teamsTab%2Did}/teamsApp{?%24select,%24expand}"); - }; - /** - * The application that is linked to the tab. This can't be changed after tab creation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsApp - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppFromDiscriminatorValue, errorMapping); - }; - /** - * The application that is linked to the tab. This can't be changed after tab creation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsTabItemRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsTabItemRequestBuilder.ts deleted file mode 100644 index 758ffecbf51..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/item/teamsTabItemRequestBuilder.ts +++ /dev/null @@ -1,137 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamsTabFromDiscriminatorValue, deserializeIntoTeamsTab, serializeTeamsTab, type TeamsTab } from '../../../../../../models/teamsTab'; -import { TeamsAppRequestBuilder } from './teamsApp/teamsAppRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsTabItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - */ -export class TeamsTabItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsTab entity. - */ - public get teamsApp(): TeamsAppRequestBuilder { - return new TeamsAppRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamsTabItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/tabs/{teamsTab%2Did}{?%24select,%24expand}"); - }; - /** - * Removes (unpins) a tab from the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/channel-delete-tabs?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of the specified tab in a channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/channel-get-tabs?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the specified tab.This can be used to configure the content of the tab. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/channel-patch-tabs?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Removes (unpins) a tab from the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of the specified tab in a channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsTabItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the specified tab.This can be used to configure the content of the tab. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsTab); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamsTabItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsTabItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsTabItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsTabItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/primaryChannel/tabs/tabsRequestBuilder.ts b/src/me/joinedTeams/item/primaryChannel/tabs/tabsRequestBuilder.ts deleted file mode 100644 index 79d7610e851..00000000000 --- a/src/me/joinedTeams/item/primaryChannel/tabs/tabsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsTabCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsTabFromDiscriminatorValue, deserializeIntoTeamsTab, serializeTeamsTab, type TeamsTab } from '../../../../../models/teamsTab'; -import { createTeamsTabCollectionResponseFromDiscriminatorValue } from '../../../../../models/teamsTabCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamsTabItemRequestBuilder } from './item/teamsTabItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TabsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - */ -export class TabsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tabs property of the microsoft.graph.channel entity. - * @param teamsTabId The unique identifier of teamsTab - * @returns a TeamsTabItemRequestBuilder - */ - public byTeamsTabId(teamsTabId: string) : TeamsTabItemRequestBuilder { - if(!teamsTabId) throw new Error("teamsTabId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamsTab%2Did"] = teamsTabId - return new TeamsTabItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TabsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/primaryChannel/tabs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of tabs in the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTabCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/channel-list-tabs?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTab - * @see {@link https://learn.microsoft.com/graph/api/channel-post-tabs?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTabFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of tabs in the specified channel within a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tabsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Adds (pins) a tab to the specified channel within a team. The corresponding app must already be installed in the team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamsTab, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamsTab); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tabsRequestBuilder - */ - public withUrl(rawUrl: string) : TabsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TabsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tabsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/index.ts b/src/me/joinedTeams/item/schedule/index.ts deleted file mode 100644 index 2b6bf2ed8ea..00000000000 --- a/src/me/joinedTeams/item/schedule/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './scheduleRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/offerShiftRequests/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/offerShiftRequests/count/countRequestBuilder.ts deleted file mode 100644 index 701e47d7f10..00000000000 --- a/src/me/joinedTeams/item/schedule/offerShiftRequests/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/offerShiftRequests/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/offerShiftRequests/count/index.ts b/src/me/joinedTeams/item/schedule/offerShiftRequests/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/offerShiftRequests/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/offerShiftRequests/index.ts b/src/me/joinedTeams/item/schedule/offerShiftRequests/index.ts deleted file mode 100644 index 49464cfce97..00000000000 --- a/src/me/joinedTeams/item/schedule/offerShiftRequests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './offerShiftRequestsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/offerShiftRequests/item/index.ts b/src/me/joinedTeams/item/schedule/offerShiftRequests/item/index.ts deleted file mode 100644 index c15f1a1d4e7..00000000000 --- a/src/me/joinedTeams/item/schedule/offerShiftRequests/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './offerShiftRequestItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/offerShiftRequests/item/offerShiftRequestItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/offerShiftRequests/item/offerShiftRequestItemRequestBuilder.ts deleted file mode 100644 index 616a219a728..00000000000 --- a/src/me/joinedTeams/item/schedule/offerShiftRequests/item/offerShiftRequestItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createOfferShiftRequestFromDiscriminatorValue, deserializeIntoOfferShiftRequest, serializeOfferShiftRequest, type OfferShiftRequest } from '../../../../../../models/offerShiftRequest'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OfferShiftRequestItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the offerShiftRequests property of the microsoft.graph.schedule entity. - */ -export class OfferShiftRequestItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OfferShiftRequestItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/offerShiftRequests/{offerShiftRequest%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property offerShiftRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of an offerShiftRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OfferShiftRequest - * @see {@link https://learn.microsoft.com/graph/api/offershiftrequest-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOfferShiftRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property offerShiftRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OfferShiftRequest - */ - public patch(body: OfferShiftRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOfferShiftRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property offerShiftRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of an offerShiftRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, offerShiftRequestItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property offerShiftRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OfferShiftRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOfferShiftRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OfferShiftRequestItemRequestBuilder - */ - public withUrl(rawUrl: string) : OfferShiftRequestItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OfferShiftRequestItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const offerShiftRequestItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/offerShiftRequests/offerShiftRequestsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/offerShiftRequests/offerShiftRequestsRequestBuilder.ts deleted file mode 100644 index 4a21e864b37..00000000000 --- a/src/me/joinedTeams/item/schedule/offerShiftRequests/offerShiftRequestsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OfferShiftRequestCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOfferShiftRequestFromDiscriminatorValue, deserializeIntoOfferShiftRequest, serializeOfferShiftRequest, type OfferShiftRequest } from '../../../../../models/offerShiftRequest'; -import { createOfferShiftRequestCollectionResponseFromDiscriminatorValue } from '../../../../../models/offerShiftRequestCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OfferShiftRequestItemRequestBuilder } from './item/offerShiftRequestItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OfferShiftRequestsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the offerShiftRequests property of the microsoft.graph.schedule entity. - */ -export class OfferShiftRequestsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the offerShiftRequests property of the microsoft.graph.schedule entity. - * @param offerShiftRequestId The unique identifier of offerShiftRequest - * @returns a OfferShiftRequestItemRequestBuilder - */ - public byOfferShiftRequestId(offerShiftRequestId: string) : OfferShiftRequestItemRequestBuilder { - if(!offerShiftRequestId) throw new Error("offerShiftRequestId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["offerShiftRequest%2Did"] = offerShiftRequestId - return new OfferShiftRequestItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OfferShiftRequestsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/offerShiftRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the properties and relationships of all offerShiftRequest objects in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OfferShiftRequestCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/offershiftrequest-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOfferShiftRequestCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an instance of an offerShiftRequest. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OfferShiftRequest - * @see {@link https://learn.microsoft.com/graph/api/offershiftrequest-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: OfferShiftRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOfferShiftRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the properties and relationships of all offerShiftRequest objects in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, offerShiftRequestsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an instance of an offerShiftRequest. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OfferShiftRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOfferShiftRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a offerShiftRequestsRequestBuilder - */ - public withUrl(rawUrl: string) : OfferShiftRequestsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OfferShiftRequestsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const offerShiftRequestsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/openShiftChangeRequests/count/countRequestBuilder.ts deleted file mode 100644 index 8e1860f1871..00000000000 --- a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/openShiftChangeRequests/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/count/index.ts b/src/me/joinedTeams/item/schedule/openShiftChangeRequests/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/index.ts b/src/me/joinedTeams/item/schedule/openShiftChangeRequests/index.ts deleted file mode 100644 index 2ef881384be..00000000000 --- a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './openShiftChangeRequestsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/item/index.ts b/src/me/joinedTeams/item/schedule/openShiftChangeRequests/item/index.ts deleted file mode 100644 index 2c12f76c075..00000000000 --- a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './openShiftChangeRequestItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/item/openShiftChangeRequestItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/openShiftChangeRequests/item/openShiftChangeRequestItemRequestBuilder.ts deleted file mode 100644 index 754dc7aceff..00000000000 --- a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/item/openShiftChangeRequestItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createOpenShiftChangeRequestFromDiscriminatorValue, deserializeIntoOpenShiftChangeRequest, serializeOpenShiftChangeRequest, type OpenShiftChangeRequest } from '../../../../../../models/openShiftChangeRequest'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OpenShiftChangeRequestItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the openShiftChangeRequests property of the microsoft.graph.schedule entity. - */ -export class OpenShiftChangeRequestItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OpenShiftChangeRequestItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/openShiftChangeRequests/{openShiftChangeRequest%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property openShiftChangeRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of an openShiftChangeRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShiftChangeRequest - * @see {@link https://learn.microsoft.com/graph/api/openshiftchangerequest-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftChangeRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property openShiftChangeRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShiftChangeRequest - */ - public patch(body: OpenShiftChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftChangeRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property openShiftChangeRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of an openShiftChangeRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, openShiftChangeRequestItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property openShiftChangeRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OpenShiftChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOpenShiftChangeRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OpenShiftChangeRequestItemRequestBuilder - */ - public withUrl(rawUrl: string) : OpenShiftChangeRequestItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OpenShiftChangeRequestItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const openShiftChangeRequestItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/openShiftChangeRequestsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/openShiftChangeRequests/openShiftChangeRequestsRequestBuilder.ts deleted file mode 100644 index 4ead9aeb67b..00000000000 --- a/src/me/joinedTeams/item/schedule/openShiftChangeRequests/openShiftChangeRequestsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OpenShiftChangeRequestCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOpenShiftChangeRequestFromDiscriminatorValue, deserializeIntoOpenShiftChangeRequest, serializeOpenShiftChangeRequest, type OpenShiftChangeRequest } from '../../../../../models/openShiftChangeRequest'; -import { createOpenShiftChangeRequestCollectionResponseFromDiscriminatorValue } from '../../../../../models/openShiftChangeRequestCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OpenShiftChangeRequestItemRequestBuilder } from './item/openShiftChangeRequestItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OpenShiftChangeRequestsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the openShiftChangeRequests property of the microsoft.graph.schedule entity. - */ -export class OpenShiftChangeRequestsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the openShiftChangeRequests property of the microsoft.graph.schedule entity. - * @param openShiftChangeRequestId The unique identifier of openShiftChangeRequest - * @returns a OpenShiftChangeRequestItemRequestBuilder - */ - public byOpenShiftChangeRequestId(openShiftChangeRequestId: string) : OpenShiftChangeRequestItemRequestBuilder { - if(!openShiftChangeRequestId) throw new Error("openShiftChangeRequestId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["openShiftChangeRequest%2Did"] = openShiftChangeRequestId - return new OpenShiftChangeRequestItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OpenShiftChangeRequestsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/openShiftChangeRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of openShiftChangeRequest objects in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShiftChangeRequestCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/openshiftchangerequest-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftChangeRequestCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create instance of an openShiftChangeRequest object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShiftChangeRequest - * @see {@link https://learn.microsoft.com/graph/api/openshiftchangerequest-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: OpenShiftChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftChangeRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of openShiftChangeRequest objects in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, openShiftChangeRequestsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create instance of an openShiftChangeRequest object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OpenShiftChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOpenShiftChangeRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a openShiftChangeRequestsRequestBuilder - */ - public withUrl(rawUrl: string) : OpenShiftChangeRequestsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OpenShiftChangeRequestsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const openShiftChangeRequestsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/openShifts/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/openShifts/count/countRequestBuilder.ts deleted file mode 100644 index 25dc8f356e0..00000000000 --- a/src/me/joinedTeams/item/schedule/openShifts/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/openShifts/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/openShifts/count/index.ts b/src/me/joinedTeams/item/schedule/openShifts/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/openShifts/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/openShifts/index.ts b/src/me/joinedTeams/item/schedule/openShifts/index.ts deleted file mode 100644 index edb2543c890..00000000000 --- a/src/me/joinedTeams/item/schedule/openShifts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './openShiftsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/openShifts/item/index.ts b/src/me/joinedTeams/item/schedule/openShifts/item/index.ts deleted file mode 100644 index 7554429552f..00000000000 --- a/src/me/joinedTeams/item/schedule/openShifts/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './openShiftItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/openShifts/item/openShiftItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/openShifts/item/openShiftItemRequestBuilder.ts deleted file mode 100644 index f065355d227..00000000000 --- a/src/me/joinedTeams/item/schedule/openShifts/item/openShiftItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createOpenShiftFromDiscriminatorValue, deserializeIntoOpenShift, serializeOpenShift, type OpenShift } from '../../../../../../models/openShift'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OpenShiftItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the openShifts property of the microsoft.graph.schedule entity. - */ -export class OpenShiftItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OpenShiftItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/openShifts/{openShift%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an openShift object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/openshift-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of an openshift object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShift - * @see {@link https://learn.microsoft.com/graph/api/openshift-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of an openShift object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShift - * @see {@link https://learn.microsoft.com/graph/api/openshift-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: OpenShift, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an openShift object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of an openshift object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, openShiftItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of an openShift object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OpenShift, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOpenShift); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OpenShiftItemRequestBuilder - */ - public withUrl(rawUrl: string) : OpenShiftItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OpenShiftItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const openShiftItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/openShifts/openShiftsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/openShifts/openShiftsRequestBuilder.ts deleted file mode 100644 index cd0763ea3ce..00000000000 --- a/src/me/joinedTeams/item/schedule/openShifts/openShiftsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OpenShiftCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOpenShiftFromDiscriminatorValue, deserializeIntoOpenShift, serializeOpenShift, type OpenShift } from '../../../../../models/openShift'; -import { createOpenShiftCollectionResponseFromDiscriminatorValue } from '../../../../../models/openShiftCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OpenShiftItemRequestBuilder } from './item/openShiftItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OpenShiftsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the openShifts property of the microsoft.graph.schedule entity. - */ -export class OpenShiftsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the openShifts property of the microsoft.graph.schedule entity. - * @param openShiftId The unique identifier of openShift - * @returns a OpenShiftItemRequestBuilder - */ - public byOpenShiftId(openShiftId: string) : OpenShiftItemRequestBuilder { - if(!openShiftId) throw new Error("openShiftId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["openShift%2Did"] = openShiftId - return new OpenShiftItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OpenShiftsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/openShifts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List openShift objects in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShiftCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/openshift-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an instance of an openShift object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OpenShift - * @see {@link https://learn.microsoft.com/graph/api/openshift-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: OpenShift, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOpenShiftFromDiscriminatorValue, errorMapping); - }; - /** - * List openShift objects in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, openShiftsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an instance of an openShift object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OpenShift, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOpenShift); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a openShiftsRequestBuilder - */ - public withUrl(rawUrl: string) : OpenShiftsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OpenShiftsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const openShiftsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/scheduleRequestBuilder.ts b/src/me/joinedTeams/item/schedule/scheduleRequestBuilder.ts deleted file mode 100644 index dc7c8ad5a7f..00000000000 --- a/src/me/joinedTeams/item/schedule/scheduleRequestBuilder.ts +++ /dev/null @@ -1,198 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createScheduleFromDiscriminatorValue, deserializeIntoSchedule, serializeSchedule, type Schedule } from '../../../../models/schedule'; -import { OfferShiftRequestsRequestBuilder } from './offerShiftRequests/offerShiftRequestsRequestBuilder'; -import { OpenShiftChangeRequestsRequestBuilder } from './openShiftChangeRequests/openShiftChangeRequestsRequestBuilder'; -import { OpenShiftsRequestBuilder } from './openShifts/openShiftsRequestBuilder'; -import { SchedulingGroupsRequestBuilder } from './schedulingGroups/schedulingGroupsRequestBuilder'; -import { ShareRequestBuilder } from './share/shareRequestBuilder'; -import { ShiftsRequestBuilder } from './shifts/shiftsRequestBuilder'; -import { SwapShiftsChangeRequestsRequestBuilder } from './swapShiftsChangeRequests/swapShiftsChangeRequestsRequestBuilder'; -import { TimeOffReasonsRequestBuilder } from './timeOffReasons/timeOffReasonsRequestBuilder'; -import { TimeOffRequestsRequestBuilder } from './timeOffRequests/timeOffRequestsRequestBuilder'; -import { TimesOffRequestBuilder } from './timesOff/timesOffRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ScheduleRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the schedule property of the microsoft.graph.team entity. - */ -export class ScheduleRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the offerShiftRequests property of the microsoft.graph.schedule entity. - */ - public get offerShiftRequests(): OfferShiftRequestsRequestBuilder { - return new OfferShiftRequestsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the openShiftChangeRequests property of the microsoft.graph.schedule entity. - */ - public get openShiftChangeRequests(): OpenShiftChangeRequestsRequestBuilder { - return new OpenShiftChangeRequestsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the openShifts property of the microsoft.graph.schedule entity. - */ - public get openShifts(): OpenShiftsRequestBuilder { - return new OpenShiftsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the schedulingGroups property of the microsoft.graph.schedule entity. - */ - public get schedulingGroups(): SchedulingGroupsRequestBuilder { - return new SchedulingGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the share method. - */ - public get share(): ShareRequestBuilder { - return new ShareRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the shifts property of the microsoft.graph.schedule entity. - */ - public get shifts(): ShiftsRequestBuilder { - return new ShiftsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the swapShiftsChangeRequests property of the microsoft.graph.schedule entity. - */ - public get swapShiftsChangeRequests(): SwapShiftsChangeRequestsRequestBuilder { - return new SwapShiftsChangeRequestsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the timeOffReasons property of the microsoft.graph.schedule entity. - */ - public get timeOffReasons(): TimeOffReasonsRequestBuilder { - return new TimeOffReasonsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the timeOffRequests property of the microsoft.graph.schedule entity. - */ - public get timeOffRequests(): TimeOffRequestsRequestBuilder { - return new TimeOffRequestsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the timesOff property of the microsoft.graph.schedule entity. - */ - public get timesOff(): TimesOffRequestBuilder { - return new TimesOffRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ScheduleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule{?%24select,%24expand}"); - }; - /** - * Delete navigation property schedule for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Schedule - * @see {@link https://learn.microsoft.com/graph/api/schedule-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createScheduleFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property schedule in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Schedule - */ - public put(body: Schedule, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createScheduleFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property schedule for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, scheduleRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property schedule in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: Schedule, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSchedule); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a scheduleRequestBuilder - */ - public withUrl(rawUrl: string) : ScheduleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ScheduleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const scheduleRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/schedulingGroups/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/schedulingGroups/count/countRequestBuilder.ts deleted file mode 100644 index 98a196b830c..00000000000 --- a/src/me/joinedTeams/item/schedule/schedulingGroups/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/schedulingGroups/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/schedulingGroups/count/index.ts b/src/me/joinedTeams/item/schedule/schedulingGroups/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/schedulingGroups/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/schedulingGroups/index.ts b/src/me/joinedTeams/item/schedule/schedulingGroups/index.ts deleted file mode 100644 index de2fe1b0db0..00000000000 --- a/src/me/joinedTeams/item/schedule/schedulingGroups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './schedulingGroupsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/schedulingGroups/item/index.ts b/src/me/joinedTeams/item/schedule/schedulingGroups/item/index.ts deleted file mode 100644 index 6ecc49bbbf1..00000000000 --- a/src/me/joinedTeams/item/schedule/schedulingGroups/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './schedulingGroupItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/schedulingGroups/item/schedulingGroupItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/schedulingGroups/item/schedulingGroupItemRequestBuilder.ts deleted file mode 100644 index a14328166ec..00000000000 --- a/src/me/joinedTeams/item/schedule/schedulingGroups/item/schedulingGroupItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createSchedulingGroupFromDiscriminatorValue, deserializeIntoSchedulingGroup, serializeSchedulingGroup, type SchedulingGroup } from '../../../../../../models/schedulingGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SchedulingGroupItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the schedulingGroups property of the microsoft.graph.schedule entity. - */ -export class SchedulingGroupItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SchedulingGroupItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/schedulingGroups/{schedulingGroup%2Did}{?%24select}"); - }; - /** - * Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/schedulinggroup-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a schedulingGroup by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SchedulingGroup - * @see {@link https://learn.microsoft.com/graph/api/schedulinggroup-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSchedulingGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Replace an existing schedulingGroup. If the specified schedulingGroup doesn't exist, this method returns 404 Not found. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SchedulingGroup - * @see {@link https://learn.microsoft.com/graph/api/schedulinggroup-put?view=graph-rest-1.0|Find more info here} - */ - public patch(body: SchedulingGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSchedulingGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Mark a schedulingGroup as inactive by setting its isActive property.This method does not remove the schedulingGroup from the schedule. Existing shift instances assigned to the scheduling group remain part of the group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a schedulingGroup by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, schedulingGroupItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Replace an existing schedulingGroup. If the specified schedulingGroup doesn't exist, this method returns 404 Not found. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SchedulingGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSchedulingGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SchedulingGroupItemRequestBuilder - */ - public withUrl(rawUrl: string) : SchedulingGroupItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SchedulingGroupItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const schedulingGroupItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/schedulingGroups/schedulingGroupsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/schedulingGroups/schedulingGroupsRequestBuilder.ts deleted file mode 100644 index ebfb81e51ca..00000000000 --- a/src/me/joinedTeams/item/schedule/schedulingGroups/schedulingGroupsRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SchedulingGroupCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSchedulingGroupFromDiscriminatorValue, deserializeIntoSchedulingGroup, serializeSchedulingGroup, type SchedulingGroup } from '../../../../../models/schedulingGroup'; -import { createSchedulingGroupCollectionResponseFromDiscriminatorValue } from '../../../../../models/schedulingGroupCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SchedulingGroupItemRequestBuilder } from './item/schedulingGroupItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SchedulingGroupsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -/** - * Provides operations to manage the schedulingGroups property of the microsoft.graph.schedule entity. - */ -export class SchedulingGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the schedulingGroups property of the microsoft.graph.schedule entity. - * @param schedulingGroupId The unique identifier of schedulingGroup - * @returns a SchedulingGroupItemRequestBuilder - */ - public bySchedulingGroupId(schedulingGroupId: string) : SchedulingGroupItemRequestBuilder { - if(!schedulingGroupId) throw new Error("schedulingGroupId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["schedulingGroup%2Did"] = schedulingGroupId - return new SchedulingGroupItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SchedulingGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/schedulingGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the list of schedulingGroups in this schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SchedulingGroupCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/schedule-list-schedulinggroups?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSchedulingGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new schedulingGroup. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SchedulingGroup - * @see {@link https://learn.microsoft.com/graph/api/schedule-post-schedulinggroups?view=graph-rest-1.0|Find more info here} - */ - public post(body: SchedulingGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSchedulingGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of schedulingGroups in this schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, schedulingGroupsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new schedulingGroup. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SchedulingGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSchedulingGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a schedulingGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : SchedulingGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SchedulingGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const schedulingGroupsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/share/index.ts b/src/me/joinedTeams/item/schedule/share/index.ts deleted file mode 100644 index 4c548f1c4ba..00000000000 --- a/src/me/joinedTeams/item/schedule/share/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './sharePostRequestBody' -export * from './shareRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/share/sharePostRequestBody.ts b/src/me/joinedTeams/item/schedule/share/sharePostRequestBody.ts deleted file mode 100644 index 6c1dabb3317..00000000000 --- a/src/me/joinedTeams/item/schedule/share/sharePostRequestBody.ts +++ /dev/null @@ -1,42 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSharePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSharePostRequestBody; -} -export function deserializeIntoSharePostRequestBody(sharePostRequestBody: SharePostRequestBody | undefined = {} as SharePostRequestBody) : Record void> { - return { - "endDateTime": n => { sharePostRequestBody.endDateTime = n.getDateValue(); }, - "notifyTeam": n => { sharePostRequestBody.notifyTeam = n.getBooleanValue(); }, - "startDateTime": n => { sharePostRequestBody.startDateTime = n.getDateValue(); }, - } -} -export function serializeSharePostRequestBody(writer: SerializationWriter, sharePostRequestBody: SharePostRequestBody | undefined = {} as SharePostRequestBody) : void { - writer.writeDateValue("endDateTime", sharePostRequestBody.endDateTime); - writer.writeBooleanValue("notifyTeam", sharePostRequestBody.notifyTeam); - writer.writeDateValue("startDateTime", sharePostRequestBody.startDateTime); - writer.writeAdditionalData(sharePostRequestBody.additionalData); -} -export interface SharePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The endDateTime property - */ - endDateTime?: Date; - /** - * The notifyTeam property - */ - notifyTeam?: boolean; - /** - * The startDateTime property - */ - startDateTime?: Date; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/share/shareRequestBuilder.ts b/src/me/joinedTeams/item/schedule/share/shareRequestBuilder.ts deleted file mode 100644 index 7a074e18d41..00000000000 --- a/src/me/joinedTeams/item/schedule/share/shareRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSharePostRequestBody, serializeSharePostRequestBody, type SharePostRequestBody } from './sharePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the share method. - */ -export class ShareRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ShareRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/share"); - }; - /** - * Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/schedule-share?view=graph-rest-1.0|Find more info here} - */ - public post(body: SharePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SharePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSharePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a shareRequestBuilder - */ - public withUrl(rawUrl: string) : ShareRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ShareRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/shifts/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/shifts/count/countRequestBuilder.ts deleted file mode 100644 index 51eaccf9453..00000000000 --- a/src/me/joinedTeams/item/schedule/shifts/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/shifts/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/shifts/count/index.ts b/src/me/joinedTeams/item/schedule/shifts/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/shifts/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/shifts/index.ts b/src/me/joinedTeams/item/schedule/shifts/index.ts deleted file mode 100644 index f9df57fe250..00000000000 --- a/src/me/joinedTeams/item/schedule/shifts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shiftsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/shifts/item/index.ts b/src/me/joinedTeams/item/schedule/shifts/item/index.ts deleted file mode 100644 index a79b31182a4..00000000000 --- a/src/me/joinedTeams/item/schedule/shifts/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shiftItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/shifts/item/shiftItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/shifts/item/shiftItemRequestBuilder.ts deleted file mode 100644 index b4f26e499b7..00000000000 --- a/src/me/joinedTeams/item/schedule/shifts/item/shiftItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createShiftFromDiscriminatorValue, deserializeIntoShift, serializeShift, type Shift } from '../../../../../../models/shift'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ShiftItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the shifts property of the microsoft.graph.schedule entity. - */ -export class ShiftItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ShiftItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/shifts/{shift%2Did}{?%24select}"); - }; - /** - * Delete a shift from the schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/shift-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a shift object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Shift - * @see {@link https://learn.microsoft.com/graph/api/shift-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createShiftFromDiscriminatorValue, errorMapping); - }; - /** - * Replace an existing shift. If the specified shift doesn't exist, this method returns 404 Not found. The duration of a shift can't be less than 1 minute or longer than 24 hours. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Shift - * @see {@link https://learn.microsoft.com/graph/api/shift-put?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Shift, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createShiftFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a shift from the schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a shift object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, shiftItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Replace an existing shift. If the specified shift doesn't exist, this method returns 404 Not found. The duration of a shift can't be less than 1 minute or longer than 24 hours. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Shift, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeShift); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ShiftItemRequestBuilder - */ - public withUrl(rawUrl: string) : ShiftItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ShiftItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const shiftItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/shifts/shiftsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/shifts/shiftsRequestBuilder.ts deleted file mode 100644 index 15cb8da6a81..00000000000 --- a/src/me/joinedTeams/item/schedule/shifts/shiftsRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ShiftCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createShiftFromDiscriminatorValue, deserializeIntoShift, serializeShift, type Shift } from '../../../../../models/shift'; -import { createShiftCollectionResponseFromDiscriminatorValue } from '../../../../../models/shiftCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ShiftItemRequestBuilder } from './item/shiftItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ShiftsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -/** - * Provides operations to manage the shifts property of the microsoft.graph.schedule entity. - */ -export class ShiftsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the shifts property of the microsoft.graph.schedule entity. - * @param shiftId The unique identifier of shift - * @returns a ShiftItemRequestBuilder - */ - public byShiftId(shiftId: string) : ShiftItemRequestBuilder { - if(!shiftId) throw new Error("shiftId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["shift%2Did"] = shiftId - return new ShiftItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ShiftsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/shifts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the list of shift instances in a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ShiftCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/schedule-list-shifts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createShiftCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Shift - * @see {@link https://learn.microsoft.com/graph/api/schedule-post-shifts?view=graph-rest-1.0|Find more info here} - */ - public post(body: Shift, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createShiftFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of shift instances in a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, shiftsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new shift instance in a schedule. The duration of a shift cannot be less than 1 minute or longer than 24 hours. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Shift, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeShift); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a shiftsRequestBuilder - */ - public withUrl(rawUrl: string) : ShiftsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ShiftsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const shiftsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/countRequestBuilder.ts deleted file mode 100644 index 97e4572fee8..00000000000 --- a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/swapShiftsChangeRequests/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/index.ts b/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/index.ts b/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/index.ts deleted file mode 100644 index 71804647f49..00000000000 --- a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './swapShiftsChangeRequestsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/item/index.ts b/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/item/index.ts deleted file mode 100644 index b3b68a34b95..00000000000 --- a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './swapShiftsChangeRequestItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/item/swapShiftsChangeRequestItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/item/swapShiftsChangeRequestItemRequestBuilder.ts deleted file mode 100644 index a0865847c81..00000000000 --- a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/item/swapShiftsChangeRequestItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createSwapShiftsChangeRequestFromDiscriminatorValue, deserializeIntoSwapShiftsChangeRequest, serializeSwapShiftsChangeRequest, type SwapShiftsChangeRequest } from '../../../../../../models/swapShiftsChangeRequest'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SwapShiftsChangeRequestItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the swapShiftsChangeRequests property of the microsoft.graph.schedule entity. - */ -export class SwapShiftsChangeRequestItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SwapShiftsChangeRequestItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/swapShiftsChangeRequests/{swapShiftsChangeRequest%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property swapShiftsChangeRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a swapShiftsChangeRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SwapShiftsChangeRequest - * @see {@link https://learn.microsoft.com/graph/api/swapshiftschangerequest-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSwapShiftsChangeRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property swapShiftsChangeRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SwapShiftsChangeRequest - */ - public patch(body: SwapShiftsChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSwapShiftsChangeRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property swapShiftsChangeRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a swapShiftsChangeRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, swapShiftsChangeRequestItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property swapShiftsChangeRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SwapShiftsChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSwapShiftsChangeRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SwapShiftsChangeRequestItemRequestBuilder - */ - public withUrl(rawUrl: string) : SwapShiftsChangeRequestItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SwapShiftsChangeRequestItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const swapShiftsChangeRequestItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/swapShiftsChangeRequestsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/swapShiftsChangeRequestsRequestBuilder.ts deleted file mode 100644 index 1827f7aec19..00000000000 --- a/src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/swapShiftsChangeRequestsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SwapShiftsChangeRequestCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSwapShiftsChangeRequestFromDiscriminatorValue, deserializeIntoSwapShiftsChangeRequest, serializeSwapShiftsChangeRequest, type SwapShiftsChangeRequest } from '../../../../../models/swapShiftsChangeRequest'; -import { createSwapShiftsChangeRequestCollectionResponseFromDiscriminatorValue } from '../../../../../models/swapShiftsChangeRequestCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SwapShiftsChangeRequestItemRequestBuilder } from './item/swapShiftsChangeRequestItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SwapShiftsChangeRequestsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the swapShiftsChangeRequests property of the microsoft.graph.schedule entity. - */ -export class SwapShiftsChangeRequestsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the swapShiftsChangeRequests property of the microsoft.graph.schedule entity. - * @param swapShiftsChangeRequestId The unique identifier of swapShiftsChangeRequest - * @returns a SwapShiftsChangeRequestItemRequestBuilder - */ - public bySwapShiftsChangeRequestId(swapShiftsChangeRequestId: string) : SwapShiftsChangeRequestItemRequestBuilder { - if(!swapShiftsChangeRequestId) throw new Error("swapShiftsChangeRequestId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["swapShiftsChangeRequest%2Did"] = swapShiftsChangeRequestId - return new SwapShiftsChangeRequestItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SwapShiftsChangeRequestsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/swapShiftsChangeRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of swapShiftsChangeRequest objects in the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SwapShiftsChangeRequestCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/swapshiftschangerequest-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSwapShiftsChangeRequestCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an instance of a swapShiftsChangeRequest object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SwapShiftsChangeRequest - * @see {@link https://learn.microsoft.com/graph/api/swapshiftschangerequest-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: SwapShiftsChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSwapShiftsChangeRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of swapShiftsChangeRequest objects in the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, swapShiftsChangeRequestsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an instance of a swapShiftsChangeRequest object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SwapShiftsChangeRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSwapShiftsChangeRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a swapShiftsChangeRequestsRequestBuilder - */ - public withUrl(rawUrl: string) : SwapShiftsChangeRequestsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SwapShiftsChangeRequestsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const swapShiftsChangeRequestsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timeOffReasons/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timeOffReasons/count/countRequestBuilder.ts deleted file mode 100644 index b6143fcbf0d..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffReasons/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timeOffReasons/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timeOffReasons/count/index.ts b/src/me/joinedTeams/item/schedule/timeOffReasons/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffReasons/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timeOffReasons/index.ts b/src/me/joinedTeams/item/schedule/timeOffReasons/index.ts deleted file mode 100644 index 1d260e0b5f1..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffReasons/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './timeOffReasonsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timeOffReasons/item/index.ts b/src/me/joinedTeams/item/schedule/timeOffReasons/item/index.ts deleted file mode 100644 index c0be3b45c7a..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffReasons/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './timeOffReasonItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timeOffReasons/item/timeOffReasonItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timeOffReasons/item/timeOffReasonItemRequestBuilder.ts deleted file mode 100644 index 00c32e5b323..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffReasons/item/timeOffReasonItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeOffReasonFromDiscriminatorValue, deserializeIntoTimeOffReason, serializeTimeOffReason, type TimeOffReason } from '../../../../../../models/timeOffReason'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TimeOffReasonItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the timeOffReasons property of the microsoft.graph.schedule entity. - */ -export class TimeOffReasonItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TimeOffReasonItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timeOffReasons/{timeOffReason%2Did}{?%24select}"); - }; - /** - * Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/timeoffreason-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a timeOffReason object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffReason - * @see {@link https://learn.microsoft.com/graph/api/timeoffreason-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffReasonFromDiscriminatorValue, errorMapping); - }; - /** - * Replace an existing timeOffReason. If the specified timeOffReason doesn't exist, this method returns 404 Not found. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffReason - * @see {@link https://learn.microsoft.com/graph/api/timeoffreason-put?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TimeOffReason, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffReasonFromDiscriminatorValue, errorMapping); - }; - /** - * Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason. This method doesn't remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a timeOffReason object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, timeOffReasonItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Replace an existing timeOffReason. If the specified timeOffReason doesn't exist, this method returns 404 Not found. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TimeOffReason, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTimeOffReason); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TimeOffReasonItemRequestBuilder - */ - public withUrl(rawUrl: string) : TimeOffReasonItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TimeOffReasonItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const timeOffReasonItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timeOffReasons/timeOffReasonsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timeOffReasons/timeOffReasonsRequestBuilder.ts deleted file mode 100644 index 526b5f7c56e..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffReasons/timeOffReasonsRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TimeOffReasonCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeOffReasonFromDiscriminatorValue, deserializeIntoTimeOffReason, serializeTimeOffReason, type TimeOffReason } from '../../../../../models/timeOffReason'; -import { createTimeOffReasonCollectionResponseFromDiscriminatorValue } from '../../../../../models/timeOffReasonCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TimeOffReasonItemRequestBuilder } from './item/timeOffReasonItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TimeOffReasonsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -/** - * Provides operations to manage the timeOffReasons property of the microsoft.graph.schedule entity. - */ -export class TimeOffReasonsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the timeOffReasons property of the microsoft.graph.schedule entity. - * @param timeOffReasonId The unique identifier of timeOffReason - * @returns a TimeOffReasonItemRequestBuilder - */ - public byTimeOffReasonId(timeOffReasonId: string) : TimeOffReasonItemRequestBuilder { - if(!timeOffReasonId) throw new Error("timeOffReasonId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["timeOffReason%2Did"] = timeOffReasonId - return new TimeOffReasonItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TimeOffReasonsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timeOffReasons{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the list of timeOffReasons in a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffReasonCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/schedule-list-timeoffreasons?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffReasonCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new timeOffReason. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffReason - * @see {@link https://learn.microsoft.com/graph/api/schedule-post-timeoffreasons?view=graph-rest-1.0|Find more info here} - */ - public post(body: TimeOffReason, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffReasonFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of timeOffReasons in a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, timeOffReasonsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new timeOffReason. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TimeOffReason, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTimeOffReason); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a timeOffReasonsRequestBuilder - */ - public withUrl(rawUrl: string) : TimeOffReasonsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TimeOffReasonsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const timeOffReasonsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timeOffRequests/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timeOffRequests/count/countRequestBuilder.ts deleted file mode 100644 index 1d62463ab00..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffRequests/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timeOffRequests/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timeOffRequests/count/index.ts b/src/me/joinedTeams/item/schedule/timeOffRequests/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffRequests/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timeOffRequests/index.ts b/src/me/joinedTeams/item/schedule/timeOffRequests/index.ts deleted file mode 100644 index af80db30bb9..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffRequests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './timeOffRequestsRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timeOffRequests/item/index.ts b/src/me/joinedTeams/item/schedule/timeOffRequests/item/index.ts deleted file mode 100644 index 4602ecc866f..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffRequests/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './timeOffRequestItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timeOffRequests/item/timeOffRequestItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timeOffRequests/item/timeOffRequestItemRequestBuilder.ts deleted file mode 100644 index 3a2a38dcaf1..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffRequests/item/timeOffRequestItemRequestBuilder.ts +++ /dev/null @@ -1,124 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeOffRequestFromDiscriminatorValue, deserializeIntoTimeOffRequest, serializeTimeOffRequest, type TimeOffRequest } from '../../../../../../models/timeOffRequest'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TimeOffRequestItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the timeOffRequests property of the microsoft.graph.schedule entity. - */ -export class TimeOffRequestItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TimeOffRequestItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timeOffRequests/{timeOffRequest%2Did}{?%24select}"); - }; - /** - * Delete a timeOffRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/timeoffrequest-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a timeoffrequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffRequest - * @see {@link https://learn.microsoft.com/graph/api/timeoffrequest-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property timeOffRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffRequest - */ - public patch(body: TimeOffRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a timeOffRequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a timeoffrequest object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, timeOffRequestItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property timeOffRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TimeOffRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTimeOffRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TimeOffRequestItemRequestBuilder - */ - public withUrl(rawUrl: string) : TimeOffRequestItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TimeOffRequestItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const timeOffRequestItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timeOffRequests/timeOffRequestsRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timeOffRequests/timeOffRequestsRequestBuilder.ts deleted file mode 100644 index b2e28052a61..00000000000 --- a/src/me/joinedTeams/item/schedule/timeOffRequests/timeOffRequestsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TimeOffRequestCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeOffRequestFromDiscriminatorValue, deserializeIntoTimeOffRequest, serializeTimeOffRequest, type TimeOffRequest } from '../../../../../models/timeOffRequest'; -import { createTimeOffRequestCollectionResponseFromDiscriminatorValue } from '../../../../../models/timeOffRequestCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TimeOffRequestItemRequestBuilder } from './item/timeOffRequestItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TimeOffRequestsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -/** - * Provides operations to manage the timeOffRequests property of the microsoft.graph.schedule entity. - */ -export class TimeOffRequestsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the timeOffRequests property of the microsoft.graph.schedule entity. - * @param timeOffRequestId The unique identifier of timeOffRequest - * @returns a TimeOffRequestItemRequestBuilder - */ - public byTimeOffRequestId(timeOffRequestId: string) : TimeOffRequestItemRequestBuilder { - if(!timeOffRequestId) throw new Error("timeOffRequestId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["timeOffRequest%2Did"] = timeOffRequestId - return new TimeOffRequestItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TimeOffRequestsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timeOffRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Retrieve a list of timeOffRequest objects in the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffRequestCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/timeoffrequest-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffRequestCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to timeOffRequests for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffRequest - */ - public post(body: TimeOffRequest, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffRequestFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of timeOffRequest objects in the team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, timeOffRequestsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to timeOffRequests for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TimeOffRequest, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTimeOffRequest); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a timeOffRequestsRequestBuilder - */ - public withUrl(rawUrl: string) : TimeOffRequestsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TimeOffRequestsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const timeOffRequestsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timesOff/count/countRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timesOff/count/countRequestBuilder.ts deleted file mode 100644 index f2cfaf286af..00000000000 --- a/src/me/joinedTeams/item/schedule/timesOff/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timesOff/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timesOff/count/index.ts b/src/me/joinedTeams/item/schedule/timesOff/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/schedule/timesOff/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timesOff/index.ts b/src/me/joinedTeams/item/schedule/timesOff/index.ts deleted file mode 100644 index 67ad563efc2..00000000000 --- a/src/me/joinedTeams/item/schedule/timesOff/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './timesOffRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timesOff/item/index.ts b/src/me/joinedTeams/item/schedule/timesOff/item/index.ts deleted file mode 100644 index 9ff648040ea..00000000000 --- a/src/me/joinedTeams/item/schedule/timesOff/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './timeOffItemRequestBuilder' diff --git a/src/me/joinedTeams/item/schedule/timesOff/item/timeOffItemRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timesOff/item/timeOffItemRequestBuilder.ts deleted file mode 100644 index 605da5371ca..00000000000 --- a/src/me/joinedTeams/item/schedule/timesOff/item/timeOffItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTimeOffFromDiscriminatorValue, deserializeIntoTimeOff, serializeTimeOff, type TimeOff } from '../../../../../../models/timeOff'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TimeOffItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the timesOff property of the microsoft.graph.schedule entity. - */ -export class TimeOffItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TimeOffItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timesOff/{timeOff%2Did}{?%24select}"); - }; - /** - * Delete a timeOff instance from a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/timeoff-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a timeOff object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOff - * @see {@link https://learn.microsoft.com/graph/api/timeoff-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffFromDiscriminatorValue, errorMapping); - }; - /** - * Replace an existing timeOff object. If the specified timeOff object doesn't exist, this method returns 404 Not found. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOff - * @see {@link https://learn.microsoft.com/graph/api/timeoff-put?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TimeOff, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a timeOff instance from a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a timeOff object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, timeOffItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Replace an existing timeOff object. If the specified timeOff object doesn't exist, this method returns 404 Not found. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TimeOff, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTimeOff); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TimeOffItemRequestBuilder - */ - public withUrl(rawUrl: string) : TimeOffItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TimeOffItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const timeOffItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/schedule/timesOff/timesOffRequestBuilder.ts b/src/me/joinedTeams/item/schedule/timesOff/timesOffRequestBuilder.ts deleted file mode 100644 index f1ec2c4a982..00000000000 --- a/src/me/joinedTeams/item/schedule/timesOff/timesOffRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TimeOffCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTimeOffFromDiscriminatorValue, deserializeIntoTimeOff, serializeTimeOff, type TimeOff } from '../../../../../models/timeOff'; -import { createTimeOffCollectionResponseFromDiscriminatorValue } from '../../../../../models/timeOffCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TimeOffItemRequestBuilder } from './item/timeOffItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TimesOffRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -/** - * Provides operations to manage the timesOff property of the microsoft.graph.schedule entity. - */ -export class TimesOffRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the timesOff property of the microsoft.graph.schedule entity. - * @param timeOffId The unique identifier of timeOff - * @returns a TimeOffItemRequestBuilder - */ - public byTimeOffId(timeOffId: string) : TimeOffItemRequestBuilder { - if(!timeOffId) throw new Error("timeOffId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["timeOff%2Did"] = timeOffId - return new TimeOffItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TimesOffRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/timesOff{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get the list of timeOff instances in a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOffCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/schedule-list-timesoff?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new timeOff instance in a schedule. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TimeOff - * @see {@link https://learn.microsoft.com/graph/api/schedule-post-timesoff?view=graph-rest-1.0|Find more info here} - */ - public post(body: TimeOff, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTimeOffFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of timeOff instances in a schedule. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, timesOffRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new timeOff instance in a schedule. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TimeOff, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTimeOff); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a timesOffRequestBuilder - */ - public withUrl(rawUrl: string) : TimesOffRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TimesOffRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const timesOffRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/sendActivityNotification/index.ts b/src/me/joinedTeams/item/sendActivityNotification/index.ts deleted file mode 100644 index bfd7d6ecfe6..00000000000 --- a/src/me/joinedTeams/item/sendActivityNotification/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './sendActivityNotificationPostRequestBody' -export * from './sendActivityNotificationRequestBuilder' diff --git a/src/me/joinedTeams/item/sendActivityNotification/sendActivityNotificationPostRequestBody.ts b/src/me/joinedTeams/item/sendActivityNotification/sendActivityNotificationPostRequestBody.ts deleted file mode 100644 index 528829b98da..00000000000 --- a/src/me/joinedTeams/item/sendActivityNotification/sendActivityNotificationPostRequestBody.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createItemBodyFromDiscriminatorValue, serializeItemBody, type ItemBody } from '../../../../models/itemBody'; -import { createKeyValuePairFromDiscriminatorValue, serializeKeyValuePair, type KeyValuePair } from '../../../../models/keyValuePair'; -import { createTeamworkActivityTopicFromDiscriminatorValue, serializeTeamworkActivityTopic, type TeamworkActivityTopic } from '../../../../models/teamworkActivityTopic'; -import { createTeamworkNotificationRecipientFromDiscriminatorValue, serializeTeamworkNotificationRecipient, type TeamworkNotificationRecipient } from '../../../../models/teamworkNotificationRecipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSendActivityNotificationPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSendActivityNotificationPostRequestBody; -} -export function deserializeIntoSendActivityNotificationPostRequestBody(sendActivityNotificationPostRequestBody: SendActivityNotificationPostRequestBody | undefined = {} as SendActivityNotificationPostRequestBody) : Record void> { - return { - "activityType": n => { sendActivityNotificationPostRequestBody.activityType = n.getStringValue(); }, - "chainId": n => { sendActivityNotificationPostRequestBody.chainId = n.getNumberValue(); }, - "previewText": n => { sendActivityNotificationPostRequestBody.previewText = n.getObjectValue(createItemBodyFromDiscriminatorValue); }, - "recipient": n => { sendActivityNotificationPostRequestBody.recipient = n.getObjectValue(createTeamworkNotificationRecipientFromDiscriminatorValue); }, - "templateParameters": n => { sendActivityNotificationPostRequestBody.templateParameters = n.getCollectionOfObjectValues(createKeyValuePairFromDiscriminatorValue); }, - "topic": n => { sendActivityNotificationPostRequestBody.topic = n.getObjectValue(createTeamworkActivityTopicFromDiscriminatorValue); }, - } -} -export interface SendActivityNotificationPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * The activityType property - */ - activityType?: string; - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The chainId property - */ - chainId?: number; - /** - * The previewText property - */ - previewText?: ItemBody; - /** - * The recipient property - */ - recipient?: TeamworkNotificationRecipient; - /** - * The templateParameters property - */ - templateParameters?: KeyValuePair[]; - /** - * The topic property - */ - topic?: TeamworkActivityTopic; -} -export function serializeSendActivityNotificationPostRequestBody(writer: SerializationWriter, sendActivityNotificationPostRequestBody: SendActivityNotificationPostRequestBody | undefined = {} as SendActivityNotificationPostRequestBody) : void { - writer.writeStringValue("activityType", sendActivityNotificationPostRequestBody.activityType); - writer.writeNumberValue("chainId", sendActivityNotificationPostRequestBody.chainId); - writer.writeObjectValue("previewText", sendActivityNotificationPostRequestBody.previewText, serializeItemBody); - writer.writeObjectValue("recipient", sendActivityNotificationPostRequestBody.recipient, serializeTeamworkNotificationRecipient); - writer.writeCollectionOfObjectValues("templateParameters", sendActivityNotificationPostRequestBody.templateParameters, serializeKeyValuePair); - writer.writeObjectValue("topic", sendActivityNotificationPostRequestBody.topic, serializeTeamworkActivityTopic); - writer.writeAdditionalData(sendActivityNotificationPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/sendActivityNotification/sendActivityNotificationRequestBuilder.ts b/src/me/joinedTeams/item/sendActivityNotification/sendActivityNotificationRequestBuilder.ts deleted file mode 100644 index 2357aee5790..00000000000 --- a/src/me/joinedTeams/item/sendActivityNotification/sendActivityNotificationRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoSendActivityNotificationPostRequestBody, serializeSendActivityNotificationPostRequestBody, type SendActivityNotificationPostRequestBody } from './sendActivityNotificationPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the sendActivityNotification method. - */ -export class SendActivityNotificationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendActivityNotificationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/sendActivityNotification"); - }; - /** - * Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-sendactivitynotification?view=graph-rest-1.0|Find more info here} - */ - public post(body: SendActivityNotificationPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send an activity feed notification in the scope of a team. For more details about sending notifications and the requirements for doing so, seesending Teams activity notifications. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SendActivityNotificationPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSendActivityNotificationPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendActivityNotificationRequestBuilder - */ - public withUrl(rawUrl: string) : SendActivityNotificationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendActivityNotificationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/tags/count/countRequestBuilder.ts b/src/me/joinedTeams/item/tags/count/countRequestBuilder.ts deleted file mode 100644 index 8ebe6f98957..00000000000 --- a/src/me/joinedTeams/item/tags/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/tags/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/tags/count/index.ts b/src/me/joinedTeams/item/tags/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/tags/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/tags/index.ts b/src/me/joinedTeams/item/tags/index.ts deleted file mode 100644 index 2702809056c..00000000000 --- a/src/me/joinedTeams/item/tags/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tagsRequestBuilder' diff --git a/src/me/joinedTeams/item/tags/item/index.ts b/src/me/joinedTeams/item/tags/item/index.ts deleted file mode 100644 index aad29eca243..00000000000 --- a/src/me/joinedTeams/item/tags/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamworkTagItemRequestBuilder' diff --git a/src/me/joinedTeams/item/tags/item/members/count/countRequestBuilder.ts b/src/me/joinedTeams/item/tags/item/members/count/countRequestBuilder.ts deleted file mode 100644 index 6b711f501fd..00000000000 --- a/src/me/joinedTeams/item/tags/item/members/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/tags/{teamworkTag%2Did}/members/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/tags/item/members/count/index.ts b/src/me/joinedTeams/item/tags/item/members/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/joinedTeams/item/tags/item/members/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/joinedTeams/item/tags/item/members/index.ts b/src/me/joinedTeams/item/tags/item/members/index.ts deleted file mode 100644 index 3f3fccb5478..00000000000 --- a/src/me/joinedTeams/item/tags/item/members/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './membersRequestBuilder' diff --git a/src/me/joinedTeams/item/tags/item/members/item/index.ts b/src/me/joinedTeams/item/tags/item/members/item/index.ts deleted file mode 100644 index cb47c694719..00000000000 --- a/src/me/joinedTeams/item/tags/item/members/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamworkTagMemberItemRequestBuilder' diff --git a/src/me/joinedTeams/item/tags/item/members/item/teamworkTagMemberItemRequestBuilder.ts b/src/me/joinedTeams/item/tags/item/members/item/teamworkTagMemberItemRequestBuilder.ts deleted file mode 100644 index 667d763cec8..00000000000 --- a/src/me/joinedTeams/item/tags/item/members/item/teamworkTagMemberItemRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createTeamworkTagMemberFromDiscriminatorValue, deserializeIntoTeamworkTagMember, serializeTeamworkTagMember, type TeamworkTagMember } from '../../../../../../../models/teamworkTagMember'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamworkTagMemberItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the members property of the microsoft.graph.teamworkTag entity. - */ -export class TeamworkTagMemberItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamworkTagMemberItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/tags/{teamworkTag%2Did}/members/{teamworkTagMember%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a member from a standard tag in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/teamworktagmember-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the properties and relationships of a member of a standard tag in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTagMember - * @see {@link https://learn.microsoft.com/graph/api/teamworktagmember-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property members in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTagMember - */ - public patch(body: TeamworkTagMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a member from a standard tag in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the properties and relationships of a member of a standard tag in a team. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamworkTagMemberItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property members in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamworkTagMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamworkTagMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamworkTagMemberItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamworkTagMemberItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamworkTagMemberItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamworkTagMemberItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/tags/item/members/membersRequestBuilder.ts b/src/me/joinedTeams/item/tags/item/members/membersRequestBuilder.ts deleted file mode 100644 index 98241e83969..00000000000 --- a/src/me/joinedTeams/item/tags/item/members/membersRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamworkTagMemberCollectionResponse } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTeamworkTagMemberFromDiscriminatorValue, deserializeIntoTeamworkTagMember, serializeTeamworkTagMember, type TeamworkTagMember } from '../../../../../../models/teamworkTagMember'; -import { createTeamworkTagMemberCollectionResponseFromDiscriminatorValue } from '../../../../../../models/teamworkTagMemberCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamworkTagMemberItemRequestBuilder } from './item/teamworkTagMemberItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MembersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the members property of the microsoft.graph.teamworkTag entity. - */ -export class MembersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.teamworkTag entity. - * @param teamworkTagMemberId The unique identifier of teamworkTagMember - * @returns a TeamworkTagMemberItemRequestBuilder - */ - public byTeamworkTagMemberId(teamworkTagMemberId: string) : TeamworkTagMemberItemRequestBuilder { - if(!teamworkTagMemberId) throw new Error("teamworkTagMemberId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamworkTagMember%2Did"] = teamworkTagMemberId - return new TeamworkTagMemberItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MembersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/tags/{teamworkTag%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of the members of a standard tag in a team and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTagMemberCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/teamworktagmember-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagMemberCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new teamworkTagMember object in a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTagMember - * @see {@link https://learn.microsoft.com/graph/api/teamworktagmember-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamworkTagMember, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagMemberFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the members of a standard tag in a team and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, membersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new teamworkTagMember object in a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamworkTagMember, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamworkTagMember); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a membersRequestBuilder - */ - public withUrl(rawUrl: string) : MembersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MembersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const membersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/tags/item/teamworkTagItemRequestBuilder.ts b/src/me/joinedTeams/item/tags/item/teamworkTagItemRequestBuilder.ts deleted file mode 100644 index 1063bcf3eee..00000000000 --- a/src/me/joinedTeams/item/tags/item/teamworkTagItemRequestBuilder.ts +++ /dev/null @@ -1,137 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamworkTagFromDiscriminatorValue, deserializeIntoTeamworkTag, serializeTeamworkTag, type TeamworkTag } from '../../../../../models/teamworkTag'; -import { MembersRequestBuilder } from './members/membersRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamworkTagItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tags property of the microsoft.graph.team entity. - */ -export class TeamworkTagItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the members property of the microsoft.graph.teamworkTag entity. - */ - public get members(): MembersRequestBuilder { - return new MembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamworkTagItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/tags/{teamworkTag%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a tag object permanently. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/teamworktag-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a tag object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTag - * @see {@link https://learn.microsoft.com/graph/api/teamworktag-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a tag object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTag - * @see {@link https://learn.microsoft.com/graph/api/teamworktag-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TeamworkTag, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a tag object permanently. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a tag object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamworkTagItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a tag object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TeamworkTag, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamworkTag); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamworkTagItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamworkTagItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamworkTagItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamworkTagItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/tags/tagsRequestBuilder.ts b/src/me/joinedTeams/item/tags/tagsRequestBuilder.ts deleted file mode 100644 index a326853aaaf..00000000000 --- a/src/me/joinedTeams/item/tags/tagsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamworkTagCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamworkTagFromDiscriminatorValue, deserializeIntoTeamworkTag, serializeTeamworkTag, type TeamworkTag } from '../../../../models/teamworkTag'; -import { createTeamworkTagCollectionResponseFromDiscriminatorValue } from '../../../../models/teamworkTagCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { TeamworkTagItemRequestBuilder } from './item/teamworkTagItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TagsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tags property of the microsoft.graph.team entity. - */ -export class TagsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tags property of the microsoft.graph.team entity. - * @param teamworkTagId The unique identifier of teamworkTag - * @returns a TeamworkTagItemRequestBuilder - */ - public byTeamworkTagId(teamworkTagId: string) : TeamworkTagItemRequestBuilder { - if(!teamworkTagId) throw new Error("teamworkTagId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["teamworkTag%2Did"] = teamworkTagId - return new TeamworkTagItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TagsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/tags{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of the tag objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTagCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/teamworktag-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a standard tag for members in a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamworkTag - * @see {@link https://learn.microsoft.com/graph/api/teamworktag-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: TeamworkTag, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamworkTagFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the tag objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tagsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a standard tag for members in a team. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TeamworkTag, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeamworkTag); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tagsRequestBuilder - */ - public withUrl(rawUrl: string) : TagsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TagsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tagsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/teamItemRequestBuilder.ts b/src/me/joinedTeams/item/teamItemRequestBuilder.ts deleted file mode 100644 index c3204fe3b9a..00000000000 --- a/src/me/joinedTeams/item/teamItemRequestBuilder.ts +++ /dev/null @@ -1,253 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createTeamFromDiscriminatorValue, deserializeIntoTeam, serializeTeam, type Team } from '../../../models/team'; -import { AllChannelsRequestBuilder } from './allChannels/allChannelsRequestBuilder'; -import { ArchiveRequestBuilder } from './archive/archiveRequestBuilder'; -import { ChannelsRequestBuilder } from './channels/channelsRequestBuilder'; -import { CloneRequestBuilder } from './clone/cloneRequestBuilder'; -import { CompleteMigrationRequestBuilder } from './completeMigration/completeMigrationRequestBuilder'; -import { GroupRequestBuilder } from './group/groupRequestBuilder'; -import { IncomingChannelsRequestBuilder } from './incomingChannels/incomingChannelsRequestBuilder'; -import { InstalledAppsRequestBuilder } from './installedApps/installedAppsRequestBuilder'; -import { MembersRequestBuilder } from './members/membersRequestBuilder'; -import { OperationsRequestBuilder } from './operations/operationsRequestBuilder'; -import { PermissionGrantsRequestBuilder } from './permissionGrants/permissionGrantsRequestBuilder'; -import { PhotoRequestBuilder } from './photo/photoRequestBuilder'; -import { PrimaryChannelRequestBuilder } from './primaryChannel/primaryChannelRequestBuilder'; -import { ScheduleRequestBuilder } from './schedule/scheduleRequestBuilder'; -import { SendActivityNotificationRequestBuilder } from './sendActivityNotification/sendActivityNotificationRequestBuilder'; -import { TagsRequestBuilder } from './tags/tagsRequestBuilder'; -import { TemplateRequestBuilder } from './template/templateRequestBuilder'; -import { UnarchiveRequestBuilder } from './unarchive/unarchiveRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the joinedTeams property of the microsoft.graph.user entity. - */ -export class TeamItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the allChannels property of the microsoft.graph.team entity. - */ - public get allChannels(): AllChannelsRequestBuilder { - return new AllChannelsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the archive method. - */ - public get archive(): ArchiveRequestBuilder { - return new ArchiveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the channels property of the microsoft.graph.team entity. - */ - public get channels(): ChannelsRequestBuilder { - return new ChannelsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the clone method. - */ - public get clone(): CloneRequestBuilder { - return new CloneRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the completeMigration method. - */ - public get completeMigration(): CompleteMigrationRequestBuilder { - return new CompleteMigrationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the group property of the microsoft.graph.team entity. - */ - public get group(): GroupRequestBuilder { - return new GroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the incomingChannels property of the microsoft.graph.team entity. - */ - public get incomingChannels(): IncomingChannelsRequestBuilder { - return new IncomingChannelsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the installedApps property of the microsoft.graph.team entity. - */ - public get installedApps(): InstalledAppsRequestBuilder { - return new InstalledAppsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the members property of the microsoft.graph.team entity. - */ - public get members(): MembersRequestBuilder { - return new MembersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the operations property of the microsoft.graph.team entity. - */ - public get operations(): OperationsRequestBuilder { - return new OperationsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the permissionGrants property of the microsoft.graph.team entity. - */ - public get permissionGrants(): PermissionGrantsRequestBuilder { - return new PermissionGrantsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the photo property of the microsoft.graph.team entity. - */ - public get photo(): PhotoRequestBuilder { - return new PhotoRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the primaryChannel property of the microsoft.graph.team entity. - */ - public get primaryChannel(): PrimaryChannelRequestBuilder { - return new PrimaryChannelRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the schedule property of the microsoft.graph.team entity. - */ - public get schedule(): ScheduleRequestBuilder { - return new ScheduleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the sendActivityNotification method. - */ - public get sendActivityNotification(): SendActivityNotificationRequestBuilder { - return new SendActivityNotificationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tags property of the microsoft.graph.team entity. - */ - public get tags(): TagsRequestBuilder { - return new TagsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the template property of the microsoft.graph.team entity. - */ - public get template(): TemplateRequestBuilder { - return new TemplateRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the unarchive method. - */ - public get unarchive(): UnarchiveRequestBuilder { - return new UnarchiveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property joinedTeams for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get joinedTeams from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Team - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property joinedTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Team - */ - public patch(body: Team, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property joinedTeams for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get joinedTeams from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property joinedTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Team, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeam); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TeamItemRequestBuilder - */ - public withUrl(rawUrl: string) : TeamItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/template/index.ts b/src/me/joinedTeams/item/template/index.ts deleted file mode 100644 index 130355287c9..00000000000 --- a/src/me/joinedTeams/item/template/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './templateRequestBuilder' diff --git a/src/me/joinedTeams/item/template/templateRequestBuilder.ts b/src/me/joinedTeams/item/template/templateRequestBuilder.ts deleted file mode 100644 index d9a1736f83b..00000000000 --- a/src/me/joinedTeams/item/template/templateRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsTemplate } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTeamsTemplateFromDiscriminatorValue } from '../../../../models/teamsTemplate'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TemplateRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the template property of the microsoft.graph.team entity. - */ -export class TemplateRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TemplateRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/template{?%24select,%24expand}"); - }; - /** - * The template this team was created from. See available templates. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsTemplate - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsTemplateFromDiscriminatorValue, errorMapping); - }; - /** - * The template this team was created from. See available templates. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, templateRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a templateRequestBuilder - */ - public withUrl(rawUrl: string) : TemplateRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TemplateRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const templateRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/item/unarchive/unarchiveRequestBuilder.ts b/src/me/joinedTeams/item/unarchive/unarchiveRequestBuilder.ts deleted file mode 100644 index 56e9c5c1902..00000000000 --- a/src/me/joinedTeams/item/unarchive/unarchiveRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the unarchive method. - */ -export class UnarchiveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UnarchiveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams/{team%2Did}/unarchive"); - }; - /** - * Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/team-unarchive?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Restore an archived team. This restores users' ability to send messages and edit the team, abiding by tenant and team settings. A Team is archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which may occur subsequent to a response from this API. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a unarchiveRequestBuilder - */ - public withUrl(rawUrl: string) : UnarchiveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UnarchiveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/joinedTeams/joinedTeamsRequestBuilder.ts b/src/me/joinedTeams/joinedTeamsRequestBuilder.ts deleted file mode 100644 index 4f811e6a845..00000000000 --- a/src/me/joinedTeams/joinedTeamsRequestBuilder.ts +++ /dev/null @@ -1,161 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createTeamFromDiscriminatorValue, deserializeIntoTeam, serializeTeam, type Team } from '../../models/team'; -import { createTeamCollectionResponseFromDiscriminatorValue } from '../../models/teamCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GetAllMessagesRequestBuilder } from './getAllMessages/getAllMessagesRequestBuilder'; -import { TeamItemRequestBuilder } from './item/teamItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface JoinedTeamsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the joinedTeams property of the microsoft.graph.user entity. - */ -export class JoinedTeamsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getAllMessages method. - */ - public get getAllMessages(): GetAllMessagesRequestBuilder { - return new GetAllMessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the joinedTeams property of the microsoft.graph.user entity. - * @param teamId The unique identifier of team - * @returns a TeamItemRequestBuilder - */ - public byTeamId(teamId: string) : TeamItemRequestBuilder { - if(!teamId) throw new Error("teamId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["team%2Did"] = teamId - return new TeamItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new JoinedTeamsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/joinedTeams{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the teams in Microsoft Teams that the user is a direct member of. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-joinedteams?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to joinedTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Team - */ - public post(body: Team, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamFromDiscriminatorValue, errorMapping); - }; - /** - * Get the teams in Microsoft Teams that the user is a direct member of. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, joinedTeamsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to joinedTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Team, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTeam); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a joinedTeamsRequestBuilder - */ - public withUrl(rawUrl: string) : JoinedTeamsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new JoinedTeamsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const joinedTeamsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/licenseDetails/count/countRequestBuilder.ts b/src/me/licenseDetails/count/countRequestBuilder.ts deleted file mode 100644 index 65d33e6f306..00000000000 --- a/src/me/licenseDetails/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/licenseDetails/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/licenseDetails/count/index.ts b/src/me/licenseDetails/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/licenseDetails/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/licenseDetails/index.ts b/src/me/licenseDetails/index.ts deleted file mode 100644 index 2b55883aa39..00000000000 --- a/src/me/licenseDetails/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './licenseDetailsRequestBuilder' diff --git a/src/me/licenseDetails/item/index.ts b/src/me/licenseDetails/item/index.ts deleted file mode 100644 index 848669057e5..00000000000 --- a/src/me/licenseDetails/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './licenseDetailsItemRequestBuilder' diff --git a/src/me/licenseDetails/item/licenseDetailsItemRequestBuilder.ts b/src/me/licenseDetails/item/licenseDetailsItemRequestBuilder.ts deleted file mode 100644 index bab8fd8b4d7..00000000000 --- a/src/me/licenseDetails/item/licenseDetailsItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createLicenseDetailsFromDiscriminatorValue, deserializeIntoLicenseDetails, serializeLicenseDetails, type LicenseDetails } from '../../../models/licenseDetails'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LicenseDetailsItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the licenseDetails property of the microsoft.graph.user entity. - */ -export class LicenseDetailsItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LicenseDetailsItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/licenseDetails/{licenseDetails%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property licenseDetails for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * A collection of this user's license details. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LicenseDetails - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLicenseDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property licenseDetails in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LicenseDetails - */ - public patch(body: LicenseDetails, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLicenseDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property licenseDetails for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * A collection of this user's license details. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, licenseDetailsItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property licenseDetails in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: LicenseDetails, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeLicenseDetails); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a LicenseDetailsItemRequestBuilder - */ - public withUrl(rawUrl: string) : LicenseDetailsItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LicenseDetailsItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const licenseDetailsItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/licenseDetails/licenseDetailsRequestBuilder.ts b/src/me/licenseDetails/licenseDetailsRequestBuilder.ts deleted file mode 100644 index a7374ff296a..00000000000 --- a/src/me/licenseDetails/licenseDetailsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type LicenseDetailsCollectionResponse } from '../../models/'; -import { createLicenseDetailsFromDiscriminatorValue, deserializeIntoLicenseDetails, serializeLicenseDetails, type LicenseDetails } from '../../models/licenseDetails'; -import { createLicenseDetailsCollectionResponseFromDiscriminatorValue } from '../../models/licenseDetailsCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { LicenseDetailsItemRequestBuilder } from './item/licenseDetailsItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LicenseDetailsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the licenseDetails property of the microsoft.graph.user entity. - */ -export class LicenseDetailsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the licenseDetails property of the microsoft.graph.user entity. - * @param licenseDetailsId The unique identifier of licenseDetails - * @returns a LicenseDetailsItemRequestBuilder - */ - public byLicenseDetailsId(licenseDetailsId: string) : LicenseDetailsItemRequestBuilder { - if(!licenseDetailsId) throw new Error("licenseDetailsId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["licenseDetails%2Did"] = licenseDetailsId - return new LicenseDetailsItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new LicenseDetailsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/licenseDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LicenseDetailsCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-licensedetails?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLicenseDetailsCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to licenseDetails for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LicenseDetails - */ - public post(body: LicenseDetails, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLicenseDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, licenseDetailsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to licenseDetails for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: LicenseDetails, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeLicenseDetails); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a licenseDetailsRequestBuilder - */ - public withUrl(rawUrl: string) : LicenseDetailsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LicenseDetailsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const licenseDetailsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/count/countRequestBuilder.ts b/src/me/mailFolders/count/countRequestBuilder.ts deleted file mode 100644 index d0c9a833d02..00000000000 --- a/src/me/mailFolders/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/count/index.ts b/src/me/mailFolders/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/delta/deltaRequestBuilder.ts b/src/me/mailFolders/delta/deltaRequestBuilder.ts deleted file mode 100644 index 889e0761199..00000000000 --- a/src/me/mailFolders/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../models/baseDeltaFunctionResponse'; -import { createMailFolderFromDiscriminatorValue, serializeMailFolder, type MailFolder } from '../../../models/mailFolder'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: MailFolder[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createMailFolderFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeMailFolder); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/delta/index.ts b/src/me/mailFolders/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/mailFolders/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/mailFolders/index.ts b/src/me/mailFolders/index.ts deleted file mode 100644 index a050042826a..00000000000 --- a/src/me/mailFolders/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './mailFoldersRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/childFoldersRequestBuilder.ts b/src/me/mailFolders/item/childFolders/childFoldersRequestBuilder.ts deleted file mode 100644 index 85b496c5109..00000000000 --- a/src/me/mailFolders/item/childFolders/childFoldersRequestBuilder.ts +++ /dev/null @@ -1,161 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MailFolderCollectionResponse } from '../../../../models/'; -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../../models/mailFolder'; -import { createMailFolderCollectionResponseFromDiscriminatorValue } from '../../../../models/mailFolderCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { MailFolderItemRequestBuilder } from './item/mailFolderItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChildFoldersRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Expand related entities - */ - expand?: string[]; - /** - * Filter items by property values - */ - filter?: string; - /** - * Include Hidden Folders - */ - includeHiddenFolders?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the childFolders property of the microsoft.graph.mailFolder entity. - */ -export class ChildFoldersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the childFolders property of the microsoft.graph.mailFolder entity. - * @param mailFolderId1 The unique identifier of mailFolder - * @returns a MailFolderItemRequestBuilder - */ - public byMailFolderId1(mailFolderId1: string) : MailFolderItemRequestBuilder { - if(!mailFolderId1) throw new Error("mailFolderId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["mailFolder%2Did1"] = mailFolderId1 - return new MailFolderItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ChildFoldersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders{?includeHiddenFolders*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of child folders in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolderCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-childfolders?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new mailSearchFolder in the specified user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailsearchfolder-post?view=graph-rest-1.0|Find more info here} - */ - public post(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of child folders in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, childFoldersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new mailSearchFolder in the specified user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMailFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a childFoldersRequestBuilder - */ - public withUrl(rawUrl: string) : ChildFoldersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChildFoldersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const childFoldersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/count/countRequestBuilder.ts b/src/me/mailFolders/item/childFolders/count/countRequestBuilder.ts deleted file mode 100644 index 859fa9485e6..00000000000 --- a/src/me/mailFolders/item/childFolders/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/count/index.ts b/src/me/mailFolders/item/childFolders/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/childFolders/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/delta/deltaRequestBuilder.ts b/src/me/mailFolders/item/childFolders/delta/deltaRequestBuilder.ts deleted file mode 100644 index f8fde569039..00000000000 --- a/src/me/mailFolders/item/childFolders/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,119 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createMailFolderFromDiscriminatorValue, serializeMailFolder, type MailFolder } from '../../../../../models/mailFolder'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: MailFolder[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createMailFolderFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeMailFolder); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of mail folders that have been added, deleted, or removed from the user's mailbox. A delta function call for mail folders in a mailbox is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls,you can query for incremental changes in the mail folders. This allows you to maintain and synchronizea local store of a user's mail folders without having to fetch all the mail folders of that mailbox from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/delta/index.ts b/src/me/mailFolders/item/childFolders/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/mailFolders/item/childFolders/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/index.ts b/src/me/mailFolders/item/childFolders/index.ts deleted file mode 100644 index f1b45c76176..00000000000 --- a/src/me/mailFolders/item/childFolders/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './childFoldersRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/copy/copyRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/copy/copyRequestBuilder.ts deleted file mode 100644 index 85e94f0b5a6..00000000000 --- a/src/me/mailFolders/item/childFolders/item/copy/copyRequestBuilder.ts +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../../../../models/mailFolder'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function createCopyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyPostRequestBody; -} -export function deserializeIntoCopyPostRequestBody(copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : Record void> { - return { - "destinationId": n => { copyPostRequestBody.destinationId = n.getStringValue(); }, - } -} -export function serializeCopyPostRequestBody(writer: SerializationWriter, copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : void { - writer.writeStringValue("DestinationId", copyPostRequestBody.destinationId); - writer.writeAdditionalData(copyPostRequestBody.additionalData); -} -/** - * Provides operations to call the copy method. - */ -export class CopyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/copy"); - }; - /** - * Copy a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-copy?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyRequestBuilder - */ - public withUrl(rawUrl: string) : CopyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/copy/index.ts b/src/me/mailFolders/item/childFolders/item/copy/index.ts deleted file mode 100644 index 2d08e5c40b9..00000000000 --- a/src/me/mailFolders/item/childFolders/item/copy/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/index.ts b/src/me/mailFolders/item/childFolders/item/index.ts deleted file mode 100644 index a5dc3120722..00000000000 --- a/src/me/mailFolders/item/childFolders/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './mailFolderItemRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/mailFolderItemRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/mailFolderItemRequestBuilder.ts deleted file mode 100644 index 03339953cf0..00000000000 --- a/src/me/mailFolders/item/childFolders/item/mailFolderItemRequestBuilder.ts +++ /dev/null @@ -1,159 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../../../models/mailFolder'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CopyRequestBuilder } from './copy/copyRequestBuilder'; -import { MessageRulesRequestBuilder } from './messageRules/messageRulesRequestBuilder'; -import { MessagesRequestBuilder } from './messages/messagesRequestBuilder'; -import { MoveRequestBuilder } from './move/moveRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MailFolderItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Include Hidden Folders - */ - includeHiddenFolders?: string; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the childFolders property of the microsoft.graph.mailFolder entity. - */ -export class MailFolderItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the copy method. - */ - public get copy(): CopyRequestBuilder { - return new CopyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - */ - public get messageRules(): MessageRulesRequestBuilder { - return new MessageRulesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - */ - public get messages(): MessagesRequestBuilder { - return new MessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the move method. - */ - public get move(): MoveRequestBuilder { - return new MoveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MailFolderItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}{?includeHiddenFolders*,%24select,%24expand}"); - }; - /** - * Delete navigation property childFolders for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of child folders in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property childFolders in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - */ - public patch(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property childFolders for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of child folders in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, mailFolderItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property childFolders in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMailFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MailFolderItemRequestBuilder - */ - public withUrl(rawUrl: string) : MailFolderItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MailFolderItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const mailFolderItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messageRules/count/countRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messageRules/count/countRequestBuilder.ts deleted file mode 100644 index 096eb893a2c..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messageRules/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messageRules/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messageRules/count/index.ts b/src/me/mailFolders/item/childFolders/item/messageRules/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messageRules/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messageRules/index.ts b/src/me/mailFolders/item/childFolders/item/messageRules/index.ts deleted file mode 100644 index 38ab8d47a74..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messageRules/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageRulesRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messageRules/item/index.ts b/src/me/mailFolders/item/childFolders/item/messageRules/item/index.ts deleted file mode 100644 index 53274d05aa1..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messageRules/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageRuleItemRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messageRules/item/messageRuleItemRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messageRules/item/messageRuleItemRequestBuilder.ts deleted file mode 100644 index ce87a97d367..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messageRules/item/messageRuleItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageRuleFromDiscriminatorValue, deserializeIntoMessageRule, serializeMessageRule, type MessageRule } from '../../../../../../../models/messageRule'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageRuleItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - */ -export class MessageRuleItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MessageRuleItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messageRules/{messageRule%2Did}{?%24select}"); - }; - /** - * Delete the specified messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/messagerule-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the properties and relationships of a messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRule - * @see {@link https://learn.microsoft.com/graph/api/messagerule-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleFromDiscriminatorValue, errorMapping); - }; - /** - * Change writable properties on a messageRule object and save the changes. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRule - * @see {@link https://learn.microsoft.com/graph/api/messagerule-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleFromDiscriminatorValue, errorMapping); - }; - /** - * Delete the specified messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the properties and relationships of a messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageRuleItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Change writable properties on a messageRule object and save the changes. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessageRule); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MessageRuleItemRequestBuilder - */ - public withUrl(rawUrl: string) : MessageRuleItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageRuleItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageRuleItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messageRules/messageRulesRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messageRules/messageRulesRequestBuilder.ts deleted file mode 100644 index dea83e292cd..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messageRules/messageRulesRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MessageRuleCollectionResponse } from '../../../../../../models/'; -import { createMessageRuleFromDiscriminatorValue, deserializeIntoMessageRule, serializeMessageRule, type MessageRule } from '../../../../../../models/messageRule'; -import { createMessageRuleCollectionResponseFromDiscriminatorValue } from '../../../../../../models/messageRuleCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { MessageRuleItemRequestBuilder } from './item/messageRuleItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageRulesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - */ -export class MessageRulesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - * @param messageRuleId The unique identifier of messageRule - * @returns a MessageRuleItemRequestBuilder - */ - public byMessageRuleId(messageRuleId: string) : MessageRuleItemRequestBuilder { - if(!messageRuleId) throw new Error("messageRuleId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["messageRule%2Did"] = messageRuleId - return new MessageRuleItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessageRulesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messageRules{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get all the messageRule objects defined for the user's inbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRuleCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-messagerules?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRule - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-post-messagerules?view=graph-rest-1.0|Find more info here} - */ - public post(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleFromDiscriminatorValue, errorMapping); - }; - /** - * Get all the messageRule objects defined for the user's inbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageRulesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessageRule); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messageRulesRequestBuilder - */ - public withUrl(rawUrl: string) : MessageRulesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageRulesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageRulesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/count/countRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/count/countRequestBuilder.ts deleted file mode 100644 index dd2040b4e01..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/count/index.ts b/src/me/mailFolders/item/childFolders/item/messages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/delta/deltaRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/delta/deltaRequestBuilder.ts deleted file mode 100644 index 90a3b0c0791..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../../models/baseDeltaFunctionResponse'; -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Message[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * A custom query option to filter the delta response based on the type of change. Supported values are created, updated or deleted. - */ - changeType?: string; - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/delta(){?changeType*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/message-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/delta/index.ts b/src/me/mailFolders/item/childFolders/item/messages/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/index.ts b/src/me/mailFolders/item/childFolders/item/messages/index.ts deleted file mode 100644 index 9f6fd0b319b..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messagesRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/attachmentsRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 6329a24265f..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,147 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/attachments{?%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to a message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/message-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to a message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/count/countRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index baae5ea2381..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/count/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 1f1c7d384fc..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/createUploadSession/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 1438ce0069b..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property attachments for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/attachment-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property attachments for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/item/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/copy/copyRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/copy/copyRequestBuilder.ts deleted file mode 100644 index 0cd57478856..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/copy/copyRequestBuilder.ts +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function createCopyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyPostRequestBody; -} -export function deserializeIntoCopyPostRequestBody(copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : Record void> { - return { - "destinationId": n => { copyPostRequestBody.destinationId = n.getStringValue(); }, - } -} -export function serializeCopyPostRequestBody(writer: SerializationWriter, copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : void { - writer.writeStringValue("DestinationId", copyPostRequestBody.destinationId); - writer.writeAdditionalData(copyPostRequestBody.additionalData); -} -/** - * Provides operations to call the copy method. - */ -export class CopyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/copy"); - }; - /** - * Copy a message to a folder within the user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-copy?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a message to a folder within the user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyRequestBuilder - */ - public withUrl(rawUrl: string) : CopyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/copy/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/copy/index.ts deleted file mode 100644 index 2d08e5c40b9..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/copy/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createForward/createForwardRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createForward/createForwardRequestBuilder.ts deleted file mode 100644 index c1215ba3608..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createForward/createForwardRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../models/recipient'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateForwardPostRequestBody; -} -export interface CreateForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function deserializeIntoCreateForwardPostRequestBody(createForwardPostRequestBody: CreateForwardPostRequestBody | undefined = {} as CreateForwardPostRequestBody) : Record void> { - return { - "comment": n => { createForwardPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createForwardPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "toRecipients": n => { createForwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export function serializeCreateForwardPostRequestBody(writer: SerializationWriter, createForwardPostRequestBody: CreateForwardPostRequestBody | undefined = {} as CreateForwardPostRequestBody) : void { - writer.writeStringValue("Comment", createForwardPostRequestBody.comment); - writer.writeObjectValue("Message", createForwardPostRequestBody.message, serializeMessage); - writer.writeCollectionOfObjectValues("ToRecipients", createForwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(createForwardPostRequestBody.additionalData); -} -/** - * Provides operations to call the createForward method. - */ -export class CreateForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/createForward"); - }; - /** - * Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createforward?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createForwardRequestBuilder - */ - public withUrl(rawUrl: string) : CreateForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createForward/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createForward/index.ts deleted file mode 100644 index d6e07309bff..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createForward/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createForwardRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createReply/createReplyRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createReply/createReplyRequestBuilder.ts deleted file mode 100644 index 0e37d2263d6..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createReply/createReplyRequestBuilder.ts +++ /dev/null @@ -1,92 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateReplyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateReplyPostRequestBody; -} -export interface CreateReplyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function deserializeIntoCreateReplyPostRequestBody(createReplyPostRequestBody: CreateReplyPostRequestBody | undefined = {} as CreateReplyPostRequestBody) : Record void> { - return { - "comment": n => { createReplyPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createReplyPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export function serializeCreateReplyPostRequestBody(writer: SerializationWriter, createReplyPostRequestBody: CreateReplyPostRequestBody | undefined = {} as CreateReplyPostRequestBody) : void { - writer.writeStringValue("Comment", createReplyPostRequestBody.comment); - writer.writeObjectValue("Message", createReplyPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(createReplyPostRequestBody.additionalData); -} -/** - * Provides operations to call the createReply method. - */ -export class CreateReplyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateReplyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/createReply"); - }; - /** - * Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createreply?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateReplyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createReplyRequestBuilder - */ - public withUrl(rawUrl: string) : CreateReplyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateReplyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createReply/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createReply/index.ts deleted file mode 100644 index 28777a90a8e..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createReply/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createReplyRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/createReplyAllPostRequestBody.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/createReplyAllPostRequestBody.ts deleted file mode 100644 index c4dd8bedee6..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/createReplyAllPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateReplyAllPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateReplyAllPostRequestBody; -} -export interface CreateReplyAllPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function deserializeIntoCreateReplyAllPostRequestBody(createReplyAllPostRequestBody: CreateReplyAllPostRequestBody | undefined = {} as CreateReplyAllPostRequestBody) : Record void> { - return { - "comment": n => { createReplyAllPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createReplyAllPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export function serializeCreateReplyAllPostRequestBody(writer: SerializationWriter, createReplyAllPostRequestBody: CreateReplyAllPostRequestBody | undefined = {} as CreateReplyAllPostRequestBody) : void { - writer.writeStringValue("Comment", createReplyAllPostRequestBody.comment); - writer.writeObjectValue("Message", createReplyAllPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(createReplyAllPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/createReplyAllRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/createReplyAllRequestBuilder.ts deleted file mode 100644 index 79a957729bf..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/createReplyAllRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCreateReplyAllPostRequestBody, serializeCreateReplyAllPostRequestBody, type CreateReplyAllPostRequestBody } from './createReplyAllPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the createReplyAll method. - */ -export class CreateReplyAllRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateReplyAllRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/createReplyAll"); - }; - /** - * Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createreplyall?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateReplyAllPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createReplyAllRequestBuilder - */ - public withUrl(rawUrl: string) : CreateReplyAllRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateReplyAllRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/index.ts deleted file mode 100644 index b1f151ae084..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/createReplyAll/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './createReplyAllPostRequestBody' -export * from './createReplyAllRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/count/countRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index a5b8bbf968c..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/count/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/extensionsRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 8c5fc3db0f0..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 591ff603657..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/item/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/forward/forwardPostRequestBody.ts b/src/me/mailFolders/item/childFolders/item/messages/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index ca87bcf82e6..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,44 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "message": n => { forwardPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeObjectValue("Message", forwardPostRequestBody.message, serializeMessage); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/forward/forwardRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 42b1c6fd456..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/forward"); - }; - /** - * Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/forward/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/index.ts deleted file mode 100644 index 9b0117e0ff1..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageItemRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/messageItemRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/messageItemRequestBuilder.ts deleted file mode 100644 index edc3fb365a8..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/messageItemRequestBuilder.ts +++ /dev/null @@ -1,211 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CopyRequestBuilder } from './copy/copyRequestBuilder'; -import { CreateForwardRequestBuilder } from './createForward/createForwardRequestBuilder'; -import { CreateReplyRequestBuilder } from './createReply/createReplyRequestBuilder'; -import { CreateReplyAllRequestBuilder } from './createReplyAll/createReplyAllRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { MoveRequestBuilder } from './move/moveRequestBuilder'; -import { ReplyRequestBuilder } from './reply/replyRequestBuilder'; -import { ReplyAllRequestBuilder } from './replyAll/replyAllRequestBuilder'; -import { SendRequestBuilder } from './send/sendRequestBuilder'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - */ -export class MessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copy method. - */ - public get copy(): CopyRequestBuilder { - return new CopyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createForward method. - */ - public get createForward(): CreateForwardRequestBuilder { - return new CreateForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createReply method. - */ - public get createReply(): CreateReplyRequestBuilder { - return new CreateReplyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createReplyAll method. - */ - public get createReplyAll(): CreateReplyAllRequestBuilder { - return new CreateReplyAllRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the move method. - */ - public get move(): MoveRequestBuilder { - return new MoveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the reply method. - */ - public get reply(): ReplyRequestBuilder { - return new ReplyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the replyAll method. - */ - public get replyAll(): ReplyAllRequestBuilder { - return new ReplyAllRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the send method. - */ - public get send(): SendRequestBuilder { - return new SendRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of messages in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property messages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - */ - public patch(body: Message, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of messages in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property messages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Message, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : MessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/move/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/move/index.ts deleted file mode 100644 index 820dabdd52a..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/move/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './movePostRequestBody' -export * from './moveRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/move/movePostRequestBody.ts b/src/me/mailFolders/item/childFolders/item/messages/item/move/movePostRequestBody.ts deleted file mode 100644 index 93a1c3bb520..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/move/movePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMovePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMovePostRequestBody; -} -export function deserializeIntoMovePostRequestBody(movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : Record void> { - return { - "destinationId": n => { movePostRequestBody.destinationId = n.getStringValue(); }, - } -} -export interface MovePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function serializeMovePostRequestBody(writer: SerializationWriter, movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : void { - writer.writeStringValue("DestinationId", movePostRequestBody.destinationId); - writer.writeAdditionalData(movePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/move/moveRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/move/moveRequestBuilder.ts deleted file mode 100644 index f2c45a49eab..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/move/moveRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoMovePostRequestBody, serializeMovePostRequestBody, type MovePostRequestBody } from './movePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the move method. - */ -export class MoveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MoveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/move"); - }; - /** - * Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-move?view=graph-rest-1.0|Find more info here} - */ - public post(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMovePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a moveRequestBuilder - */ - public withUrl(rawUrl: string) : MoveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MoveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/reply/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/reply/index.ts deleted file mode 100644 index f62039cf265..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/reply/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './replyPostRequestBody' -export * from './replyRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/reply/replyPostRequestBody.ts b/src/me/mailFolders/item/childFolders/item/messages/item/reply/replyPostRequestBody.ts deleted file mode 100644 index 2086d16b3f1..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/reply/replyPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReplyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReplyPostRequestBody; -} -export function deserializeIntoReplyPostRequestBody(replyPostRequestBody: ReplyPostRequestBody | undefined = {} as ReplyPostRequestBody) : Record void> { - return { - "comment": n => { replyPostRequestBody.comment = n.getStringValue(); }, - "message": n => { replyPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export interface ReplyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function serializeReplyPostRequestBody(writer: SerializationWriter, replyPostRequestBody: ReplyPostRequestBody | undefined = {} as ReplyPostRequestBody) : void { - writer.writeStringValue("Comment", replyPostRequestBody.comment); - writer.writeObjectValue("Message", replyPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(replyPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/reply/replyRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/reply/replyRequestBuilder.ts deleted file mode 100644 index 3dadb08f33d..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/reply/replyRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoReplyPostRequestBody, serializeReplyPostRequestBody, type ReplyPostRequestBody } from './replyPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the reply method. - */ -export class ReplyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReplyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/reply"); - }; - /** - * Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-reply?view=graph-rest-1.0|Find more info here} - */ - public post(body: ReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReplyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a replyRequestBuilder - */ - public withUrl(rawUrl: string) : ReplyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReplyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/replyAll/index.ts b/src/me/mailFolders/item/childFolders/item/messages/item/replyAll/index.ts deleted file mode 100644 index 34c4d8e1dbf..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/replyAll/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './replyAllRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/replyAll/replyAllRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/replyAll/replyAllRequestBuilder.ts deleted file mode 100644 index a35fb5743f0..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/replyAll/replyAllRequestBuilder.ts +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../../../models/message'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReplyAllPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReplyAllPostRequestBody; -} -export function deserializeIntoReplyAllPostRequestBody(replyAllPostRequestBody: ReplyAllPostRequestBody | undefined = {} as ReplyAllPostRequestBody) : Record void> { - return { - "comment": n => { replyAllPostRequestBody.comment = n.getStringValue(); }, - "message": n => { replyAllPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export interface ReplyAllPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function serializeReplyAllPostRequestBody(writer: SerializationWriter, replyAllPostRequestBody: ReplyAllPostRequestBody | undefined = {} as ReplyAllPostRequestBody) : void { - writer.writeStringValue("Comment", replyAllPostRequestBody.comment); - writer.writeObjectValue("Message", replyAllPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(replyAllPostRequestBody.additionalData); -} -/** - * Provides operations to call the replyAll method. - */ -export class ReplyAllRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReplyAllRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/replyAll"); - }; - /** - * Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-replyall?view=graph-rest-1.0|Find more info here} - */ - public post(body: ReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReplyAllPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a replyAllRequestBuilder - */ - public withUrl(rawUrl: string) : ReplyAllRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReplyAllRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/send/sendRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/send/sendRequestBuilder.ts deleted file mode 100644 index 83af4e46a7c..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/send/sendRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the send method. - */ -export class SendRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/send"); - }; - /** - * Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-send?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendRequestBuilder - */ - public withUrl(rawUrl: string) : SendRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/item/value/contentRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/item/value/contentRequestBuilder.ts deleted file mode 100644 index f5e421cbf67..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/$value"); - }; - /** - * Get media content for the navigation property messages from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property messages in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property messages from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property messages in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/messages/messagesRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/messages/messagesRequestBuilder.ts deleted file mode 100644 index f2bb24e72fa..00000000000 --- a/src/me/mailFolders/item/childFolders/item/messages/messagesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MessageCollectionResponse } from '../../../../../../models/'; -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../models/message'; -import { createMessageCollectionResponseFromDiscriminatorValue } from '../../../../../../models/messageCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { MessageItemRequestBuilder } from './item/messageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - */ -export class MessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - * @param messageId The unique identifier of message - * @returns a MessageItemRequestBuilder - */ - public byMessageId(messageId: string) : MessageItemRequestBuilder { - if(!messageId) throw new Error("messageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["message%2Did"] = messageId - return new MessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Message in a mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-post-messages?view=graph-rest-1.0|Find more info here} - */ - public post(body: Message, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Message in a mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Message, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messagesRequestBuilder - */ - public withUrl(rawUrl: string) : MessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/move/index.ts b/src/me/mailFolders/item/childFolders/item/move/index.ts deleted file mode 100644 index 820dabdd52a..00000000000 --- a/src/me/mailFolders/item/childFolders/item/move/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './movePostRequestBody' -export * from './moveRequestBuilder' diff --git a/src/me/mailFolders/item/childFolders/item/move/movePostRequestBody.ts b/src/me/mailFolders/item/childFolders/item/move/movePostRequestBody.ts deleted file mode 100644 index 93a1c3bb520..00000000000 --- a/src/me/mailFolders/item/childFolders/item/move/movePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMovePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMovePostRequestBody; -} -export function deserializeIntoMovePostRequestBody(movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : Record void> { - return { - "destinationId": n => { movePostRequestBody.destinationId = n.getStringValue(); }, - } -} -export interface MovePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function serializeMovePostRequestBody(writer: SerializationWriter, movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : void { - writer.writeStringValue("DestinationId", movePostRequestBody.destinationId); - writer.writeAdditionalData(movePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/childFolders/item/move/moveRequestBuilder.ts b/src/me/mailFolders/item/childFolders/item/move/moveRequestBuilder.ts deleted file mode 100644 index 8ba23b2bbbe..00000000000 --- a/src/me/mailFolders/item/childFolders/item/move/moveRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../../../../models/mailFolder'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoMovePostRequestBody, serializeMovePostRequestBody, type MovePostRequestBody } from './movePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the move method. - */ -export class MoveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MoveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/move"); - }; - /** - * Move a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-move?view=graph-rest-1.0|Find more info here} - */ - public post(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Move a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMovePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a moveRequestBuilder - */ - public withUrl(rawUrl: string) : MoveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MoveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/copy/copyRequestBuilder.ts b/src/me/mailFolders/item/copy/copyRequestBuilder.ts deleted file mode 100644 index a5c685c2c82..00000000000 --- a/src/me/mailFolders/item/copy/copyRequestBuilder.ts +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../../models/mailFolder'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function createCopyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyPostRequestBody; -} -export function deserializeIntoCopyPostRequestBody(copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : Record void> { - return { - "destinationId": n => { copyPostRequestBody.destinationId = n.getStringValue(); }, - } -} -export function serializeCopyPostRequestBody(writer: SerializationWriter, copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : void { - writer.writeStringValue("DestinationId", copyPostRequestBody.destinationId); - writer.writeAdditionalData(copyPostRequestBody.additionalData); -} -/** - * Provides operations to call the copy method. - */ -export class CopyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/copy"); - }; - /** - * Copy a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-copy?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyRequestBuilder - */ - public withUrl(rawUrl: string) : CopyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/copy/index.ts b/src/me/mailFolders/item/copy/index.ts deleted file mode 100644 index 2d08e5c40b9..00000000000 --- a/src/me/mailFolders/item/copy/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyRequestBuilder' diff --git a/src/me/mailFolders/item/index.ts b/src/me/mailFolders/item/index.ts deleted file mode 100644 index a5dc3120722..00000000000 --- a/src/me/mailFolders/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './mailFolderItemRequestBuilder' diff --git a/src/me/mailFolders/item/mailFolderItemRequestBuilder.ts b/src/me/mailFolders/item/mailFolderItemRequestBuilder.ts deleted file mode 100644 index 5eb7d756a1f..00000000000 --- a/src/me/mailFolders/item/mailFolderItemRequestBuilder.ts +++ /dev/null @@ -1,169 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../models/mailFolder'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { ChildFoldersRequestBuilder } from './childFolders/childFoldersRequestBuilder'; -import { CopyRequestBuilder } from './copy/copyRequestBuilder'; -import { MessageRulesRequestBuilder } from './messageRules/messageRulesRequestBuilder'; -import { MessagesRequestBuilder } from './messages/messagesRequestBuilder'; -import { MoveRequestBuilder } from './move/moveRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MailFolderItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Include Hidden Folders - */ - includeHiddenFolders?: string; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the mailFolders property of the microsoft.graph.user entity. - */ -export class MailFolderItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the childFolders property of the microsoft.graph.mailFolder entity. - */ - public get childFolders(): ChildFoldersRequestBuilder { - return new ChildFoldersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copy method. - */ - public get copy(): CopyRequestBuilder { - return new CopyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - */ - public get messageRules(): MessageRulesRequestBuilder { - return new MessageRulesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - */ - public get messages(): MessagesRequestBuilder { - return new MessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the move method. - */ - public get move(): MoveRequestBuilder { - return new MoveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MailFolderItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}{?includeHiddenFolders*,%24select,%24expand}"); - }; - /** - * Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The user's mail folders. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of mailfolder object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The user's mail folders. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, mailFolderItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of mailfolder object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMailFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MailFolderItemRequestBuilder - */ - public withUrl(rawUrl: string) : MailFolderItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MailFolderItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const mailFolderItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messageRules/count/countRequestBuilder.ts b/src/me/mailFolders/item/messageRules/count/countRequestBuilder.ts deleted file mode 100644 index dcabdb1c9c8..00000000000 --- a/src/me/mailFolders/item/messageRules/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messageRules/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messageRules/count/index.ts b/src/me/mailFolders/item/messageRules/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/messageRules/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/messageRules/index.ts b/src/me/mailFolders/item/messageRules/index.ts deleted file mode 100644 index 38ab8d47a74..00000000000 --- a/src/me/mailFolders/item/messageRules/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageRulesRequestBuilder' diff --git a/src/me/mailFolders/item/messageRules/item/index.ts b/src/me/mailFolders/item/messageRules/item/index.ts deleted file mode 100644 index 53274d05aa1..00000000000 --- a/src/me/mailFolders/item/messageRules/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageRuleItemRequestBuilder' diff --git a/src/me/mailFolders/item/messageRules/item/messageRuleItemRequestBuilder.ts b/src/me/mailFolders/item/messageRules/item/messageRuleItemRequestBuilder.ts deleted file mode 100644 index d04544d86b9..00000000000 --- a/src/me/mailFolders/item/messageRules/item/messageRuleItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageRuleFromDiscriminatorValue, deserializeIntoMessageRule, serializeMessageRule, type MessageRule } from '../../../../../models/messageRule'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageRuleItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - */ -export class MessageRuleItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MessageRuleItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messageRules/{messageRule%2Did}{?%24select}"); - }; - /** - * Delete the specified messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/messagerule-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the properties and relationships of a messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRule - * @see {@link https://learn.microsoft.com/graph/api/messagerule-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleFromDiscriminatorValue, errorMapping); - }; - /** - * Change writable properties on a messageRule object and save the changes. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRule - * @see {@link https://learn.microsoft.com/graph/api/messagerule-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleFromDiscriminatorValue, errorMapping); - }; - /** - * Delete the specified messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the properties and relationships of a messageRule object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageRuleItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Change writable properties on a messageRule object and save the changes. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessageRule); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MessageRuleItemRequestBuilder - */ - public withUrl(rawUrl: string) : MessageRuleItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageRuleItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageRuleItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messageRules/messageRulesRequestBuilder.ts b/src/me/mailFolders/item/messageRules/messageRulesRequestBuilder.ts deleted file mode 100644 index 088cc05716e..00000000000 --- a/src/me/mailFolders/item/messageRules/messageRulesRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MessageRuleCollectionResponse } from '../../../../models/'; -import { createMessageRuleFromDiscriminatorValue, deserializeIntoMessageRule, serializeMessageRule, type MessageRule } from '../../../../models/messageRule'; -import { createMessageRuleCollectionResponseFromDiscriminatorValue } from '../../../../models/messageRuleCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { MessageRuleItemRequestBuilder } from './item/messageRuleItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageRulesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - */ -export class MessageRulesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity. - * @param messageRuleId The unique identifier of messageRule - * @returns a MessageRuleItemRequestBuilder - */ - public byMessageRuleId(messageRuleId: string) : MessageRuleItemRequestBuilder { - if(!messageRuleId) throw new Error("messageRuleId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["messageRule%2Did"] = messageRuleId - return new MessageRuleItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessageRulesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messageRules{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get all the messageRule objects defined for the user's inbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRuleCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-messagerules?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageRule - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-post-messagerules?view=graph-rest-1.0|Find more info here} - */ - public post(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageRuleFromDiscriminatorValue, errorMapping); - }; - /** - * Get all the messageRule objects defined for the user's inbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageRulesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MessageRule, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessageRule); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messageRulesRequestBuilder - */ - public withUrl(rawUrl: string) : MessageRulesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageRulesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageRulesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/count/countRequestBuilder.ts b/src/me/mailFolders/item/messages/count/countRequestBuilder.ts deleted file mode 100644 index 5f8b4e01586..00000000000 --- a/src/me/mailFolders/item/messages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/count/index.ts b/src/me/mailFolders/item/messages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/messages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/messages/delta/deltaRequestBuilder.ts b/src/me/mailFolders/item/messages/delta/deltaRequestBuilder.ts deleted file mode 100644 index 071666e2ce9..00000000000 --- a/src/me/mailFolders/item/messages/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../models/baseDeltaFunctionResponse'; -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../models/message'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Message[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * A custom query option to filter the delta response based on the type of change. Supported values are created, updated or deleted. - */ - changeType?: string; - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/delta(){?changeType*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/message-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/delta/index.ts b/src/me/mailFolders/item/messages/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/mailFolders/item/messages/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/mailFolders/item/messages/index.ts b/src/me/mailFolders/item/messages/index.ts deleted file mode 100644 index 9f6fd0b319b..00000000000 --- a/src/me/mailFolders/item/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messagesRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/attachments/attachmentsRequestBuilder.ts b/src/me/mailFolders/item/messages/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 5dd170a1462..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,147 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/attachments{?%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to a message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/message-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to a message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/attachments/count/countRequestBuilder.ts b/src/me/mailFolders/item/messages/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 9e88281c668..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/attachments/count/index.ts b/src/me/mailFolders/item/messages/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/mailFolders/item/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 500cc4f84c9..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/attachments/createUploadSession/index.ts b/src/me/mailFolders/item/messages/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/attachments/index.ts b/src/me/mailFolders/item/messages/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/mailFolders/item/messages/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 38ce67bf62e..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../../../models/attachment'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property attachments for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/attachment-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property attachments for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/attachments/item/index.ts b/src/me/mailFolders/item/messages/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/mailFolders/item/messages/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/copy/copyRequestBuilder.ts b/src/me/mailFolders/item/messages/item/copy/copyRequestBuilder.ts deleted file mode 100644 index 106e2f54dae..00000000000 --- a/src/me/mailFolders/item/messages/item/copy/copyRequestBuilder.ts +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../models/message'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function createCopyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyPostRequestBody; -} -export function deserializeIntoCopyPostRequestBody(copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : Record void> { - return { - "destinationId": n => { copyPostRequestBody.destinationId = n.getStringValue(); }, - } -} -export function serializeCopyPostRequestBody(writer: SerializationWriter, copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : void { - writer.writeStringValue("DestinationId", copyPostRequestBody.destinationId); - writer.writeAdditionalData(copyPostRequestBody.additionalData); -} -/** - * Provides operations to call the copy method. - */ -export class CopyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/copy"); - }; - /** - * Copy a message to a folder within the user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-copy?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a message to a folder within the user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyRequestBuilder - */ - public withUrl(rawUrl: string) : CopyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/copy/index.ts b/src/me/mailFolders/item/messages/item/copy/index.ts deleted file mode 100644 index 2d08e5c40b9..00000000000 --- a/src/me/mailFolders/item/messages/item/copy/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/createForward/createForwardRequestBuilder.ts b/src/me/mailFolders/item/messages/item/createForward/createForwardRequestBuilder.ts deleted file mode 100644 index de896842a5c..00000000000 --- a/src/me/mailFolders/item/messages/item/createForward/createForwardRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../models/message'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../models/recipient'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateForwardPostRequestBody; -} -export interface CreateForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function deserializeIntoCreateForwardPostRequestBody(createForwardPostRequestBody: CreateForwardPostRequestBody | undefined = {} as CreateForwardPostRequestBody) : Record void> { - return { - "comment": n => { createForwardPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createForwardPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "toRecipients": n => { createForwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export function serializeCreateForwardPostRequestBody(writer: SerializationWriter, createForwardPostRequestBody: CreateForwardPostRequestBody | undefined = {} as CreateForwardPostRequestBody) : void { - writer.writeStringValue("Comment", createForwardPostRequestBody.comment); - writer.writeObjectValue("Message", createForwardPostRequestBody.message, serializeMessage); - writer.writeCollectionOfObjectValues("ToRecipients", createForwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(createForwardPostRequestBody.additionalData); -} -/** - * Provides operations to call the createForward method. - */ -export class CreateForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/createForward"); - }; - /** - * Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createforward?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createForwardRequestBuilder - */ - public withUrl(rawUrl: string) : CreateForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/createForward/index.ts b/src/me/mailFolders/item/messages/item/createForward/index.ts deleted file mode 100644 index d6e07309bff..00000000000 --- a/src/me/mailFolders/item/messages/item/createForward/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createForwardRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/createReply/createReplyRequestBuilder.ts b/src/me/mailFolders/item/messages/item/createReply/createReplyRequestBuilder.ts deleted file mode 100644 index 07bb7e05463..00000000000 --- a/src/me/mailFolders/item/messages/item/createReply/createReplyRequestBuilder.ts +++ /dev/null @@ -1,92 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../models/message'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateReplyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateReplyPostRequestBody; -} -export interface CreateReplyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function deserializeIntoCreateReplyPostRequestBody(createReplyPostRequestBody: CreateReplyPostRequestBody | undefined = {} as CreateReplyPostRequestBody) : Record void> { - return { - "comment": n => { createReplyPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createReplyPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export function serializeCreateReplyPostRequestBody(writer: SerializationWriter, createReplyPostRequestBody: CreateReplyPostRequestBody | undefined = {} as CreateReplyPostRequestBody) : void { - writer.writeStringValue("Comment", createReplyPostRequestBody.comment); - writer.writeObjectValue("Message", createReplyPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(createReplyPostRequestBody.additionalData); -} -/** - * Provides operations to call the createReply method. - */ -export class CreateReplyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateReplyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/createReply"); - }; - /** - * Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createreply?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateReplyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createReplyRequestBuilder - */ - public withUrl(rawUrl: string) : CreateReplyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateReplyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/createReply/index.ts b/src/me/mailFolders/item/messages/item/createReply/index.ts deleted file mode 100644 index 28777a90a8e..00000000000 --- a/src/me/mailFolders/item/messages/item/createReply/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createReplyRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/createReplyAll/createReplyAllPostRequestBody.ts b/src/me/mailFolders/item/messages/item/createReplyAll/createReplyAllPostRequestBody.ts deleted file mode 100644 index 591c0ddffe6..00000000000 --- a/src/me/mailFolders/item/messages/item/createReplyAll/createReplyAllPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../models/message'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateReplyAllPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateReplyAllPostRequestBody; -} -export interface CreateReplyAllPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function deserializeIntoCreateReplyAllPostRequestBody(createReplyAllPostRequestBody: CreateReplyAllPostRequestBody | undefined = {} as CreateReplyAllPostRequestBody) : Record void> { - return { - "comment": n => { createReplyAllPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createReplyAllPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export function serializeCreateReplyAllPostRequestBody(writer: SerializationWriter, createReplyAllPostRequestBody: CreateReplyAllPostRequestBody | undefined = {} as CreateReplyAllPostRequestBody) : void { - writer.writeStringValue("Comment", createReplyAllPostRequestBody.comment); - writer.writeObjectValue("Message", createReplyAllPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(createReplyAllPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/createReplyAll/createReplyAllRequestBuilder.ts b/src/me/mailFolders/item/messages/item/createReplyAll/createReplyAllRequestBuilder.ts deleted file mode 100644 index c38728e58dd..00000000000 --- a/src/me/mailFolders/item/messages/item/createReplyAll/createReplyAllRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../models/message'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCreateReplyAllPostRequestBody, serializeCreateReplyAllPostRequestBody, type CreateReplyAllPostRequestBody } from './createReplyAllPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the createReplyAll method. - */ -export class CreateReplyAllRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateReplyAllRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/createReplyAll"); - }; - /** - * Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createreplyall?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateReplyAllPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createReplyAllRequestBuilder - */ - public withUrl(rawUrl: string) : CreateReplyAllRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateReplyAllRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/createReplyAll/index.ts b/src/me/mailFolders/item/messages/item/createReplyAll/index.ts deleted file mode 100644 index b1f151ae084..00000000000 --- a/src/me/mailFolders/item/messages/item/createReplyAll/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './createReplyAllPostRequestBody' -export * from './createReplyAllRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/extensions/count/countRequestBuilder.ts b/src/me/mailFolders/item/messages/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 6c885bdd892..00000000000 --- a/src/me/mailFolders/item/messages/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/extensions/count/index.ts b/src/me/mailFolders/item/messages/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/mailFolders/item/messages/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/extensions/extensionsRequestBuilder.ts b/src/me/mailFolders/item/messages/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index f7517fa3c35..00000000000 --- a/src/me/mailFolders/item/messages/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/extensions/index.ts b/src/me/mailFolders/item/messages/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/mailFolders/item/messages/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/mailFolders/item/messages/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 92d426bccc5..00000000000 --- a/src/me/mailFolders/item/messages/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/extensions/item/index.ts b/src/me/mailFolders/item/messages/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/mailFolders/item/messages/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/forward/forwardPostRequestBody.ts b/src/me/mailFolders/item/messages/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index a7ef82b1bfa..00000000000 --- a/src/me/mailFolders/item/messages/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,44 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../models/message'; -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "message": n => { forwardPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeObjectValue("Message", forwardPostRequestBody.message, serializeMessage); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/forward/forwardRequestBuilder.ts b/src/me/mailFolders/item/messages/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index f3290db5aa1..00000000000 --- a/src/me/mailFolders/item/messages/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/forward"); - }; - /** - * Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/forward/index.ts b/src/me/mailFolders/item/messages/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/mailFolders/item/messages/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/index.ts b/src/me/mailFolders/item/messages/item/index.ts deleted file mode 100644 index 9b0117e0ff1..00000000000 --- a/src/me/mailFolders/item/messages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageItemRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/messageItemRequestBuilder.ts b/src/me/mailFolders/item/messages/item/messageItemRequestBuilder.ts deleted file mode 100644 index d278fd6c785..00000000000 --- a/src/me/mailFolders/item/messages/item/messageItemRequestBuilder.ts +++ /dev/null @@ -1,211 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../models/message'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CopyRequestBuilder } from './copy/copyRequestBuilder'; -import { CreateForwardRequestBuilder } from './createForward/createForwardRequestBuilder'; -import { CreateReplyRequestBuilder } from './createReply/createReplyRequestBuilder'; -import { CreateReplyAllRequestBuilder } from './createReplyAll/createReplyAllRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { MoveRequestBuilder } from './move/moveRequestBuilder'; -import { ReplyRequestBuilder } from './reply/replyRequestBuilder'; -import { ReplyAllRequestBuilder } from './replyAll/replyAllRequestBuilder'; -import { SendRequestBuilder } from './send/sendRequestBuilder'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - */ -export class MessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copy method. - */ - public get copy(): CopyRequestBuilder { - return new CopyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createForward method. - */ - public get createForward(): CreateForwardRequestBuilder { - return new CreateForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createReply method. - */ - public get createReply(): CreateReplyRequestBuilder { - return new CreateReplyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createReplyAll method. - */ - public get createReplyAll(): CreateReplyAllRequestBuilder { - return new CreateReplyAllRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the move method. - */ - public get move(): MoveRequestBuilder { - return new MoveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the reply method. - */ - public get reply(): ReplyRequestBuilder { - return new ReplyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the replyAll method. - */ - public get replyAll(): ReplyAllRequestBuilder { - return new ReplyAllRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the send method. - */ - public get send(): SendRequestBuilder { - return new SendRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of messages in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property messages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - */ - public patch(body: Message, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property messages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of messages in the mailFolder. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property messages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Message, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : MessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/move/index.ts b/src/me/mailFolders/item/messages/item/move/index.ts deleted file mode 100644 index 820dabdd52a..00000000000 --- a/src/me/mailFolders/item/messages/item/move/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './movePostRequestBody' -export * from './moveRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/move/movePostRequestBody.ts b/src/me/mailFolders/item/messages/item/move/movePostRequestBody.ts deleted file mode 100644 index 93a1c3bb520..00000000000 --- a/src/me/mailFolders/item/messages/item/move/movePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMovePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMovePostRequestBody; -} -export function deserializeIntoMovePostRequestBody(movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : Record void> { - return { - "destinationId": n => { movePostRequestBody.destinationId = n.getStringValue(); }, - } -} -export interface MovePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function serializeMovePostRequestBody(writer: SerializationWriter, movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : void { - writer.writeStringValue("DestinationId", movePostRequestBody.destinationId); - writer.writeAdditionalData(movePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/move/moveRequestBuilder.ts b/src/me/mailFolders/item/messages/item/move/moveRequestBuilder.ts deleted file mode 100644 index 95e9588264e..00000000000 --- a/src/me/mailFolders/item/messages/item/move/moveRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../../../models/message'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoMovePostRequestBody, serializeMovePostRequestBody, type MovePostRequestBody } from './movePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the move method. - */ -export class MoveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MoveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/move"); - }; - /** - * Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-move?view=graph-rest-1.0|Find more info here} - */ - public post(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMovePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a moveRequestBuilder - */ - public withUrl(rawUrl: string) : MoveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MoveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/reply/index.ts b/src/me/mailFolders/item/messages/item/reply/index.ts deleted file mode 100644 index f62039cf265..00000000000 --- a/src/me/mailFolders/item/messages/item/reply/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './replyPostRequestBody' -export * from './replyRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/reply/replyPostRequestBody.ts b/src/me/mailFolders/item/messages/item/reply/replyPostRequestBody.ts deleted file mode 100644 index 2bb55b7e211..00000000000 --- a/src/me/mailFolders/item/messages/item/reply/replyPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../models/message'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReplyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReplyPostRequestBody; -} -export function deserializeIntoReplyPostRequestBody(replyPostRequestBody: ReplyPostRequestBody | undefined = {} as ReplyPostRequestBody) : Record void> { - return { - "comment": n => { replyPostRequestBody.comment = n.getStringValue(); }, - "message": n => { replyPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export interface ReplyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function serializeReplyPostRequestBody(writer: SerializationWriter, replyPostRequestBody: ReplyPostRequestBody | undefined = {} as ReplyPostRequestBody) : void { - writer.writeStringValue("Comment", replyPostRequestBody.comment); - writer.writeObjectValue("Message", replyPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(replyPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/reply/replyRequestBuilder.ts b/src/me/mailFolders/item/messages/item/reply/replyRequestBuilder.ts deleted file mode 100644 index dcaae464f4d..00000000000 --- a/src/me/mailFolders/item/messages/item/reply/replyRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoReplyPostRequestBody, serializeReplyPostRequestBody, type ReplyPostRequestBody } from './replyPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the reply method. - */ -export class ReplyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReplyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/reply"); - }; - /** - * Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-reply?view=graph-rest-1.0|Find more info here} - */ - public post(body: ReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReplyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a replyRequestBuilder - */ - public withUrl(rawUrl: string) : ReplyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReplyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/replyAll/index.ts b/src/me/mailFolders/item/messages/item/replyAll/index.ts deleted file mode 100644 index 34c4d8e1dbf..00000000000 --- a/src/me/mailFolders/item/messages/item/replyAll/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './replyAllRequestBuilder' diff --git a/src/me/mailFolders/item/messages/item/replyAll/replyAllRequestBuilder.ts b/src/me/mailFolders/item/messages/item/replyAll/replyAllRequestBuilder.ts deleted file mode 100644 index 99d582e4a04..00000000000 --- a/src/me/mailFolders/item/messages/item/replyAll/replyAllRequestBuilder.ts +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../../../models/message'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReplyAllPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReplyAllPostRequestBody; -} -export function deserializeIntoReplyAllPostRequestBody(replyAllPostRequestBody: ReplyAllPostRequestBody | undefined = {} as ReplyAllPostRequestBody) : Record void> { - return { - "comment": n => { replyAllPostRequestBody.comment = n.getStringValue(); }, - "message": n => { replyAllPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export interface ReplyAllPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function serializeReplyAllPostRequestBody(writer: SerializationWriter, replyAllPostRequestBody: ReplyAllPostRequestBody | undefined = {} as ReplyAllPostRequestBody) : void { - writer.writeStringValue("Comment", replyAllPostRequestBody.comment); - writer.writeObjectValue("Message", replyAllPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(replyAllPostRequestBody.additionalData); -} -/** - * Provides operations to call the replyAll method. - */ -export class ReplyAllRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReplyAllRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/replyAll"); - }; - /** - * Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-replyall?view=graph-rest-1.0|Find more info here} - */ - public post(body: ReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReplyAllPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a replyAllRequestBuilder - */ - public withUrl(rawUrl: string) : ReplyAllRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReplyAllRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/send/sendRequestBuilder.ts b/src/me/mailFolders/item/messages/item/send/sendRequestBuilder.ts deleted file mode 100644 index 6e4b4a18ec2..00000000000 --- a/src/me/mailFolders/item/messages/item/send/sendRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the send method. - */ -export class SendRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/send"); - }; - /** - * Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-send?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendRequestBuilder - */ - public withUrl(rawUrl: string) : SendRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/item/value/contentRequestBuilder.ts b/src/me/mailFolders/item/messages/item/value/contentRequestBuilder.ts deleted file mode 100644 index e4086ca22b8..00000000000 --- a/src/me/mailFolders/item/messages/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages/{message%2Did}/$value"); - }; - /** - * Get media content for the navigation property messages from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property messages in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property messages from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property messages in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/messages/messagesRequestBuilder.ts b/src/me/mailFolders/item/messages/messagesRequestBuilder.ts deleted file mode 100644 index a497d41cf3c..00000000000 --- a/src/me/mailFolders/item/messages/messagesRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MessageCollectionResponse } from '../../../../models/'; -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../models/message'; -import { createMessageCollectionResponseFromDiscriminatorValue } from '../../../../models/messageCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { MessageItemRequestBuilder } from './item/messageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - */ -export class MessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.mailFolder entity. - * @param messageId The unique identifier of message - * @returns a MessageItemRequestBuilder - */ - public byMessageId(messageId: string) : MessageItemRequestBuilder { - if(!messageId) throw new Error("messageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["message%2Did"] = messageId - return new MessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Message in a mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-post-messages?view=graph-rest-1.0|Find more info here} - */ - public post(body: Message, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Get all the messages in the specified user's mailbox, or those messages in a specified folder in the mailbox. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Message in a mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Message, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messagesRequestBuilder - */ - public withUrl(rawUrl: string) : MessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/move/index.ts b/src/me/mailFolders/item/move/index.ts deleted file mode 100644 index 820dabdd52a..00000000000 --- a/src/me/mailFolders/item/move/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './movePostRequestBody' -export * from './moveRequestBuilder' diff --git a/src/me/mailFolders/item/move/movePostRequestBody.ts b/src/me/mailFolders/item/move/movePostRequestBody.ts deleted file mode 100644 index 93a1c3bb520..00000000000 --- a/src/me/mailFolders/item/move/movePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMovePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMovePostRequestBody; -} -export function deserializeIntoMovePostRequestBody(movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : Record void> { - return { - "destinationId": n => { movePostRequestBody.destinationId = n.getStringValue(); }, - } -} -export interface MovePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function serializeMovePostRequestBody(writer: SerializationWriter, movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : void { - writer.writeStringValue("DestinationId", movePostRequestBody.destinationId); - writer.writeAdditionalData(movePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/item/move/moveRequestBuilder.ts b/src/me/mailFolders/item/move/moveRequestBuilder.ts deleted file mode 100644 index 4858cd9353b..00000000000 --- a/src/me/mailFolders/item/move/moveRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../../../models/mailFolder'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoMovePostRequestBody, serializeMovePostRequestBody, type MovePostRequestBody } from './movePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the move method. - */ -export class MoveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MoveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}/move"); - }; - /** - * Move a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/mailfolder-move?view=graph-rest-1.0|Find more info here} - */ - public post(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * Move a mailfolder and its contents to another mailfolder. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMovePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a moveRequestBuilder - */ - public withUrl(rawUrl: string) : MoveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MoveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/mailFolders/mailFoldersRequestBuilder.ts b/src/me/mailFolders/mailFoldersRequestBuilder.ts deleted file mode 100644 index e5e365de841..00000000000 --- a/src/me/mailFolders/mailFoldersRequestBuilder.ts +++ /dev/null @@ -1,161 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MailFolderCollectionResponse } from '../../models/'; -import { createMailFolderFromDiscriminatorValue, deserializeIntoMailFolder, serializeMailFolder, type MailFolder } from '../../models/mailFolder'; -import { createMailFolderCollectionResponseFromDiscriminatorValue } from '../../models/mailFolderCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { MailFolderItemRequestBuilder } from './item/mailFolderItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MailFoldersRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Expand related entities - */ - expand?: string[]; - /** - * Filter items by property values - */ - filter?: string; - /** - * Include Hidden Folders - */ - includeHiddenFolders?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the mailFolders property of the microsoft.graph.user entity. - */ -export class MailFoldersRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the mailFolders property of the microsoft.graph.user entity. - * @param mailFolderId The unique identifier of mailFolder - * @returns a MailFolderItemRequestBuilder - */ - public byMailFolderId(mailFolderId: string) : MailFolderItemRequestBuilder { - if(!mailFolderId) throw new Error("mailFolderId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["mailFolder%2Did"] = mailFolderId - return new MailFolderItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MailFoldersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailFolders{?includeHiddenFolders*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The user's mail folders. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolderCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-mailfolders?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailFolder - * @see {@link https://learn.microsoft.com/graph/api/user-post-mailfolders?view=graph-rest-1.0|Find more info here} - */ - public post(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailFolderFromDiscriminatorValue, errorMapping); - }; - /** - * The user's mail folders. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, mailFoldersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MailFolder, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMailFolder); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a mailFoldersRequestBuilder - */ - public withUrl(rawUrl: string) : MailFoldersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MailFoldersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const mailFoldersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/mailboxSettings/index.ts b/src/me/mailboxSettings/index.ts deleted file mode 100644 index 198783cbc07..00000000000 --- a/src/me/mailboxSettings/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './mailboxSettingsRequestBuilder' diff --git a/src/me/mailboxSettings/mailboxSettingsRequestBuilder.ts b/src/me/mailboxSettings/mailboxSettingsRequestBuilder.ts deleted file mode 100644 index ae2b27424fc..00000000000 --- a/src/me/mailboxSettings/mailboxSettingsRequestBuilder.ts +++ /dev/null @@ -1,102 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMailboxSettingsFromDiscriminatorValue, deserializeIntoMailboxSettings, serializeMailboxSettings, type MailboxSettings } from '../../models/mailboxSettings'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MailboxSettingsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Builds and executes requests for operations under /me/mailboxSettings - */ -export class MailboxSettingsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MailboxSettingsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/mailboxSettings{?%24select,%24expand}"); - }; - /** - * Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailboxSettings - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailboxSettingsFromDiscriminatorValue, errorMapping); - }; - /** - * Update property mailboxSettings value. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MailboxSettings - */ - public patch(body: MailboxSettings, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMailboxSettingsFromDiscriminatorValue, errorMapping); - }; - /** - * Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, mailboxSettingsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update property mailboxSettings value. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: MailboxSettings, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMailboxSettings); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a mailboxSettingsRequestBuilder - */ - public withUrl(rawUrl: string) : MailboxSettingsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MailboxSettingsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const mailboxSettingsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedAppRegistrations/count/countRequestBuilder.ts b/src/me/managedAppRegistrations/count/countRequestBuilder.ts deleted file mode 100644 index 56c55803ee1..00000000000 --- a/src/me/managedAppRegistrations/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedAppRegistrations/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedAppRegistrations/count/index.ts b/src/me/managedAppRegistrations/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/managedAppRegistrations/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/managedAppRegistrations/index.ts b/src/me/managedAppRegistrations/index.ts deleted file mode 100644 index 07ad301b167..00000000000 --- a/src/me/managedAppRegistrations/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './managedAppRegistrationsRequestBuilder' diff --git a/src/me/managedAppRegistrations/item/index.ts b/src/me/managedAppRegistrations/item/index.ts deleted file mode 100644 index 185eb0fe6d9..00000000000 --- a/src/me/managedAppRegistrations/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './managedAppRegistrationItemRequestBuilder' diff --git a/src/me/managedAppRegistrations/item/managedAppRegistrationItemRequestBuilder.ts b/src/me/managedAppRegistrations/item/managedAppRegistrationItemRequestBuilder.ts deleted file mode 100644 index b6cc9741fc2..00000000000 --- a/src/me/managedAppRegistrations/item/managedAppRegistrationItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ManagedAppRegistration } from '../../../models/'; -import { createManagedAppRegistrationFromDiscriminatorValue } from '../../../models/managedAppRegistration'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ManagedAppRegistrationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the managedAppRegistrations property of the microsoft.graph.user entity. - */ -export class ManagedAppRegistrationItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ManagedAppRegistrationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedAppRegistrations/{managedAppRegistration%2Did}{?%24select,%24expand}"); - }; - /** - * Zero or more managed app registrations that belong to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ManagedAppRegistration - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createManagedAppRegistrationFromDiscriminatorValue, errorMapping); - }; - /** - * Zero or more managed app registrations that belong to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, managedAppRegistrationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ManagedAppRegistrationItemRequestBuilder - */ - public withUrl(rawUrl: string) : ManagedAppRegistrationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ManagedAppRegistrationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const managedAppRegistrationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedAppRegistrations/managedAppRegistrationsRequestBuilder.ts b/src/me/managedAppRegistrations/managedAppRegistrationsRequestBuilder.ts deleted file mode 100644 index 39dc7e3f13b..00000000000 --- a/src/me/managedAppRegistrations/managedAppRegistrationsRequestBuilder.ts +++ /dev/null @@ -1,122 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ManagedAppRegistrationCollectionResponse } from '../../models/'; -import { createManagedAppRegistrationCollectionResponseFromDiscriminatorValue } from '../../models/managedAppRegistrationCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ManagedAppRegistrationItemRequestBuilder } from './item/managedAppRegistrationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ManagedAppRegistrationsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the managedAppRegistrations property of the microsoft.graph.user entity. - */ -export class ManagedAppRegistrationsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the managedAppRegistrations property of the microsoft.graph.user entity. - * @param managedAppRegistrationId The unique identifier of managedAppRegistration - * @returns a ManagedAppRegistrationItemRequestBuilder - */ - public byManagedAppRegistrationId(managedAppRegistrationId: string) : ManagedAppRegistrationItemRequestBuilder { - if(!managedAppRegistrationId) throw new Error("managedAppRegistrationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["managedAppRegistration%2Did"] = managedAppRegistrationId - return new ManagedAppRegistrationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ManagedAppRegistrationsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedAppRegistrations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Zero or more managed app registrations that belong to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ManagedAppRegistrationCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createManagedAppRegistrationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Zero or more managed app registrations that belong to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, managedAppRegistrationsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a managedAppRegistrationsRequestBuilder - */ - public withUrl(rawUrl: string) : ManagedAppRegistrationsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ManagedAppRegistrationsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const managedAppRegistrationsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/count/countRequestBuilder.ts b/src/me/managedDevices/count/countRequestBuilder.ts deleted file mode 100644 index f9a91c3ce02..00000000000 --- a/src/me/managedDevices/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/count/index.ts b/src/me/managedDevices/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/managedDevices/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/managedDevices/index.ts b/src/me/managedDevices/index.ts deleted file mode 100644 index 784bc7dc05d..00000000000 --- a/src/me/managedDevices/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './managedDevicesRequestBuilder' diff --git a/src/me/managedDevices/item/bypassActivationLock/bypassActivationLockRequestBuilder.ts b/src/me/managedDevices/item/bypassActivationLock/bypassActivationLockRequestBuilder.ts deleted file mode 100644 index 48f936ba1f7..00000000000 --- a/src/me/managedDevices/item/bypassActivationLock/bypassActivationLockRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the bypassActivationLock method. - */ -export class BypassActivationLockRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new BypassActivationLockRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/bypassActivationLock"); - }; - /** - * Bypass activation lock - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-bypassactivationlock?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Bypass activation lock - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a bypassActivationLockRequestBuilder - */ - public withUrl(rawUrl: string) : BypassActivationLockRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new BypassActivationLockRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/cleanWindowsDevice/cleanWindowsDevicePostRequestBody.ts b/src/me/managedDevices/item/cleanWindowsDevice/cleanWindowsDevicePostRequestBody.ts deleted file mode 100644 index 02c64f964fd..00000000000 --- a/src/me/managedDevices/item/cleanWindowsDevice/cleanWindowsDevicePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CleanWindowsDevicePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The keepUserData property - */ - keepUserData?: boolean; -} -export function createCleanWindowsDevicePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCleanWindowsDevicePostRequestBody; -} -export function deserializeIntoCleanWindowsDevicePostRequestBody(cleanWindowsDevicePostRequestBody: CleanWindowsDevicePostRequestBody | undefined = {} as CleanWindowsDevicePostRequestBody) : Record void> { - return { - "keepUserData": n => { cleanWindowsDevicePostRequestBody.keepUserData = n.getBooleanValue(); }, - } -} -export function serializeCleanWindowsDevicePostRequestBody(writer: SerializationWriter, cleanWindowsDevicePostRequestBody: CleanWindowsDevicePostRequestBody | undefined = {} as CleanWindowsDevicePostRequestBody) : void { - writer.writeBooleanValue("keepUserData", cleanWindowsDevicePostRequestBody.keepUserData); - writer.writeAdditionalData(cleanWindowsDevicePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/cleanWindowsDevice/cleanWindowsDeviceRequestBuilder.ts b/src/me/managedDevices/item/cleanWindowsDevice/cleanWindowsDeviceRequestBuilder.ts deleted file mode 100644 index 1b5c470d15a..00000000000 --- a/src/me/managedDevices/item/cleanWindowsDevice/cleanWindowsDeviceRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCleanWindowsDevicePostRequestBody, serializeCleanWindowsDevicePostRequestBody, type CleanWindowsDevicePostRequestBody } from './cleanWindowsDevicePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the cleanWindowsDevice method. - */ -export class CleanWindowsDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CleanWindowsDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/cleanWindowsDevice"); - }; - /** - * Clean Windows device - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-cleanwindowsdevice?view=graph-rest-1.0|Find more info here} - */ - public post(body: CleanWindowsDevicePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Clean Windows device - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CleanWindowsDevicePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCleanWindowsDevicePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a cleanWindowsDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : CleanWindowsDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CleanWindowsDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/cleanWindowsDevice/index.ts b/src/me/managedDevices/item/cleanWindowsDevice/index.ts deleted file mode 100644 index f236161d6ef..00000000000 --- a/src/me/managedDevices/item/cleanWindowsDevice/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './cleanWindowsDevicePostRequestBody' -export * from './cleanWindowsDeviceRequestBuilder' diff --git a/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDevicePostRequestBody.ts b/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDevicePostRequestBody.ts deleted file mode 100644 index 124aae1c805..00000000000 --- a/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDevicePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeleteUserFromSharedAppleDevicePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeleteUserFromSharedAppleDevicePostRequestBody; -} -export interface DeleteUserFromSharedAppleDevicePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The userPrincipalName property - */ - userPrincipalName?: string; -} -export function deserializeIntoDeleteUserFromSharedAppleDevicePostRequestBody(deleteUserFromSharedAppleDevicePostRequestBody: DeleteUserFromSharedAppleDevicePostRequestBody | undefined = {} as DeleteUserFromSharedAppleDevicePostRequestBody) : Record void> { - return { - "userPrincipalName": n => { deleteUserFromSharedAppleDevicePostRequestBody.userPrincipalName = n.getStringValue(); }, - } -} -export function serializeDeleteUserFromSharedAppleDevicePostRequestBody(writer: SerializationWriter, deleteUserFromSharedAppleDevicePostRequestBody: DeleteUserFromSharedAppleDevicePostRequestBody | undefined = {} as DeleteUserFromSharedAppleDevicePostRequestBody) : void { - writer.writeStringValue("userPrincipalName", deleteUserFromSharedAppleDevicePostRequestBody.userPrincipalName); - writer.writeAdditionalData(deleteUserFromSharedAppleDevicePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDeviceRequestBuilder.ts b/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDeviceRequestBuilder.ts deleted file mode 100644 index db3205e91db..00000000000 --- a/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDeviceRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoDeleteUserFromSharedAppleDevicePostRequestBody, serializeDeleteUserFromSharedAppleDevicePostRequestBody, type DeleteUserFromSharedAppleDevicePostRequestBody } from './deleteUserFromSharedAppleDevicePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the deleteUserFromSharedAppleDevice method. - */ -export class DeleteUserFromSharedAppleDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeleteUserFromSharedAppleDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deleteUserFromSharedAppleDevice"); - }; - /** - * Delete user from shared Apple device - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-deleteuserfromsharedappledevice?view=graph-rest-1.0|Find more info here} - */ - public post(body: DeleteUserFromSharedAppleDevicePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Delete user from shared Apple device - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeleteUserFromSharedAppleDevicePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeleteUserFromSharedAppleDevicePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deleteUserFromSharedAppleDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : DeleteUserFromSharedAppleDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeleteUserFromSharedAppleDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/index.ts b/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/index.ts deleted file mode 100644 index 0beb4669b93..00000000000 --- a/src/me/managedDevices/item/deleteUserFromSharedAppleDevice/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './deleteUserFromSharedAppleDevicePostRequestBody' -export * from './deleteUserFromSharedAppleDeviceRequestBuilder' diff --git a/src/me/managedDevices/item/deviceCategory/deviceCategoryRequestBuilder.ts b/src/me/managedDevices/item/deviceCategory/deviceCategoryRequestBuilder.ts deleted file mode 100644 index d705aa08655..00000000000 --- a/src/me/managedDevices/item/deviceCategory/deviceCategoryRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDeviceCategoryFromDiscriminatorValue, deserializeIntoDeviceCategory, serializeDeviceCategory, type DeviceCategory } from '../../../../models/deviceCategory'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceCategoryRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the deviceCategory property of the microsoft.graph.managedDevice entity. - */ -export class DeviceCategoryRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeviceCategoryRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceCategory{?%24select,%24expand}"); - }; - /** - * Delete navigation property deviceCategory for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read properties and relationships of the deviceCategory object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCategory - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-devicecategory-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCategoryFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a deviceCategory object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCategory - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-devicecategory-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: DeviceCategory, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCategoryFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property deviceCategory for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read properties and relationships of the deviceCategory object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceCategoryRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a deviceCategory object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: DeviceCategory, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceCategory); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deviceCategoryRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceCategoryRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceCategoryRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceCategoryRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceCategory/index.ts b/src/me/managedDevices/item/deviceCategory/index.ts deleted file mode 100644 index f65e1bf4bce..00000000000 --- a/src/me/managedDevices/item/deviceCategory/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceCategoryRequestBuilder' diff --git a/src/me/managedDevices/item/deviceCompliancePolicyStates/count/countRequestBuilder.ts b/src/me/managedDevices/item/deviceCompliancePolicyStates/count/countRequestBuilder.ts deleted file mode 100644 index 4ab1a31e917..00000000000 --- a/src/me/managedDevices/item/deviceCompliancePolicyStates/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceCompliancePolicyStates/count/index.ts b/src/me/managedDevices/item/deviceCompliancePolicyStates/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/managedDevices/item/deviceCompliancePolicyStates/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/managedDevices/item/deviceCompliancePolicyStates/deviceCompliancePolicyStatesRequestBuilder.ts b/src/me/managedDevices/item/deviceCompliancePolicyStates/deviceCompliancePolicyStatesRequestBuilder.ts deleted file mode 100644 index f50a7ef06e9..00000000000 --- a/src/me/managedDevices/item/deviceCompliancePolicyStates/deviceCompliancePolicyStatesRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceCompliancePolicyStateCollectionResponse } from '../../../../models/'; -import { createDeviceCompliancePolicyStateFromDiscriminatorValue, deserializeIntoDeviceCompliancePolicyState, serializeDeviceCompliancePolicyState, type DeviceCompliancePolicyState } from '../../../../models/deviceCompliancePolicyState'; -import { createDeviceCompliancePolicyStateCollectionResponseFromDiscriminatorValue } from '../../../../models/deviceCompliancePolicyStateCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeviceCompliancePolicyStateItemRequestBuilder } from './item/deviceCompliancePolicyStateItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceCompliancePolicyStatesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the deviceCompliancePolicyStates property of the microsoft.graph.managedDevice entity. - */ -export class DeviceCompliancePolicyStatesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceCompliancePolicyStates property of the microsoft.graph.managedDevice entity. - * @param deviceCompliancePolicyStateId The unique identifier of deviceCompliancePolicyState - * @returns a DeviceCompliancePolicyStateItemRequestBuilder - */ - public byDeviceCompliancePolicyStateId(deviceCompliancePolicyStateId: string) : DeviceCompliancePolicyStateItemRequestBuilder { - if(!deviceCompliancePolicyStateId) throw new Error("deviceCompliancePolicyStateId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["deviceCompliancePolicyState%2Did"] = deviceCompliancePolicyStateId - return new DeviceCompliancePolicyStateItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new DeviceCompliancePolicyStatesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Device compliance policy states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCompliancePolicyStateCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCompliancePolicyStateCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to deviceCompliancePolicyStates for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCompliancePolicyState - */ - public post(body: DeviceCompliancePolicyState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCompliancePolicyStateFromDiscriminatorValue, errorMapping); - }; - /** - * Device compliance policy states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceCompliancePolicyStatesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to deviceCompliancePolicyStates for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeviceCompliancePolicyState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceCompliancePolicyState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deviceCompliancePolicyStatesRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceCompliancePolicyStatesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceCompliancePolicyStatesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceCompliancePolicyStatesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceCompliancePolicyStates/index.ts b/src/me/managedDevices/item/deviceCompliancePolicyStates/index.ts deleted file mode 100644 index 0367ce1e527..00000000000 --- a/src/me/managedDevices/item/deviceCompliancePolicyStates/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceCompliancePolicyStatesRequestBuilder' diff --git a/src/me/managedDevices/item/deviceCompliancePolicyStates/item/deviceCompliancePolicyStateItemRequestBuilder.ts b/src/me/managedDevices/item/deviceCompliancePolicyStates/item/deviceCompliancePolicyStateItemRequestBuilder.ts deleted file mode 100644 index e49c23d16c9..00000000000 --- a/src/me/managedDevices/item/deviceCompliancePolicyStates/item/deviceCompliancePolicyStateItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDeviceCompliancePolicyStateFromDiscriminatorValue, deserializeIntoDeviceCompliancePolicyState, serializeDeviceCompliancePolicyState, type DeviceCompliancePolicyState } from '../../../../../models/deviceCompliancePolicyState'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceCompliancePolicyStateItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the deviceCompliancePolicyStates property of the microsoft.graph.managedDevice entity. - */ -export class DeviceCompliancePolicyStateItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeviceCompliancePolicyStateItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates/{deviceCompliancePolicyState%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property deviceCompliancePolicyStates for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Device compliance policy states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCompliancePolicyState - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCompliancePolicyStateFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property deviceCompliancePolicyStates in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCompliancePolicyState - */ - public patch(body: DeviceCompliancePolicyState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCompliancePolicyStateFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property deviceCompliancePolicyStates for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Device compliance policy states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceCompliancePolicyStateItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property deviceCompliancePolicyStates in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: DeviceCompliancePolicyState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceCompliancePolicyState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DeviceCompliancePolicyStateItemRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceCompliancePolicyStateItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceCompliancePolicyStateItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceCompliancePolicyStateItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceCompliancePolicyStates/item/index.ts b/src/me/managedDevices/item/deviceCompliancePolicyStates/item/index.ts deleted file mode 100644 index 26f9c8511d8..00000000000 --- a/src/me/managedDevices/item/deviceCompliancePolicyStates/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceCompliancePolicyStateItemRequestBuilder' diff --git a/src/me/managedDevices/item/deviceConfigurationStates/count/countRequestBuilder.ts b/src/me/managedDevices/item/deviceConfigurationStates/count/countRequestBuilder.ts deleted file mode 100644 index 9885cf71918..00000000000 --- a/src/me/managedDevices/item/deviceConfigurationStates/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceConfigurationStates/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceConfigurationStates/count/index.ts b/src/me/managedDevices/item/deviceConfigurationStates/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/managedDevices/item/deviceConfigurationStates/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/managedDevices/item/deviceConfigurationStates/deviceConfigurationStatesRequestBuilder.ts b/src/me/managedDevices/item/deviceConfigurationStates/deviceConfigurationStatesRequestBuilder.ts deleted file mode 100644 index f425ed7dcf7..00000000000 --- a/src/me/managedDevices/item/deviceConfigurationStates/deviceConfigurationStatesRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceConfigurationStateCollectionResponse } from '../../../../models/'; -import { createDeviceConfigurationStateFromDiscriminatorValue, deserializeIntoDeviceConfigurationState, serializeDeviceConfigurationState, type DeviceConfigurationState } from '../../../../models/deviceConfigurationState'; -import { createDeviceConfigurationStateCollectionResponseFromDiscriminatorValue } from '../../../../models/deviceConfigurationStateCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeviceConfigurationStateItemRequestBuilder } from './item/deviceConfigurationStateItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceConfigurationStatesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the deviceConfigurationStates property of the microsoft.graph.managedDevice entity. - */ -export class DeviceConfigurationStatesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceConfigurationStates property of the microsoft.graph.managedDevice entity. - * @param deviceConfigurationStateId The unique identifier of deviceConfigurationState - * @returns a DeviceConfigurationStateItemRequestBuilder - */ - public byDeviceConfigurationStateId(deviceConfigurationStateId: string) : DeviceConfigurationStateItemRequestBuilder { - if(!deviceConfigurationStateId) throw new Error("deviceConfigurationStateId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["deviceConfigurationState%2Did"] = deviceConfigurationStateId - return new DeviceConfigurationStateItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new DeviceConfigurationStatesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceConfigurationStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Device configuration states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceConfigurationStateCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceConfigurationStateCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to deviceConfigurationStates for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceConfigurationState - */ - public post(body: DeviceConfigurationState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceConfigurationStateFromDiscriminatorValue, errorMapping); - }; - /** - * Device configuration states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceConfigurationStatesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to deviceConfigurationStates for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeviceConfigurationState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceConfigurationState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deviceConfigurationStatesRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceConfigurationStatesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceConfigurationStatesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceConfigurationStatesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceConfigurationStates/index.ts b/src/me/managedDevices/item/deviceConfigurationStates/index.ts deleted file mode 100644 index 5669f8a21be..00000000000 --- a/src/me/managedDevices/item/deviceConfigurationStates/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceConfigurationStatesRequestBuilder' diff --git a/src/me/managedDevices/item/deviceConfigurationStates/item/deviceConfigurationStateItemRequestBuilder.ts b/src/me/managedDevices/item/deviceConfigurationStates/item/deviceConfigurationStateItemRequestBuilder.ts deleted file mode 100644 index 15a66934b7e..00000000000 --- a/src/me/managedDevices/item/deviceConfigurationStates/item/deviceConfigurationStateItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDeviceConfigurationStateFromDiscriminatorValue, deserializeIntoDeviceConfigurationState, serializeDeviceConfigurationState, type DeviceConfigurationState } from '../../../../../models/deviceConfigurationState'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceConfigurationStateItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the deviceConfigurationStates property of the microsoft.graph.managedDevice entity. - */ -export class DeviceConfigurationStateItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeviceConfigurationStateItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/deviceConfigurationStates/{deviceConfigurationState%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property deviceConfigurationStates for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Device configuration states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceConfigurationState - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceConfigurationStateFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property deviceConfigurationStates in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceConfigurationState - */ - public patch(body: DeviceConfigurationState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceConfigurationStateFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property deviceConfigurationStates for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Device configuration states for this device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceConfigurationStateItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property deviceConfigurationStates in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: DeviceConfigurationState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceConfigurationState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DeviceConfigurationStateItemRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceConfigurationStateItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceConfigurationStateItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceConfigurationStateItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/deviceConfigurationStates/item/index.ts b/src/me/managedDevices/item/deviceConfigurationStates/item/index.ts deleted file mode 100644 index 60607c7defb..00000000000 --- a/src/me/managedDevices/item/deviceConfigurationStates/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceConfigurationStateItemRequestBuilder' diff --git a/src/me/managedDevices/item/disableLostMode/disableLostModeRequestBuilder.ts b/src/me/managedDevices/item/disableLostMode/disableLostModeRequestBuilder.ts deleted file mode 100644 index cee590719d1..00000000000 --- a/src/me/managedDevices/item/disableLostMode/disableLostModeRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the disableLostMode method. - */ -export class DisableLostModeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DisableLostModeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/disableLostMode"); - }; - /** - * Disable lost mode - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-disablelostmode?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Disable lost mode - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a disableLostModeRequestBuilder - */ - public withUrl(rawUrl: string) : DisableLostModeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DisableLostModeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/index.ts b/src/me/managedDevices/item/index.ts deleted file mode 100644 index 68492af85ea..00000000000 --- a/src/me/managedDevices/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './managedDeviceItemRequestBuilder' diff --git a/src/me/managedDevices/item/locateDevice/locateDeviceRequestBuilder.ts b/src/me/managedDevices/item/locateDevice/locateDeviceRequestBuilder.ts deleted file mode 100644 index 2d37ba0ff9f..00000000000 --- a/src/me/managedDevices/item/locateDevice/locateDeviceRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the locateDevice method. - */ -export class LocateDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LocateDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/locateDevice"); - }; - /** - * Locate a device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-locatedevice?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Locate a device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a locateDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : LocateDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LocateDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/logCollectionRequests/count/countRequestBuilder.ts b/src/me/managedDevices/item/logCollectionRequests/count/countRequestBuilder.ts deleted file mode 100644 index a799446141e..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/logCollectionRequests/count/index.ts b/src/me/managedDevices/item/logCollectionRequests/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/managedDevices/item/logCollectionRequests/index.ts b/src/me/managedDevices/item/logCollectionRequests/index.ts deleted file mode 100644 index 931ba01b4a5..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './logCollectionRequestsRequestBuilder' diff --git a/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/createDownloadUrlPostResponse.ts b/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/createDownloadUrlPostResponse.ts deleted file mode 100644 index ada1ae34164..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/createDownloadUrlPostResponse.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateDownloadUrlPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateDownloadUrlPostResponse; -} -export interface CreateDownloadUrlPostResponse extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The value property - */ - value?: string; -} -export function deserializeIntoCreateDownloadUrlPostResponse(createDownloadUrlPostResponse: CreateDownloadUrlPostResponse | undefined = {} as CreateDownloadUrlPostResponse) : Record void> { - return { - "value": n => { createDownloadUrlPostResponse.value = n.getStringValue(); }, - } -} -export function serializeCreateDownloadUrlPostResponse(writer: SerializationWriter, createDownloadUrlPostResponse: CreateDownloadUrlPostResponse | undefined = {} as CreateDownloadUrlPostResponse) : void { - writer.writeStringValue("value", createDownloadUrlPostResponse.value); - writer.writeAdditionalData(createDownloadUrlPostResponse.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/createDownloadUrlRequestBuilder.ts b/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/createDownloadUrlRequestBuilder.ts deleted file mode 100644 index 2deaaf01e8d..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/createDownloadUrlRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createCreateDownloadUrlPostResponseFromDiscriminatorValue } from './createDownloadUrlPostResponse'; -import { type CreateDownloadUrlPostResponse } from './index'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the createDownloadUrl method. - */ -export class CreateDownloadUrlRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateDownloadUrlRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}/createDownloadUrl"); - }; - /** - * Invoke action createDownloadUrl - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CreateDownloadUrlPostResponse - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCreateDownloadUrlPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke action createDownloadUrl - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createDownloadUrlRequestBuilder - */ - public withUrl(rawUrl: string) : CreateDownloadUrlRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateDownloadUrlRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/index.ts b/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/index.ts deleted file mode 100644 index 75df8551ac7..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/item/createDownloadUrl/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './createDownloadUrlPostResponse' -export * from './createDownloadUrlRequestBuilder' diff --git a/src/me/managedDevices/item/logCollectionRequests/item/deviceLogCollectionResponseItemRequestBuilder.ts b/src/me/managedDevices/item/logCollectionRequests/item/deviceLogCollectionResponseItemRequestBuilder.ts deleted file mode 100644 index 5792496a82b..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/item/deviceLogCollectionResponseItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createDeviceLogCollectionResponseFromDiscriminatorValue, deserializeIntoDeviceLogCollectionResponse, serializeDeviceLogCollectionResponse, type DeviceLogCollectionResponse } from '../../../../../models/deviceLogCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CreateDownloadUrlRequestBuilder } from './createDownloadUrl/createDownloadUrlRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DeviceLogCollectionResponseItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. - */ -export class DeviceLogCollectionResponseItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the createDownloadUrl method. - */ - public get createDownloadUrl(): CreateDownloadUrlRequestBuilder { - return new CreateDownloadUrlRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DeviceLogCollectionResponseItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property logCollectionRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * List of log collection requests - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceLogCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceLogCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property logCollectionRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceLogCollectionResponse - */ - public patch(body: DeviceLogCollectionResponse, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceLogCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property logCollectionRequests for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * List of log collection requests - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deviceLogCollectionResponseItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property logCollectionRequests in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: DeviceLogCollectionResponse, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceLogCollectionResponse); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DeviceLogCollectionResponseItemRequestBuilder - */ - public withUrl(rawUrl: string) : DeviceLogCollectionResponseItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeviceLogCollectionResponseItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deviceLogCollectionResponseItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/logCollectionRequests/item/index.ts b/src/me/managedDevices/item/logCollectionRequests/item/index.ts deleted file mode 100644 index 10009806df4..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deviceLogCollectionResponseItemRequestBuilder' diff --git a/src/me/managedDevices/item/logCollectionRequests/logCollectionRequestsRequestBuilder.ts b/src/me/managedDevices/item/logCollectionRequests/logCollectionRequestsRequestBuilder.ts deleted file mode 100644 index fe6d94583f7..00000000000 --- a/src/me/managedDevices/item/logCollectionRequests/logCollectionRequestsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceLogCollectionResponseCollectionResponse } from '../../../../models/'; -import { createDeviceLogCollectionResponseFromDiscriminatorValue, deserializeIntoDeviceLogCollectionResponse, serializeDeviceLogCollectionResponse, type DeviceLogCollectionResponse } from '../../../../models/deviceLogCollectionResponse'; -import { createDeviceLogCollectionResponseCollectionResponseFromDiscriminatorValue } from '../../../../models/deviceLogCollectionResponseCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeviceLogCollectionResponseItemRequestBuilder } from './item/deviceLogCollectionResponseItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LogCollectionRequestsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. - */ -export class LogCollectionRequestsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. - * @param deviceLogCollectionResponseId The unique identifier of deviceLogCollectionResponse - * @returns a DeviceLogCollectionResponseItemRequestBuilder - */ - public byDeviceLogCollectionResponseId(deviceLogCollectionResponseId: string) : DeviceLogCollectionResponseItemRequestBuilder { - if(!deviceLogCollectionResponseId) throw new Error("deviceLogCollectionResponseId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["deviceLogCollectionResponse%2Did"] = deviceLogCollectionResponseId - return new DeviceLogCollectionResponseItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new LogCollectionRequestsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List of log collection requests - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceLogCollectionResponseCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceLogCollectionResponseCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to logCollectionRequests for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceLogCollectionResponse - */ - public post(body: DeviceLogCollectionResponse, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceLogCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * List of log collection requests - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, logCollectionRequestsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to logCollectionRequests for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: DeviceLogCollectionResponse, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeDeviceLogCollectionResponse); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a logCollectionRequestsRequestBuilder - */ - public withUrl(rawUrl: string) : LogCollectionRequestsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LogCollectionRequestsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const logCollectionRequestsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/logoutSharedAppleDeviceActiveUser/logoutSharedAppleDeviceActiveUserRequestBuilder.ts b/src/me/managedDevices/item/logoutSharedAppleDeviceActiveUser/logoutSharedAppleDeviceActiveUserRequestBuilder.ts deleted file mode 100644 index 0da345e5192..00000000000 --- a/src/me/managedDevices/item/logoutSharedAppleDeviceActiveUser/logoutSharedAppleDeviceActiveUserRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the logoutSharedAppleDeviceActiveUser method. - */ -export class LogoutSharedAppleDeviceActiveUserRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LogoutSharedAppleDeviceActiveUserRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/logoutSharedAppleDeviceActiveUser"); - }; - /** - * Logout shared Apple device active user - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-logoutsharedappledeviceactiveuser?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Logout shared Apple device active user - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a logoutSharedAppleDeviceActiveUserRequestBuilder - */ - public withUrl(rawUrl: string) : LogoutSharedAppleDeviceActiveUserRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LogoutSharedAppleDeviceActiveUserRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/managedDeviceItemRequestBuilder.ts b/src/me/managedDevices/item/managedDeviceItemRequestBuilder.ts deleted file mode 100644 index bddf28b8293..00000000000 --- a/src/me/managedDevices/item/managedDeviceItemRequestBuilder.ts +++ /dev/null @@ -1,295 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createManagedDeviceFromDiscriminatorValue, deserializeIntoManagedDevice, serializeManagedDevice, type ManagedDevice } from '../../../models/managedDevice'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BypassActivationLockRequestBuilder } from './bypassActivationLock/bypassActivationLockRequestBuilder'; -import { CleanWindowsDeviceRequestBuilder } from './cleanWindowsDevice/cleanWindowsDeviceRequestBuilder'; -import { DeleteUserFromSharedAppleDeviceRequestBuilder } from './deleteUserFromSharedAppleDevice/deleteUserFromSharedAppleDeviceRequestBuilder'; -import { DeviceCategoryRequestBuilder } from './deviceCategory/deviceCategoryRequestBuilder'; -import { DeviceCompliancePolicyStatesRequestBuilder } from './deviceCompliancePolicyStates/deviceCompliancePolicyStatesRequestBuilder'; -import { DeviceConfigurationStatesRequestBuilder } from './deviceConfigurationStates/deviceConfigurationStatesRequestBuilder'; -import { DisableLostModeRequestBuilder } from './disableLostMode/disableLostModeRequestBuilder'; -import { LocateDeviceRequestBuilder } from './locateDevice/locateDeviceRequestBuilder'; -import { LogCollectionRequestsRequestBuilder } from './logCollectionRequests/logCollectionRequestsRequestBuilder'; -import { LogoutSharedAppleDeviceActiveUserRequestBuilder } from './logoutSharedAppleDeviceActiveUser/logoutSharedAppleDeviceActiveUserRequestBuilder'; -import { RebootNowRequestBuilder } from './rebootNow/rebootNowRequestBuilder'; -import { RecoverPasscodeRequestBuilder } from './recoverPasscode/recoverPasscodeRequestBuilder'; -import { RemoteLockRequestBuilder } from './remoteLock/remoteLockRequestBuilder'; -import { RequestRemoteAssistanceRequestBuilder } from './requestRemoteAssistance/requestRemoteAssistanceRequestBuilder'; -import { ResetPasscodeRequestBuilder } from './resetPasscode/resetPasscodeRequestBuilder'; -import { RetireRequestBuilder } from './retire/retireRequestBuilder'; -import { ShutDownRequestBuilder } from './shutDown/shutDownRequestBuilder'; -import { SyncDeviceRequestBuilder } from './syncDevice/syncDeviceRequestBuilder'; -import { UpdateWindowsDeviceAccountRequestBuilder } from './updateWindowsDeviceAccount/updateWindowsDeviceAccountRequestBuilder'; -import { UsersRequestBuilder } from './users/usersRequestBuilder'; -import { WindowsDefenderScanRequestBuilder } from './windowsDefenderScan/windowsDefenderScanRequestBuilder'; -import { WindowsDefenderUpdateSignaturesRequestBuilder } from './windowsDefenderUpdateSignatures/windowsDefenderUpdateSignaturesRequestBuilder'; -import { WindowsProtectionStateRequestBuilder } from './windowsProtectionState/windowsProtectionStateRequestBuilder'; -import { WipeRequestBuilder } from './wipe/wipeRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ManagedDeviceItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the managedDevices property of the microsoft.graph.user entity. - */ -export class ManagedDeviceItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the bypassActivationLock method. - */ - public get bypassActivationLock(): BypassActivationLockRequestBuilder { - return new BypassActivationLockRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the cleanWindowsDevice method. - */ - public get cleanWindowsDevice(): CleanWindowsDeviceRequestBuilder { - return new CleanWindowsDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the deleteUserFromSharedAppleDevice method. - */ - public get deleteUserFromSharedAppleDevice(): DeleteUserFromSharedAppleDeviceRequestBuilder { - return new DeleteUserFromSharedAppleDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceCategory property of the microsoft.graph.managedDevice entity. - */ - public get deviceCategory(): DeviceCategoryRequestBuilder { - return new DeviceCategoryRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceCompliancePolicyStates property of the microsoft.graph.managedDevice entity. - */ - public get deviceCompliancePolicyStates(): DeviceCompliancePolicyStatesRequestBuilder { - return new DeviceCompliancePolicyStatesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceConfigurationStates property of the microsoft.graph.managedDevice entity. - */ - public get deviceConfigurationStates(): DeviceConfigurationStatesRequestBuilder { - return new DeviceConfigurationStatesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the disableLostMode method. - */ - public get disableLostMode(): DisableLostModeRequestBuilder { - return new DisableLostModeRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the locateDevice method. - */ - public get locateDevice(): LocateDeviceRequestBuilder { - return new LocateDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the logCollectionRequests property of the microsoft.graph.managedDevice entity. - */ - public get logCollectionRequests(): LogCollectionRequestsRequestBuilder { - return new LogCollectionRequestsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the logoutSharedAppleDeviceActiveUser method. - */ - public get logoutSharedAppleDeviceActiveUser(): LogoutSharedAppleDeviceActiveUserRequestBuilder { - return new LogoutSharedAppleDeviceActiveUserRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the rebootNow method. - */ - public get rebootNow(): RebootNowRequestBuilder { - return new RebootNowRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the recoverPasscode method. - */ - public get recoverPasscode(): RecoverPasscodeRequestBuilder { - return new RecoverPasscodeRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the remoteLock method. - */ - public get remoteLock(): RemoteLockRequestBuilder { - return new RemoteLockRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the requestRemoteAssistance method. - */ - public get requestRemoteAssistance(): RequestRemoteAssistanceRequestBuilder { - return new RequestRemoteAssistanceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the resetPasscode method. - */ - public get resetPasscode(): ResetPasscodeRequestBuilder { - return new ResetPasscodeRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the retire method. - */ - public get retire(): RetireRequestBuilder { - return new RetireRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the shutDown method. - */ - public get shutDown(): ShutDownRequestBuilder { - return new ShutDownRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the syncDevice method. - */ - public get syncDevice(): SyncDeviceRequestBuilder { - return new SyncDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the updateWindowsDeviceAccount method. - */ - public get updateWindowsDeviceAccount(): UpdateWindowsDeviceAccountRequestBuilder { - return new UpdateWindowsDeviceAccountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the users property of the microsoft.graph.managedDevice entity. - */ - public get users(): UsersRequestBuilder { - return new UsersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the windowsDefenderScan method. - */ - public get windowsDefenderScan(): WindowsDefenderScanRequestBuilder { - return new WindowsDefenderScanRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the windowsDefenderUpdateSignatures method. - */ - public get windowsDefenderUpdateSignatures(): WindowsDefenderUpdateSignaturesRequestBuilder { - return new WindowsDefenderUpdateSignaturesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. - */ - public get windowsProtectionState(): WindowsProtectionStateRequestBuilder { - return new WindowsProtectionStateRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the wipe method. - */ - public get wipe(): WipeRequestBuilder { - return new WipeRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ManagedDeviceItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property managedDevices for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The managed devices associated with the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ManagedDevice - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createManagedDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property managedDevices in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ManagedDevice - */ - public patch(body: ManagedDevice, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createManagedDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property managedDevices for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The managed devices associated with the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, managedDeviceItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property managedDevices in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ManagedDevice, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeManagedDevice); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ManagedDeviceItemRequestBuilder - */ - public withUrl(rawUrl: string) : ManagedDeviceItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ManagedDeviceItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const managedDeviceItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/rebootNow/rebootNowRequestBuilder.ts b/src/me/managedDevices/item/rebootNow/rebootNowRequestBuilder.ts deleted file mode 100644 index 5a86c160348..00000000000 --- a/src/me/managedDevices/item/rebootNow/rebootNowRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the rebootNow method. - */ -export class RebootNowRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RebootNowRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/rebootNow"); - }; - /** - * Reboot device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-rebootnow?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reboot device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a rebootNowRequestBuilder - */ - public withUrl(rawUrl: string) : RebootNowRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RebootNowRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/recoverPasscode/recoverPasscodeRequestBuilder.ts b/src/me/managedDevices/item/recoverPasscode/recoverPasscodeRequestBuilder.ts deleted file mode 100644 index dee46670a48..00000000000 --- a/src/me/managedDevices/item/recoverPasscode/recoverPasscodeRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the recoverPasscode method. - */ -export class RecoverPasscodeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RecoverPasscodeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/recoverPasscode"); - }; - /** - * Recover passcode - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-recoverpasscode?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Recover passcode - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a recoverPasscodeRequestBuilder - */ - public withUrl(rawUrl: string) : RecoverPasscodeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RecoverPasscodeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/remoteLock/remoteLockRequestBuilder.ts b/src/me/managedDevices/item/remoteLock/remoteLockRequestBuilder.ts deleted file mode 100644 index 6d49c3ad6e4..00000000000 --- a/src/me/managedDevices/item/remoteLock/remoteLockRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the remoteLock method. - */ -export class RemoteLockRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RemoteLockRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/remoteLock"); - }; - /** - * Remote lock - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-remotelock?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Remote lock - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a remoteLockRequestBuilder - */ - public withUrl(rawUrl: string) : RemoteLockRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RemoteLockRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/requestRemoteAssistance/requestRemoteAssistanceRequestBuilder.ts b/src/me/managedDevices/item/requestRemoteAssistance/requestRemoteAssistanceRequestBuilder.ts deleted file mode 100644 index e7098304116..00000000000 --- a/src/me/managedDevices/item/requestRemoteAssistance/requestRemoteAssistanceRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the requestRemoteAssistance method. - */ -export class RequestRemoteAssistanceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RequestRemoteAssistanceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/requestRemoteAssistance"); - }; - /** - * Request remote assistance - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-requestremoteassistance?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Request remote assistance - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a requestRemoteAssistanceRequestBuilder - */ - public withUrl(rawUrl: string) : RequestRemoteAssistanceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RequestRemoteAssistanceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/resetPasscode/resetPasscodeRequestBuilder.ts b/src/me/managedDevices/item/resetPasscode/resetPasscodeRequestBuilder.ts deleted file mode 100644 index 64c88301d14..00000000000 --- a/src/me/managedDevices/item/resetPasscode/resetPasscodeRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the resetPasscode method. - */ -export class ResetPasscodeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ResetPasscodeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/resetPasscode"); - }; - /** - * Reset passcode - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-resetpasscode?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reset passcode - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a resetPasscodeRequestBuilder - */ - public withUrl(rawUrl: string) : ResetPasscodeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResetPasscodeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/retire/retireRequestBuilder.ts b/src/me/managedDevices/item/retire/retireRequestBuilder.ts deleted file mode 100644 index b0e9d22ee08..00000000000 --- a/src/me/managedDevices/item/retire/retireRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the retire method. - */ -export class RetireRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RetireRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/retire"); - }; - /** - * Retire a device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-retire?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retire a device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a retireRequestBuilder - */ - public withUrl(rawUrl: string) : RetireRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RetireRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/shutDown/shutDownRequestBuilder.ts b/src/me/managedDevices/item/shutDown/shutDownRequestBuilder.ts deleted file mode 100644 index 47c6a637bc0..00000000000 --- a/src/me/managedDevices/item/shutDown/shutDownRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the shutDown method. - */ -export class ShutDownRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ShutDownRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/shutDown"); - }; - /** - * Shut down device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-shutdown?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Shut down device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a shutDownRequestBuilder - */ - public withUrl(rawUrl: string) : ShutDownRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ShutDownRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/syncDevice/syncDeviceRequestBuilder.ts b/src/me/managedDevices/item/syncDevice/syncDeviceRequestBuilder.ts deleted file mode 100644 index 51a012c02b8..00000000000 --- a/src/me/managedDevices/item/syncDevice/syncDeviceRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the syncDevice method. - */ -export class SyncDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SyncDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/syncDevice"); - }; - /** - * Not yet documented - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-syncdevice?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Not yet documented - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a syncDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : SyncDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SyncDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/updateWindowsDeviceAccount/index.ts b/src/me/managedDevices/item/updateWindowsDeviceAccount/index.ts deleted file mode 100644 index 2a8d61a954d..00000000000 --- a/src/me/managedDevices/item/updateWindowsDeviceAccount/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './updateWindowsDeviceAccountPostRequestBody' -export * from './updateWindowsDeviceAccountRequestBuilder' diff --git a/src/me/managedDevices/item/updateWindowsDeviceAccount/updateWindowsDeviceAccountPostRequestBody.ts b/src/me/managedDevices/item/updateWindowsDeviceAccount/updateWindowsDeviceAccountPostRequestBody.ts deleted file mode 100644 index ca95c48edf4..00000000000 --- a/src/me/managedDevices/item/updateWindowsDeviceAccount/updateWindowsDeviceAccountPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createUpdateWindowsDeviceAccountActionParameterFromDiscriminatorValue, serializeUpdateWindowsDeviceAccountActionParameter, type UpdateWindowsDeviceAccountActionParameter } from '../../../../models/updateWindowsDeviceAccountActionParameter'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createUpdateWindowsDeviceAccountPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoUpdateWindowsDeviceAccountPostRequestBody; -} -export function deserializeIntoUpdateWindowsDeviceAccountPostRequestBody(updateWindowsDeviceAccountPostRequestBody: UpdateWindowsDeviceAccountPostRequestBody | undefined = {} as UpdateWindowsDeviceAccountPostRequestBody) : Record void> { - return { - "updateWindowsDeviceAccountActionParameter": n => { updateWindowsDeviceAccountPostRequestBody.updateWindowsDeviceAccountActionParameter = n.getObjectValue(createUpdateWindowsDeviceAccountActionParameterFromDiscriminatorValue); }, - } -} -export function serializeUpdateWindowsDeviceAccountPostRequestBody(writer: SerializationWriter, updateWindowsDeviceAccountPostRequestBody: UpdateWindowsDeviceAccountPostRequestBody | undefined = {} as UpdateWindowsDeviceAccountPostRequestBody) : void { - writer.writeObjectValue("updateWindowsDeviceAccountActionParameter", updateWindowsDeviceAccountPostRequestBody.updateWindowsDeviceAccountActionParameter, serializeUpdateWindowsDeviceAccountActionParameter); - writer.writeAdditionalData(updateWindowsDeviceAccountPostRequestBody.additionalData); -} -export interface UpdateWindowsDeviceAccountPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The updateWindowsDeviceAccountActionParameter property - */ - updateWindowsDeviceAccountActionParameter?: UpdateWindowsDeviceAccountActionParameter; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/updateWindowsDeviceAccount/updateWindowsDeviceAccountRequestBuilder.ts b/src/me/managedDevices/item/updateWindowsDeviceAccount/updateWindowsDeviceAccountRequestBuilder.ts deleted file mode 100644 index 3dfd03c73a1..00000000000 --- a/src/me/managedDevices/item/updateWindowsDeviceAccount/updateWindowsDeviceAccountRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoUpdateWindowsDeviceAccountPostRequestBody, serializeUpdateWindowsDeviceAccountPostRequestBody, type UpdateWindowsDeviceAccountPostRequestBody } from './updateWindowsDeviceAccountPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the updateWindowsDeviceAccount method. - */ -export class UpdateWindowsDeviceAccountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UpdateWindowsDeviceAccountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/updateWindowsDeviceAccount"); - }; - /** - * Not yet documented - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-updatewindowsdeviceaccount?view=graph-rest-1.0|Find more info here} - */ - public post(body: UpdateWindowsDeviceAccountPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Not yet documented - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UpdateWindowsDeviceAccountPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUpdateWindowsDeviceAccountPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a updateWindowsDeviceAccountRequestBuilder - */ - public withUrl(rawUrl: string) : UpdateWindowsDeviceAccountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UpdateWindowsDeviceAccountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/users/index.ts b/src/me/managedDevices/item/users/index.ts deleted file mode 100644 index 397043834a4..00000000000 --- a/src/me/managedDevices/item/users/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './usersRequestBuilder' diff --git a/src/me/managedDevices/item/users/usersRequestBuilder.ts b/src/me/managedDevices/item/users/usersRequestBuilder.ts deleted file mode 100644 index a6f78117366..00000000000 --- a/src/me/managedDevices/item/users/usersRequestBuilder.ts +++ /dev/null @@ -1,104 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type UserCollectionResponse } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createUserCollectionResponseFromDiscriminatorValue } from '../../../../models/userCollectionResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface UsersRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the users property of the microsoft.graph.managedDevice entity. - */ -export class UsersRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new UsersRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/users{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List properties and relationships of the user objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-user-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * List properties and relationships of the user objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, usersRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a usersRequestBuilder - */ - public withUrl(rawUrl: string) : UsersRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UsersRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const usersRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsDefenderScan/index.ts b/src/me/managedDevices/item/windowsDefenderScan/index.ts deleted file mode 100644 index dc9802fbf0b..00000000000 --- a/src/me/managedDevices/item/windowsDefenderScan/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './windowsDefenderScanPostRequestBody' -export * from './windowsDefenderScanRequestBuilder' diff --git a/src/me/managedDevices/item/windowsDefenderScan/windowsDefenderScanPostRequestBody.ts b/src/me/managedDevices/item/windowsDefenderScan/windowsDefenderScanPostRequestBody.ts deleted file mode 100644 index d4c649f7eca..00000000000 --- a/src/me/managedDevices/item/windowsDefenderScan/windowsDefenderScanPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createWindowsDefenderScanPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoWindowsDefenderScanPostRequestBody; -} -export function deserializeIntoWindowsDefenderScanPostRequestBody(windowsDefenderScanPostRequestBody: WindowsDefenderScanPostRequestBody | undefined = {} as WindowsDefenderScanPostRequestBody) : Record void> { - return { - "quickScan": n => { windowsDefenderScanPostRequestBody.quickScan = n.getBooleanValue(); }, - } -} -export function serializeWindowsDefenderScanPostRequestBody(writer: SerializationWriter, windowsDefenderScanPostRequestBody: WindowsDefenderScanPostRequestBody | undefined = {} as WindowsDefenderScanPostRequestBody) : void { - writer.writeBooleanValue("quickScan", windowsDefenderScanPostRequestBody.quickScan); - writer.writeAdditionalData(windowsDefenderScanPostRequestBody.additionalData); -} -export interface WindowsDefenderScanPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The quickScan property - */ - quickScan?: boolean; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsDefenderScan/windowsDefenderScanRequestBuilder.ts b/src/me/managedDevices/item/windowsDefenderScan/windowsDefenderScanRequestBuilder.ts deleted file mode 100644 index acca0cc3f8e..00000000000 --- a/src/me/managedDevices/item/windowsDefenderScan/windowsDefenderScanRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoWindowsDefenderScanPostRequestBody, serializeWindowsDefenderScanPostRequestBody, type WindowsDefenderScanPostRequestBody } from './windowsDefenderScanPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the windowsDefenderScan method. - */ -export class WindowsDefenderScanRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new WindowsDefenderScanRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsDefenderScan"); - }; - /** - * Not yet documented - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-windowsdefenderscan?view=graph-rest-1.0|Find more info here} - */ - public post(body: WindowsDefenderScanPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Not yet documented - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: WindowsDefenderScanPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeWindowsDefenderScanPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a windowsDefenderScanRequestBuilder - */ - public withUrl(rawUrl: string) : WindowsDefenderScanRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WindowsDefenderScanRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsDefenderUpdateSignatures/windowsDefenderUpdateSignaturesRequestBuilder.ts b/src/me/managedDevices/item/windowsDefenderUpdateSignatures/windowsDefenderUpdateSignaturesRequestBuilder.ts deleted file mode 100644 index 7984be9a6a4..00000000000 --- a/src/me/managedDevices/item/windowsDefenderUpdateSignatures/windowsDefenderUpdateSignaturesRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the windowsDefenderUpdateSignatures method. - */ -export class WindowsDefenderUpdateSignaturesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new WindowsDefenderUpdateSignaturesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsDefenderUpdateSignatures"); - }; - /** - * Not yet documented - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-windowsdefenderupdatesignatures?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Not yet documented - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a windowsDefenderUpdateSignaturesRequestBuilder - */ - public withUrl(rawUrl: string) : WindowsDefenderUpdateSignaturesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WindowsDefenderUpdateSignaturesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/count/countRequestBuilder.ts b/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/count/countRequestBuilder.ts deleted file mode 100644 index c6641931d1e..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/count/index.ts b/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/detectedMalwareStateRequestBuilder.ts b/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/detectedMalwareStateRequestBuilder.ts deleted file mode 100644 index f2c5c53308d..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/detectedMalwareStateRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type WindowsDeviceMalwareStateCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createWindowsDeviceMalwareStateFromDiscriminatorValue, deserializeIntoWindowsDeviceMalwareState, serializeWindowsDeviceMalwareState, type WindowsDeviceMalwareState } from '../../../../../models/windowsDeviceMalwareState'; -import { createWindowsDeviceMalwareStateCollectionResponseFromDiscriminatorValue } from '../../../../../models/windowsDeviceMalwareStateCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { WindowsDeviceMalwareStateItemRequestBuilder } from './item/windowsDeviceMalwareStateItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DetectedMalwareStateRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. - */ -export class DetectedMalwareStateRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. - * @param windowsDeviceMalwareStateId The unique identifier of windowsDeviceMalwareState - * @returns a WindowsDeviceMalwareStateItemRequestBuilder - */ - public byWindowsDeviceMalwareStateId(windowsDeviceMalwareStateId: string) : WindowsDeviceMalwareStateItemRequestBuilder { - if(!windowsDeviceMalwareStateId) throw new Error("windowsDeviceMalwareStateId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["windowsDeviceMalwareState%2Did"] = windowsDeviceMalwareStateId - return new WindowsDeviceMalwareStateItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new DetectedMalwareStateRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * List properties and relationships of the windowsDeviceMalwareState objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsDeviceMalwareStateCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsdevicemalwarestate-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsDeviceMalwareStateCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new windowsDeviceMalwareState object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsDeviceMalwareState - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsdevicemalwarestate-create?view=graph-rest-1.0|Find more info here} - */ - public post(body: WindowsDeviceMalwareState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsDeviceMalwareStateFromDiscriminatorValue, errorMapping); - }; - /** - * List properties and relationships of the windowsDeviceMalwareState objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, detectedMalwareStateRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new windowsDeviceMalwareState object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: WindowsDeviceMalwareState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeWindowsDeviceMalwareState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a detectedMalwareStateRequestBuilder - */ - public withUrl(rawUrl: string) : DetectedMalwareStateRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DetectedMalwareStateRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const detectedMalwareStateRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/index.ts b/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/index.ts deleted file mode 100644 index 897fab69bbc..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './detectedMalwareStateRequestBuilder' diff --git a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/item/index.ts b/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/item/index.ts deleted file mode 100644 index f8c6f5c826d..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './windowsDeviceMalwareStateItemRequestBuilder' diff --git a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/item/windowsDeviceMalwareStateItemRequestBuilder.ts b/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/item/windowsDeviceMalwareStateItemRequestBuilder.ts deleted file mode 100644 index 8d3a6c7f9ad..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/detectedMalwareState/item/windowsDeviceMalwareStateItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createWindowsDeviceMalwareStateFromDiscriminatorValue, deserializeIntoWindowsDeviceMalwareState, serializeWindowsDeviceMalwareState, type WindowsDeviceMalwareState } from '../../../../../../models/windowsDeviceMalwareState'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. - */ -export class WindowsDeviceMalwareStateItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new WindowsDeviceMalwareStateItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a windowsDeviceMalwareState. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsdevicemalwarestate-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read properties and relationships of the windowsDeviceMalwareState object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsDeviceMalwareState - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsdevicemalwarestate-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsDeviceMalwareStateFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a windowsDeviceMalwareState object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsDeviceMalwareState - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsdevicemalwarestate-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: WindowsDeviceMalwareState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsDeviceMalwareStateFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a windowsDeviceMalwareState. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read properties and relationships of the windowsDeviceMalwareState object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, windowsDeviceMalwareStateItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a windowsDeviceMalwareState object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: WindowsDeviceMalwareState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeWindowsDeviceMalwareState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a WindowsDeviceMalwareStateItemRequestBuilder - */ - public withUrl(rawUrl: string) : WindowsDeviceMalwareStateItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WindowsDeviceMalwareStateItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const windowsDeviceMalwareStateItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/windowsProtectionState/index.ts b/src/me/managedDevices/item/windowsProtectionState/index.ts deleted file mode 100644 index 5a1e759abe5..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './windowsProtectionStateRequestBuilder' diff --git a/src/me/managedDevices/item/windowsProtectionState/windowsProtectionStateRequestBuilder.ts b/src/me/managedDevices/item/windowsProtectionState/windowsProtectionStateRequestBuilder.ts deleted file mode 100644 index 3bd2cd6a82c..00000000000 --- a/src/me/managedDevices/item/windowsProtectionState/windowsProtectionStateRequestBuilder.ts +++ /dev/null @@ -1,136 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createWindowsProtectionStateFromDiscriminatorValue, deserializeIntoWindowsProtectionState, serializeWindowsProtectionState, type WindowsProtectionState } from '../../../../models/windowsProtectionState'; -import { DetectedMalwareStateRequestBuilder } from './detectedMalwareState/detectedMalwareStateRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface WindowsProtectionStateRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the windowsProtectionState property of the microsoft.graph.managedDevice entity. - */ -export class WindowsProtectionStateRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the detectedMalwareState property of the microsoft.graph.windowsProtectionState entity. - */ - public get detectedMalwareState(): DetectedMalwareStateRequestBuilder { - return new DetectedMalwareStateRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new WindowsProtectionStateRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}"); - }; - /** - * Delete navigation property windowsProtectionState for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read properties and relationships of the windowsProtectionState object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsProtectionState - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsprotectionstate-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsProtectionStateFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a windowsProtectionState object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of WindowsProtectionState - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-windowsprotectionstate-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: WindowsProtectionState, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createWindowsProtectionStateFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property windowsProtectionState for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read properties and relationships of the windowsProtectionState object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, windowsProtectionStateRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a windowsProtectionState object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: WindowsProtectionState, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeWindowsProtectionState); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a windowsProtectionStateRequestBuilder - */ - public withUrl(rawUrl: string) : WindowsProtectionStateRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WindowsProtectionStateRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const windowsProtectionStateRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/wipe/index.ts b/src/me/managedDevices/item/wipe/index.ts deleted file mode 100644 index 7874ff4e174..00000000000 --- a/src/me/managedDevices/item/wipe/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './wipePostRequestBody' -export * from './wipeRequestBuilder' diff --git a/src/me/managedDevices/item/wipe/wipePostRequestBody.ts b/src/me/managedDevices/item/wipe/wipePostRequestBody.ts deleted file mode 100644 index 49a6c514fc7..00000000000 --- a/src/me/managedDevices/item/wipe/wipePostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createWipePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoWipePostRequestBody; -} -export function deserializeIntoWipePostRequestBody(wipePostRequestBody: WipePostRequestBody | undefined = {} as WipePostRequestBody) : Record void> { - return { - "keepEnrollmentData": n => { wipePostRequestBody.keepEnrollmentData = n.getBooleanValue(); }, - "keepUserData": n => { wipePostRequestBody.keepUserData = n.getBooleanValue(); }, - "macOsUnlockCode": n => { wipePostRequestBody.macOsUnlockCode = n.getStringValue(); }, - "persistEsimDataPlan": n => { wipePostRequestBody.persistEsimDataPlan = n.getBooleanValue(); }, - } -} -export function serializeWipePostRequestBody(writer: SerializationWriter, wipePostRequestBody: WipePostRequestBody | undefined = {} as WipePostRequestBody) : void { - writer.writeBooleanValue("keepEnrollmentData", wipePostRequestBody.keepEnrollmentData); - writer.writeBooleanValue("keepUserData", wipePostRequestBody.keepUserData); - writer.writeStringValue("macOsUnlockCode", wipePostRequestBody.macOsUnlockCode); - writer.writeBooleanValue("persistEsimDataPlan", wipePostRequestBody.persistEsimDataPlan); - writer.writeAdditionalData(wipePostRequestBody.additionalData); -} -export interface WipePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The keepEnrollmentData property - */ - keepEnrollmentData?: boolean; - /** - * The keepUserData property - */ - keepUserData?: boolean; - /** - * The macOsUnlockCode property - */ - macOsUnlockCode?: string; - /** - * The persistEsimDataPlan property - */ - persistEsimDataPlan?: boolean; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/item/wipe/wipeRequestBuilder.ts b/src/me/managedDevices/item/wipe/wipeRequestBuilder.ts deleted file mode 100644 index 79dd7b96d82..00000000000 --- a/src/me/managedDevices/item/wipe/wipeRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoWipePostRequestBody, serializeWipePostRequestBody, type WipePostRequestBody } from './wipePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the wipe method. - */ -export class WipeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new WipeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices/{managedDevice%2Did}/wipe"); - }; - /** - * Wipe a device - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-manageddevice-wipe?view=graph-rest-1.0|Find more info here} - */ - public post(body: WipePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Wipe a device - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: WipePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeWipePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a wipeRequestBuilder - */ - public withUrl(rawUrl: string) : WipeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WipeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/managedDevices/managedDevicesRequestBuilder.ts b/src/me/managedDevices/managedDevicesRequestBuilder.ts deleted file mode 100644 index 01033084988..00000000000 --- a/src/me/managedDevices/managedDevicesRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ManagedDeviceCollectionResponse } from '../../models/'; -import { createManagedDeviceFromDiscriminatorValue, deserializeIntoManagedDevice, serializeManagedDevice, type ManagedDevice } from '../../models/managedDevice'; -import { createManagedDeviceCollectionResponseFromDiscriminatorValue } from '../../models/managedDeviceCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ManagedDeviceItemRequestBuilder } from './item/managedDeviceItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ManagedDevicesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the managedDevices property of the microsoft.graph.user entity. - */ -export class ManagedDevicesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the managedDevices property of the microsoft.graph.user entity. - * @param managedDeviceId The unique identifier of managedDevice - * @returns a ManagedDeviceItemRequestBuilder - */ - public byManagedDeviceId(managedDeviceId: string) : ManagedDeviceItemRequestBuilder { - if(!managedDeviceId) throw new Error("managedDeviceId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["managedDevice%2Did"] = managedDeviceId - return new ManagedDeviceItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ManagedDevicesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/managedDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The managed devices associated with the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ManagedDeviceCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createManagedDeviceCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to managedDevices for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ManagedDevice - */ - public post(body: ManagedDevice, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createManagedDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * The managed devices associated with the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, managedDevicesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to managedDevices for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ManagedDevice, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeManagedDevice); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a managedDevicesRequestBuilder - */ - public withUrl(rawUrl: string) : ManagedDevicesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ManagedDevicesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const managedDevicesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/manager/index.ts b/src/me/manager/index.ts deleted file mode 100644 index a9a7c30305b..00000000000 --- a/src/me/manager/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './managerRequestBuilder' diff --git a/src/me/manager/managerRequestBuilder.ts b/src/me/manager/managerRequestBuilder.ts deleted file mode 100644 index 5ce08a6351b..00000000000 --- a/src/me/manager/managerRequestBuilder.ts +++ /dev/null @@ -1,107 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../models/directoryObject'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { RefRequestBuilder } from './ref/refRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ManagerRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the manager property of the microsoft.graph.user entity. - */ -export class ManagerRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the collection of user entities. - */ - public get ref(): RefRequestBuilder { - return new RefRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ManagerRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/manager{?%24select,%24expand}"); - }; - /** - * Remove a user's manager. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-delete-manager?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - * @see {@link https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * Remove a user's manager. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, managerRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a managerRequestBuilder - */ - public withUrl(rawUrl: string) : ManagerRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ManagerRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const managerRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/manager/ref/refRequestBuilder.ts b/src/me/manager/ref/refRequestBuilder.ts deleted file mode 100644 index f5693034e6f..00000000000 --- a/src/me/manager/ref/refRequestBuilder.ts +++ /dev/null @@ -1,115 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { deserializeIntoReferenceUpdate, serializeReferenceUpdate, type ReferenceUpdate } from '../../../models/referenceUpdate'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the collection of user entities. - */ -export class RefRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RefRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/manager/$ref"); - }; - /** - * Remove a user's manager. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-delete-manager?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of String - * @see {@link https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "string", errorMapping); - }; - /** - * Assign a user's manager. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-post-manager?view=graph-rest-1.0|Find more info here} - */ - public put(body: ReferenceUpdate, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Remove a user's manager. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Assign a user's manager. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ReferenceUpdate, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReferenceUpdate); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a RefRequestBuilder - */ - public withUrl(rawUrl: string) : RefRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RefRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/meRequestBuilder.ts b/src/me/meRequestBuilder.ts deleted file mode 100644 index 4597c586a00..00000000000 --- a/src/me/meRequestBuilder.ts +++ /dev/null @@ -1,618 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../models/oDataErrors/oDataError'; -import { createUserFromDiscriminatorValue, deserializeIntoUser, serializeUser, type User } from '../models/user'; -import { ActivitiesRequestBuilder } from './activities/activitiesRequestBuilder'; -import { AgreementAcceptancesRequestBuilder } from './agreementAcceptances/agreementAcceptancesRequestBuilder'; -import { AppRoleAssignmentsRequestBuilder } from './appRoleAssignments/appRoleAssignmentsRequestBuilder'; -import { AssignLicenseRequestBuilder } from './assignLicense/assignLicenseRequestBuilder'; -import { AuthenticationRequestBuilder } from './authentication/authenticationRequestBuilder'; -import { CalendarRequestBuilder } from './calendar/calendarRequestBuilder'; -import { CalendarGroupsRequestBuilder } from './calendarGroups/calendarGroupsRequestBuilder'; -import { CalendarsRequestBuilder } from './calendars/calendarsRequestBuilder'; -import { CalendarViewRequestBuilder } from './calendarView/calendarViewRequestBuilder'; -import { ChangePasswordRequestBuilder } from './changePassword/changePasswordRequestBuilder'; -import { ChatsRequestBuilder } from './chats/chatsRequestBuilder'; -import { CheckMemberGroupsRequestBuilder } from './checkMemberGroups/checkMemberGroupsRequestBuilder'; -import { CheckMemberObjectsRequestBuilder } from './checkMemberObjects/checkMemberObjectsRequestBuilder'; -import { ContactFoldersRequestBuilder } from './contactFolders/contactFoldersRequestBuilder'; -import { ContactsRequestBuilder } from './contacts/contactsRequestBuilder'; -import { CreatedObjectsRequestBuilder } from './createdObjects/createdObjectsRequestBuilder'; -import { DeviceManagementTroubleshootingEventsRequestBuilder } from './deviceManagementTroubleshootingEvents/deviceManagementTroubleshootingEventsRequestBuilder'; -import { DirectReportsRequestBuilder } from './directReports/directReportsRequestBuilder'; -import { DriveRequestBuilder } from './drive/driveRequestBuilder'; -import { DrivesRequestBuilder } from './drives/drivesRequestBuilder'; -import { EmployeeExperienceRequestBuilder } from './employeeExperience/employeeExperienceRequestBuilder'; -import { EventsRequestBuilder } from './events/eventsRequestBuilder'; -import { ExportDeviceAndAppManagementDataRequestBuilder } from './exportDeviceAndAppManagementData/exportDeviceAndAppManagementDataRequestBuilder'; -import { ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder } from './exportDeviceAndAppManagementDataWithSkipWithTop/exportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder'; -import { ExportPersonalDataRequestBuilder } from './exportPersonalData/exportPersonalDataRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { FindMeetingTimesRequestBuilder } from './findMeetingTimes/findMeetingTimesRequestBuilder'; -import { FollowedSitesRequestBuilder } from './followedSites/followedSitesRequestBuilder'; -import { GetMailTipsRequestBuilder } from './getMailTips/getMailTipsRequestBuilder'; -import { GetManagedAppDiagnosticStatusesRequestBuilder } from './getManagedAppDiagnosticStatuses/getManagedAppDiagnosticStatusesRequestBuilder'; -import { GetManagedAppPoliciesRequestBuilder } from './getManagedAppPolicies/getManagedAppPoliciesRequestBuilder'; -import { GetManagedDevicesWithAppFailuresRequestBuilder } from './getManagedDevicesWithAppFailures/getManagedDevicesWithAppFailuresRequestBuilder'; -import { GetMemberGroupsRequestBuilder } from './getMemberGroups/getMemberGroupsRequestBuilder'; -import { GetMemberObjectsRequestBuilder } from './getMemberObjects/getMemberObjectsRequestBuilder'; -import { InferenceClassificationRequestBuilder } from './inferenceClassification/inferenceClassificationRequestBuilder'; -import { InsightsRequestBuilder } from './insights/insightsRequestBuilder'; -import { JoinedTeamsRequestBuilder } from './joinedTeams/joinedTeamsRequestBuilder'; -import { LicenseDetailsRequestBuilder } from './licenseDetails/licenseDetailsRequestBuilder'; -import { MailboxSettingsRequestBuilder } from './mailboxSettings/mailboxSettingsRequestBuilder'; -import { MailFoldersRequestBuilder } from './mailFolders/mailFoldersRequestBuilder'; -import { ManagedAppRegistrationsRequestBuilder } from './managedAppRegistrations/managedAppRegistrationsRequestBuilder'; -import { ManagedDevicesRequestBuilder } from './managedDevices/managedDevicesRequestBuilder'; -import { ManagerRequestBuilder } from './manager/managerRequestBuilder'; -import { MemberOfRequestBuilder } from './memberOf/memberOfRequestBuilder'; -import { MessagesRequestBuilder } from './messages/messagesRequestBuilder'; -import { Oauth2PermissionGrantsRequestBuilder } from './oauth2PermissionGrants/oauth2PermissionGrantsRequestBuilder'; -import { OnenoteRequestBuilder } from './onenote/onenoteRequestBuilder'; -import { OnlineMeetingsRequestBuilder } from './onlineMeetings/onlineMeetingsRequestBuilder'; -import { OutlookRequestBuilder } from './outlook/outlookRequestBuilder'; -import { OwnedDevicesRequestBuilder } from './ownedDevices/ownedDevicesRequestBuilder'; -import { OwnedObjectsRequestBuilder } from './ownedObjects/ownedObjectsRequestBuilder'; -import { PeopleRequestBuilder } from './people/peopleRequestBuilder'; -import { PhotoRequestBuilder } from './photo/photoRequestBuilder'; -import { PhotosRequestBuilder } from './photos/photosRequestBuilder'; -import { PlannerRequestBuilder } from './planner/plannerRequestBuilder'; -import { PresenceRequestBuilder } from './presence/presenceRequestBuilder'; -import { RegisteredDevicesRequestBuilder } from './registeredDevices/registeredDevicesRequestBuilder'; -import { ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder } from './reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder'; -import { RemoveAllDevicesFromManagementRequestBuilder } from './removeAllDevicesFromManagement/removeAllDevicesFromManagementRequestBuilder'; -import { ReprocessLicenseAssignmentRequestBuilder } from './reprocessLicenseAssignment/reprocessLicenseAssignmentRequestBuilder'; -import { RestoreRequestBuilder } from './restore/restoreRequestBuilder'; -import { RetryServiceProvisioningRequestBuilder } from './retryServiceProvisioning/retryServiceProvisioningRequestBuilder'; -import { RevokeSignInSessionsRequestBuilder } from './revokeSignInSessions/revokeSignInSessionsRequestBuilder'; -import { ScopedRoleMemberOfRequestBuilder } from './scopedRoleMemberOf/scopedRoleMemberOfRequestBuilder'; -import { SendMailRequestBuilder } from './sendMail/sendMailRequestBuilder'; -import { ServiceProvisioningErrorsRequestBuilder } from './serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder'; -import { SettingsRequestBuilder } from './settings/settingsRequestBuilder'; -import { TeamworkRequestBuilder } from './teamwork/teamworkRequestBuilder'; -import { TodoRequestBuilder } from './todo/todoRequestBuilder'; -import { TransitiveMemberOfRequestBuilder } from './transitiveMemberOf/transitiveMemberOfRequestBuilder'; -import { TranslateExchangeIdsRequestBuilder } from './translateExchangeIds/translateExchangeIdsRequestBuilder'; -import { WipeManagedAppRegistrationsByDeviceTagRequestBuilder } from './wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MeRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the user singleton. - */ -export class MeRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the activities property of the microsoft.graph.user entity. - */ - public get activities(): ActivitiesRequestBuilder { - return new ActivitiesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the agreementAcceptances property of the microsoft.graph.user entity. - */ - public get agreementAcceptances(): AgreementAcceptancesRequestBuilder { - return new AgreementAcceptancesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the appRoleAssignments property of the microsoft.graph.user entity. - */ - public get appRoleAssignments(): AppRoleAssignmentsRequestBuilder { - return new AppRoleAssignmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the assignLicense method. - */ - public get assignLicense(): AssignLicenseRequestBuilder { - return new AssignLicenseRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the authentication property of the microsoft.graph.user entity. - */ - public get authentication(): AuthenticationRequestBuilder { - return new AuthenticationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendar property of the microsoft.graph.user entity. - */ - public get calendar(): CalendarRequestBuilder { - return new CalendarRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarGroups property of the microsoft.graph.user entity. - */ - public get calendarGroups(): CalendarGroupsRequestBuilder { - return new CalendarGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendars property of the microsoft.graph.user entity. - */ - public get calendars(): CalendarsRequestBuilder { - return new CalendarsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the calendarView property of the microsoft.graph.user entity. - */ - public get calendarView(): CalendarViewRequestBuilder { - return new CalendarViewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the changePassword method. - */ - public get changePassword(): ChangePasswordRequestBuilder { - return new ChangePasswordRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the chats property of the microsoft.graph.user entity. - */ - public get chats(): ChatsRequestBuilder { - return new ChatsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the checkMemberGroups method. - */ - public get checkMemberGroups(): CheckMemberGroupsRequestBuilder { - return new CheckMemberGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the checkMemberObjects method. - */ - public get checkMemberObjects(): CheckMemberObjectsRequestBuilder { - return new CheckMemberObjectsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contactFolders property of the microsoft.graph.user entity. - */ - public get contactFolders(): ContactFoldersRequestBuilder { - return new ContactFoldersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the contacts property of the microsoft.graph.user entity. - */ - public get contacts(): ContactsRequestBuilder { - return new ContactsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the createdObjects property of the microsoft.graph.user entity. - */ - public get createdObjects(): CreatedObjectsRequestBuilder { - return new CreatedObjectsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the deviceManagementTroubleshootingEvents property of the microsoft.graph.user entity. - */ - public get deviceManagementTroubleshootingEvents(): DeviceManagementTroubleshootingEventsRequestBuilder { - return new DeviceManagementTroubleshootingEventsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the directReports property of the microsoft.graph.user entity. - */ - public get directReports(): DirectReportsRequestBuilder { - return new DirectReportsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the drive property of the microsoft.graph.user entity. - */ - public get drive(): DriveRequestBuilder { - return new DriveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the drives property of the microsoft.graph.user entity. - */ - public get drives(): DrivesRequestBuilder { - return new DrivesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the employeeExperience property of the microsoft.graph.user entity. - */ - public get employeeExperience(): EmployeeExperienceRequestBuilder { - return new EmployeeExperienceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the events property of the microsoft.graph.user entity. - */ - public get events(): EventsRequestBuilder { - return new EventsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the exportDeviceAndAppManagementData method. - */ - public get exportDeviceAndAppManagementData(): ExportDeviceAndAppManagementDataRequestBuilder { - return new ExportDeviceAndAppManagementDataRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the exportPersonalData method. - */ - public get exportPersonalData(): ExportPersonalDataRequestBuilder { - return new ExportPersonalDataRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.user entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the findMeetingTimes method. - */ - public get findMeetingTimes(): FindMeetingTimesRequestBuilder { - return new FindMeetingTimesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the followedSites property of the microsoft.graph.user entity. - */ - public get followedSites(): FollowedSitesRequestBuilder { - return new FollowedSitesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getMailTips method. - */ - public get getMailTips(): GetMailTipsRequestBuilder { - return new GetMailTipsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getManagedAppDiagnosticStatuses method. - */ - public get getManagedAppDiagnosticStatuses(): GetManagedAppDiagnosticStatusesRequestBuilder { - return new GetManagedAppDiagnosticStatusesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getManagedAppPolicies method. - */ - public get getManagedAppPolicies(): GetManagedAppPoliciesRequestBuilder { - return new GetManagedAppPoliciesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getManagedDevicesWithAppFailures method. - */ - public get getManagedDevicesWithAppFailures(): GetManagedDevicesWithAppFailuresRequestBuilder { - return new GetManagedDevicesWithAppFailuresRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getMemberGroups method. - */ - public get getMemberGroups(): GetMemberGroupsRequestBuilder { - return new GetMemberGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getMemberObjects method. - */ - public get getMemberObjects(): GetMemberObjectsRequestBuilder { - return new GetMemberObjectsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the inferenceClassification property of the microsoft.graph.user entity. - */ - public get inferenceClassification(): InferenceClassificationRequestBuilder { - return new InferenceClassificationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the insights property of the microsoft.graph.user entity. - */ - public get insights(): InsightsRequestBuilder { - return new InsightsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the joinedTeams property of the microsoft.graph.user entity. - */ - public get joinedTeams(): JoinedTeamsRequestBuilder { - return new JoinedTeamsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the licenseDetails property of the microsoft.graph.user entity. - */ - public get licenseDetails(): LicenseDetailsRequestBuilder { - return new LicenseDetailsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * The mailboxSettings property - */ - public get mailboxSettings(): MailboxSettingsRequestBuilder { - return new MailboxSettingsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the mailFolders property of the microsoft.graph.user entity. - */ - public get mailFolders(): MailFoldersRequestBuilder { - return new MailFoldersRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the managedAppRegistrations property of the microsoft.graph.user entity. - */ - public get managedAppRegistrations(): ManagedAppRegistrationsRequestBuilder { - return new ManagedAppRegistrationsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the managedDevices property of the microsoft.graph.user entity. - */ - public get managedDevices(): ManagedDevicesRequestBuilder { - return new ManagedDevicesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the manager property of the microsoft.graph.user entity. - */ - public get manager(): ManagerRequestBuilder { - return new ManagerRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the memberOf property of the microsoft.graph.user entity. - */ - public get memberOf(): MemberOfRequestBuilder { - return new MemberOfRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.user entity. - */ - public get messages(): MessagesRequestBuilder { - return new MessagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. - */ - public get oauth2PermissionGrants(): Oauth2PermissionGrantsRequestBuilder { - return new Oauth2PermissionGrantsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the onenote property of the microsoft.graph.user entity. - */ - public get onenote(): OnenoteRequestBuilder { - return new OnenoteRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the onlineMeetings property of the microsoft.graph.user entity. - */ - public get onlineMeetings(): OnlineMeetingsRequestBuilder { - return new OnlineMeetingsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the outlook property of the microsoft.graph.user entity. - */ - public get outlook(): OutlookRequestBuilder { - return new OutlookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the ownedDevices property of the microsoft.graph.user entity. - */ - public get ownedDevices(): OwnedDevicesRequestBuilder { - return new OwnedDevicesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the ownedObjects property of the microsoft.graph.user entity. - */ - public get ownedObjects(): OwnedObjectsRequestBuilder { - return new OwnedObjectsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the people property of the microsoft.graph.user entity. - */ - public get people(): PeopleRequestBuilder { - return new PeopleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the photo property of the microsoft.graph.user entity. - */ - public get photo(): PhotoRequestBuilder { - return new PhotoRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the photos property of the microsoft.graph.user entity. - */ - public get photos(): PhotosRequestBuilder { - return new PhotosRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the planner property of the microsoft.graph.user entity. - */ - public get planner(): PlannerRequestBuilder { - return new PlannerRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the presence property of the microsoft.graph.user entity. - */ - public get presence(): PresenceRequestBuilder { - return new PresenceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the registeredDevices property of the microsoft.graph.user entity. - */ - public get registeredDevices(): RegisteredDevicesRequestBuilder { - return new RegisteredDevicesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the removeAllDevicesFromManagement method. - */ - public get removeAllDevicesFromManagement(): RemoveAllDevicesFromManagementRequestBuilder { - return new RemoveAllDevicesFromManagementRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the reprocessLicenseAssignment method. - */ - public get reprocessLicenseAssignment(): ReprocessLicenseAssignmentRequestBuilder { - return new ReprocessLicenseAssignmentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the restore method. - */ - public get restore(): RestoreRequestBuilder { - return new RestoreRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the retryServiceProvisioning method. - */ - public get retryServiceProvisioning(): RetryServiceProvisioningRequestBuilder { - return new RetryServiceProvisioningRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the revokeSignInSessions method. - */ - public get revokeSignInSessions(): RevokeSignInSessionsRequestBuilder { - return new RevokeSignInSessionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the scopedRoleMemberOf property of the microsoft.graph.user entity. - */ - public get scopedRoleMemberOf(): ScopedRoleMemberOfRequestBuilder { - return new ScopedRoleMemberOfRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the sendMail method. - */ - public get sendMail(): SendMailRequestBuilder { - return new SendMailRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * The serviceProvisioningErrors property - */ - public get serviceProvisioningErrors(): ServiceProvisioningErrorsRequestBuilder { - return new ServiceProvisioningErrorsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the settings property of the microsoft.graph.user entity. - */ - public get settings(): SettingsRequestBuilder { - return new SettingsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the teamwork property of the microsoft.graph.user entity. - */ - public get teamwork(): TeamworkRequestBuilder { - return new TeamworkRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the todo property of the microsoft.graph.user entity. - */ - public get todo(): TodoRequestBuilder { - return new TodoRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the transitiveMemberOf property of the microsoft.graph.user entity. - */ - public get transitiveMemberOf(): TransitiveMemberOfRequestBuilder { - return new TransitiveMemberOfRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the translateExchangeIds method. - */ - public get translateExchangeIds(): TranslateExchangeIdsRequestBuilder { - return new TranslateExchangeIdsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the wipeManagedAppRegistrationsByDeviceTag method. - */ - public get wipeManagedAppRegistrationsByDeviceTag(): WipeManagedAppRegistrationsByDeviceTagRequestBuilder { - return new WipeManagedAppRegistrationsByDeviceTagRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MeRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me{?%24select,%24expand}"); - }; - /** - * Provides operations to call the exportDeviceAndAppManagementData method. - * @param skip Usage: skip={skip} - * @param top Usage: top={top} - * @returns a exportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder - */ - public exportDeviceAndAppManagementDataWithSkipWithTop(skip: number | undefined, top: number | undefined) : ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder { - if(!skip) throw new Error("skip cannot be undefined"); - if(!top) throw new Error("top cannot be undefined"); - return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(this.pathParameters, this.requestAdapter, skip, top); - }; - /** - * Retrieve the properties and relationships of user object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of User - * @see {@link https://learn.microsoft.com/graph/api/user-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of User - * @see {@link https://learn.microsoft.com/graph/api/user-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: User, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserFromDiscriminatorValue, errorMapping); - }; - /** - * Provides operations to call the reminderView method. - * @param EndDateTime Usage: EndDateTime='{EndDateTime}' - * @param StartDateTime Usage: StartDateTime='{StartDateTime}' - * @returns a reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder - */ - public reminderViewWithStartDateTimeWithEndDateTime(endDateTime: string | undefined, startDateTime: string | undefined) : ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder { - if(!endDateTime) throw new Error("endDateTime cannot be undefined"); - if(!startDateTime) throw new Error("startDateTime cannot be undefined"); - return new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(this.pathParameters, this.requestAdapter, endDateTime, startDateTime); - }; - /** - * Retrieve the properties and relationships of user object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, meRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: User, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUser); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a meRequestBuilder - */ - public withUrl(rawUrl: string) : MeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const meRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/count/countRequestBuilder.ts b/src/me/memberOf/count/countRequestBuilder.ts deleted file mode 100644 index f4e4003e7fc..00000000000 --- a/src/me/memberOf/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/count/index.ts b/src/me/memberOf/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/memberOf/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/memberOf/graphAdministrativeUnit/count/countRequestBuilder.ts b/src/me/memberOf/graphAdministrativeUnit/count/countRequestBuilder.ts deleted file mode 100644 index 029ad7e501b..00000000000 --- a/src/me/memberOf/graphAdministrativeUnit/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/graphAdministrativeUnit/count/index.ts b/src/me/memberOf/graphAdministrativeUnit/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/memberOf/graphAdministrativeUnit/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/memberOf/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts b/src/me/memberOf/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts deleted file mode 100644 index e1eafed8dce..00000000000 --- a/src/me/memberOf/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdministrativeUnitCollectionResponse } from '../../../models/'; -import { createAdministrativeUnitCollectionResponseFromDiscriminatorValue } from '../../../models/administrativeUnitCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAdministrativeUnitRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to administrativeUnit. - */ -export class GraphAdministrativeUnitRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AdministrativeUnitCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAdministrativeUnitCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAdministrativeUnitRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAdministrativeUnitRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAdministrativeUnitRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAdministrativeUnitRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAdministrativeUnitRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/graphAdministrativeUnit/index.ts b/src/me/memberOf/graphAdministrativeUnit/index.ts deleted file mode 100644 index 956e6827ff4..00000000000 --- a/src/me/memberOf/graphAdministrativeUnit/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAdministrativeUnitRequestBuilder' diff --git a/src/me/memberOf/graphDirectoryRole/count/countRequestBuilder.ts b/src/me/memberOf/graphDirectoryRole/count/countRequestBuilder.ts deleted file mode 100644 index a9012b8e0eb..00000000000 --- a/src/me/memberOf/graphDirectoryRole/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/graph.directoryRole/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/graphDirectoryRole/count/index.ts b/src/me/memberOf/graphDirectoryRole/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/memberOf/graphDirectoryRole/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/memberOf/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts b/src/me/memberOf/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts deleted file mode 100644 index d901aa9f855..00000000000 --- a/src/me/memberOf/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryRoleCollectionResponse } from '../../../models/'; -import { createDirectoryRoleCollectionResponseFromDiscriminatorValue } from '../../../models/directoryRoleCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDirectoryRoleRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to directoryRole. - */ -export class GraphDirectoryRoleRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphDirectoryRoleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/graph.directoryRole{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryRoleCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryRoleCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDirectoryRoleRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDirectoryRoleRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDirectoryRoleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDirectoryRoleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDirectoryRoleRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/graphDirectoryRole/index.ts b/src/me/memberOf/graphDirectoryRole/index.ts deleted file mode 100644 index ce4033a8241..00000000000 --- a/src/me/memberOf/graphDirectoryRole/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDirectoryRoleRequestBuilder' diff --git a/src/me/memberOf/graphGroup/count/countRequestBuilder.ts b/src/me/memberOf/graphGroup/count/countRequestBuilder.ts deleted file mode 100644 index 8b965b2657b..00000000000 --- a/src/me/memberOf/graphGroup/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/graph.group/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/graphGroup/count/index.ts b/src/me/memberOf/graphGroup/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/memberOf/graphGroup/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/memberOf/graphGroup/graphGroupRequestBuilder.ts b/src/me/memberOf/graphGroup/graphGroupRequestBuilder.ts deleted file mode 100644 index acd91c28bae..00000000000 --- a/src/me/memberOf/graphGroup/graphGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type GroupCollectionResponse } from '../../../models/'; -import { createGroupCollectionResponseFromDiscriminatorValue } from '../../../models/groupCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphGroupRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to group. - */ -export class GraphGroupRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GroupCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphGroupRequestBuilder - */ - public withUrl(rawUrl: string) : GraphGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphGroupRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/graphGroup/index.ts b/src/me/memberOf/graphGroup/index.ts deleted file mode 100644 index b6b54379339..00000000000 --- a/src/me/memberOf/graphGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphGroupRequestBuilder' diff --git a/src/me/memberOf/index.ts b/src/me/memberOf/index.ts deleted file mode 100644 index e8a4ca917c9..00000000000 --- a/src/me/memberOf/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './memberOfRequestBuilder' diff --git a/src/me/memberOf/item/directoryObjectItemRequestBuilder.ts b/src/me/memberOf/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index f34ce2aaa75..00000000000 --- a/src/me/memberOf/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphAdministrativeUnitRequestBuilder } from './graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder'; -import { GraphDirectoryRoleRequestBuilder } from './graphDirectoryRole/graphDirectoryRoleRequestBuilder'; -import { GraphGroupRequestBuilder } from './graphGroup/graphGroupRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the memberOf property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to administrativeUnit. - */ - public get graphAdministrativeUnit(): GraphAdministrativeUnitRequestBuilder { - return new GraphAdministrativeUnitRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to directoryRole. - */ - public get graphDirectoryRole(): GraphDirectoryRoleRequestBuilder { - return new GraphDirectoryRoleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to group. - */ - public get graphGroup(): GraphGroupRequestBuilder { - return new GraphGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/item/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts b/src/me/memberOf/item/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts deleted file mode 100644 index de5a58b3640..00000000000 --- a/src/me/memberOf/item/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdministrativeUnit } from '../../../../models/'; -import { createAdministrativeUnitFromDiscriminatorValue } from '../../../../models/administrativeUnit'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAdministrativeUnitRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to administrativeUnit. - */ -export class GraphAdministrativeUnitRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AdministrativeUnit - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAdministrativeUnitFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAdministrativeUnitRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAdministrativeUnitRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAdministrativeUnitRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAdministrativeUnitRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAdministrativeUnitRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/item/graphAdministrativeUnit/index.ts b/src/me/memberOf/item/graphAdministrativeUnit/index.ts deleted file mode 100644 index 956e6827ff4..00000000000 --- a/src/me/memberOf/item/graphAdministrativeUnit/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAdministrativeUnitRequestBuilder' diff --git a/src/me/memberOf/item/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts b/src/me/memberOf/item/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts deleted file mode 100644 index 60efc27fac8..00000000000 --- a/src/me/memberOf/item/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryRole } from '../../../../models/'; -import { createDirectoryRoleFromDiscriminatorValue } from '../../../../models/directoryRole'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDirectoryRoleRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to directoryRole. - */ -export class GraphDirectoryRoleRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphDirectoryRoleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/{directoryObject%2Did}/graph.directoryRole{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryRole - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryRoleFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDirectoryRoleRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDirectoryRoleRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDirectoryRoleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDirectoryRoleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDirectoryRoleRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/item/graphDirectoryRole/index.ts b/src/me/memberOf/item/graphDirectoryRole/index.ts deleted file mode 100644 index ce4033a8241..00000000000 --- a/src/me/memberOf/item/graphDirectoryRole/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDirectoryRoleRequestBuilder' diff --git a/src/me/memberOf/item/graphGroup/graphGroupRequestBuilder.ts b/src/me/memberOf/item/graphGroup/graphGroupRequestBuilder.ts deleted file mode 100644 index 9af731a809b..00000000000 --- a/src/me/memberOf/item/graphGroup/graphGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Group } from '../../../../models/'; -import { createGroupFromDiscriminatorValue } from '../../../../models/group'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to group. - */ -export class GraphGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf/{directoryObject%2Did}/graph.group{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.group - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Group - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.group - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphGroupRequestBuilder - */ - public withUrl(rawUrl: string) : GraphGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/memberOf/item/graphGroup/index.ts b/src/me/memberOf/item/graphGroup/index.ts deleted file mode 100644 index b6b54379339..00000000000 --- a/src/me/memberOf/item/graphGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphGroupRequestBuilder' diff --git a/src/me/memberOf/item/index.ts b/src/me/memberOf/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/memberOf/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/memberOf/memberOfRequestBuilder.ts b/src/me/memberOf/memberOfRequestBuilder.ts deleted file mode 100644 index 21547c83955..00000000000 --- a/src/me/memberOf/memberOfRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphAdministrativeUnitRequestBuilder } from './graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder'; -import { GraphDirectoryRoleRequestBuilder } from './graphDirectoryRole/graphDirectoryRoleRequestBuilder'; -import { GraphGroupRequestBuilder } from './graphGroup/graphGroupRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MemberOfRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the memberOf property of the microsoft.graph.user entity. - */ -export class MemberOfRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to administrativeUnit. - */ - public get graphAdministrativeUnit(): GraphAdministrativeUnitRequestBuilder { - return new GraphAdministrativeUnitRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to directoryRole. - */ - public get graphDirectoryRole(): GraphDirectoryRoleRequestBuilder { - return new GraphDirectoryRoleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to group. - */ - public get graphGroup(): GraphGroupRequestBuilder { - return new GraphGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the memberOf property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MemberOfRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/memberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-memberof?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, memberOfRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a memberOfRequestBuilder - */ - public withUrl(rawUrl: string) : MemberOfRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MemberOfRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const memberOfRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/count/countRequestBuilder.ts b/src/me/messages/count/countRequestBuilder.ts deleted file mode 100644 index 56f91df578f..00000000000 --- a/src/me/messages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/count/index.ts b/src/me/messages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/messages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/messages/delta/deltaRequestBuilder.ts b/src/me/messages/delta/deltaRequestBuilder.ts deleted file mode 100644 index 7a3d7f67a40..00000000000 --- a/src/me/messages/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../models/baseDeltaFunctionResponse'; -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../models/message'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: Message[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * A custom query option to filter the delta response based on the type of change. Supported values are created, updated or deleted. - */ - changeType?: string; - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createMessageFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeMessage); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/delta(){?changeType*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - * @see {@link https://learn.microsoft.com/graph/api/message-delta?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a set of messages that have been added, deleted, or updated in a specified folder. A delta function call for messages in a folder is similar to a GET request, except that by appropriatelyapplying state tokens in one or more of these calls, you can [query for incremental changes in the messages inthat folder](/graph/delta-query-messages). This allows you to maintain and synchronize a local store of a user's messages withouthaving to fetch the entire set of messages from the server every time. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/delta/index.ts b/src/me/messages/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/messages/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/messages/index.ts b/src/me/messages/index.ts deleted file mode 100644 index 9f6fd0b319b..00000000000 --- a/src/me/messages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messagesRequestBuilder' diff --git a/src/me/messages/item/attachments/attachmentsRequestBuilder.ts b/src/me/messages/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index f4d93985b1c..00000000000 --- a/src/me/messages/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,147 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentCollectionResponse } from '../../../../models/'; -import { createAttachmentFromDiscriminatorValue, deserializeIntoAttachment, serializeAttachment, type Attachment } from '../../../../models/attachment'; -import { createAttachmentCollectionResponseFromDiscriminatorValue } from '../../../../models/attachmentCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentItemRequestBuilder } from './item/attachmentItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - * @param attachmentId The unique identifier of attachment - * @returns a AttachmentItemRequestBuilder - */ - public byAttachmentId(attachmentId: string) : AttachmentItemRequestBuilder { - if(!attachmentId) throw new Error("attachmentId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachment%2Did"] = attachmentId - return new AttachmentItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/attachments{?%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of attachment objects attached to a message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/message-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of attachment objects attached to a message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Attachment, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachment); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/attachments/count/countRequestBuilder.ts b/src/me/messages/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 27b714b6cef..00000000000 --- a/src/me/messages/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/attachments/count/index.ts b/src/me/messages/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/messages/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index 3be8bde94df..00000000000 --- a/src/me/messages/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentItemFromDiscriminatorValue, serializeAttachmentItem, type AttachmentItem } from '../../../../../models/attachmentItem'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The AttachmentItem property - */ - attachmentItem?: AttachmentItem; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentItem": n => { createUploadSessionPostRequestBody.attachmentItem = n.getObjectValue(createAttachmentItemFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("AttachmentItem", createUploadSessionPostRequestBody.attachmentItem, serializeAttachmentItem); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/attachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/attachments/createUploadSession/index.ts b/src/me/messages/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/messages/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/messages/item/attachments/index.ts b/src/me/messages/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/messages/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/messages/item/attachments/item/attachmentItemRequestBuilder.ts b/src/me/messages/item/attachments/item/attachmentItemRequestBuilder.ts deleted file mode 100644 index 0632315ab28..00000000000 --- a/src/me/messages/item/attachments/item/attachmentItemRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Attachment } from '../../../../../models/'; -import { createAttachmentFromDiscriminatorValue } from '../../../../../models/attachment'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ -export class AttachmentItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttachmentItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/attachments/{attachment%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property attachments for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Attachment - * @see {@link https://learn.microsoft.com/graph/api/attachment-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property attachments for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/attachments/item/index.ts b/src/me/messages/item/attachments/item/index.ts deleted file mode 100644 index 614075b7e35..00000000000 --- a/src/me/messages/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentItemRequestBuilder' diff --git a/src/me/messages/item/copy/copyRequestBuilder.ts b/src/me/messages/item/copy/copyRequestBuilder.ts deleted file mode 100644 index 8ed594518f2..00000000000 --- a/src/me/messages/item/copy/copyRequestBuilder.ts +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../models/message'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function createCopyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyPostRequestBody; -} -export function deserializeIntoCopyPostRequestBody(copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : Record void> { - return { - "destinationId": n => { copyPostRequestBody.destinationId = n.getStringValue(); }, - } -} -export function serializeCopyPostRequestBody(writer: SerializationWriter, copyPostRequestBody: CopyPostRequestBody | undefined = {} as CopyPostRequestBody) : void { - writer.writeStringValue("DestinationId", copyPostRequestBody.destinationId); - writer.writeAdditionalData(copyPostRequestBody.additionalData); -} -/** - * Provides operations to call the copy method. - */ -export class CopyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/copy"); - }; - /** - * Copy a message to a folder within the user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-copy?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a message to a folder within the user's mailbox. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyRequestBuilder - */ - public withUrl(rawUrl: string) : CopyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/copy/index.ts b/src/me/messages/item/copy/index.ts deleted file mode 100644 index 2d08e5c40b9..00000000000 --- a/src/me/messages/item/copy/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyRequestBuilder' diff --git a/src/me/messages/item/createForward/createForwardRequestBuilder.ts b/src/me/messages/item/createForward/createForwardRequestBuilder.ts deleted file mode 100644 index fb196e94963..00000000000 --- a/src/me/messages/item/createForward/createForwardRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../models/message'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../models/recipient'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateForwardPostRequestBody; -} -export interface CreateForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function deserializeIntoCreateForwardPostRequestBody(createForwardPostRequestBody: CreateForwardPostRequestBody | undefined = {} as CreateForwardPostRequestBody) : Record void> { - return { - "comment": n => { createForwardPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createForwardPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "toRecipients": n => { createForwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export function serializeCreateForwardPostRequestBody(writer: SerializationWriter, createForwardPostRequestBody: CreateForwardPostRequestBody | undefined = {} as CreateForwardPostRequestBody) : void { - writer.writeStringValue("Comment", createForwardPostRequestBody.comment); - writer.writeObjectValue("Message", createForwardPostRequestBody.message, serializeMessage); - writer.writeCollectionOfObjectValues("ToRecipients", createForwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(createForwardPostRequestBody.additionalData); -} -/** - * Provides operations to call the createForward method. - */ -export class CreateForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/createForward"); - }; - /** - * Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createforward?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to forward an existing message, in either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, forward a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createForwardRequestBuilder - */ - public withUrl(rawUrl: string) : CreateForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/createForward/index.ts b/src/me/messages/item/createForward/index.ts deleted file mode 100644 index d6e07309bff..00000000000 --- a/src/me/messages/item/createForward/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createForwardRequestBuilder' diff --git a/src/me/messages/item/createReply/createReplyRequestBuilder.ts b/src/me/messages/item/createReply/createReplyRequestBuilder.ts deleted file mode 100644 index d0f8f50928c..00000000000 --- a/src/me/messages/item/createReply/createReplyRequestBuilder.ts +++ /dev/null @@ -1,92 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../models/message'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateReplyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateReplyPostRequestBody; -} -export interface CreateReplyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function deserializeIntoCreateReplyPostRequestBody(createReplyPostRequestBody: CreateReplyPostRequestBody | undefined = {} as CreateReplyPostRequestBody) : Record void> { - return { - "comment": n => { createReplyPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createReplyPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export function serializeCreateReplyPostRequestBody(writer: SerializationWriter, createReplyPostRequestBody: CreateReplyPostRequestBody | undefined = {} as CreateReplyPostRequestBody) : void { - writer.writeStringValue("Comment", createReplyPostRequestBody.comment); - writer.writeObjectValue("Message", createReplyPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(createReplyPostRequestBody.additionalData); -} -/** - * Provides operations to call the createReply method. - */ -export class CreateReplyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateReplyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/createReply"); - }; - /** - * Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createreply?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to reply to the sender of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If replyTo is specified in the original message, per Internet Message Format (RFC 2822), you should send the reply to the recipients in replyTo, and not the recipients in from.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply to a message in a single operation. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateReplyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createReplyRequestBuilder - */ - public withUrl(rawUrl: string) : CreateReplyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateReplyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/createReply/index.ts b/src/me/messages/item/createReply/index.ts deleted file mode 100644 index 28777a90a8e..00000000000 --- a/src/me/messages/item/createReply/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createReplyRequestBuilder' diff --git a/src/me/messages/item/createReplyAll/createReplyAllPostRequestBody.ts b/src/me/messages/item/createReplyAll/createReplyAllPostRequestBody.ts deleted file mode 100644 index cb6e75efbcc..00000000000 --- a/src/me/messages/item/createReplyAll/createReplyAllPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../models/message'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateReplyAllPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateReplyAllPostRequestBody; -} -export interface CreateReplyAllPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function deserializeIntoCreateReplyAllPostRequestBody(createReplyAllPostRequestBody: CreateReplyAllPostRequestBody | undefined = {} as CreateReplyAllPostRequestBody) : Record void> { - return { - "comment": n => { createReplyAllPostRequestBody.comment = n.getStringValue(); }, - "message": n => { createReplyAllPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export function serializeCreateReplyAllPostRequestBody(writer: SerializationWriter, createReplyAllPostRequestBody: CreateReplyAllPostRequestBody | undefined = {} as CreateReplyAllPostRequestBody) : void { - writer.writeStringValue("Comment", createReplyAllPostRequestBody.comment); - writer.writeObjectValue("Message", createReplyAllPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(createReplyAllPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/createReplyAll/createReplyAllRequestBuilder.ts b/src/me/messages/item/createReplyAll/createReplyAllRequestBuilder.ts deleted file mode 100644 index ea3c516fee6..00000000000 --- a/src/me/messages/item/createReplyAll/createReplyAllRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../models/message'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoCreateReplyAllPostRequestBody, serializeCreateReplyAllPostRequestBody, type CreateReplyAllPostRequestBody } from './createReplyAllPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the createReplyAll method. - */ -export class CreateReplyAllRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateReplyAllRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/createReplyAll"); - }; - /** - * Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-createreplyall?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft to reply to the sender and all recipients of a message in either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), you should send the reply to the recipients in the replyTo and toRecipients properties, and not the recipients in the from and toRecipients properties.- You can update the draft later to add reply content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. Send the draft message in a subsequent operation. Alternatively, reply-all to a message in a single action. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateReplyAllPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createReplyAllRequestBuilder - */ - public withUrl(rawUrl: string) : CreateReplyAllRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateReplyAllRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/createReplyAll/index.ts b/src/me/messages/item/createReplyAll/index.ts deleted file mode 100644 index b1f151ae084..00000000000 --- a/src/me/messages/item/createReplyAll/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './createReplyAllPostRequestBody' -export * from './createReplyAllRequestBuilder' diff --git a/src/me/messages/item/extensions/count/countRequestBuilder.ts b/src/me/messages/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 77c78cba4e9..00000000000 --- a/src/me/messages/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/extensions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/extensions/count/index.ts b/src/me/messages/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/messages/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/messages/item/extensions/extensionsRequestBuilder.ts b/src/me/messages/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 9bf817c610e..00000000000 --- a/src/me/messages/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/extensions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0|Find more info here} - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/extensions/index.ts b/src/me/messages/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/messages/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/messages/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/messages/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 821450e72c7..00000000000 --- a/src/me/messages/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - * @see {@link https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an open extension (openTypeExtension object) from the specified instance of a resource. For the list of resources that support open extensions, see the table in the Permissions section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/extensions/item/index.ts b/src/me/messages/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/messages/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/messages/item/forward/forwardPostRequestBody.ts b/src/me/messages/item/forward/forwardPostRequestBody.ts deleted file mode 100644 index 27a45b00b1a..00000000000 --- a/src/me/messages/item/forward/forwardPostRequestBody.ts +++ /dev/null @@ -1,44 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../models/message'; -import { createRecipientFromDiscriminatorValue, serializeRecipient, type Recipient } from '../../../../models/recipient'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createForwardPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoForwardPostRequestBody; -} -export function deserializeIntoForwardPostRequestBody(forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : Record void> { - return { - "comment": n => { forwardPostRequestBody.comment = n.getStringValue(); }, - "message": n => { forwardPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "toRecipients": n => { forwardPostRequestBody.toRecipients = n.getCollectionOfObjectValues(createRecipientFromDiscriminatorValue); }, - } -} -export interface ForwardPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; - /** - * The ToRecipients property - */ - toRecipients?: Recipient[]; -} -export function serializeForwardPostRequestBody(writer: SerializationWriter, forwardPostRequestBody: ForwardPostRequestBody | undefined = {} as ForwardPostRequestBody) : void { - writer.writeStringValue("Comment", forwardPostRequestBody.comment); - writer.writeObjectValue("Message", forwardPostRequestBody.message, serializeMessage); - writer.writeCollectionOfObjectValues("ToRecipients", forwardPostRequestBody.toRecipients, serializeRecipient); - writer.writeAdditionalData(forwardPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/forward/forwardRequestBuilder.ts b/src/me/messages/item/forward/forwardRequestBuilder.ts deleted file mode 100644 index 888f88bbedc..00000000000 --- a/src/me/messages/item/forward/forwardRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoForwardPostRequestBody, serializeForwardPostRequestBody, type ForwardPostRequestBody } from './forwardPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the forward method. - */ -export class ForwardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ForwardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/forward"); - }; - /** - * Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-forward?view=graph-rest-1.0|Find more info here} - */ - public post(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Forward a message using either JSON or MIME format. When using JSON format, you can:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- Specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to forward a message, and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ForwardPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeForwardPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a forwardRequestBuilder - */ - public withUrl(rawUrl: string) : ForwardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ForwardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/forward/index.ts b/src/me/messages/item/forward/index.ts deleted file mode 100644 index f4bc85739b5..00000000000 --- a/src/me/messages/item/forward/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './forwardPostRequestBody' -export * from './forwardRequestBuilder' diff --git a/src/me/messages/item/index.ts b/src/me/messages/item/index.ts deleted file mode 100644 index 9b0117e0ff1..00000000000 --- a/src/me/messages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './messageItemRequestBuilder' diff --git a/src/me/messages/item/messageItemRequestBuilder.ts b/src/me/messages/item/messageItemRequestBuilder.ts deleted file mode 100644 index 30c66b618a3..00000000000 --- a/src/me/messages/item/messageItemRequestBuilder.ts +++ /dev/null @@ -1,218 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../models/message'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { CopyRequestBuilder } from './copy/copyRequestBuilder'; -import { CreateForwardRequestBuilder } from './createForward/createForwardRequestBuilder'; -import { CreateReplyRequestBuilder } from './createReply/createReplyRequestBuilder'; -import { CreateReplyAllRequestBuilder } from './createReplyAll/createReplyAllRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { ForwardRequestBuilder } from './forward/forwardRequestBuilder'; -import { MoveRequestBuilder } from './move/moveRequestBuilder'; -import { ReplyRequestBuilder } from './reply/replyRequestBuilder'; -import { ReplyAllRequestBuilder } from './replyAll/replyAllRequestBuilder'; -import { SendRequestBuilder } from './send/sendRequestBuilder'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Include Hidden Messages - */ - includeHiddenMessages?: string; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.user entity. - */ -export class MessageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the attachments property of the microsoft.graph.message entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copy method. - */ - public get copy(): CopyRequestBuilder { - return new CopyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createForward method. - */ - public get createForward(): CreateForwardRequestBuilder { - return new CreateForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createReply method. - */ - public get createReply(): CreateReplyRequestBuilder { - return new CreateReplyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createReplyAll method. - */ - public get createReplyAll(): CreateReplyAllRequestBuilder { - return new CreateReplyAllRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.message entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the forward method. - */ - public get forward(): ForwardRequestBuilder { - return new ForwardRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the move method. - */ - public get move(): MoveRequestBuilder { - return new MoveRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the reply method. - */ - public get reply(): ReplyRequestBuilder { - return new ReplyRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the replyAll method. - */ - public get replyAll(): ReplyAllRequestBuilder { - return new ReplyAllRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the send method. - */ - public get send(): SendRequestBuilder { - return new SendRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MessageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}{?includeHiddenMessages*,%24select,%24expand}"); - }; - /** - * Delete a message in the specified user's mailbox, or delete a relationship of the message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The messages in a mailbox or folder. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of an eventMessage object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/eventmessage-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: Message, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a message in the specified user's mailbox, or delete a relationship of the message. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The messages in a mailbox or folder. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of an eventMessage object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Message, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MessageItemRequestBuilder - */ - public withUrl(rawUrl: string) : MessageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/move/index.ts b/src/me/messages/item/move/index.ts deleted file mode 100644 index 820dabdd52a..00000000000 --- a/src/me/messages/item/move/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './movePostRequestBody' -export * from './moveRequestBuilder' diff --git a/src/me/messages/item/move/movePostRequestBody.ts b/src/me/messages/item/move/movePostRequestBody.ts deleted file mode 100644 index 93a1c3bb520..00000000000 --- a/src/me/messages/item/move/movePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createMovePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoMovePostRequestBody; -} -export function deserializeIntoMovePostRequestBody(movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : Record void> { - return { - "destinationId": n => { movePostRequestBody.destinationId = n.getStringValue(); }, - } -} -export interface MovePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The DestinationId property - */ - destinationId?: string; -} -export function serializeMovePostRequestBody(writer: SerializationWriter, movePostRequestBody: MovePostRequestBody | undefined = {} as MovePostRequestBody) : void { - writer.writeStringValue("DestinationId", movePostRequestBody.destinationId); - writer.writeAdditionalData(movePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/move/moveRequestBuilder.ts b/src/me/messages/item/move/moveRequestBuilder.ts deleted file mode 100644 index 63b6d038bf2..00000000000 --- a/src/me/messages/item/move/moveRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../../../models/message'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoMovePostRequestBody, serializeMovePostRequestBody, type MovePostRequestBody } from './movePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the move method. - */ -export class MoveRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MoveRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/move"); - }; - /** - * Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/message-move?view=graph-rest-1.0|Find more info here} - */ - public post(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * Move a message to another folder within the specified user's mailbox. This creates a new copy of the message in the destination folder and removes the original message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MovePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMovePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a moveRequestBuilder - */ - public withUrl(rawUrl: string) : MoveRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MoveRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/reply/index.ts b/src/me/messages/item/reply/index.ts deleted file mode 100644 index f62039cf265..00000000000 --- a/src/me/messages/item/reply/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './replyPostRequestBody' -export * from './replyRequestBuilder' diff --git a/src/me/messages/item/reply/replyPostRequestBody.ts b/src/me/messages/item/reply/replyPostRequestBody.ts deleted file mode 100644 index a5c32068613..00000000000 --- a/src/me/messages/item/reply/replyPostRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../models/message'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReplyPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReplyPostRequestBody; -} -export function deserializeIntoReplyPostRequestBody(replyPostRequestBody: ReplyPostRequestBody | undefined = {} as ReplyPostRequestBody) : Record void> { - return { - "comment": n => { replyPostRequestBody.comment = n.getStringValue(); }, - "message": n => { replyPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export interface ReplyPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function serializeReplyPostRequestBody(writer: SerializationWriter, replyPostRequestBody: ReplyPostRequestBody | undefined = {} as ReplyPostRequestBody) : void { - writer.writeStringValue("Comment", replyPostRequestBody.comment); - writer.writeObjectValue("Message", replyPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(replyPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/reply/replyRequestBuilder.ts b/src/me/messages/item/reply/replyRequestBuilder.ts deleted file mode 100644 index 030a5c0fba9..00000000000 --- a/src/me/messages/item/reply/replyRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoReplyPostRequestBody, serializeReplyPostRequestBody, type ReplyPostRequestBody } from './replyPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the reply method. - */ -export class ReplyRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReplyRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/reply"); - }; - /** - * Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-reply?view=graph-rest-1.0|Find more info here} - */ - public post(body: ReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reply to the sender of a message using either JSON or MIME format. When using JSON format:* Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.* If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply to an existing message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ReplyPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReplyPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a replyRequestBuilder - */ - public withUrl(rawUrl: string) : ReplyRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReplyRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/replyAll/index.ts b/src/me/messages/item/replyAll/index.ts deleted file mode 100644 index 34c4d8e1dbf..00000000000 --- a/src/me/messages/item/replyAll/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './replyAllRequestBuilder' diff --git a/src/me/messages/item/replyAll/replyAllRequestBuilder.ts b/src/me/messages/item/replyAll/replyAllRequestBuilder.ts deleted file mode 100644 index e0387f0e1fd..00000000000 --- a/src/me/messages/item/replyAll/replyAllRequestBuilder.ts +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../../../models/message'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReplyAllPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReplyAllPostRequestBody; -} -export function deserializeIntoReplyAllPostRequestBody(replyAllPostRequestBody: ReplyAllPostRequestBody | undefined = {} as ReplyAllPostRequestBody) : Record void> { - return { - "comment": n => { replyAllPostRequestBody.comment = n.getStringValue(); }, - "message": n => { replyAllPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - } -} -export interface ReplyAllPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Comment property - */ - comment?: string; - /** - * The Message property - */ - message?: Message; -} -export function serializeReplyAllPostRequestBody(writer: SerializationWriter, replyAllPostRequestBody: ReplyAllPostRequestBody | undefined = {} as ReplyAllPostRequestBody) : void { - writer.writeStringValue("Comment", replyAllPostRequestBody.comment); - writer.writeObjectValue("Message", replyAllPostRequestBody.message, serializeMessage); - writer.writeAdditionalData(replyAllPostRequestBody.additionalData); -} -/** - * Provides operations to call the replyAll method. - */ -export class ReplyAllRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReplyAllRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/replyAll"); - }; - /** - * Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-replyall?view=graph-rest-1.0|Find more info here} - */ - public post(body: ReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Reply to all recipients of a message using either JSON or MIME format. When using JSON format:- Specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.- If the original message specifies a recipient in the replyTo property, per Internet Message Format (RFC 2822), send the reply to the recipients in replyTo and not the recipient in the from property. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- Add any attachments and S/MIME properties to the MIME content. This method saves the message in the Sent Items folder. Alternatively, create a draft to reply-all to a message and send it later. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ReplyAllPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeReplyAllPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a replyAllRequestBuilder - */ - public withUrl(rawUrl: string) : ReplyAllRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReplyAllRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/send/sendRequestBuilder.ts b/src/me/messages/item/send/sendRequestBuilder.ts deleted file mode 100644 index c2a76ba0422..00000000000 --- a/src/me/messages/item/send/sendRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the send method. - */ -export class SendRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/send"); - }; - /** - * Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/message-send?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send an existing draft message. The draft message can be a new message draft, reply draft, reply-all draft, or a forward draft. This method saves the message in the Sent Items folder. Alternatively, send a new message in a single operation. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendRequestBuilder - */ - public withUrl(rawUrl: string) : SendRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/item/value/contentRequestBuilder.ts b/src/me/messages/item/value/contentRequestBuilder.ts deleted file mode 100644 index 8b74c91cf20..00000000000 --- a/src/me/messages/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages/{message%2Did}/$value"); - }; - /** - * Get media content for the navigation property messages from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property messages in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property messages from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property messages in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/messages/messagesRequestBuilder.ts b/src/me/messages/messagesRequestBuilder.ts deleted file mode 100644 index 09b55d954a3..00000000000 --- a/src/me/messages/messagesRequestBuilder.ts +++ /dev/null @@ -1,166 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MessageCollectionResponse } from '../../models/'; -import { createMessageFromDiscriminatorValue, deserializeIntoMessage, serializeMessage, type Message } from '../../models/message'; -import { createMessageCollectionResponseFromDiscriminatorValue } from '../../models/messageCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { MessageItemRequestBuilder } from './item/messageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MessagesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Expand related entities - */ - expand?: string[]; - /** - * Filter items by property values - */ - filter?: string; - /** - * Include Hidden Messages - */ - includeHiddenMessages?: 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; -} -/** - * Provides operations to manage the messages property of the microsoft.graph.user entity. - */ -export class MessagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the messages property of the microsoft.graph.user entity. - * @param messageId The unique identifier of message - * @returns a MessageItemRequestBuilder - */ - public byMessageId(messageId: string) : MessageItemRequestBuilder { - if(!messageId) throw new Error("messageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["message%2Did"] = messageId - return new MessageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MessagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/messages{?includeHiddenMessages*,%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The messages in a mailbox or folder. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MessageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the message.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Message - * @see {@link https://learn.microsoft.com/graph/api/user-post-messages?view=graph-rest-1.0|Find more info here} - */ - public post(body: Message, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMessageFromDiscriminatorValue, errorMapping); - }; - /** - * The messages in a mailbox or folder. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, messagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the message.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Message, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMessage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a messagesRequestBuilder - */ - public withUrl(rawUrl: string) : MessagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MessagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const messagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/oauth2PermissionGrants/count/countRequestBuilder.ts b/src/me/oauth2PermissionGrants/count/countRequestBuilder.ts deleted file mode 100644 index 9628b4e77ee..00000000000 --- a/src/me/oauth2PermissionGrants/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/oauth2PermissionGrants/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/oauth2PermissionGrants/count/index.ts b/src/me/oauth2PermissionGrants/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/oauth2PermissionGrants/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/oauth2PermissionGrants/index.ts b/src/me/oauth2PermissionGrants/index.ts deleted file mode 100644 index 47a8d41fb78..00000000000 --- a/src/me/oauth2PermissionGrants/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './oauth2PermissionGrantsRequestBuilder' diff --git a/src/me/oauth2PermissionGrants/item/index.ts b/src/me/oauth2PermissionGrants/item/index.ts deleted file mode 100644 index badc8e3e0d3..00000000000 --- a/src/me/oauth2PermissionGrants/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './oAuth2PermissionGrantItemRequestBuilder' diff --git a/src/me/oauth2PermissionGrants/item/oAuth2PermissionGrantItemRequestBuilder.ts b/src/me/oauth2PermissionGrants/item/oAuth2PermissionGrantItemRequestBuilder.ts deleted file mode 100644 index 8dce05ad215..00000000000 --- a/src/me/oauth2PermissionGrants/item/oAuth2PermissionGrantItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OAuth2PermissionGrant } from '../../../models/'; -import { createOAuth2PermissionGrantFromDiscriminatorValue } from '../../../models/oAuth2PermissionGrant'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OAuth2PermissionGrantItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. - */ -export class OAuth2PermissionGrantItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OAuth2PermissionGrantItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/oauth2PermissionGrants/{oAuth2PermissionGrant%2Did}{?%24select,%24expand}"); - }; - /** - * Get oauth2PermissionGrants from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OAuth2PermissionGrant - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOAuth2PermissionGrantFromDiscriminatorValue, errorMapping); - }; - /** - * Get oauth2PermissionGrants from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, oAuth2PermissionGrantItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OAuth2PermissionGrantItemRequestBuilder - */ - public withUrl(rawUrl: string) : OAuth2PermissionGrantItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OAuth2PermissionGrantItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const oAuth2PermissionGrantItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/oauth2PermissionGrants/oauth2PermissionGrantsRequestBuilder.ts b/src/me/oauth2PermissionGrants/oauth2PermissionGrantsRequestBuilder.ts deleted file mode 100644 index 9f61a630fba..00000000000 --- a/src/me/oauth2PermissionGrants/oauth2PermissionGrantsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OAuth2PermissionGrantCollectionResponse } from '../../models/'; -import { createOAuth2PermissionGrantCollectionResponseFromDiscriminatorValue } from '../../models/oAuth2PermissionGrantCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OAuth2PermissionGrantItemRequestBuilder } from './item/oAuth2PermissionGrantItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface Oauth2PermissionGrantsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. - */ -export class Oauth2PermissionGrantsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. - * @param oAuth2PermissionGrantId The unique identifier of oAuth2PermissionGrant - * @returns a OAuth2PermissionGrantItemRequestBuilder - */ - public byOAuth2PermissionGrantId(oAuth2PermissionGrantId: string) : OAuth2PermissionGrantItemRequestBuilder { - if(!oAuth2PermissionGrantId) throw new Error("oAuth2PermissionGrantId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["oAuth2PermissionGrant%2Did"] = oAuth2PermissionGrantId - return new OAuth2PermissionGrantItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new Oauth2PermissionGrantsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/oauth2PermissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OAuth2PermissionGrantCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-oauth2permissiongrants?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOAuth2PermissionGrantCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, oauth2PermissionGrantsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a oauth2PermissionGrantsRequestBuilder - */ - public withUrl(rawUrl: string) : Oauth2PermissionGrantsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new Oauth2PermissionGrantsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const oauth2PermissionGrantsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/index.ts b/src/me/onenote/index.ts deleted file mode 100644 index 04c75be40e1..00000000000 --- a/src/me/onenote/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteRequestBuilder' diff --git a/src/me/onenote/notebooks/count/countRequestBuilder.ts b/src/me/onenote/notebooks/count/countRequestBuilder.ts deleted file mode 100644 index 8e39d1a9f78..00000000000 --- a/src/me/onenote/notebooks/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/count/index.ts b/src/me/onenote/notebooks/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/getNotebookFromWebUrl/getNotebookFromWebUrlPostRequestBody.ts b/src/me/onenote/notebooks/getNotebookFromWebUrl/getNotebookFromWebUrlPostRequestBody.ts deleted file mode 100644 index 5de000d11c3..00000000000 --- a/src/me/onenote/notebooks/getNotebookFromWebUrl/getNotebookFromWebUrlPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetNotebookFromWebUrlPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetNotebookFromWebUrlPostRequestBody; -} -export function deserializeIntoGetNotebookFromWebUrlPostRequestBody(getNotebookFromWebUrlPostRequestBody: GetNotebookFromWebUrlPostRequestBody | undefined = {} as GetNotebookFromWebUrlPostRequestBody) : Record void> { - return { - "webUrl": n => { getNotebookFromWebUrlPostRequestBody.webUrl = n.getStringValue(); }, - } -} -export interface GetNotebookFromWebUrlPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The webUrl property - */ - webUrl?: string; -} -export function serializeGetNotebookFromWebUrlPostRequestBody(writer: SerializationWriter, getNotebookFromWebUrlPostRequestBody: GetNotebookFromWebUrlPostRequestBody | undefined = {} as GetNotebookFromWebUrlPostRequestBody) : void { - writer.writeStringValue("webUrl", getNotebookFromWebUrlPostRequestBody.webUrl); - writer.writeAdditionalData(getNotebookFromWebUrlPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/getNotebookFromWebUrl/getNotebookFromWebUrlRequestBuilder.ts b/src/me/onenote/notebooks/getNotebookFromWebUrl/getNotebookFromWebUrlRequestBuilder.ts deleted file mode 100644 index 9c7a7b284be..00000000000 --- a/src/me/onenote/notebooks/getNotebookFromWebUrl/getNotebookFromWebUrlRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCopyNotebookModelFromDiscriminatorValue, deserializeIntoCopyNotebookModel, serializeCopyNotebookModel, type CopyNotebookModel } from '../../../../models/copyNotebookModel'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { deserializeIntoGetNotebookFromWebUrlPostRequestBody, serializeGetNotebookFromWebUrlPostRequestBody, type GetNotebookFromWebUrlPostRequestBody } from './getNotebookFromWebUrlPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the getNotebookFromWebUrl method. - */ -export class GetNotebookFromWebUrlRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetNotebookFromWebUrlRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/getNotebookFromWebUrl"); - }; - /** - * Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CopyNotebookModel - * @see {@link https://learn.microsoft.com/graph/api/notebook-getnotebookfromweburl?view=graph-rest-1.0|Find more info here} - */ - public post(body: GetNotebookFromWebUrlPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCopyNotebookModelFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the properties and relationships of a notebook object by using its URL path. The location can be user notebooks on Microsoft 365, group notebooks, or SharePoint site-hosted team notebooks on Microsoft 365. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: GetNotebookFromWebUrlPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeGetNotebookFromWebUrlPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getNotebookFromWebUrlRequestBuilder - */ - public withUrl(rawUrl: string) : GetNotebookFromWebUrlRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetNotebookFromWebUrlRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/getNotebookFromWebUrl/index.ts b/src/me/onenote/notebooks/getNotebookFromWebUrl/index.ts deleted file mode 100644 index 7dc15b6bda2..00000000000 --- a/src/me/onenote/notebooks/getNotebookFromWebUrl/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getNotebookFromWebUrlPostRequestBody' -export * from './getNotebookFromWebUrlRequestBuilder' diff --git a/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksGetResponse.ts b/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksGetResponse.ts deleted file mode 100644 index 67ab4b540ad..00000000000 --- a/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksGetResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../../models/baseCollectionPaginationCountResponse'; -import { createRecentNotebookFromDiscriminatorValue, serializeRecentNotebook, type RecentNotebook } from '../../../../models/recentNotebook'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetRecentNotebooksWithIncludePersonalNotebooksGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetRecentNotebooksWithIncludePersonalNotebooksGetResponse; -} -export function deserializeIntoGetRecentNotebooksWithIncludePersonalNotebooksGetResponse(getRecentNotebooksWithIncludePersonalNotebooksGetResponse: GetRecentNotebooksWithIncludePersonalNotebooksGetResponse | undefined = {} as GetRecentNotebooksWithIncludePersonalNotebooksGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(getRecentNotebooksWithIncludePersonalNotebooksGetResponse), - "value": n => { getRecentNotebooksWithIncludePersonalNotebooksGetResponse.value = n.getCollectionOfObjectValues(createRecentNotebookFromDiscriminatorValue); }, - } -} -export interface GetRecentNotebooksWithIncludePersonalNotebooksGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: RecentNotebook[]; -} -export function serializeGetRecentNotebooksWithIncludePersonalNotebooksGetResponse(writer: SerializationWriter, getRecentNotebooksWithIncludePersonalNotebooksGetResponse: GetRecentNotebooksWithIncludePersonalNotebooksGetResponse | undefined = {} as GetRecentNotebooksWithIncludePersonalNotebooksGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, getRecentNotebooksWithIncludePersonalNotebooksGetResponse) - writer.writeCollectionOfObjectValues("value", getRecentNotebooksWithIncludePersonalNotebooksGetResponse.value, serializeRecentNotebook); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder.ts b/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder.ts deleted file mode 100644 index 3a3fc6de394..00000000000 --- a/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createGetRecentNotebooksWithIncludePersonalNotebooksGetResponseFromDiscriminatorValue } from './getRecentNotebooksWithIncludePersonalNotebooksGetResponse'; -import { type GetRecentNotebooksWithIncludePersonalNotebooksGetResponse } from './index'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to call the getRecentNotebooks method. - */ -export class GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder and sets the default values. - * @param includePersonalNotebooks Usage: includePersonalNotebooks={includePersonalNotebooks} - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, includePersonalNotebooks?: boolean | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks}){?%24top,%24skip,%24search,%24filter,%24count}"); - this.pathParameters["includePersonalNotebooks"] = includePersonalNotebooks - }; - /** - * Invoke function getRecentNotebooks - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetRecentNotebooksWithIncludePersonalNotebooksGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetRecentNotebooksWithIncludePersonalNotebooksGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function getRecentNotebooks - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, getRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder - */ - public withUrl(rawUrl: string) : GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const getRecentNotebooksWithIncludePersonalNotebooksRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/index.ts b/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/index.ts deleted file mode 100644 index 1844bdd1e3e..00000000000 --- a/src/me/onenote/notebooks/getRecentNotebooksWithIncludePersonalNotebooks/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getRecentNotebooksWithIncludePersonalNotebooksGetResponse' -export * from './getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder' diff --git a/src/me/onenote/notebooks/index.ts b/src/me/onenote/notebooks/index.ts deleted file mode 100644 index 27f90960aa1..00000000000 --- a/src/me/onenote/notebooks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './notebooksRequestBuilder' diff --git a/src/me/onenote/notebooks/item/copyNotebook/copyNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/copyNotebook/copyNotebookRequestBuilder.ts deleted file mode 100644 index 329d1ebc49b..00000000000 --- a/src/me/onenote/notebooks/item/copyNotebook/copyNotebookRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../models/onenoteOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyNotebookPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The notebookFolder property - */ - notebookFolder?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyNotebookPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyNotebookPostRequestBody; -} -export function deserializeIntoCopyNotebookPostRequestBody(copyNotebookPostRequestBody: CopyNotebookPostRequestBody | undefined = {} as CopyNotebookPostRequestBody) : Record void> { - return { - "groupId": n => { copyNotebookPostRequestBody.groupId = n.getStringValue(); }, - "notebookFolder": n => { copyNotebookPostRequestBody.notebookFolder = n.getStringValue(); }, - "renameAs": n => { copyNotebookPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyNotebookPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyNotebookPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyNotebookPostRequestBody(writer: SerializationWriter, copyNotebookPostRequestBody: CopyNotebookPostRequestBody | undefined = {} as CopyNotebookPostRequestBody) : void { - writer.writeStringValue("groupId", copyNotebookPostRequestBody.groupId); - writer.writeStringValue("notebookFolder", copyNotebookPostRequestBody.notebookFolder); - writer.writeStringValue("renameAs", copyNotebookPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyNotebookPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyNotebookPostRequestBody.siteId); - writer.writeAdditionalData(copyNotebookPostRequestBody.additionalData); -} -/** - * Provides operations to call the copyNotebook method. - */ -export class CopyNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/copyNotebook"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/notebook-copynotebook?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyNotebookPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : CopyNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/copyNotebook/index.ts b/src/me/onenote/notebooks/item/copyNotebook/index.ts deleted file mode 100644 index e5ebc7cae6c..00000000000 --- a/src/me/onenote/notebooks/item/copyNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/index.ts b/src/me/onenote/notebooks/item/index.ts deleted file mode 100644 index 9099dcb0b1d..00000000000 --- a/src/me/onenote/notebooks/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './notebookItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/notebookItemRequestBuilder.ts b/src/me/onenote/notebooks/item/notebookItemRequestBuilder.ts deleted file mode 100644 index 068f36e370a..00000000000 --- a/src/me/onenote/notebooks/item/notebookItemRequestBuilder.ts +++ /dev/null @@ -1,149 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createNotebookFromDiscriminatorValue, deserializeIntoNotebook, serializeNotebook, type Notebook } from '../../../../models/notebook'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CopyNotebookRequestBuilder } from './copyNotebook/copyNotebookRequestBuilder'; -import { SectionGroupsRequestBuilder } from './sectionGroups/sectionGroupsRequestBuilder'; -import { SectionsRequestBuilder } from './sections/sectionsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface NotebookItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the notebooks property of the microsoft.graph.onenote entity. - */ -export class NotebookItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the copyNotebook method. - */ - public get copyNotebook(): CopyNotebookRequestBuilder { - return new CopyNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.notebook entity. - */ - public get sectionGroups(): SectionGroupsRequestBuilder { - return new SectionGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.notebook entity. - */ - public get sections(): SectionsRequestBuilder { - return new SectionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new NotebookItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property notebooks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a notebook object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - * @see {@link https://learn.microsoft.com/graph/api/notebook-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property notebooks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public patch(body: Notebook, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property notebooks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a notebook object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, notebookItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property notebooks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Notebook, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeNotebook); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a NotebookItemRequestBuilder - */ - public withUrl(rawUrl: string) : NotebookItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new NotebookItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const notebookItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/count/countRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/count/countRequestBuilder.ts deleted file mode 100644 index d27c9873936..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/count/index.ts b/src/me/onenote/notebooks/item/sectionGroups/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/index.ts b/src/me/onenote/notebooks/item/sectionGroups/index.ts deleted file mode 100644 index 37b7f776747..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupsRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/index.ts deleted file mode 100644 index e4013e9d2d1..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/parentNotebook/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index c47e9b0fd51..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.sectionGroup entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/parentSectionGroup/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/parentSectionGroup/index.ts deleted file mode 100644 index 74d7c5d7fbf..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/parentSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionGroupRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts deleted file mode 100644 index 7bb2b9ea4ff..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.sectionGroup entity. - */ -export class ParentSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/parentSectionGroup{?%24select,%24expand}"); - }; - /** - * The section group that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section group that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts deleted file mode 100644 index 400044e93a4..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue, deserializeIntoSectionGroup, serializeSectionGroup, type SectionGroup } from '../../../../../../models/sectionGroup'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionGroupRequestBuilder } from './parentSectionGroup/parentSectionGroupRequestBuilder'; -import { SectionGroupsRequestBuilder } from './sectionGroups/sectionGroupsRequestBuilder'; -import { SectionsRequestBuilder } from './sections/sectionsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.notebook entity. - */ -export class SectionGroupItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.sectionGroup entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.sectionGroup entity. - */ - public get parentSectionGroup(): ParentSectionGroupRequestBuilder { - return new ParentSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - */ - public get sectionGroups(): SectionGroupsRequestBuilder { - return new SectionGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - */ - public get sections(): SectionsRequestBuilder { - return new SectionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new SectionGroupItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property sectionGroups for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The section groups in the notebook. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sectionGroups in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public patch(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property sectionGroups for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The section groups in the notebook. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sectionGroups in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSectionGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SectionGroupItemRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/count/countRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/count/countRequestBuilder.ts deleted file mode 100644 index eed0eb0df52..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sectionGroups/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/count/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/index.ts deleted file mode 100644 index 37b7f776747..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupsRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/item/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/item/index.ts deleted file mode 100644 index e4013e9d2d1..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts deleted file mode 100644 index 381856bc120..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - */ -export class SectionGroupItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SectionGroupItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sectionGroups/{sectionGroup%2Did1}{?%24select,%24expand}"); - }; - /** - * The section groups in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section groups in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SectionGroupItemRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/sectionGroupsRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/sectionGroupsRequestBuilder.ts deleted file mode 100644 index c0bfa79b55d..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sectionGroups/sectionGroupsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroupCollectionResponse } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/sectionGroupCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SectionGroupItemRequestBuilder } from './item/sectionGroupItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - */ -export class SectionGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - * @param sectionGroupId1 The unique identifier of sectionGroup - * @returns a SectionGroupItemRequestBuilder - */ - public bySectionGroupId1(sectionGroupId1: string) : SectionGroupItemRequestBuilder { - if(!sectionGroupId1) throw new Error("sectionGroupId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sectionGroup%2Did1"] = sectionGroupId1 - return new SectionGroupItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sectionGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of section groups from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroupCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of section groups from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/count/countRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/count/countRequestBuilder.ts deleted file mode 100644 index 1600a896dc7..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/count/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/index.ts deleted file mode 100644 index 309c37a22a8..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionsRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts deleted file mode 100644 index a90759bee1d..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts +++ /dev/null @@ -1,54 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToNotebookPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToNotebookPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToNotebookPostRequestBody; -} -export function deserializeIntoCopyToNotebookPostRequestBody(copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : Record void> { - return { - "groupId": n => { copyToNotebookPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToNotebookPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToNotebookPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToNotebookPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToNotebookPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToNotebookPostRequestBody(writer: SerializationWriter, copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : void { - writer.writeStringValue("groupId", copyToNotebookPostRequestBody.groupId); - writer.writeStringValue("id", copyToNotebookPostRequestBody.id); - writer.writeStringValue("renameAs", copyToNotebookPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToNotebookPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToNotebookPostRequestBody.siteId); - writer.writeAdditionalData(copyToNotebookPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts deleted file mode 100644 index e214c27854a..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToNotebookPostRequestBody, serializeCopyToNotebookPostRequestBody, type CopyToNotebookPostRequestBody } from './copyToNotebookPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToNotebook method. - */ -export class CopyToNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/copyToNotebook"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytonotebook?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToNotebookPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/index.ts deleted file mode 100644 index 55c9d404cbc..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToNotebook/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToNotebookPostRequestBody' -export * from './copyToNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts deleted file mode 100644 index a7d8b7eba4c..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../../../models/onenoteOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionGroupPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionGroupPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionGroupPostRequestBody; -} -export function deserializeIntoCopyToSectionGroupPostRequestBody(copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionGroupPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionGroupPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToSectionGroupPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionGroupPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionGroupPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionGroupPostRequestBody(writer: SerializationWriter, copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionGroupPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionGroupPostRequestBody.id); - writer.writeStringValue("renameAs", copyToSectionGroupPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToSectionGroupPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionGroupPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionGroupPostRequestBody.additionalData); -} -/** - * Provides operations to call the copyToSectionGroup method. - */ -export class CopyToSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/copyToSectionGroup"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytosectiongroup?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionGroupPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToSectionGroup/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToSectionGroup/index.ts deleted file mode 100644 index fffca97462e..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/copyToSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyToSectionGroupRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/index.ts deleted file mode 100644 index 8d699381c1a..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteSectionItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/onenoteSectionItemRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/onenoteSectionItemRequestBuilder.ts deleted file mode 100644 index af779fec59f..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/onenoteSectionItemRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../../../../../models/onenoteSection'; -import { CopyToNotebookRequestBuilder } from './copyToNotebook/copyToNotebookRequestBuilder'; -import { CopyToSectionGroupRequestBuilder } from './copyToSectionGroup/copyToSectionGroupRequestBuilder'; -import { PagesRequestBuilder } from './pages/pagesRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionGroupRequestBuilder } from './parentSectionGroup/parentSectionGroupRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteSectionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - */ -export class OnenoteSectionItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the copyToNotebook method. - */ - public get copyToNotebook(): CopyToNotebookRequestBuilder { - return new CopyToNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSectionGroup method. - */ - public get copyToSectionGroup(): CopyToSectionGroupRequestBuilder { - return new CopyToSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ - public get pages(): PagesRequestBuilder { - return new PagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ - public get parentSectionGroup(): ParentSectionGroupRequestBuilder { - return new ParentSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenoteSectionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The sections in the section group. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public patch(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The sections in the section group. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteSectionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenoteSectionItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteSectionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteSectionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteSectionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/count/countRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/count/countRequestBuilder.ts deleted file mode 100644 index 9d62c957fa2..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/count/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/index.ts deleted file mode 100644 index faefa406497..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pagesRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/content/contentRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/content/contentRequestBuilder.ts deleted file mode 100644 index 3925ae60846..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePage } from '../../../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue } from '../../../../../../../../../../../models/onenotePage'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/content"); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts deleted file mode 100644 index dd27a1dd92f..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionPostRequestBody; -} -export function deserializeIntoCopyToSectionPostRequestBody(copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionPostRequestBody.id = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionPostRequestBody(writer: SerializationWriter, copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionPostRequestBody.id); - writer.writeStringValue("siteCollectionId", copyToSectionPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts deleted file mode 100644 index 84f123feedb..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToSectionPostRequestBody, serializeCopyToSectionPostRequestBody, type CopyToSectionPostRequestBody } from './copyToSectionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToSection method. - */ -export class CopyToSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/copyToSection"); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/page-copytosection?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/index.ts deleted file mode 100644 index c8247cbd948..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/copyToSection/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToSectionPostRequestBody' -export * from './copyToSectionRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/index.ts deleted file mode 100644 index 31aae08a358..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenotePageItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts deleted file mode 100644 index a9dfe1497d0..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts +++ /dev/null @@ -1,169 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../../../../../models/onenotePage'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { CopyToSectionRequestBuilder } from './copyToSection/copyToSectionRequestBuilder'; -import { OnenotePatchContentRequestBuilder } from './onenotePatchContent/onenotePatchContentRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionRequestBuilder } from './parentSection/parentSectionRequestBuilder'; -import { PreviewRequestBuilder } from './preview/previewRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenotePageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class OnenotePageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSection method. - */ - public get copyToSection(): CopyToSectionRequestBuilder { - return new CopyToSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the onenotePatchContent method. - */ - public get onenotePatchContent(): OnenotePatchContentRequestBuilder { - return new OnenotePatchContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ - public get parentSection(): ParentSectionRequestBuilder { - return new ParentSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the preview method. - */ - public get preview(): PreviewRequestBuilder { - return new PreviewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenotePageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public patch(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenotePageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenotePageItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenotePageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/index.ts deleted file mode 100644 index 396d2dde0cb..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './onenotePatchContentPostRequestBody' -export * from './onenotePatchContentRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts deleted file mode 100644 index 78d880acb09..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createOnenotePatchContentCommandFromDiscriminatorValue, serializeOnenotePatchContentCommand, type OnenotePatchContentCommand } from '../../../../../../../../../../../models/onenotePatchContentCommand'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createOnenotePatchContentPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoOnenotePatchContentPostRequestBody; -} -export function deserializeIntoOnenotePatchContentPostRequestBody(onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : Record void> { - return { - "commands": n => { onenotePatchContentPostRequestBody.commands = n.getCollectionOfObjectValues(createOnenotePatchContentCommandFromDiscriminatorValue); }, - } -} -export interface OnenotePatchContentPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The commands property - */ - commands?: OnenotePatchContentCommand[]; -} -export function serializeOnenotePatchContentPostRequestBody(writer: SerializationWriter, onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : void { - writer.writeCollectionOfObjectValues("commands", onenotePatchContentPostRequestBody.commands, serializeOnenotePatchContentCommand); - writer.writeAdditionalData(onenotePatchContentPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts deleted file mode 100644 index 86793130872..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoOnenotePatchContentPostRequestBody, serializeOnenotePatchContentPostRequestBody, type OnenotePatchContentPostRequestBody } from './onenotePatchContentPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the onenotePatchContent method. - */ -export class OnenotePatchContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OnenotePatchContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/onenotePatchContent"); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePatchContentPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onenotePatchContentRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePatchContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePatchContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentNotebook/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index dca1427fce2..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentSection/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentSection/index.ts deleted file mode 100644 index 6bfa061926c..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts deleted file mode 100644 index 5f23979ec93..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSection } from '../../../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue } from '../../../../../../../../../../../models/onenoteSection'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ -export class ParentSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentSection{?%24select,%24expand}"); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/preview/previewRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/preview/previewRequestBuilder.ts deleted file mode 100644 index 2b1a8726a76..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/item/preview/previewRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePagePreview } from '../../../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePagePreviewFromDiscriminatorValue } from '../../../../../../../../../../../models/onenotePagePreview'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the preview method. - */ -export class PreviewRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PreviewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/preview()"); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePagePreview - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePagePreviewFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a previewRequestBuilder - */ - public withUrl(rawUrl: string) : PreviewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PreviewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/pagesRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/pagesRequestBuilder.ts deleted file mode 100644 index b2ccee0ec16..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/pages/pagesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePageCollectionResponse } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../../../../models/onenotePage'; -import { createOnenotePageCollectionResponseFromDiscriminatorValue } from '../../../../../../../../../models/onenotePageCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenotePageItemRequestBuilder } from './item/onenotePageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class PagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - * @param onenotePageId The unique identifier of onenotePage - * @returns a OnenotePageItemRequestBuilder - */ - public byOnenotePageId(onenotePageId: string) : OnenotePageItemRequestBuilder { - if(!onenotePageId) throw new Error("onenotePageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenotePage%2Did"] = onenotePageId - return new OnenotePageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - * @see {@link https://learn.microsoft.com/graph/api/section-post-pages?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a pagesRequestBuilder - */ - public withUrl(rawUrl: string) : PagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentNotebook/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index cf6fc333f36..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentSectionGroup/index.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentSectionGroup/index.ts deleted file mode 100644 index 74d7c5d7fbf..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionGroupRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts deleted file mode 100644 index 2e9dcf806da..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ -export class ParentSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/parentSectionGroup{?%24select,%24expand}"); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/item/sections/sectionsRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/item/sections/sectionsRequestBuilder.ts deleted file mode 100644 index fadf0df60fb..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/item/sections/sectionsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSectionCollectionResponse } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../../../../models/onenoteSection'; -import { createOnenoteSectionCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/onenoteSectionCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenoteSectionItemRequestBuilder } from './item/onenoteSectionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - */ -export class SectionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - * @param onenoteSectionId The unique identifier of onenoteSection - * @returns a OnenoteSectionItemRequestBuilder - */ - public byOnenoteSectionId(onenoteSectionId: string) : OnenoteSectionItemRequestBuilder { - if(!onenoteSectionId) throw new Error("onenoteSectionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenoteSection%2Did"] = onenoteSectionId - return new OnenoteSectionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of onenoteSection objects from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSectionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new onenoteSection in the specified section group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-post-sections?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of onenoteSection objects from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new onenoteSection in the specified section group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sectionGroups/sectionGroupsRequestBuilder.ts b/src/me/onenote/notebooks/item/sectionGroups/sectionGroupsRequestBuilder.ts deleted file mode 100644 index 169a85ca7e5..00000000000 --- a/src/me/onenote/notebooks/item/sectionGroups/sectionGroupsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroupCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue, deserializeIntoSectionGroup, serializeSectionGroup, type SectionGroup } from '../../../../../models/sectionGroup'; -import { createSectionGroupCollectionResponseFromDiscriminatorValue } from '../../../../../models/sectionGroupCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SectionGroupItemRequestBuilder } from './item/sectionGroupItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.notebook entity. - */ -export class SectionGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.notebook entity. - * @param sectionGroupId The unique identifier of sectionGroup - * @returns a SectionGroupItemRequestBuilder - */ - public bySectionGroupId(sectionGroupId: string) : SectionGroupItemRequestBuilder { - if(!sectionGroupId) throw new Error("sectionGroupId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sectionGroup%2Did"] = sectionGroupId - return new SectionGroupItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sectionGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of section groups from the specified notebook. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroupCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/notebook-list-sectiongroups?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new section group in the specified notebook. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - * @see {@link https://learn.microsoft.com/graph/api/notebook-post-sectiongroups?view=graph-rest-1.0|Find more info here} - */ - public post(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of section groups from the specified notebook. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new section group in the specified notebook. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSectionGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/count/countRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/count/countRequestBuilder.ts deleted file mode 100644 index eb664af2f7c..00000000000 --- a/src/me/onenote/notebooks/item/sections/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/count/index.ts b/src/me/onenote/notebooks/item/sections/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/item/sections/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/index.ts b/src/me/onenote/notebooks/item/sections/index.ts deleted file mode 100644 index 309c37a22a8..00000000000 --- a/src/me/onenote/notebooks/item/sections/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionsRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts b/src/me/onenote/notebooks/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts deleted file mode 100644 index a90759bee1d..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts +++ /dev/null @@ -1,54 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToNotebookPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToNotebookPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToNotebookPostRequestBody; -} -export function deserializeIntoCopyToNotebookPostRequestBody(copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : Record void> { - return { - "groupId": n => { copyToNotebookPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToNotebookPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToNotebookPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToNotebookPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToNotebookPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToNotebookPostRequestBody(writer: SerializationWriter, copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : void { - writer.writeStringValue("groupId", copyToNotebookPostRequestBody.groupId); - writer.writeStringValue("id", copyToNotebookPostRequestBody.id); - writer.writeStringValue("renameAs", copyToNotebookPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToNotebookPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToNotebookPostRequestBody.siteId); - writer.writeAdditionalData(copyToNotebookPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts deleted file mode 100644 index d4af319364c..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToNotebookPostRequestBody, serializeCopyToNotebookPostRequestBody, type CopyToNotebookPostRequestBody } from './copyToNotebookPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToNotebook method. - */ -export class CopyToNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/copyToNotebook"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytonotebook?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToNotebookPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/copyToNotebook/index.ts b/src/me/onenote/notebooks/item/sections/item/copyToNotebook/index.ts deleted file mode 100644 index 55c9d404cbc..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/copyToNotebook/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToNotebookPostRequestBody' -export * from './copyToNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts deleted file mode 100644 index c8626d857ac..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../models/onenoteOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionGroupPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionGroupPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionGroupPostRequestBody; -} -export function deserializeIntoCopyToSectionGroupPostRequestBody(copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionGroupPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionGroupPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToSectionGroupPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionGroupPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionGroupPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionGroupPostRequestBody(writer: SerializationWriter, copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionGroupPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionGroupPostRequestBody.id); - writer.writeStringValue("renameAs", copyToSectionGroupPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToSectionGroupPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionGroupPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionGroupPostRequestBody.additionalData); -} -/** - * Provides operations to call the copyToSectionGroup method. - */ -export class CopyToSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/copyToSectionGroup"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytosectiongroup?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionGroupPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/copyToSectionGroup/index.ts b/src/me/onenote/notebooks/item/sections/item/copyToSectionGroup/index.ts deleted file mode 100644 index fffca97462e..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/copyToSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyToSectionGroupRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/index.ts b/src/me/onenote/notebooks/item/sections/item/index.ts deleted file mode 100644 index 8d699381c1a..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteSectionItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/onenoteSectionItemRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/onenoteSectionItemRequestBuilder.ts deleted file mode 100644 index 3277a697b2d..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/onenoteSectionItemRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../../../models/onenoteSection'; -import { CopyToNotebookRequestBuilder } from './copyToNotebook/copyToNotebookRequestBuilder'; -import { CopyToSectionGroupRequestBuilder } from './copyToSectionGroup/copyToSectionGroupRequestBuilder'; -import { PagesRequestBuilder } from './pages/pagesRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionGroupRequestBuilder } from './parentSectionGroup/parentSectionGroupRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteSectionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.notebook entity. - */ -export class OnenoteSectionItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the copyToNotebook method. - */ - public get copyToNotebook(): CopyToNotebookRequestBuilder { - return new CopyToNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSectionGroup method. - */ - public get copyToSectionGroup(): CopyToSectionGroupRequestBuilder { - return new CopyToSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ - public get pages(): PagesRequestBuilder { - return new PagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ - public get parentSectionGroup(): ParentSectionGroupRequestBuilder { - return new ParentSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenoteSectionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The sections in the notebook. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public patch(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The sections in the notebook. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteSectionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenoteSectionItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteSectionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteSectionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteSectionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/count/countRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/count/countRequestBuilder.ts deleted file mode 100644 index 4f3e55331f4..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/count/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/index.ts deleted file mode 100644 index faefa406497..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pagesRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/content/contentRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/content/contentRequestBuilder.ts deleted file mode 100644 index 3d2e18d461d..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePage } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue } from '../../../../../../../../../models/onenotePage'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/content"); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts deleted file mode 100644 index dd27a1dd92f..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionPostRequestBody; -} -export function deserializeIntoCopyToSectionPostRequestBody(copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionPostRequestBody.id = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionPostRequestBody(writer: SerializationWriter, copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionPostRequestBody.id); - writer.writeStringValue("siteCollectionId", copyToSectionPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts deleted file mode 100644 index 3e0fd2fd836..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToSectionPostRequestBody, serializeCopyToSectionPostRequestBody, type CopyToSectionPostRequestBody } from './copyToSectionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToSection method. - */ -export class CopyToSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/copyToSection"); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/page-copytosection?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/index.ts deleted file mode 100644 index c8247cbd948..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/copyToSection/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToSectionPostRequestBody' -export * from './copyToSectionRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/index.ts deleted file mode 100644 index 31aae08a358..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenotePageItemRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts deleted file mode 100644 index 7f4680caaca..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts +++ /dev/null @@ -1,169 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../../../models/onenotePage'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { CopyToSectionRequestBuilder } from './copyToSection/copyToSectionRequestBuilder'; -import { OnenotePatchContentRequestBuilder } from './onenotePatchContent/onenotePatchContentRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionRequestBuilder } from './parentSection/parentSectionRequestBuilder'; -import { PreviewRequestBuilder } from './preview/previewRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenotePageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class OnenotePageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSection method. - */ - public get copyToSection(): CopyToSectionRequestBuilder { - return new CopyToSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the onenotePatchContent method. - */ - public get onenotePatchContent(): OnenotePatchContentRequestBuilder { - return new OnenotePatchContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ - public get parentSection(): ParentSectionRequestBuilder { - return new ParentSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the preview method. - */ - public get preview(): PreviewRequestBuilder { - return new PreviewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenotePageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public patch(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenotePageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenotePageItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenotePageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/index.ts deleted file mode 100644 index 396d2dde0cb..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './onenotePatchContentPostRequestBody' -export * from './onenotePatchContentRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts deleted file mode 100644 index 1e62308910b..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createOnenotePatchContentCommandFromDiscriminatorValue, serializeOnenotePatchContentCommand, type OnenotePatchContentCommand } from '../../../../../../../../../models/onenotePatchContentCommand'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createOnenotePatchContentPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoOnenotePatchContentPostRequestBody; -} -export function deserializeIntoOnenotePatchContentPostRequestBody(onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : Record void> { - return { - "commands": n => { onenotePatchContentPostRequestBody.commands = n.getCollectionOfObjectValues(createOnenotePatchContentCommandFromDiscriminatorValue); }, - } -} -export interface OnenotePatchContentPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The commands property - */ - commands?: OnenotePatchContentCommand[]; -} -export function serializeOnenotePatchContentPostRequestBody(writer: SerializationWriter, onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : void { - writer.writeCollectionOfObjectValues("commands", onenotePatchContentPostRequestBody.commands, serializeOnenotePatchContentCommand); - writer.writeAdditionalData(onenotePatchContentPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts deleted file mode 100644 index b134c403725..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoOnenotePatchContentPostRequestBody, serializeOnenotePatchContentPostRequestBody, type OnenotePatchContentPostRequestBody } from './onenotePatchContentPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the onenotePatchContent method. - */ -export class OnenotePatchContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OnenotePatchContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/onenotePatchContent"); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePatchContentPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onenotePatchContentRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePatchContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePatchContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/parentNotebook/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index de3967d796f..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/parentSection/index.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/parentSection/index.ts deleted file mode 100644 index 6bfa061926c..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/parentSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts deleted file mode 100644 index 15f17b88c31..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSection } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue } from '../../../../../../../../../models/onenoteSection'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ -export class ParentSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentSection{?%24select,%24expand}"); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/item/preview/previewRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/item/preview/previewRequestBuilder.ts deleted file mode 100644 index b063469b1a7..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/item/preview/previewRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePagePreview } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePagePreviewFromDiscriminatorValue } from '../../../../../../../../../models/onenotePagePreview'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the preview method. - */ -export class PreviewRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PreviewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/preview()"); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePagePreview - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePagePreviewFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a previewRequestBuilder - */ - public withUrl(rawUrl: string) : PreviewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PreviewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/pages/pagesRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/pages/pagesRequestBuilder.ts deleted file mode 100644 index c06cae637e1..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/pages/pagesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePageCollectionResponse } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../../models/onenotePage'; -import { createOnenotePageCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/onenotePageCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenotePageItemRequestBuilder } from './item/onenotePageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class PagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - * @param onenotePageId The unique identifier of onenotePage - * @returns a OnenotePageItemRequestBuilder - */ - public byOnenotePageId(onenotePageId: string) : OnenotePageItemRequestBuilder { - if(!onenotePageId) throw new Error("onenotePageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenotePage%2Did"] = onenotePageId - return new OnenotePageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - * @see {@link https://learn.microsoft.com/graph/api/section-post-pages?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a pagesRequestBuilder - */ - public withUrl(rawUrl: string) : PagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/parentNotebook/index.ts b/src/me/onenote/notebooks/item/sections/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index 3ce50b8ecbd..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/item/parentSectionGroup/index.ts b/src/me/onenote/notebooks/item/sections/item/parentSectionGroup/index.ts deleted file mode 100644 index 74d7c5d7fbf..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/parentSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionGroupRequestBuilder' diff --git a/src/me/onenote/notebooks/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts deleted file mode 100644 index 663b96a4825..00000000000 --- a/src/me/onenote/notebooks/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ -export class ParentSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections/{onenoteSection%2Did}/parentSectionGroup{?%24select,%24expand}"); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/item/sections/sectionsRequestBuilder.ts b/src/me/onenote/notebooks/item/sections/sectionsRequestBuilder.ts deleted file mode 100644 index 27534e68838..00000000000 --- a/src/me/onenote/notebooks/item/sections/sectionsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSectionCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../../models/onenoteSection'; -import { createOnenoteSectionCollectionResponseFromDiscriminatorValue } from '../../../../../models/onenoteSectionCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenoteSectionItemRequestBuilder } from './item/onenoteSectionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.notebook entity. - */ -export class SectionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.notebook entity. - * @param onenoteSectionId The unique identifier of onenoteSection - * @returns a OnenoteSectionItemRequestBuilder - */ - public byOnenoteSectionId(onenoteSectionId: string) : OnenoteSectionItemRequestBuilder { - if(!onenoteSectionId) throw new Error("onenoteSectionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenoteSection%2Did"] = onenoteSectionId - return new OnenoteSectionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks/{notebook%2Did}/sections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of onenoteSection objects from the specified notebook. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSectionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/notebook-list-sections?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new onenoteSection in the specified notebook. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - * @see {@link https://learn.microsoft.com/graph/api/notebook-post-sections?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of onenoteSection objects from the specified notebook. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new onenoteSection in the specified notebook. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/notebooks/notebooksRequestBuilder.ts b/src/me/onenote/notebooks/notebooksRequestBuilder.ts deleted file mode 100644 index a15365eb814..00000000000 --- a/src/me/onenote/notebooks/notebooksRequestBuilder.ts +++ /dev/null @@ -1,172 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type NotebookCollectionResponse } from '../../../models/'; -import { createNotebookFromDiscriminatorValue, deserializeIntoNotebook, serializeNotebook, type Notebook } from '../../../models/notebook'; -import { createNotebookCollectionResponseFromDiscriminatorValue } from '../../../models/notebookCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GetNotebookFromWebUrlRequestBuilder } from './getNotebookFromWebUrl/getNotebookFromWebUrlRequestBuilder'; -import { GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder } from './getRecentNotebooksWithIncludePersonalNotebooks/getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder'; -import { NotebookItemRequestBuilder } from './item/notebookItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface NotebooksRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the notebooks property of the microsoft.graph.onenote entity. - */ -export class NotebooksRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getNotebookFromWebUrl method. - */ - public get getNotebookFromWebUrl(): GetNotebookFromWebUrlRequestBuilder { - return new GetNotebookFromWebUrlRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the notebooks property of the microsoft.graph.onenote entity. - * @param notebookId The unique identifier of notebook - * @returns a NotebookItemRequestBuilder - */ - public byNotebookId(notebookId: string) : NotebookItemRequestBuilder { - if(!notebookId) throw new Error("notebookId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["notebook%2Did"] = notebookId - return new NotebookItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new NotebooksRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/notebooks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of notebook objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of NotebookCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/onenote-list-notebooks?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Provides operations to call the getRecentNotebooks method. - * @param includePersonalNotebooks Usage: includePersonalNotebooks={includePersonalNotebooks} - * @returns a getRecentNotebooksWithIncludePersonalNotebooksRequestBuilder - */ - public getRecentNotebooksWithIncludePersonalNotebooks(includePersonalNotebooks: boolean | undefined) : GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder { - if(!includePersonalNotebooks) throw new Error("includePersonalNotebooks cannot be undefined"); - return new GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(this.pathParameters, this.requestAdapter, includePersonalNotebooks); - }; - /** - * Create a new OneNote notebook. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - * @see {@link https://learn.microsoft.com/graph/api/onenote-post-notebooks?view=graph-rest-1.0|Find more info here} - */ - public post(body: Notebook, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of notebook objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, notebooksRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new OneNote notebook. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Notebook, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeNotebook); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a notebooksRequestBuilder - */ - public withUrl(rawUrl: string) : NotebooksRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new NotebooksRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const notebooksRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/onenoteRequestBuilder.ts b/src/me/onenote/onenoteRequestBuilder.ts deleted file mode 100644 index d9493434a6d..00000000000 --- a/src/me/onenote/onenoteRequestBuilder.ts +++ /dev/null @@ -1,169 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createOnenoteFromDiscriminatorValue, deserializeIntoOnenote, serializeOnenote, type Onenote } from '../../models/onenote'; -import { NotebooksRequestBuilder } from './notebooks/notebooksRequestBuilder'; -import { OperationsRequestBuilder } from './operations/operationsRequestBuilder'; -import { PagesRequestBuilder } from './pages/pagesRequestBuilder'; -import { ResourcesRequestBuilder } from './resources/resourcesRequestBuilder'; -import { SectionGroupsRequestBuilder } from './sectionGroups/sectionGroupsRequestBuilder'; -import { SectionsRequestBuilder } from './sections/sectionsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the onenote property of the microsoft.graph.user entity. - */ -export class OnenoteRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the notebooks property of the microsoft.graph.onenote entity. - */ - public get notebooks(): NotebooksRequestBuilder { - return new NotebooksRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the operations property of the microsoft.graph.onenote entity. - */ - public get operations(): OperationsRequestBuilder { - return new OperationsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenote entity. - */ - public get pages(): PagesRequestBuilder { - return new PagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the resources property of the microsoft.graph.onenote entity. - */ - public get resources(): ResourcesRequestBuilder { - return new ResourcesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.onenote entity. - */ - public get sectionGroups(): SectionGroupsRequestBuilder { - return new SectionGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.onenote entity. - */ - public get sections(): SectionsRequestBuilder { - return new SectionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenoteRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote{?%24select,%24expand}"); - }; - /** - * Delete navigation property onenote for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get onenote from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Onenote - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property onenote in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Onenote - */ - public patch(body: Onenote, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property onenote for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get onenote from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property onenote in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Onenote, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenote); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onenoteRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/operations/count/countRequestBuilder.ts b/src/me/onenote/operations/count/countRequestBuilder.ts deleted file mode 100644 index ec0ab2b2603..00000000000 --- a/src/me/onenote/operations/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/operations/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/operations/count/index.ts b/src/me/onenote/operations/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/operations/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/operations/index.ts b/src/me/onenote/operations/index.ts deleted file mode 100644 index c1fc87253ad..00000000000 --- a/src/me/onenote/operations/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './operationsRequestBuilder' diff --git a/src/me/onenote/operations/item/index.ts b/src/me/onenote/operations/item/index.ts deleted file mode 100644 index 4823eee44f5..00000000000 --- a/src/me/onenote/operations/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteOperationItemRequestBuilder' diff --git a/src/me/onenote/operations/item/onenoteOperationItemRequestBuilder.ts b/src/me/onenote/operations/item/onenoteOperationItemRequestBuilder.ts deleted file mode 100644 index 689526db3f8..00000000000 --- a/src/me/onenote/operations/item/onenoteOperationItemRequestBuilder.ts +++ /dev/null @@ -1,128 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../models/onenoteOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteOperationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the operations property of the microsoft.graph.onenote entity. - */ -export class OnenoteOperationItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OnenoteOperationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/operations/{onenoteOperation%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property operations for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/onenoteoperation-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property operations in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - */ - public patch(body: OnenoteOperation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property operations for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteOperationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property operations in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenoteOperation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteOperation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenoteOperationItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteOperationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteOperationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteOperationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/operations/operationsRequestBuilder.ts b/src/me/onenote/operations/operationsRequestBuilder.ts deleted file mode 100644 index dd64c0bc381..00000000000 --- a/src/me/onenote/operations/operationsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteOperationCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../models/onenoteOperation'; -import { createOnenoteOperationCollectionResponseFromDiscriminatorValue } from '../../../models/onenoteOperationCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenoteOperationItemRequestBuilder } from './item/onenoteOperationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OperationsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the operations property of the microsoft.graph.onenote entity. - */ -export class OperationsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the operations property of the microsoft.graph.onenote entity. - * @param onenoteOperationId The unique identifier of onenoteOperation - * @returns a OnenoteOperationItemRequestBuilder - */ - public byOnenoteOperationId(onenoteOperationId: string) : OnenoteOperationItemRequestBuilder { - if(!onenoteOperationId) throw new Error("onenoteOperationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenoteOperation%2Did"] = onenoteOperationId - return new OnenoteOperationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OperationsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperationCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to operations for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - */ - public post(body: OnenoteOperation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Get the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, operationsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to operations for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenoteOperation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteOperation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a operationsRequestBuilder - */ - public withUrl(rawUrl: string) : OperationsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OperationsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const operationsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/count/countRequestBuilder.ts b/src/me/onenote/pages/count/countRequestBuilder.ts deleted file mode 100644 index c3e0167a922..00000000000 --- a/src/me/onenote/pages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/count/index.ts b/src/me/onenote/pages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/pages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/pages/index.ts b/src/me/onenote/pages/index.ts deleted file mode 100644 index faefa406497..00000000000 --- a/src/me/onenote/pages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pagesRequestBuilder' diff --git a/src/me/onenote/pages/item/content/contentRequestBuilder.ts b/src/me/onenote/pages/item/content/contentRequestBuilder.ts deleted file mode 100644 index f5061235ed3..00000000000 --- a/src/me/onenote/pages/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePage } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue } from '../../../../../models/onenotePage'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}/content"); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/onenote-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/copyToSection/copyToSectionPostRequestBody.ts b/src/me/onenote/pages/item/copyToSection/copyToSectionPostRequestBody.ts deleted file mode 100644 index dd27a1dd92f..00000000000 --- a/src/me/onenote/pages/item/copyToSection/copyToSectionPostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionPostRequestBody; -} -export function deserializeIntoCopyToSectionPostRequestBody(copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionPostRequestBody.id = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionPostRequestBody(writer: SerializationWriter, copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionPostRequestBody.id); - writer.writeStringValue("siteCollectionId", copyToSectionPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/copyToSection/copyToSectionRequestBuilder.ts b/src/me/onenote/pages/item/copyToSection/copyToSectionRequestBuilder.ts deleted file mode 100644 index ebe4a9e74d0..00000000000 --- a/src/me/onenote/pages/item/copyToSection/copyToSectionRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToSectionPostRequestBody, serializeCopyToSectionPostRequestBody, type CopyToSectionPostRequestBody } from './copyToSectionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToSection method. - */ -export class CopyToSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}/copyToSection"); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/page-copytosection?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/copyToSection/index.ts b/src/me/onenote/pages/item/copyToSection/index.ts deleted file mode 100644 index c8247cbd948..00000000000 --- a/src/me/onenote/pages/item/copyToSection/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToSectionPostRequestBody' -export * from './copyToSectionRequestBuilder' diff --git a/src/me/onenote/pages/item/index.ts b/src/me/onenote/pages/item/index.ts deleted file mode 100644 index 31aae08a358..00000000000 --- a/src/me/onenote/pages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenotePageItemRequestBuilder' diff --git a/src/me/onenote/pages/item/onenotePageItemRequestBuilder.ts b/src/me/onenote/pages/item/onenotePageItemRequestBuilder.ts deleted file mode 100644 index fdf3ca16954..00000000000 --- a/src/me/onenote/pages/item/onenotePageItemRequestBuilder.ts +++ /dev/null @@ -1,171 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../models/onenotePage'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { CopyToSectionRequestBuilder } from './copyToSection/copyToSectionRequestBuilder'; -import { OnenotePatchContentRequestBuilder } from './onenotePatchContent/onenotePatchContentRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionRequestBuilder } from './parentSection/parentSectionRequestBuilder'; -import { PreviewRequestBuilder } from './preview/previewRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenotePageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenote entity. - */ -export class OnenotePageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSection method. - */ - public get copyToSection(): CopyToSectionRequestBuilder { - return new CopyToSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the onenotePatchContent method. - */ - public get onenotePatchContent(): OnenotePatchContentRequestBuilder { - return new OnenotePatchContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ - public get parentSection(): ParentSectionRequestBuilder { - return new ParentSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the preview method. - */ - public get preview(): PreviewRequestBuilder { - return new PreviewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenotePageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a OneNote page. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/page-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - * @see {@link https://learn.microsoft.com/graph/api/page-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public patch(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a OneNote page. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a page object. Getting page information Access a page's metadata by page identifier: Getting page content You can use the page's content endpoint to get the HTML content of a page: The includeIDs=true query option is used to update pages. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenotePageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenotePageItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenotePageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/onenotePatchContent/index.ts b/src/me/onenote/pages/item/onenotePatchContent/index.ts deleted file mode 100644 index 396d2dde0cb..00000000000 --- a/src/me/onenote/pages/item/onenotePatchContent/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './onenotePatchContentPostRequestBody' -export * from './onenotePatchContentRequestBuilder' diff --git a/src/me/onenote/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts b/src/me/onenote/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts deleted file mode 100644 index 990785cdd73..00000000000 --- a/src/me/onenote/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createOnenotePatchContentCommandFromDiscriminatorValue, serializeOnenotePatchContentCommand, type OnenotePatchContentCommand } from '../../../../../models/onenotePatchContentCommand'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createOnenotePatchContentPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoOnenotePatchContentPostRequestBody; -} -export function deserializeIntoOnenotePatchContentPostRequestBody(onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : Record void> { - return { - "commands": n => { onenotePatchContentPostRequestBody.commands = n.getCollectionOfObjectValues(createOnenotePatchContentCommandFromDiscriminatorValue); }, - } -} -export interface OnenotePatchContentPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The commands property - */ - commands?: OnenotePatchContentCommand[]; -} -export function serializeOnenotePatchContentPostRequestBody(writer: SerializationWriter, onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : void { - writer.writeCollectionOfObjectValues("commands", onenotePatchContentPostRequestBody.commands, serializeOnenotePatchContentCommand); - writer.writeAdditionalData(onenotePatchContentPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts b/src/me/onenote/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts deleted file mode 100644 index 7493545e55e..00000000000 --- a/src/me/onenote/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoOnenotePatchContentPostRequestBody, serializeOnenotePatchContentPostRequestBody, type OnenotePatchContentPostRequestBody } from './onenotePatchContentPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the onenotePatchContent method. - */ -export class OnenotePatchContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OnenotePatchContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}/onenotePatchContent"); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePatchContentPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onenotePatchContentRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePatchContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePatchContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/parentNotebook/index.ts b/src/me/onenote/pages/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/pages/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/pages/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/pages/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index 7270101edd4..00000000000 --- a/src/me/onenote/pages/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../models/notebook'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/parentSection/index.ts b/src/me/onenote/pages/item/parentSection/index.ts deleted file mode 100644 index 6bfa061926c..00000000000 --- a/src/me/onenote/pages/item/parentSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionRequestBuilder' diff --git a/src/me/onenote/pages/item/parentSection/parentSectionRequestBuilder.ts b/src/me/onenote/pages/item/parentSection/parentSectionRequestBuilder.ts deleted file mode 100644 index 7b5b73f360a..00000000000 --- a/src/me/onenote/pages/item/parentSection/parentSectionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSection } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue } from '../../../../../models/onenoteSection'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ -export class ParentSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}/parentSection{?%24select,%24expand}"); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/item/preview/previewRequestBuilder.ts b/src/me/onenote/pages/item/preview/previewRequestBuilder.ts deleted file mode 100644 index e60d0c867c1..00000000000 --- a/src/me/onenote/pages/item/preview/previewRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePagePreview } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenotePagePreviewFromDiscriminatorValue } from '../../../../../models/onenotePagePreview'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the preview method. - */ -export class PreviewRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PreviewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages/{onenotePage%2Did}/preview()"); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePagePreview - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePagePreviewFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a previewRequestBuilder - */ - public withUrl(rawUrl: string) : PreviewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PreviewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/pages/pagesRequestBuilder.ts b/src/me/onenote/pages/pagesRequestBuilder.ts deleted file mode 100644 index c990bf29b1e..00000000000 --- a/src/me/onenote/pages/pagesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePageCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../models/onenotePage'; -import { createOnenotePageCollectionResponseFromDiscriminatorValue } from '../../../models/onenotePageCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenotePageItemRequestBuilder } from './item/onenotePageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenote entity. - */ -export class PagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenote entity. - * @param onenotePageId The unique identifier of onenotePage - * @returns a OnenotePageItemRequestBuilder - */ - public byOnenotePageId(onenotePageId: string) : OnenotePageItemRequestBuilder { - if(!onenotePageId) throw new Error("onenotePageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenotePage%2Did"] = onenotePageId - return new OnenotePageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of page objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/onenote-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - * @see {@link https://learn.microsoft.com/graph/api/onenote-post-pages?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of page objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new OneNote page in the default section of the default notebook. To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a pagesRequestBuilder - */ - public withUrl(rawUrl: string) : PagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/resources/count/countRequestBuilder.ts b/src/me/onenote/resources/count/countRequestBuilder.ts deleted file mode 100644 index ece31d2371d..00000000000 --- a/src/me/onenote/resources/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/resources/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/resources/count/index.ts b/src/me/onenote/resources/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/resources/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/resources/index.ts b/src/me/onenote/resources/index.ts deleted file mode 100644 index 5e25fe9df36..00000000000 --- a/src/me/onenote/resources/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './resourcesRequestBuilder' diff --git a/src/me/onenote/resources/item/content/contentRequestBuilder.ts b/src/me/onenote/resources/item/content/contentRequestBuilder.ts deleted file mode 100644 index efe6d863d20..00000000000 --- a/src/me/onenote/resources/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,89 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteResource } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteResourceFromDiscriminatorValue } from '../../../../../models/onenoteResource'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/resources/{onenoteResource%2Did}/content"); - }; - /** - * The content stream - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The content stream - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteResource - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteResourceFromDiscriminatorValue, errorMapping); - }; - /** - * The content stream - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The content stream - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/resources/item/index.ts b/src/me/onenote/resources/item/index.ts deleted file mode 100644 index d9c795d8b94..00000000000 --- a/src/me/onenote/resources/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteResourceItemRequestBuilder' diff --git a/src/me/onenote/resources/item/onenoteResourceItemRequestBuilder.ts b/src/me/onenote/resources/item/onenoteResourceItemRequestBuilder.ts deleted file mode 100644 index 8f3b7fbc5a0..00000000000 --- a/src/me/onenote/resources/item/onenoteResourceItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createOnenoteResourceFromDiscriminatorValue, deserializeIntoOnenoteResource, serializeOnenoteResource, type OnenoteResource } from '../../../../models/onenoteResource'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteResourceItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the resources property of the microsoft.graph.onenote entity. - */ -export class OnenoteResourceItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenoteResourceItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/resources/{onenoteResource%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property resources for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteResource - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteResourceFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property resources in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteResource - */ - public patch(body: OnenoteResource, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteResourceFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property resources for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteResourceItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property resources in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenoteResource, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteResource); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenoteResourceItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteResourceItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteResourceItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteResourceItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/resources/resourcesRequestBuilder.ts b/src/me/onenote/resources/resourcesRequestBuilder.ts deleted file mode 100644 index 1f8fdbba559..00000000000 --- a/src/me/onenote/resources/resourcesRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteResourceCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOnenoteResourceFromDiscriminatorValue, deserializeIntoOnenoteResource, serializeOnenoteResource, type OnenoteResource } from '../../../models/onenoteResource'; -import { createOnenoteResourceCollectionResponseFromDiscriminatorValue } from '../../../models/onenoteResourceCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenoteResourceItemRequestBuilder } from './item/onenoteResourceItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ResourcesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the resources property of the microsoft.graph.onenote entity. - */ -export class ResourcesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the resources property of the microsoft.graph.onenote entity. - * @param onenoteResourceId The unique identifier of onenoteResource - * @returns a OnenoteResourceItemRequestBuilder - */ - public byOnenoteResourceId(onenoteResourceId: string) : OnenoteResourceItemRequestBuilder { - if(!onenoteResourceId) throw new Error("onenoteResourceId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenoteResource%2Did"] = onenoteResourceId - return new OnenoteResourceItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ResourcesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/resources{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteResourceCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteResourceCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to resources for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteResource - */ - public post(body: OnenoteResource, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteResourceFromDiscriminatorValue, errorMapping); - }; - /** - * The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, resourcesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to resources for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenoteResource, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteResource); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a resourcesRequestBuilder - */ - public withUrl(rawUrl: string) : ResourcesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ResourcesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const resourcesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/count/countRequestBuilder.ts b/src/me/onenote/sectionGroups/count/countRequestBuilder.ts deleted file mode 100644 index 1bbabc674ed..00000000000 --- a/src/me/onenote/sectionGroups/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/count/index.ts b/src/me/onenote/sectionGroups/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/sectionGroups/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/sectionGroups/index.ts b/src/me/onenote/sectionGroups/index.ts deleted file mode 100644 index 37b7f776747..00000000000 --- a/src/me/onenote/sectionGroups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupsRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/index.ts b/src/me/onenote/sectionGroups/item/index.ts deleted file mode 100644 index e4013e9d2d1..00000000000 --- a/src/me/onenote/sectionGroups/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupItemRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/parentNotebook/index.ts b/src/me/onenote/sectionGroups/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/sectionGroups/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/sectionGroups/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index 0975e40345b..00000000000 --- a/src/me/onenote/sectionGroups/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../models/notebook'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.sectionGroup entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/parentSectionGroup/index.ts b/src/me/onenote/sectionGroups/item/parentSectionGroup/index.ts deleted file mode 100644 index 74d7c5d7fbf..00000000000 --- a/src/me/onenote/sectionGroups/item/parentSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionGroupRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts b/src/me/onenote/sectionGroups/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts deleted file mode 100644 index 7e350167d75..00000000000 --- a/src/me/onenote/sectionGroups/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.sectionGroup entity. - */ -export class ParentSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/parentSectionGroup{?%24select,%24expand}"); - }; - /** - * The section group that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section group that contains the section group. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sectionGroupItemRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sectionGroupItemRequestBuilder.ts deleted file mode 100644 index 84f981eba1a..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroupItemRequestBuilder.ts +++ /dev/null @@ -1,156 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue, deserializeIntoSectionGroup, serializeSectionGroup, type SectionGroup } from '../../../../models/sectionGroup'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionGroupRequestBuilder } from './parentSectionGroup/parentSectionGroupRequestBuilder'; -import { SectionGroupsRequestBuilder } from './sectionGroups/sectionGroupsRequestBuilder'; -import { SectionsRequestBuilder } from './sections/sectionsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.onenote entity. - */ -export class SectionGroupItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.sectionGroup entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.sectionGroup entity. - */ - public get parentSectionGroup(): ParentSectionGroupRequestBuilder { - return new ParentSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - */ - public get sectionGroups(): SectionGroupsRequestBuilder { - return new SectionGroupsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - */ - public get sections(): SectionsRequestBuilder { - return new SectionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new SectionGroupItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property sectionGroups for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a sectionGroup object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sectionGroups in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public patch(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property sectionGroups for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a sectionGroup object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sectionGroups in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSectionGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SectionGroupItemRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sectionGroups/count/countRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sectionGroups/count/countRequestBuilder.ts deleted file mode 100644 index 924962903da..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroups/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sectionGroups/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sectionGroups/count/index.ts b/src/me/onenote/sectionGroups/item/sectionGroups/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroups/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sectionGroups/index.ts b/src/me/onenote/sectionGroups/item/sectionGroups/index.ts deleted file mode 100644 index 37b7f776747..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupsRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sectionGroups/item/index.ts b/src/me/onenote/sectionGroups/item/sectionGroups/item/index.ts deleted file mode 100644 index e4013e9d2d1..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroups/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionGroupItemRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts deleted file mode 100644 index 6fe1d08b95d..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroups/item/sectionGroupItemRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../../models/'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - */ -export class SectionGroupItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SectionGroupItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sectionGroups/{sectionGroup%2Did1}{?%24select,%24expand}"); - }; - /** - * The section groups in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section groups in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a SectionGroupItemRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sectionGroups/sectionGroupsRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sectionGroups/sectionGroupsRequestBuilder.ts deleted file mode 100644 index 8b2fe5c4498..00000000000 --- a/src/me/onenote/sectionGroups/item/sectionGroups/sectionGroupsRequestBuilder.ts +++ /dev/null @@ -1,123 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroupCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupCollectionResponseFromDiscriminatorValue } from '../../../../../models/sectionGroupCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SectionGroupItemRequestBuilder } from './item/sectionGroupItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - */ -export class SectionGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.sectionGroup entity. - * @param sectionGroupId1 The unique identifier of sectionGroup - * @returns a SectionGroupItemRequestBuilder - */ - public bySectionGroupId1(sectionGroupId1: string) : SectionGroupItemRequestBuilder { - if(!sectionGroupId1) throw new Error("sectionGroupId1 cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sectionGroup%2Did1"] = sectionGroupId1 - return new SectionGroupItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sectionGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of section groups from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroupCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-list-sectiongroups?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of section groups from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/count/countRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/count/countRequestBuilder.ts deleted file mode 100644 index a4c216f7d04..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/count/index.ts b/src/me/onenote/sectionGroups/item/sections/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/index.ts b/src/me/onenote/sectionGroups/item/sections/index.ts deleted file mode 100644 index 309c37a22a8..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionsRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts b/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts deleted file mode 100644 index a90759bee1d..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts +++ /dev/null @@ -1,54 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToNotebookPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToNotebookPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToNotebookPostRequestBody; -} -export function deserializeIntoCopyToNotebookPostRequestBody(copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : Record void> { - return { - "groupId": n => { copyToNotebookPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToNotebookPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToNotebookPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToNotebookPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToNotebookPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToNotebookPostRequestBody(writer: SerializationWriter, copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : void { - writer.writeStringValue("groupId", copyToNotebookPostRequestBody.groupId); - writer.writeStringValue("id", copyToNotebookPostRequestBody.id); - writer.writeStringValue("renameAs", copyToNotebookPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToNotebookPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToNotebookPostRequestBody.siteId); - writer.writeAdditionalData(copyToNotebookPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts deleted file mode 100644 index ca3dfd82033..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToNotebookPostRequestBody, serializeCopyToNotebookPostRequestBody, type CopyToNotebookPostRequestBody } from './copyToNotebookPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToNotebook method. - */ -export class CopyToNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/copyToNotebook"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytonotebook?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToNotebookPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/index.ts b/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/index.ts deleted file mode 100644 index 55c9d404cbc..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/copyToNotebook/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToNotebookPostRequestBody' -export * from './copyToNotebookRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts deleted file mode 100644 index 5e56443a0b5..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../models/onenoteOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionGroupPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionGroupPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionGroupPostRequestBody; -} -export function deserializeIntoCopyToSectionGroupPostRequestBody(copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionGroupPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionGroupPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToSectionGroupPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionGroupPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionGroupPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionGroupPostRequestBody(writer: SerializationWriter, copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionGroupPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionGroupPostRequestBody.id); - writer.writeStringValue("renameAs", copyToSectionGroupPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToSectionGroupPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionGroupPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionGroupPostRequestBody.additionalData); -} -/** - * Provides operations to call the copyToSectionGroup method. - */ -export class CopyToSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/copyToSectionGroup"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytosectiongroup?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionGroupPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/copyToSectionGroup/index.ts b/src/me/onenote/sectionGroups/item/sections/item/copyToSectionGroup/index.ts deleted file mode 100644 index fffca97462e..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/copyToSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyToSectionGroupRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/index.ts b/src/me/onenote/sectionGroups/item/sections/item/index.ts deleted file mode 100644 index 8d699381c1a..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteSectionItemRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/onenoteSectionItemRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/onenoteSectionItemRequestBuilder.ts deleted file mode 100644 index 85d7487be27..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/onenoteSectionItemRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../../../models/onenoteSection'; -import { CopyToNotebookRequestBuilder } from './copyToNotebook/copyToNotebookRequestBuilder'; -import { CopyToSectionGroupRequestBuilder } from './copyToSectionGroup/copyToSectionGroupRequestBuilder'; -import { PagesRequestBuilder } from './pages/pagesRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionGroupRequestBuilder } from './parentSectionGroup/parentSectionGroupRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteSectionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - */ -export class OnenoteSectionItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the copyToNotebook method. - */ - public get copyToNotebook(): CopyToNotebookRequestBuilder { - return new CopyToNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSectionGroup method. - */ - public get copyToSectionGroup(): CopyToSectionGroupRequestBuilder { - return new CopyToSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ - public get pages(): PagesRequestBuilder { - return new PagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ - public get parentSectionGroup(): ParentSectionGroupRequestBuilder { - return new ParentSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenoteSectionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The sections in the section group. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public patch(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The sections in the section group. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteSectionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenoteSectionItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteSectionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteSectionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteSectionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/count/countRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/count/countRequestBuilder.ts deleted file mode 100644 index b8ed72f468a..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/count/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/index.ts deleted file mode 100644 index faefa406497..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pagesRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/content/contentRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/content/contentRequestBuilder.ts deleted file mode 100644 index 74d3b9a7463..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePage } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue } from '../../../../../../../../../models/onenotePage'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/content"); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts deleted file mode 100644 index dd27a1dd92f..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionPostRequestBody; -} -export function deserializeIntoCopyToSectionPostRequestBody(copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionPostRequestBody.id = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionPostRequestBody(writer: SerializationWriter, copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionPostRequestBody.id); - writer.writeStringValue("siteCollectionId", copyToSectionPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts deleted file mode 100644 index 8137356099b..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToSectionPostRequestBody, serializeCopyToSectionPostRequestBody, type CopyToSectionPostRequestBody } from './copyToSectionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToSection method. - */ -export class CopyToSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/copyToSection"); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/page-copytosection?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/index.ts deleted file mode 100644 index c8247cbd948..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/copyToSection/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToSectionPostRequestBody' -export * from './copyToSectionRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/index.ts deleted file mode 100644 index 31aae08a358..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenotePageItemRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts deleted file mode 100644 index 2211e322a6c..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePageItemRequestBuilder.ts +++ /dev/null @@ -1,169 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../../../models/onenotePage'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { CopyToSectionRequestBuilder } from './copyToSection/copyToSectionRequestBuilder'; -import { OnenotePatchContentRequestBuilder } from './onenotePatchContent/onenotePatchContentRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionRequestBuilder } from './parentSection/parentSectionRequestBuilder'; -import { PreviewRequestBuilder } from './preview/previewRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenotePageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class OnenotePageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSection method. - */ - public get copyToSection(): CopyToSectionRequestBuilder { - return new CopyToSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the onenotePatchContent method. - */ - public get onenotePatchContent(): OnenotePatchContentRequestBuilder { - return new OnenotePatchContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ - public get parentSection(): ParentSectionRequestBuilder { - return new ParentSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the preview method. - */ - public get preview(): PreviewRequestBuilder { - return new PreviewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenotePageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public patch(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenotePageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenotePageItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenotePageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/index.ts deleted file mode 100644 index 396d2dde0cb..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './onenotePatchContentPostRequestBody' -export * from './onenotePatchContentRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts deleted file mode 100644 index 1e62308910b..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createOnenotePatchContentCommandFromDiscriminatorValue, serializeOnenotePatchContentCommand, type OnenotePatchContentCommand } from '../../../../../../../../../models/onenotePatchContentCommand'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createOnenotePatchContentPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoOnenotePatchContentPostRequestBody; -} -export function deserializeIntoOnenotePatchContentPostRequestBody(onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : Record void> { - return { - "commands": n => { onenotePatchContentPostRequestBody.commands = n.getCollectionOfObjectValues(createOnenotePatchContentCommandFromDiscriminatorValue); }, - } -} -export interface OnenotePatchContentPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The commands property - */ - commands?: OnenotePatchContentCommand[]; -} -export function serializeOnenotePatchContentPostRequestBody(writer: SerializationWriter, onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : void { - writer.writeCollectionOfObjectValues("commands", onenotePatchContentPostRequestBody.commands, serializeOnenotePatchContentCommand); - writer.writeAdditionalData(onenotePatchContentPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts deleted file mode 100644 index ff00829214a..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoOnenotePatchContentPostRequestBody, serializeOnenotePatchContentPostRequestBody, type OnenotePatchContentPostRequestBody } from './onenotePatchContentPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the onenotePatchContent method. - */ -export class OnenotePatchContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OnenotePatchContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/onenotePatchContent"); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePatchContentPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onenotePatchContentRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePatchContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePatchContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentNotebook/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index 905b6a55f01..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentSection/index.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentSection/index.ts deleted file mode 100644 index 6bfa061926c..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts deleted file mode 100644 index 6d488a5ff0e..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSection } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue } from '../../../../../../../../../models/onenoteSection'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ -export class ParentSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentSection{?%24select,%24expand}"); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/item/preview/previewRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/item/preview/previewRequestBuilder.ts deleted file mode 100644 index 424f6852135..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/item/preview/previewRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePagePreview } from '../../../../../../../../../models/'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePagePreviewFromDiscriminatorValue } from '../../../../../../../../../models/onenotePagePreview'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the preview method. - */ -export class PreviewRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PreviewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/preview()"); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePagePreview - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePagePreviewFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a previewRequestBuilder - */ - public withUrl(rawUrl: string) : PreviewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PreviewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/pages/pagesRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/pages/pagesRequestBuilder.ts deleted file mode 100644 index b92301b665e..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/pages/pagesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePageCollectionResponse } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../../models/onenotePage'; -import { createOnenotePageCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/onenotePageCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenotePageItemRequestBuilder } from './item/onenotePageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class PagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - * @param onenotePageId The unique identifier of onenotePage - * @returns a OnenotePageItemRequestBuilder - */ - public byOnenotePageId(onenotePageId: string) : OnenotePageItemRequestBuilder { - if(!onenotePageId) throw new Error("onenotePageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenotePage%2Did"] = onenotePageId - return new OnenotePageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - * @see {@link https://learn.microsoft.com/graph/api/section-post-pages?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a pagesRequestBuilder - */ - public withUrl(rawUrl: string) : PagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/parentNotebook/index.ts b/src/me/onenote/sectionGroups/item/sections/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index bed626ed971..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/item/parentSectionGroup/index.ts b/src/me/onenote/sectionGroups/item/sections/item/parentSectionGroup/index.ts deleted file mode 100644 index 74d7c5d7fbf..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/parentSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionGroupRequestBuilder' diff --git a/src/me/onenote/sectionGroups/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts deleted file mode 100644 index 55311097d34..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ -export class ParentSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/parentSectionGroup{?%24select,%24expand}"); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/item/sections/sectionsRequestBuilder.ts b/src/me/onenote/sectionGroups/item/sections/sectionsRequestBuilder.ts deleted file mode 100644 index 9e95b2c1b89..00000000000 --- a/src/me/onenote/sectionGroups/item/sections/sectionsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSectionCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../../models/onenoteSection'; -import { createOnenoteSectionCollectionResponseFromDiscriminatorValue } from '../../../../../models/onenoteSectionCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenoteSectionItemRequestBuilder } from './item/onenoteSectionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - */ -export class SectionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.sectionGroup entity. - * @param onenoteSectionId The unique identifier of onenoteSection - * @returns a OnenoteSectionItemRequestBuilder - */ - public byOnenoteSectionId(onenoteSectionId: string) : OnenoteSectionItemRequestBuilder { - if(!onenoteSectionId) throw new Error("onenoteSectionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenoteSection%2Did"] = onenoteSectionId - return new OnenoteSectionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups/{sectionGroup%2Did}/sections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of onenoteSection objects from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSectionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-list-sections?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new onenoteSection in the specified section group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - * @see {@link https://learn.microsoft.com/graph/api/sectiongroup-post-sections?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of onenoteSection objects from the specified section group. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new onenoteSection in the specified section group. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sectionGroups/sectionGroupsRequestBuilder.ts b/src/me/onenote/sectionGroups/sectionGroupsRequestBuilder.ts deleted file mode 100644 index 44467f0a513..00000000000 --- a/src/me/onenote/sectionGroups/sectionGroupsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroupCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue, deserializeIntoSectionGroup, serializeSectionGroup, type SectionGroup } from '../../../models/sectionGroup'; -import { createSectionGroupCollectionResponseFromDiscriminatorValue } from '../../../models/sectionGroupCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { SectionGroupItemRequestBuilder } from './item/sectionGroupItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionGroupsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sectionGroups property of the microsoft.graph.onenote entity. - */ -export class SectionGroupsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sectionGroups property of the microsoft.graph.onenote entity. - * @param sectionGroupId The unique identifier of sectionGroup - * @returns a SectionGroupItemRequestBuilder - */ - public bySectionGroupId(sectionGroupId: string) : SectionGroupItemRequestBuilder { - if(!sectionGroupId) throw new Error("sectionGroupId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["sectionGroup%2Did"] = sectionGroupId - return new SectionGroupItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionGroupsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sectionGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of sectionGroup objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroupCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/onenote-list-sectiongroups?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to sectionGroups for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public post(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of sectionGroup objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionGroupsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to sectionGroups for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SectionGroup, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSectionGroup); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionGroupsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionGroupsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionGroupsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionGroupsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/count/countRequestBuilder.ts b/src/me/onenote/sections/count/countRequestBuilder.ts deleted file mode 100644 index e445b9441b1..00000000000 --- a/src/me/onenote/sections/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/count/index.ts b/src/me/onenote/sections/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/sections/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/sections/index.ts b/src/me/onenote/sections/index.ts deleted file mode 100644 index 309c37a22a8..00000000000 --- a/src/me/onenote/sections/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sectionsRequestBuilder' diff --git a/src/me/onenote/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts b/src/me/onenote/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts deleted file mode 100644 index a90759bee1d..00000000000 --- a/src/me/onenote/sections/item/copyToNotebook/copyToNotebookPostRequestBody.ts +++ /dev/null @@ -1,54 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToNotebookPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToNotebookPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToNotebookPostRequestBody; -} -export function deserializeIntoCopyToNotebookPostRequestBody(copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : Record void> { - return { - "groupId": n => { copyToNotebookPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToNotebookPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToNotebookPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToNotebookPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToNotebookPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToNotebookPostRequestBody(writer: SerializationWriter, copyToNotebookPostRequestBody: CopyToNotebookPostRequestBody | undefined = {} as CopyToNotebookPostRequestBody) : void { - writer.writeStringValue("groupId", copyToNotebookPostRequestBody.groupId); - writer.writeStringValue("id", copyToNotebookPostRequestBody.id); - writer.writeStringValue("renameAs", copyToNotebookPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToNotebookPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToNotebookPostRequestBody.siteId); - writer.writeAdditionalData(copyToNotebookPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts b/src/me/onenote/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts deleted file mode 100644 index 68b88726dba..00000000000 --- a/src/me/onenote/sections/item/copyToNotebook/copyToNotebookRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToNotebookPostRequestBody, serializeCopyToNotebookPostRequestBody, type CopyToNotebookPostRequestBody } from './copyToNotebookPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToNotebook method. - */ -export class CopyToNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/copyToNotebook"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytonotebook?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToNotebookPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToNotebookPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/copyToNotebook/index.ts b/src/me/onenote/sections/item/copyToNotebook/index.ts deleted file mode 100644 index 55c9d404cbc..00000000000 --- a/src/me/onenote/sections/item/copyToNotebook/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToNotebookPostRequestBody' -export * from './copyToNotebookRequestBuilder' diff --git a/src/me/onenote/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts b/src/me/onenote/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts deleted file mode 100644 index 2aa7d2c3e56..00000000000 --- a/src/me/onenote/sections/item/copyToSectionGroup/copyToSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../models/onenoteOperation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionGroupPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The renameAs property - */ - renameAs?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionGroupPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionGroupPostRequestBody; -} -export function deserializeIntoCopyToSectionGroupPostRequestBody(copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionGroupPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionGroupPostRequestBody.id = n.getStringValue(); }, - "renameAs": n => { copyToSectionGroupPostRequestBody.renameAs = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionGroupPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionGroupPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionGroupPostRequestBody(writer: SerializationWriter, copyToSectionGroupPostRequestBody: CopyToSectionGroupPostRequestBody | undefined = {} as CopyToSectionGroupPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionGroupPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionGroupPostRequestBody.id); - writer.writeStringValue("renameAs", copyToSectionGroupPostRequestBody.renameAs); - writer.writeStringValue("siteCollectionId", copyToSectionGroupPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionGroupPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionGroupPostRequestBody.additionalData); -} -/** - * Provides operations to call the copyToSectionGroup method. - */ -export class CopyToSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/copyToSectionGroup"); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/section-copytosectiongroup?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionGroupPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionGroupPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/copyToSectionGroup/index.ts b/src/me/onenote/sections/item/copyToSectionGroup/index.ts deleted file mode 100644 index fffca97462e..00000000000 --- a/src/me/onenote/sections/item/copyToSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './copyToSectionGroupRequestBuilder' diff --git a/src/me/onenote/sections/item/index.ts b/src/me/onenote/sections/item/index.ts deleted file mode 100644 index 8d699381c1a..00000000000 --- a/src/me/onenote/sections/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenoteSectionItemRequestBuilder' diff --git a/src/me/onenote/sections/item/onenoteSectionItemRequestBuilder.ts b/src/me/onenote/sections/item/onenoteSectionItemRequestBuilder.ts deleted file mode 100644 index 37a8418c792..00000000000 --- a/src/me/onenote/sections/item/onenoteSectionItemRequestBuilder.ts +++ /dev/null @@ -1,163 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../../models/onenoteSection'; -import { CopyToNotebookRequestBuilder } from './copyToNotebook/copyToNotebookRequestBuilder'; -import { CopyToSectionGroupRequestBuilder } from './copyToSectionGroup/copyToSectionGroupRequestBuilder'; -import { PagesRequestBuilder } from './pages/pagesRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionGroupRequestBuilder } from './parentSectionGroup/parentSectionGroupRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenoteSectionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.onenote entity. - */ -export class OnenoteSectionItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the copyToNotebook method. - */ - public get copyToNotebook(): CopyToNotebookRequestBuilder { - return new CopyToNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSectionGroup method. - */ - public get copyToSectionGroup(): CopyToSectionGroupRequestBuilder { - return new CopyToSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ - public get pages(): PagesRequestBuilder { - return new PagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ - public get parentSectionGroup(): ParentSectionGroupRequestBuilder { - return new ParentSectionGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenoteSectionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a onenoteSection object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - * @see {@link https://learn.microsoft.com/graph/api/section-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public patch(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property sections for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a onenoteSection object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenoteSectionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property sections in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenoteSectionItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenoteSectionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenoteSectionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenoteSectionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/count/countRequestBuilder.ts b/src/me/onenote/sections/item/pages/count/countRequestBuilder.ts deleted file mode 100644 index aa20fe22964..00000000000 --- a/src/me/onenote/sections/item/pages/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/count/index.ts b/src/me/onenote/sections/item/pages/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onenote/sections/item/pages/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/index.ts b/src/me/onenote/sections/item/pages/index.ts deleted file mode 100644 index faefa406497..00000000000 --- a/src/me/onenote/sections/item/pages/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pagesRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/item/content/contentRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/content/contentRequestBuilder.ts deleted file mode 100644 index a872e5854fa..00000000000 --- a/src/me/onenote/sections/item/pages/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePage } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue } from '../../../../../../../models/onenotePage'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/content"); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * The page's HTML content. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The page's HTML content. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts b/src/me/onenote/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts deleted file mode 100644 index dd27a1dd92f..00000000000 --- a/src/me/onenote/sections/item/pages/item/copyToSection/copyToSectionPostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface CopyToSectionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The groupId property - */ - groupId?: string; - /** - * The id property - */ - id?: string; - /** - * The siteCollectionId property - */ - siteCollectionId?: string; - /** - * The siteId property - */ - siteId?: string; -} -export function createCopyToSectionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCopyToSectionPostRequestBody; -} -export function deserializeIntoCopyToSectionPostRequestBody(copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : Record void> { - return { - "groupId": n => { copyToSectionPostRequestBody.groupId = n.getStringValue(); }, - "id": n => { copyToSectionPostRequestBody.id = n.getStringValue(); }, - "siteCollectionId": n => { copyToSectionPostRequestBody.siteCollectionId = n.getStringValue(); }, - "siteId": n => { copyToSectionPostRequestBody.siteId = n.getStringValue(); }, - } -} -export function serializeCopyToSectionPostRequestBody(writer: SerializationWriter, copyToSectionPostRequestBody: CopyToSectionPostRequestBody | undefined = {} as CopyToSectionPostRequestBody) : void { - writer.writeStringValue("groupId", copyToSectionPostRequestBody.groupId); - writer.writeStringValue("id", copyToSectionPostRequestBody.id); - writer.writeStringValue("siteCollectionId", copyToSectionPostRequestBody.siteCollectionId); - writer.writeStringValue("siteId", copyToSectionPostRequestBody.siteId); - writer.writeAdditionalData(copyToSectionPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts deleted file mode 100644 index 75b4c165764..00000000000 --- a/src/me/onenote/sections/item/pages/item/copyToSection/copyToSectionRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteOperationFromDiscriminatorValue, deserializeIntoOnenoteOperation, serializeOnenoteOperation, type OnenoteOperation } from '../../../../../../../models/onenoteOperation'; -import { deserializeIntoCopyToSectionPostRequestBody, serializeCopyToSectionPostRequestBody, type CopyToSectionPostRequestBody } from './copyToSectionPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the copyToSection method. - */ -export class CopyToSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CopyToSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/copyToSection"); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteOperation - * @see {@link https://learn.microsoft.com/graph/api/page-copytosection?view=graph-rest-1.0|Find more info here} - */ - public post(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteOperationFromDiscriminatorValue, errorMapping); - }; - /** - * Copy a page to a specific section. For copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CopyToSectionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCopyToSectionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a copyToSectionRequestBuilder - */ - public withUrl(rawUrl: string) : CopyToSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CopyToSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/copyToSection/index.ts b/src/me/onenote/sections/item/pages/item/copyToSection/index.ts deleted file mode 100644 index c8247cbd948..00000000000 --- a/src/me/onenote/sections/item/pages/item/copyToSection/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './copyToSectionPostRequestBody' -export * from './copyToSectionRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/item/index.ts b/src/me/onenote/sections/item/pages/item/index.ts deleted file mode 100644 index 31aae08a358..00000000000 --- a/src/me/onenote/sections/item/pages/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onenotePageItemRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/item/onenotePageItemRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/onenotePageItemRequestBuilder.ts deleted file mode 100644 index e1b0c6318f8..00000000000 --- a/src/me/onenote/sections/item/pages/item/onenotePageItemRequestBuilder.ts +++ /dev/null @@ -1,169 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../../models/onenotePage'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { CopyToSectionRequestBuilder } from './copyToSection/copyToSectionRequestBuilder'; -import { OnenotePatchContentRequestBuilder } from './onenotePatchContent/onenotePatchContentRequestBuilder'; -import { ParentNotebookRequestBuilder } from './parentNotebook/parentNotebookRequestBuilder'; -import { ParentSectionRequestBuilder } from './parentSection/parentSectionRequestBuilder'; -import { PreviewRequestBuilder } from './preview/previewRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnenotePageItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class OnenotePageItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the copyToSection method. - */ - public get copyToSection(): CopyToSectionRequestBuilder { - return new CopyToSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the onenotePatchContent method. - */ - public get onenotePatchContent(): OnenotePatchContentRequestBuilder { - return new OnenotePatchContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ - public get parentNotebook(): ParentNotebookRequestBuilder { - return new ParentNotebookRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ - public get parentSection(): ParentSectionRequestBuilder { - return new ParentSectionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the preview method. - */ - public get preview(): PreviewRequestBuilder { - return new PreviewRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnenotePageItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - */ - public patch(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property pages for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of pages in the section. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onenotePageItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property pages in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnenotePageItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePageItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePageItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onenotePageItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/onenotePatchContent/index.ts b/src/me/onenote/sections/item/pages/item/onenotePatchContent/index.ts deleted file mode 100644 index 396d2dde0cb..00000000000 --- a/src/me/onenote/sections/item/pages/item/onenotePatchContent/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './onenotePatchContentPostRequestBody' -export * from './onenotePatchContentRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts b/src/me/onenote/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts deleted file mode 100644 index 87992afeb5d..00000000000 --- a/src/me/onenote/sections/item/pages/item/onenotePatchContent/onenotePatchContentPostRequestBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createOnenotePatchContentCommandFromDiscriminatorValue, serializeOnenotePatchContentCommand, type OnenotePatchContentCommand } from '../../../../../../../models/onenotePatchContentCommand'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createOnenotePatchContentPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoOnenotePatchContentPostRequestBody; -} -export function deserializeIntoOnenotePatchContentPostRequestBody(onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : Record void> { - return { - "commands": n => { onenotePatchContentPostRequestBody.commands = n.getCollectionOfObjectValues(createOnenotePatchContentCommandFromDiscriminatorValue); }, - } -} -export interface OnenotePatchContentPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The commands property - */ - commands?: OnenotePatchContentCommand[]; -} -export function serializeOnenotePatchContentPostRequestBody(writer: SerializationWriter, onenotePatchContentPostRequestBody: OnenotePatchContentPostRequestBody | undefined = {} as OnenotePatchContentPostRequestBody) : void { - writer.writeCollectionOfObjectValues("commands", onenotePatchContentPostRequestBody.commands, serializeOnenotePatchContentCommand); - writer.writeAdditionalData(onenotePatchContentPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts deleted file mode 100644 index 338a2535886..00000000000 --- a/src/me/onenote/sections/item/pages/item/onenotePatchContent/onenotePatchContentRequestBuilder.ts +++ /dev/null @@ -1,61 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { deserializeIntoOnenotePatchContentPostRequestBody, serializeOnenotePatchContentPostRequestBody, type OnenotePatchContentPostRequestBody } from './onenotePatchContentPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the onenotePatchContent method. - */ -export class OnenotePatchContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OnenotePatchContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/onenotePatchContent"); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action onenotePatchContent - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePatchContentPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePatchContentPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onenotePatchContentRequestBuilder - */ - public withUrl(rawUrl: string) : OnenotePatchContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnenotePatchContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/parentNotebook/index.ts b/src/me/onenote/sections/item/pages/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/sections/item/pages/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index 9a5b4a4f80a..00000000000 --- a/src/me/onenote/sections/item/pages/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../../../models/notebook'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenotePage entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/parentSection/index.ts b/src/me/onenote/sections/item/pages/item/parentSection/index.ts deleted file mode 100644 index 6bfa061926c..00000000000 --- a/src/me/onenote/sections/item/pages/item/parentSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionRequestBuilder' diff --git a/src/me/onenote/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts deleted file mode 100644 index 34167c8e3b5..00000000000 --- a/src/me/onenote/sections/item/pages/item/parentSection/parentSectionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSection } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue } from '../../../../../../../models/onenoteSection'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSection property of the microsoft.graph.onenotePage entity. - */ -export class ParentSectionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/parentSection{?%24select,%24expand}"); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * The section that contains the page. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/item/preview/previewRequestBuilder.ts b/src/me/onenote/sections/item/pages/item/preview/previewRequestBuilder.ts deleted file mode 100644 index 9b6a910516c..00000000000 --- a/src/me/onenote/sections/item/pages/item/preview/previewRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePagePreview } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createOnenotePagePreviewFromDiscriminatorValue } from '../../../../../../../models/onenotePagePreview'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the preview method. - */ -export class PreviewRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PreviewRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages/{onenotePage%2Did}/preview()"); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePagePreview - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePagePreviewFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function preview - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a previewRequestBuilder - */ - public withUrl(rawUrl: string) : PreviewRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PreviewRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/pages/pagesRequestBuilder.ts b/src/me/onenote/sections/item/pages/pagesRequestBuilder.ts deleted file mode 100644 index b85d2a39c9b..00000000000 --- a/src/me/onenote/sections/item/pages/pagesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenotePageCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createOnenotePageFromDiscriminatorValue, deserializeIntoOnenotePage, serializeOnenotePage, type OnenotePage } from '../../../../../models/onenotePage'; -import { createOnenotePageCollectionResponseFromDiscriminatorValue } from '../../../../../models/onenotePageCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenotePageItemRequestBuilder } from './item/onenotePageItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PagesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - */ -export class PagesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the pages property of the microsoft.graph.onenoteSection entity. - * @param onenotePageId The unique identifier of onenotePage - * @returns a OnenotePageItemRequestBuilder - */ - public byOnenotePageId(onenotePageId: string) : OnenotePageItemRequestBuilder { - if(!onenotePageId) throw new Error("onenotePageId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenotePage%2Did"] = onenotePageId - return new OnenotePageItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/pages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePageCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/section-list-pages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenotePage - * @see {@link https://learn.microsoft.com/graph/api/section-post-pages?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenotePageFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of page objects from the specified section. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, pagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new page in the specified section. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenotePage, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenotePage); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a pagesRequestBuilder - */ - public withUrl(rawUrl: string) : PagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const pagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/parentNotebook/index.ts b/src/me/onenote/sections/item/parentNotebook/index.ts deleted file mode 100644 index aa8b44f2704..00000000000 --- a/src/me/onenote/sections/item/parentNotebook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentNotebookRequestBuilder' diff --git a/src/me/onenote/sections/item/parentNotebook/parentNotebookRequestBuilder.ts b/src/me/onenote/sections/item/parentNotebook/parentNotebookRequestBuilder.ts deleted file mode 100644 index e3248dfb925..00000000000 --- a/src/me/onenote/sections/item/parentNotebook/parentNotebookRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Notebook } from '../../../../../models/'; -import { createNotebookFromDiscriminatorValue } from '../../../../../models/notebook'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentNotebookRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentNotebook property of the microsoft.graph.onenoteSection entity. - */ -export class ParentNotebookRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentNotebookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/parentNotebook{?%24select,%24expand}"); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Notebook - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createNotebookFromDiscriminatorValue, errorMapping); - }; - /** - * The notebook that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentNotebookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentNotebookRequestBuilder - */ - public withUrl(rawUrl: string) : ParentNotebookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentNotebookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentNotebookRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/item/parentSectionGroup/index.ts b/src/me/onenote/sections/item/parentSectionGroup/index.ts deleted file mode 100644 index 74d7c5d7fbf..00000000000 --- a/src/me/onenote/sections/item/parentSectionGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './parentSectionGroupRequestBuilder' diff --git a/src/me/onenote/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts b/src/me/onenote/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts deleted file mode 100644 index 5925e3b57b4..00000000000 --- a/src/me/onenote/sections/item/parentSectionGroup/parentSectionGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type SectionGroup } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createSectionGroupFromDiscriminatorValue } from '../../../../../models/sectionGroup'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ParentSectionGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the parentSectionGroup property of the microsoft.graph.onenoteSection entity. - */ -export class ParentSectionGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ParentSectionGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections/{onenoteSection%2Did}/parentSectionGroup{?%24select,%24expand}"); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SectionGroup - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSectionGroupFromDiscriminatorValue, errorMapping); - }; - /** - * The section group that contains the section. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, parentSectionGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a parentSectionGroupRequestBuilder - */ - public withUrl(rawUrl: string) : ParentSectionGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ParentSectionGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const parentSectionGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onenote/sections/sectionsRequestBuilder.ts b/src/me/onenote/sections/sectionsRequestBuilder.ts deleted file mode 100644 index 25ce92b0b28..00000000000 --- a/src/me/onenote/sections/sectionsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnenoteSectionCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOnenoteSectionFromDiscriminatorValue, deserializeIntoOnenoteSection, serializeOnenoteSection, type OnenoteSection } from '../../../models/onenoteSection'; -import { createOnenoteSectionCollectionResponseFromDiscriminatorValue } from '../../../models/onenoteSectionCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OnenoteSectionItemRequestBuilder } from './item/onenoteSectionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SectionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the sections property of the microsoft.graph.onenote entity. - */ -export class SectionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the sections property of the microsoft.graph.onenote entity. - * @param onenoteSectionId The unique identifier of onenoteSection - * @returns a OnenoteSectionItemRequestBuilder - */ - public byOnenoteSectionId(onenoteSectionId: string) : OnenoteSectionItemRequestBuilder { - if(!onenoteSectionId) throw new Error("onenoteSectionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onenoteSection%2Did"] = onenoteSectionId - return new OnenoteSectionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new SectionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onenote/sections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of onenoteSection objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSectionCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/onenote-list-sections?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to sections for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnenoteSection - */ - public post(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnenoteSectionFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of onenoteSection objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, sectionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to sections for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnenoteSection, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnenoteSection); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sectionsRequestBuilder - */ - public withUrl(rawUrl: string) : SectionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SectionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const sectionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/count/countRequestBuilder.ts b/src/me/onlineMeetings/count/countRequestBuilder.ts deleted file mode 100644 index 63f9c662848..00000000000 --- a/src/me/onlineMeetings/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/count/index.ts b/src/me/onlineMeetings/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onlineMeetings/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onlineMeetings/createOrGet/createOrGetRequestBuilder.ts b/src/me/onlineMeetings/createOrGet/createOrGetRequestBuilder.ts deleted file mode 100644 index 19605b92f39..00000000000 --- a/src/me/onlineMeetings/createOrGet/createOrGetRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChatInfoFromDiscriminatorValue, serializeChatInfo, type ChatInfo } from '../../../models/chatInfo'; -import { createMeetingParticipantsFromDiscriminatorValue, serializeMeetingParticipants, type MeetingParticipants } from '../../../models/meetingParticipants'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOnlineMeetingFromDiscriminatorValue, deserializeIntoOnlineMeeting, serializeOnlineMeeting, type OnlineMeeting } from '../../../models/onlineMeeting'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateOrGetPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateOrGetPostRequestBody; -} -export interface CreateOrGetPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The chatInfo property - */ - chatInfo?: ChatInfo; - /** - * The endDateTime property - */ - endDateTime?: Date; - /** - * The externalId property - */ - externalId?: string; - /** - * The participants property - */ - participants?: MeetingParticipants; - /** - * The startDateTime property - */ - startDateTime?: Date; - /** - * The subject property - */ - subject?: string; -} -export function deserializeIntoCreateOrGetPostRequestBody(createOrGetPostRequestBody: CreateOrGetPostRequestBody | undefined = {} as CreateOrGetPostRequestBody) : Record void> { - return { - "chatInfo": n => { createOrGetPostRequestBody.chatInfo = n.getObjectValue(createChatInfoFromDiscriminatorValue); }, - "endDateTime": n => { createOrGetPostRequestBody.endDateTime = n.getDateValue(); }, - "externalId": n => { createOrGetPostRequestBody.externalId = n.getStringValue(); }, - "participants": n => { createOrGetPostRequestBody.participants = n.getObjectValue(createMeetingParticipantsFromDiscriminatorValue); }, - "startDateTime": n => { createOrGetPostRequestBody.startDateTime = n.getDateValue(); }, - "subject": n => { createOrGetPostRequestBody.subject = n.getStringValue(); }, - } -} -export function serializeCreateOrGetPostRequestBody(writer: SerializationWriter, createOrGetPostRequestBody: CreateOrGetPostRequestBody | undefined = {} as CreateOrGetPostRequestBody) : void { - writer.writeObjectValue("chatInfo", createOrGetPostRequestBody.chatInfo, serializeChatInfo); - writer.writeDateValue("endDateTime", createOrGetPostRequestBody.endDateTime); - writer.writeStringValue("externalId", createOrGetPostRequestBody.externalId); - writer.writeObjectValue("participants", createOrGetPostRequestBody.participants, serializeMeetingParticipants); - writer.writeDateValue("startDateTime", createOrGetPostRequestBody.startDateTime); - writer.writeStringValue("subject", createOrGetPostRequestBody.subject); - writer.writeAdditionalData(createOrGetPostRequestBody.additionalData); -} -/** - * Provides operations to call the createOrGet method. - */ -export class CreateOrGetRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateOrGetRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/createOrGet"); - }; - /** - * Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnlineMeeting - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-createorget?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateOrGetPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnlineMeetingFromDiscriminatorValue, errorMapping); - }; - /** - * Create an onlineMeeting object with a custom specified external ID. If the external ID already exists, this API will return the onlineMeeting object with that external ID. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateOrGetPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateOrGetPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createOrGetRequestBuilder - */ - public withUrl(rawUrl: string) : CreateOrGetRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateOrGetRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/createOrGet/index.ts b/src/me/onlineMeetings/createOrGet/index.ts deleted file mode 100644 index a3b1e5a10de..00000000000 --- a/src/me/onlineMeetings/createOrGet/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createOrGetRequestBuilder' diff --git a/src/me/onlineMeetings/index.ts b/src/me/onlineMeetings/index.ts deleted file mode 100644 index 1e7eff0ef51..00000000000 --- a/src/me/onlineMeetings/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onlineMeetingsRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/attendanceReportsRequestBuilder.ts b/src/me/onlineMeetings/item/attendanceReports/attendanceReportsRequestBuilder.ts deleted file mode 100644 index beb9e2c9155..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/attendanceReportsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type MeetingAttendanceReportCollectionResponse } from '../../../../models/'; -import { createMeetingAttendanceReportFromDiscriminatorValue, deserializeIntoMeetingAttendanceReport, serializeMeetingAttendanceReport, type MeetingAttendanceReport } from '../../../../models/meetingAttendanceReport'; -import { createMeetingAttendanceReportCollectionResponseFromDiscriminatorValue } from '../../../../models/meetingAttendanceReportCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { MeetingAttendanceReportItemRequestBuilder } from './item/meetingAttendanceReportItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttendanceReportsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. - */ -export class AttendanceReportsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. - * @param meetingAttendanceReportId The unique identifier of meetingAttendanceReport - * @returns a MeetingAttendanceReportItemRequestBuilder - */ - public byMeetingAttendanceReportId(meetingAttendanceReportId: string) : MeetingAttendanceReportItemRequestBuilder { - if(!meetingAttendanceReportId) throw new Error("meetingAttendanceReportId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["meetingAttendanceReport%2Did"] = meetingAttendanceReportId - return new MeetingAttendanceReportItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttendanceReportsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendanceReports{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get attendanceReports from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MeetingAttendanceReportCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMeetingAttendanceReportCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to attendanceReports for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MeetingAttendanceReport - */ - public post(body: MeetingAttendanceReport, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMeetingAttendanceReportFromDiscriminatorValue, errorMapping); - }; - /** - * Get attendanceReports from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attendanceReportsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to attendanceReports for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: MeetingAttendanceReport, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMeetingAttendanceReport); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attendanceReportsRequestBuilder - */ - public withUrl(rawUrl: string) : AttendanceReportsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttendanceReportsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attendanceReportsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/attendanceReports/count/countRequestBuilder.ts b/src/me/onlineMeetings/item/attendanceReports/count/countRequestBuilder.ts deleted file mode 100644 index 109ba24341f..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/attendanceReports/count/index.ts b/src/me/onlineMeetings/item/attendanceReports/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/index.ts b/src/me/onlineMeetings/item/attendanceReports/index.ts deleted file mode 100644 index d8f56ebf37c..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attendanceReportsRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/attendanceRecordsRequestBuilder.ts b/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/attendanceRecordsRequestBuilder.ts deleted file mode 100644 index b7bec5b462c..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/attendanceRecordsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttendanceRecordCollectionResponse } from '../../../../../../models/'; -import { createAttendanceRecordFromDiscriminatorValue, deserializeIntoAttendanceRecord, serializeAttendanceRecord, type AttendanceRecord } from '../../../../../../models/attendanceRecord'; -import { createAttendanceRecordCollectionResponseFromDiscriminatorValue } from '../../../../../../models/attendanceRecordCollectionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { AttendanceRecordItemRequestBuilder } from './item/attendanceRecordItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttendanceRecordsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the attendanceRecords property of the microsoft.graph.meetingAttendanceReport entity. - */ -export class AttendanceRecordsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attendanceRecords property of the microsoft.graph.meetingAttendanceReport entity. - * @param attendanceRecordId The unique identifier of attendanceRecord - * @returns a AttendanceRecordItemRequestBuilder - */ - public byAttendanceRecordId(attendanceRecordId: string) : AttendanceRecordItemRequestBuilder { - if(!attendanceRecordId) throw new Error("attendanceRecordId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attendanceRecord%2Did"] = attendanceRecordId - return new AttendanceRecordItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttendanceRecordsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of attendanceRecord objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttendanceRecordCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/attendancerecord-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttendanceRecordCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to attendanceRecords for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttendanceRecord - */ - public post(body: AttendanceRecord, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttendanceRecordFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of attendanceRecord objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attendanceRecordsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to attendanceRecords for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AttendanceRecord, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttendanceRecord); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attendanceRecordsRequestBuilder - */ - public withUrl(rawUrl: string) : AttendanceRecordsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttendanceRecordsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attendanceRecordsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/count/countRequestBuilder.ts b/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/count/countRequestBuilder.ts deleted file mode 100644 index d6b4935341a..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/count/index.ts b/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/index.ts b/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/index.ts deleted file mode 100644 index 675d4309d69..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attendanceRecordsRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/item/attendanceRecordItemRequestBuilder.ts b/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/item/attendanceRecordItemRequestBuilder.ts deleted file mode 100644 index 656642ed4b3..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/item/attendanceRecordItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttendanceRecordFromDiscriminatorValue, deserializeIntoAttendanceRecord, serializeAttendanceRecord, type AttendanceRecord } from '../../../../../../../models/attendanceRecord'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttendanceRecordItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attendanceRecords property of the microsoft.graph.meetingAttendanceReport entity. - */ -export class AttendanceRecordItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttendanceRecordItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords/{attendanceRecord%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property attendanceRecords for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * List of attendance records of an attendance report. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttendanceRecord - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttendanceRecordFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property attendanceRecords in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttendanceRecord - */ - public patch(body: AttendanceRecord, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttendanceRecordFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property attendanceRecords for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * List of attendance records of an attendance report. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attendanceRecordItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property attendanceRecords in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: AttendanceRecord, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttendanceRecord); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttendanceRecordItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttendanceRecordItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttendanceRecordItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attendanceRecordItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/item/index.ts b/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/item/index.ts deleted file mode 100644 index f6b367f876d..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/attendanceRecords/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attendanceRecordItemRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/item/index.ts b/src/me/onlineMeetings/item/attendanceReports/item/index.ts deleted file mode 100644 index b364d928ef6..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './meetingAttendanceReportItemRequestBuilder' diff --git a/src/me/onlineMeetings/item/attendanceReports/item/meetingAttendanceReportItemRequestBuilder.ts b/src/me/onlineMeetings/item/attendanceReports/item/meetingAttendanceReportItemRequestBuilder.ts deleted file mode 100644 index f9d9292009d..00000000000 --- a/src/me/onlineMeetings/item/attendanceReports/item/meetingAttendanceReportItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMeetingAttendanceReportFromDiscriminatorValue, deserializeIntoMeetingAttendanceReport, serializeMeetingAttendanceReport, type MeetingAttendanceReport } from '../../../../../models/meetingAttendanceReport'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { AttendanceRecordsRequestBuilder } from './attendanceRecords/attendanceRecordsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MeetingAttendanceReportItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. - */ -export class MeetingAttendanceReportItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the attendanceRecords property of the microsoft.graph.meetingAttendanceReport entity. - */ - public get attendanceRecords(): AttendanceRecordsRequestBuilder { - return new AttendanceRecordsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new MeetingAttendanceReportItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property attendanceReports for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get attendanceReports from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MeetingAttendanceReport - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMeetingAttendanceReportFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property attendanceReports in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of MeetingAttendanceReport - */ - public patch(body: MeetingAttendanceReport, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createMeetingAttendanceReportFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property attendanceReports for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get attendanceReports from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, meetingAttendanceReportItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property attendanceReports in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: MeetingAttendanceReport, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeMeetingAttendanceReport); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a MeetingAttendanceReportItemRequestBuilder - */ - public withUrl(rawUrl: string) : MeetingAttendanceReportItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MeetingAttendanceReportItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const meetingAttendanceReportItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/attendeeReport/attendeeReportRequestBuilder.ts b/src/me/onlineMeetings/item/attendeeReport/attendeeReportRequestBuilder.ts deleted file mode 100644 index 687e2f0cae8..00000000000 --- a/src/me/onlineMeetings/item/attendeeReport/attendeeReportRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class AttendeeReportRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AttendeeReportRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/attendeeReport"); - }; - /** - * Get attendeeReport for the navigation property onlineMeetings from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update attendeeReport for the navigation property onlineMeetings in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get attendeeReport for the navigation property onlineMeetings from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update attendeeReport for the navigation property onlineMeetings in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attendeeReportRequestBuilder - */ - public withUrl(rawUrl: string) : AttendeeReportRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttendeeReportRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlGetResponse.ts b/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlGetResponse.ts deleted file mode 100644 index 8c7f0c7bfa1..00000000000 --- a/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlGetResponse.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createGetVirtualAppointmentJoinWebUrlGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoGetVirtualAppointmentJoinWebUrlGetResponse; -} -export function deserializeIntoGetVirtualAppointmentJoinWebUrlGetResponse(getVirtualAppointmentJoinWebUrlGetResponse: GetVirtualAppointmentJoinWebUrlGetResponse | undefined = {} as GetVirtualAppointmentJoinWebUrlGetResponse) : Record void> { - return { - "value": n => { getVirtualAppointmentJoinWebUrlGetResponse.value = n.getStringValue(); }, - } -} -export interface GetVirtualAppointmentJoinWebUrlGetResponse extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The value property - */ - value?: string; -} -export function serializeGetVirtualAppointmentJoinWebUrlGetResponse(writer: SerializationWriter, getVirtualAppointmentJoinWebUrlGetResponse: GetVirtualAppointmentJoinWebUrlGetResponse | undefined = {} as GetVirtualAppointmentJoinWebUrlGetResponse) : void { - writer.writeStringValue("value", getVirtualAppointmentJoinWebUrlGetResponse.value); - writer.writeAdditionalData(getVirtualAppointmentJoinWebUrlGetResponse.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlRequestBuilder.ts b/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlRequestBuilder.ts deleted file mode 100644 index b043986cb3b..00000000000 --- a/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlRequestBuilder.ts +++ /dev/null @@ -1,59 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createGetVirtualAppointmentJoinWebUrlGetResponseFromDiscriminatorValue } from './getVirtualAppointmentJoinWebUrlGetResponse'; -import { type GetVirtualAppointmentJoinWebUrlGetResponse } from './index'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the getVirtualAppointmentJoinWebUrl method. - */ -export class GetVirtualAppointmentJoinWebUrlRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GetVirtualAppointmentJoinWebUrlRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/getVirtualAppointmentJoinWebUrl()"); - }; - /** - * Invoke function getVirtualAppointmentJoinWebUrl - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GetVirtualAppointmentJoinWebUrlGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGetVirtualAppointmentJoinWebUrlGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function getVirtualAppointmentJoinWebUrl - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a getVirtualAppointmentJoinWebUrlRequestBuilder - */ - public withUrl(rawUrl: string) : GetVirtualAppointmentJoinWebUrlRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GetVirtualAppointmentJoinWebUrlRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/index.ts b/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/index.ts deleted file mode 100644 index db6624efd46..00000000000 --- a/src/me/onlineMeetings/item/getVirtualAppointmentJoinWebUrl/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './getVirtualAppointmentJoinWebUrlGetResponse' -export * from './getVirtualAppointmentJoinWebUrlRequestBuilder' diff --git a/src/me/onlineMeetings/item/index.ts b/src/me/onlineMeetings/item/index.ts deleted file mode 100644 index e0d0655482d..00000000000 --- a/src/me/onlineMeetings/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './onlineMeetingItemRequestBuilder' diff --git a/src/me/onlineMeetings/item/onlineMeetingItemRequestBuilder.ts b/src/me/onlineMeetings/item/onlineMeetingItemRequestBuilder.ts deleted file mode 100644 index 76eda1c354a..00000000000 --- a/src/me/onlineMeetings/item/onlineMeetingItemRequestBuilder.ts +++ /dev/null @@ -1,165 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOnlineMeetingFromDiscriminatorValue, deserializeIntoOnlineMeeting, serializeOnlineMeeting, type OnlineMeeting } from '../../../models/onlineMeeting'; -import { AttendanceReportsRequestBuilder } from './attendanceReports/attendanceReportsRequestBuilder'; -import { AttendeeReportRequestBuilder } from './attendeeReport/attendeeReportRequestBuilder'; -import { GetVirtualAppointmentJoinWebUrlRequestBuilder } from './getVirtualAppointmentJoinWebUrl/getVirtualAppointmentJoinWebUrlRequestBuilder'; -import { RecordingsRequestBuilder } from './recordings/recordingsRequestBuilder'; -import { TranscriptsRequestBuilder } from './transcripts/transcriptsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnlineMeetingItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the onlineMeetings property of the microsoft.graph.user entity. - */ -export class OnlineMeetingItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. - */ - public get attendanceReports(): AttendanceReportsRequestBuilder { - return new AttendanceReportsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the media for the user entity. - */ - public get attendeeReport(): AttendeeReportRequestBuilder { - return new AttendeeReportRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the getVirtualAppointmentJoinWebUrl method. - */ - public get getVirtualAppointmentJoinWebUrl(): GetVirtualAppointmentJoinWebUrlRequestBuilder { - return new GetVirtualAppointmentJoinWebUrlRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. - */ - public get recordings(): RecordingsRequestBuilder { - return new RecordingsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. - */ - public get transcripts(): TranscriptsRequestBuilder { - return new TranscriptsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OnlineMeetingItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}{?%24select,%24expand}"); - }; - /** - * Delete an onlineMeeting object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnlineMeeting - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnlineMeetingFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the specified onlineMeeting object. Please see Request body section for the list of properties that support updating. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnlineMeeting - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: OnlineMeeting, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnlineMeetingFromDiscriminatorValue, errorMapping); - }; - /** - * Delete an onlineMeeting object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onlineMeetingItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the specified onlineMeeting object. Please see Request body section for the list of properties that support updating. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OnlineMeeting, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnlineMeeting); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OnlineMeetingItemRequestBuilder - */ - public withUrl(rawUrl: string) : OnlineMeetingItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnlineMeetingItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onlineMeetingItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/recordings/count/countRequestBuilder.ts b/src/me/onlineMeetings/item/recordings/count/countRequestBuilder.ts deleted file mode 100644 index 02b092becd7..00000000000 --- a/src/me/onlineMeetings/item/recordings/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/recordings/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/recordings/count/index.ts b/src/me/onlineMeetings/item/recordings/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onlineMeetings/item/recordings/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onlineMeetings/item/recordings/index.ts b/src/me/onlineMeetings/item/recordings/index.ts deleted file mode 100644 index 347736aa80a..00000000000 --- a/src/me/onlineMeetings/item/recordings/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './recordingsRequestBuilder' diff --git a/src/me/onlineMeetings/item/recordings/item/callRecordingItemRequestBuilder.ts b/src/me/onlineMeetings/item/recordings/item/callRecordingItemRequestBuilder.ts deleted file mode 100644 index ce9468888be..00000000000 --- a/src/me/onlineMeetings/item/recordings/item/callRecordingItemRequestBuilder.ts +++ /dev/null @@ -1,135 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCallRecordingFromDiscriminatorValue, deserializeIntoCallRecording, serializeCallRecording, type CallRecording } from '../../../../../models/callRecording'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CallRecordingItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. - */ -export class CallRecordingItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new CallRecordingItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/recordings/{callRecording%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property recordings for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get a callRecording object associated with a scheduled onlineMeeting. This API doesn't support getting call recordings from channel meetings. For a recording, this API returns the metadata of the single recording associated with the online meeting. For the content of a recording, this API returns the stream of bytes associated with the recording. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallRecording - * @see {@link https://learn.microsoft.com/graph/api/callrecording-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallRecordingFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property recordings in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallRecording - */ - public patch(body: CallRecording, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallRecordingFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property recordings for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get a callRecording object associated with a scheduled onlineMeeting. This API doesn't support getting call recordings from channel meetings. For a recording, this API returns the metadata of the single recording associated with the online meeting. For the content of a recording, this API returns the stream of bytes associated with the recording. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, callRecordingItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property recordings in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: CallRecording, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCallRecording); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CallRecordingItemRequestBuilder - */ - public withUrl(rawUrl: string) : CallRecordingItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CallRecordingItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const callRecordingItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/recordings/item/content/contentRequestBuilder.ts b/src/me/onlineMeetings/item/recordings/item/content/contentRequestBuilder.ts deleted file mode 100644 index e77a867575b..00000000000 --- a/src/me/onlineMeetings/item/recordings/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,89 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CallRecording } from '../../../../../../models/'; -import { createCallRecordingFromDiscriminatorValue } from '../../../../../../models/callRecording'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/recordings/{callRecording%2Did}/content"); - }; - /** - * The content of the recording. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The content of the recording. Read-only. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallRecording - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallRecordingFromDiscriminatorValue, errorMapping); - }; - /** - * The content of the recording. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The content of the recording. Read-only. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/recordings/item/index.ts b/src/me/onlineMeetings/item/recordings/item/index.ts deleted file mode 100644 index 1ca3ca16334..00000000000 --- a/src/me/onlineMeetings/item/recordings/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './callRecordingItemRequestBuilder' diff --git a/src/me/onlineMeetings/item/recordings/recordingsRequestBuilder.ts b/src/me/onlineMeetings/item/recordings/recordingsRequestBuilder.ts deleted file mode 100644 index ca653331103..00000000000 --- a/src/me/onlineMeetings/item/recordings/recordingsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CallRecordingCollectionResponse } from '../../../../models/'; -import { createCallRecordingFromDiscriminatorValue, deserializeIntoCallRecording, serializeCallRecording, type CallRecording } from '../../../../models/callRecording'; -import { createCallRecordingCollectionResponseFromDiscriminatorValue } from '../../../../models/callRecordingCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CallRecordingItemRequestBuilder } from './item/callRecordingItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface RecordingsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. - */ -export class RecordingsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. - * @param callRecordingId The unique identifier of callRecording - * @returns a CallRecordingItemRequestBuilder - */ - public byCallRecordingId(callRecordingId: string) : CallRecordingItemRequestBuilder { - if(!callRecordingId) throw new Error("callRecordingId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["callRecording%2Did"] = callRecordingId - return new CallRecordingItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new RecordingsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/recordings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a callRecording object associated with a scheduled onlineMeeting. This API doesn't support getting call recordings from channel meetings. For a recording, this API returns the metadata of the single recording associated with the online meeting. For the content of a recording, this API returns the stream of bytes associated with the recording. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallRecordingCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallRecordingCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to recordings for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallRecording - */ - public post(body: CallRecording, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallRecordingFromDiscriminatorValue, errorMapping); - }; - /** - * Get a callRecording object associated with a scheduled onlineMeeting. This API doesn't support getting call recordings from channel meetings. For a recording, this API returns the metadata of the single recording associated with the online meeting. For the content of a recording, this API returns the stream of bytes associated with the recording. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, recordingsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to recordings for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CallRecording, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCallRecording); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a recordingsRequestBuilder - */ - public withUrl(rawUrl: string) : RecordingsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RecordingsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const recordingsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/transcripts/count/countRequestBuilder.ts b/src/me/onlineMeetings/item/transcripts/count/countRequestBuilder.ts deleted file mode 100644 index 9f4a469d9f9..00000000000 --- a/src/me/onlineMeetings/item/transcripts/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/transcripts/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/transcripts/count/index.ts b/src/me/onlineMeetings/item/transcripts/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/onlineMeetings/item/transcripts/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/onlineMeetings/item/transcripts/index.ts b/src/me/onlineMeetings/item/transcripts/index.ts deleted file mode 100644 index 796e8a216fe..00000000000 --- a/src/me/onlineMeetings/item/transcripts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './transcriptsRequestBuilder' diff --git a/src/me/onlineMeetings/item/transcripts/item/callTranscriptItemRequestBuilder.ts b/src/me/onlineMeetings/item/transcripts/item/callTranscriptItemRequestBuilder.ts deleted file mode 100644 index 4149ef5211e..00000000000 --- a/src/me/onlineMeetings/item/transcripts/item/callTranscriptItemRequestBuilder.ts +++ /dev/null @@ -1,142 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createCallTranscriptFromDiscriminatorValue, deserializeIntoCallTranscript, serializeCallTranscript, type CallTranscript } from '../../../../../models/callTranscript'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { MetadataContentRequestBuilder } from './metadataContent/metadataContentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CallTranscriptItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. - */ -export class CallTranscriptItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the media for the user entity. - */ - public get metadataContent(): MetadataContentRequestBuilder { - return new MetadataContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new CallTranscriptItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property transcripts for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallTranscript - * @see {@link https://learn.microsoft.com/graph/api/calltranscript-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallTranscriptFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property transcripts in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallTranscript - */ - public patch(body: CallTranscript, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallTranscriptFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property transcripts for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve a callTranscript object associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. Retrieving the transcript returns the metadata of the single transcript associated with the online meeting. Retrieving the content of the transcript returns the stream of text associated with the transcript. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, callTranscriptItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property transcripts in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: CallTranscript, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCallTranscript); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CallTranscriptItemRequestBuilder - */ - public withUrl(rawUrl: string) : CallTranscriptItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CallTranscriptItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const callTranscriptItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/transcripts/item/content/contentRequestBuilder.ts b/src/me/onlineMeetings/item/transcripts/item/content/contentRequestBuilder.ts deleted file mode 100644 index 8c185a187d9..00000000000 --- a/src/me/onlineMeetings/item/transcripts/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CallTranscript } from '../../../../../../models/'; -import { createCallTranscriptFromDiscriminatorValue } from '../../../../../../models/callTranscript'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/content"); - }; - /** - * The content of the transcript. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-list-transcripts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The content of the transcript. Read-only. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallTranscript - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallTranscriptFromDiscriminatorValue, errorMapping); - }; - /** - * The content of the transcript. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The content of the transcript. Read-only. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/transcripts/item/index.ts b/src/me/onlineMeetings/item/transcripts/item/index.ts deleted file mode 100644 index d450db3afc5..00000000000 --- a/src/me/onlineMeetings/item/transcripts/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './callTranscriptItemRequestBuilder' diff --git a/src/me/onlineMeetings/item/transcripts/item/metadataContent/metadataContentRequestBuilder.ts b/src/me/onlineMeetings/item/transcripts/item/metadataContent/metadataContentRequestBuilder.ts deleted file mode 100644 index ed32eaa895b..00000000000 --- a/src/me/onlineMeetings/item/transcripts/item/metadataContent/metadataContentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class MetadataContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new MetadataContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/metadataContent"); - }; - /** - * The time-aligned metadata of the utterances in the transcript. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-list-transcripts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The time-aligned metadata of the utterances in the transcript. Read-only. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The time-aligned metadata of the utterances in the transcript. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The time-aligned metadata of the utterances in the transcript. Read-only. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a metadataContentRequestBuilder - */ - public withUrl(rawUrl: string) : MetadataContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MetadataContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/item/transcripts/transcriptsRequestBuilder.ts b/src/me/onlineMeetings/item/transcripts/transcriptsRequestBuilder.ts deleted file mode 100644 index 6168d7f65ce..00000000000 --- a/src/me/onlineMeetings/item/transcripts/transcriptsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type CallTranscriptCollectionResponse } from '../../../../models/'; -import { createCallTranscriptFromDiscriminatorValue, deserializeIntoCallTranscript, serializeCallTranscript, type CallTranscript } from '../../../../models/callTranscript'; -import { createCallTranscriptCollectionResponseFromDiscriminatorValue } from '../../../../models/callTranscriptCollectionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CallTranscriptItemRequestBuilder } from './item/callTranscriptItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TranscriptsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. - */ -export class TranscriptsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. - * @param callTranscriptId The unique identifier of callTranscript - * @returns a CallTranscriptItemRequestBuilder - */ - public byCallTranscriptId(callTranscriptId: string) : CallTranscriptItemRequestBuilder { - if(!callTranscriptId) throw new Error("callTranscriptId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["callTranscript%2Did"] = callTranscriptId - return new CallTranscriptItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TranscriptsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings/{onlineMeeting%2Did}/transcripts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallTranscriptCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-list-transcripts?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallTranscriptCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to transcripts for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of CallTranscript - */ - public post(body: CallTranscript, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createCallTranscriptFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of callTranscript objects associated with a scheduled onlineMeeting. This API doesn't support getting call transcripts from channel meetings. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, transcriptsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to transcripts for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CallTranscript, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCallTranscript); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a transcriptsRequestBuilder - */ - public withUrl(rawUrl: string) : TranscriptsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TranscriptsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const transcriptsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/onlineMeetings/onlineMeetingsRequestBuilder.ts b/src/me/onlineMeetings/onlineMeetingsRequestBuilder.ts deleted file mode 100644 index 134c9774b60..00000000000 --- a/src/me/onlineMeetings/onlineMeetingsRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OnlineMeetingCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createOnlineMeetingFromDiscriminatorValue, deserializeIntoOnlineMeeting, serializeOnlineMeeting, type OnlineMeeting } from '../../models/onlineMeeting'; -import { createOnlineMeetingCollectionResponseFromDiscriminatorValue } from '../../models/onlineMeetingCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateOrGetRequestBuilder } from './createOrGet/createOrGetRequestBuilder'; -import { OnlineMeetingItemRequestBuilder } from './item/onlineMeetingItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OnlineMeetingsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the onlineMeetings property of the microsoft.graph.user entity. - */ -export class OnlineMeetingsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createOrGet method. - */ - public get createOrGet(): CreateOrGetRequestBuilder { - return new CreateOrGetRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the onlineMeetings property of the microsoft.graph.user entity. - * @param onlineMeetingId The unique identifier of onlineMeeting - * @returns a OnlineMeetingItemRequestBuilder - */ - public byOnlineMeetingId(onlineMeetingId: string) : OnlineMeetingItemRequestBuilder { - if(!onlineMeetingId) throw new Error("onlineMeetingId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["onlineMeeting%2Did"] = onlineMeetingId - return new OnlineMeetingItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OnlineMeetingsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/onlineMeetings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnlineMeetingCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/onlinemeeting-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnlineMeetingCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an online meeting on behalf of a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OnlineMeeting - * @see {@link https://learn.microsoft.com/graph/api/application-post-onlinemeetings?view=graph-rest-1.0|Find more info here} - */ - public post(body: OnlineMeeting, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOnlineMeetingFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) is an online meeting artifact. For details, see Online meeting artifacts and permissions. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, onlineMeetingsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an online meeting on behalf of a user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OnlineMeeting, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOnlineMeeting); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a onlineMeetingsRequestBuilder - */ - public withUrl(rawUrl: string) : OnlineMeetingsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OnlineMeetingsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const onlineMeetingsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/index.ts b/src/me/outlook/index.ts deleted file mode 100644 index a6841b5a491..00000000000 --- a/src/me/outlook/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './outlookRequestBuilder' diff --git a/src/me/outlook/masterCategories/count/countRequestBuilder.ts b/src/me/outlook/masterCategories/count/countRequestBuilder.ts deleted file mode 100644 index 743daca6b0c..00000000000 --- a/src/me/outlook/masterCategories/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook/masterCategories/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/masterCategories/count/index.ts b/src/me/outlook/masterCategories/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/outlook/masterCategories/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/outlook/masterCategories/index.ts b/src/me/outlook/masterCategories/index.ts deleted file mode 100644 index 86ac869771e..00000000000 --- a/src/me/outlook/masterCategories/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './masterCategoriesRequestBuilder' diff --git a/src/me/outlook/masterCategories/item/index.ts b/src/me/outlook/masterCategories/item/index.ts deleted file mode 100644 index 8cdf26b4e7b..00000000000 --- a/src/me/outlook/masterCategories/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './outlookCategoryItemRequestBuilder' diff --git a/src/me/outlook/masterCategories/item/outlookCategoryItemRequestBuilder.ts b/src/me/outlook/masterCategories/item/outlookCategoryItemRequestBuilder.ts deleted file mode 100644 index cab57ed4638..00000000000 --- a/src/me/outlook/masterCategories/item/outlookCategoryItemRequestBuilder.ts +++ /dev/null @@ -1,125 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createOutlookCategoryFromDiscriminatorValue, deserializeIntoOutlookCategory, serializeOutlookCategory, type OutlookCategory } from '../../../../models/outlookCategory'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OutlookCategoryItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the masterCategories property of the microsoft.graph.outlookUser entity. - */ -export class OutlookCategoryItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new OutlookCategoryItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook/masterCategories/{outlookCategory%2Did}{?%24select}"); - }; - /** - * Delete the specified outlookCategory object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/outlookcategory-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the properties and relationships of the specified outlookCategory object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OutlookCategory - * @see {@link https://learn.microsoft.com/graph/api/outlookcategory-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOutlookCategoryFromDiscriminatorValue, errorMapping); - }; - /** - * Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OutlookCategory - * @see {@link https://learn.microsoft.com/graph/api/outlookcategory-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: OutlookCategory, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOutlookCategoryFromDiscriminatorValue, errorMapping); - }; - /** - * Delete the specified outlookCategory object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the properties and relationships of the specified outlookCategory object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, outlookCategoryItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: OutlookCategory, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOutlookCategory); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a OutlookCategoryItemRequestBuilder - */ - public withUrl(rawUrl: string) : OutlookCategoryItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OutlookCategoryItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const outlookCategoryItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/masterCategories/masterCategoriesRequestBuilder.ts b/src/me/outlook/masterCategories/masterCategoriesRequestBuilder.ts deleted file mode 100644 index aff24c2f0d7..00000000000 --- a/src/me/outlook/masterCategories/masterCategoriesRequestBuilder.ts +++ /dev/null @@ -1,145 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OutlookCategoryCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createOutlookCategoryFromDiscriminatorValue, deserializeIntoOutlookCategory, serializeOutlookCategory, type OutlookCategory } from '../../../models/outlookCategory'; -import { createOutlookCategoryCollectionResponseFromDiscriminatorValue } from '../../../models/outlookCategoryCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { OutlookCategoryItemRequestBuilder } from './item/outlookCategoryItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface MasterCategoriesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the masterCategories property of the microsoft.graph.outlookUser entity. - */ -export class MasterCategoriesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the masterCategories property of the microsoft.graph.outlookUser entity. - * @param outlookCategoryId The unique identifier of outlookCategory - * @returns a OutlookCategoryItemRequestBuilder - */ - public byOutlookCategoryId(outlookCategoryId: string) : OutlookCategoryItemRequestBuilder { - if(!outlookCategoryId) throw new Error("outlookCategoryId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["outlookCategory%2Did"] = outlookCategoryId - return new OutlookCategoryItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new MasterCategoriesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook/masterCategories{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get all the categories that have been defined for the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OutlookCategoryCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/outlookuser-list-mastercategories?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOutlookCategoryCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create an outlookCategory object in the user's master list of categories. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OutlookCategory - * @see {@link https://learn.microsoft.com/graph/api/outlookuser-post-mastercategories?view=graph-rest-1.0|Find more info here} - */ - public post(body: OutlookCategory, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOutlookCategoryFromDiscriminatorValue, errorMapping); - }; - /** - * Get all the categories that have been defined for the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, masterCategoriesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create an outlookCategory object in the user's master list of categories. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: OutlookCategory, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeOutlookCategory); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a masterCategoriesRequestBuilder - */ - public withUrl(rawUrl: string) : MasterCategoriesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new MasterCategoriesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const masterCategoriesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/outlookRequestBuilder.ts b/src/me/outlook/outlookRequestBuilder.ts deleted file mode 100644 index 4f583578e56..00000000000 --- a/src/me/outlook/outlookRequestBuilder.ts +++ /dev/null @@ -1,99 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type OutlookUser } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createOutlookUserFromDiscriminatorValue } from '../../models/outlookUser'; -import { MasterCategoriesRequestBuilder } from './masterCategories/masterCategoriesRequestBuilder'; -import { SupportedLanguagesRequestBuilder } from './supportedLanguages/supportedLanguagesRequestBuilder'; -import { SupportedTimeZonesRequestBuilder } from './supportedTimeZones/supportedTimeZonesRequestBuilder'; -import { SupportedTimeZonesWithTimeZoneStandardRequestBuilder } from './supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OutlookRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the outlook property of the microsoft.graph.user entity. - */ -export class OutlookRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the masterCategories property of the microsoft.graph.outlookUser entity. - */ - public get masterCategories(): MasterCategoriesRequestBuilder { - return new MasterCategoriesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the supportedLanguages method. - */ - public get supportedLanguages(): SupportedLanguagesRequestBuilder { - return new SupportedLanguagesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the supportedTimeZones method. - */ - public get supportedTimeZones(): SupportedTimeZonesRequestBuilder { - return new SupportedTimeZonesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new OutlookRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook{?%24select}"); - }; - /** - * Get outlook from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of OutlookUser - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createOutlookUserFromDiscriminatorValue, errorMapping); - }; - /** - * Provides operations to call the supportedTimeZones method. - * @param TimeZoneStandard Usage: TimeZoneStandard='{TimeZoneStandard}' - * @returns a supportedTimeZonesWithTimeZoneStandardRequestBuilder - */ - public supportedTimeZonesWithTimeZoneStandard(timeZoneStandard: string | undefined) : SupportedTimeZonesWithTimeZoneStandardRequestBuilder { - if(!timeZoneStandard) throw new Error("timeZoneStandard cannot be undefined"); - return new SupportedTimeZonesWithTimeZoneStandardRequestBuilder(this.pathParameters, this.requestAdapter, timeZoneStandard); - }; - /** - * Get outlook from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, outlookRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a outlookRequestBuilder - */ - public withUrl(rawUrl: string) : OutlookRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OutlookRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const outlookRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/supportedLanguages/index.ts b/src/me/outlook/supportedLanguages/index.ts deleted file mode 100644 index c161f0f8be6..00000000000 --- a/src/me/outlook/supportedLanguages/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './supportedLanguagesGetResponse' -export * from './supportedLanguagesRequestBuilder' diff --git a/src/me/outlook/supportedLanguages/supportedLanguagesGetResponse.ts b/src/me/outlook/supportedLanguages/supportedLanguagesGetResponse.ts deleted file mode 100644 index 09b590f85a4..00000000000 --- a/src/me/outlook/supportedLanguages/supportedLanguagesGetResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { createLocaleInfoFromDiscriminatorValue, serializeLocaleInfo, type LocaleInfo } from '../../../models/localeInfo'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSupportedLanguagesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSupportedLanguagesGetResponse; -} -export function deserializeIntoSupportedLanguagesGetResponse(supportedLanguagesGetResponse: SupportedLanguagesGetResponse | undefined = {} as SupportedLanguagesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(supportedLanguagesGetResponse), - "value": n => { supportedLanguagesGetResponse.value = n.getCollectionOfObjectValues(createLocaleInfoFromDiscriminatorValue); }, - } -} -export function serializeSupportedLanguagesGetResponse(writer: SerializationWriter, supportedLanguagesGetResponse: SupportedLanguagesGetResponse | undefined = {} as SupportedLanguagesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, supportedLanguagesGetResponse) - writer.writeCollectionOfObjectValues("value", supportedLanguagesGetResponse.value, serializeLocaleInfo); -} -export interface SupportedLanguagesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: LocaleInfo[]; -} -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/supportedLanguages/supportedLanguagesRequestBuilder.ts b/src/me/outlook/supportedLanguages/supportedLanguagesRequestBuilder.ts deleted file mode 100644 index 080b699def5..00000000000 --- a/src/me/outlook/supportedLanguages/supportedLanguagesRequestBuilder.ts +++ /dev/null @@ -1,89 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { type SupportedLanguagesGetResponse } from './index'; -import { createSupportedLanguagesGetResponseFromDiscriminatorValue } from './supportedLanguagesGetResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SupportedLanguagesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to call the supportedLanguages method. - */ -export class SupportedLanguagesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SupportedLanguagesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook/supportedLanguages(){?%24top,%24skip,%24search,%24filter,%24count}"); - }; - /** - * Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SupportedLanguagesGetResponse - * @see {@link https://learn.microsoft.com/graph/api/outlookuser-supportedlanguages?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSupportedLanguagesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of locales and languages that are supported for the user, as configured on the user's mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported list. You can subsequently get the preferred language bygetting the user's mailbox settings. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, supportedLanguagesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a supportedLanguagesRequestBuilder - */ - public withUrl(rawUrl: string) : SupportedLanguagesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SupportedLanguagesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const supportedLanguagesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/supportedTimeZones/index.ts b/src/me/outlook/supportedTimeZones/index.ts deleted file mode 100644 index b28cb50d8d9..00000000000 --- a/src/me/outlook/supportedTimeZones/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './supportedTimeZonesRequestBuilder' diff --git a/src/me/outlook/supportedTimeZones/supportedTimeZonesRequestBuilder.ts b/src/me/outlook/supportedTimeZones/supportedTimeZonesRequestBuilder.ts deleted file mode 100644 index 2d1f6b20c92..00000000000 --- a/src/me/outlook/supportedTimeZones/supportedTimeZonesRequestBuilder.ts +++ /dev/null @@ -1,108 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createTimeZoneInformationFromDiscriminatorValue, serializeTimeZoneInformation, type TimeZoneInformation } from '../../../models/timeZoneInformation'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSupportedTimeZonesGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSupportedTimeZonesGetResponse; -} -export function deserializeIntoSupportedTimeZonesGetResponse(supportedTimeZonesGetResponse: SupportedTimeZonesGetResponse | undefined = {} as SupportedTimeZonesGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(supportedTimeZonesGetResponse), - "value": n => { supportedTimeZonesGetResponse.value = n.getCollectionOfObjectValues(createTimeZoneInformationFromDiscriminatorValue); }, - } -} -export function serializeSupportedTimeZonesGetResponse(writer: SerializationWriter, supportedTimeZonesGetResponse: SupportedTimeZonesGetResponse | undefined = {} as SupportedTimeZonesGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, supportedTimeZonesGetResponse) - writer.writeCollectionOfObjectValues("value", supportedTimeZonesGetResponse.value, serializeTimeZoneInformation); -} -export interface SupportedTimeZonesGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: TimeZoneInformation[]; -} -export interface SupportedTimeZonesRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to call the supportedTimeZones method. - */ -export class SupportedTimeZonesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SupportedTimeZonesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook/supportedTimeZones(){?%24top,%24skip,%24search,%24filter,%24count}"); - }; - /** - * Invoke function supportedTimeZones - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SupportedTimeZonesGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSupportedTimeZonesGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function supportedTimeZones - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, supportedTimeZonesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a supportedTimeZonesRequestBuilder - */ - public withUrl(rawUrl: string) : SupportedTimeZonesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SupportedTimeZonesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const supportedTimeZonesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/index.ts b/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/index.ts deleted file mode 100644 index 4f1952231e0..00000000000 --- a/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './supportedTimeZonesWithTimeZoneStandardGetResponse' -export * from './supportedTimeZonesWithTimeZoneStandardRequestBuilder' diff --git a/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardGetResponse.ts b/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardGetResponse.ts deleted file mode 100644 index 28a4e995f92..00000000000 --- a/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardGetResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../../models/baseCollectionPaginationCountResponse'; -import { createTimeZoneInformationFromDiscriminatorValue, serializeTimeZoneInformation, type TimeZoneInformation } from '../../../models/timeZoneInformation'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSupportedTimeZonesWithTimeZoneStandardGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSupportedTimeZonesWithTimeZoneStandardGetResponse; -} -export function deserializeIntoSupportedTimeZonesWithTimeZoneStandardGetResponse(supportedTimeZonesWithTimeZoneStandardGetResponse: SupportedTimeZonesWithTimeZoneStandardGetResponse | undefined = {} as SupportedTimeZonesWithTimeZoneStandardGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(supportedTimeZonesWithTimeZoneStandardGetResponse), - "value": n => { supportedTimeZonesWithTimeZoneStandardGetResponse.value = n.getCollectionOfObjectValues(createTimeZoneInformationFromDiscriminatorValue); }, - } -} -export function serializeSupportedTimeZonesWithTimeZoneStandardGetResponse(writer: SerializationWriter, supportedTimeZonesWithTimeZoneStandardGetResponse: SupportedTimeZonesWithTimeZoneStandardGetResponse | undefined = {} as SupportedTimeZonesWithTimeZoneStandardGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, supportedTimeZonesWithTimeZoneStandardGetResponse) - writer.writeCollectionOfObjectValues("value", supportedTimeZonesWithTimeZoneStandardGetResponse.value, serializeTimeZoneInformation); -} -export interface SupportedTimeZonesWithTimeZoneStandardGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: TimeZoneInformation[]; -} -// tslint:enable -// eslint-enable diff --git a/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardRequestBuilder.ts b/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardRequestBuilder.ts deleted file mode 100644 index 7fd875db1d9..00000000000 --- a/src/me/outlook/supportedTimeZonesWithTimeZoneStandard/supportedTimeZonesWithTimeZoneStandardRequestBuilder.ts +++ /dev/null @@ -1,90 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { type SupportedTimeZonesWithTimeZoneStandardGetResponse } from './index'; -import { createSupportedTimeZonesWithTimeZoneStandardGetResponseFromDiscriminatorValue } from './supportedTimeZonesWithTimeZoneStandardGetResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SupportedTimeZonesWithTimeZoneStandardRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to call the supportedTimeZones method. - */ -export class SupportedTimeZonesWithTimeZoneStandardRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SupportedTimeZonesWithTimeZoneStandardRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - * @param TimeZoneStandard Usage: TimeZoneStandard='{TimeZoneStandard}' - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, timeZoneStandard?: string | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/outlook/supportedTimeZones(TimeZoneStandard='{TimeZoneStandard}'){?%24top,%24skip,%24search,%24filter,%24count}"); - this.pathParameters["TimeZoneStandard"] = timeZoneStandard - }; - /** - * Invoke function supportedTimeZones - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of SupportedTimeZonesWithTimeZoneStandardGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createSupportedTimeZonesWithTimeZoneStandardGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function supportedTimeZones - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, supportedTimeZonesWithTimeZoneStandardRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a supportedTimeZonesWithTimeZoneStandardRequestBuilder - */ - public withUrl(rawUrl: string) : SupportedTimeZonesWithTimeZoneStandardRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SupportedTimeZonesWithTimeZoneStandardRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const supportedTimeZonesWithTimeZoneStandardRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/count/countRequestBuilder.ts b/src/me/ownedDevices/count/countRequestBuilder.ts deleted file mode 100644 index 688bb813370..00000000000 --- a/src/me/ownedDevices/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/count/index.ts b/src/me/ownedDevices/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedDevices/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedDevices/graphAppRoleAssignment/count/countRequestBuilder.ts b/src/me/ownedDevices/graphAppRoleAssignment/count/countRequestBuilder.ts deleted file mode 100644 index 841435a577c..00000000000 --- a/src/me/ownedDevices/graphAppRoleAssignment/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/graph.appRoleAssignment/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/graphAppRoleAssignment/count/index.ts b/src/me/ownedDevices/graphAppRoleAssignment/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedDevices/graphAppRoleAssignment/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedDevices/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts b/src/me/ownedDevices/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts deleted file mode 100644 index 039488536eb..00000000000 --- a/src/me/ownedDevices/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AppRoleAssignmentCollectionResponse } from '../../../models/'; -import { createAppRoleAssignmentCollectionResponseFromDiscriminatorValue } from '../../../models/appRoleAssignmentCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAppRoleAssignmentRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to appRoleAssignment. - */ -export class GraphAppRoleAssignmentRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphAppRoleAssignmentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignmentCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAppRoleAssignmentRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAppRoleAssignmentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAppRoleAssignmentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/graphAppRoleAssignment/index.ts b/src/me/ownedDevices/graphAppRoleAssignment/index.ts deleted file mode 100644 index 143126fb9f4..00000000000 --- a/src/me/ownedDevices/graphAppRoleAssignment/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAppRoleAssignmentRequestBuilder' diff --git a/src/me/ownedDevices/graphDevice/count/countRequestBuilder.ts b/src/me/ownedDevices/graphDevice/count/countRequestBuilder.ts deleted file mode 100644 index 88999148ce2..00000000000 --- a/src/me/ownedDevices/graphDevice/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/graph.device/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/graphDevice/count/index.ts b/src/me/ownedDevices/graphDevice/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedDevices/graphDevice/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedDevices/graphDevice/graphDeviceRequestBuilder.ts b/src/me/ownedDevices/graphDevice/graphDeviceRequestBuilder.ts deleted file mode 100644 index 08a66997193..00000000000 --- a/src/me/ownedDevices/graphDevice/graphDeviceRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceCollectionResponse } from '../../../models/'; -import { createDeviceCollectionResponseFromDiscriminatorValue } from '../../../models/deviceCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDeviceRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to device. - */ -export class GraphDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDeviceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDeviceRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/graphDevice/index.ts b/src/me/ownedDevices/graphDevice/index.ts deleted file mode 100644 index 9e1613fdd97..00000000000 --- a/src/me/ownedDevices/graphDevice/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDeviceRequestBuilder' diff --git a/src/me/ownedDevices/graphEndpoint/count/countRequestBuilder.ts b/src/me/ownedDevices/graphEndpoint/count/countRequestBuilder.ts deleted file mode 100644 index d422961936b..00000000000 --- a/src/me/ownedDevices/graphEndpoint/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/graph.endpoint/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/graphEndpoint/count/index.ts b/src/me/ownedDevices/graphEndpoint/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedDevices/graphEndpoint/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedDevices/graphEndpoint/graphEndpointRequestBuilder.ts b/src/me/ownedDevices/graphEndpoint/graphEndpointRequestBuilder.ts deleted file mode 100644 index e6aba92c8ba..00000000000 --- a/src/me/ownedDevices/graphEndpoint/graphEndpointRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EndpointCollectionResponse } from '../../../models/'; -import { createEndpointCollectionResponseFromDiscriminatorValue } from '../../../models/endpointCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphEndpointRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to endpoint. - */ -export class GraphEndpointRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphEndpointRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EndpointCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEndpointCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphEndpointRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphEndpointRequestBuilder - */ - public withUrl(rawUrl: string) : GraphEndpointRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphEndpointRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphEndpointRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/graphEndpoint/index.ts b/src/me/ownedDevices/graphEndpoint/index.ts deleted file mode 100644 index ced6d90b90c..00000000000 --- a/src/me/ownedDevices/graphEndpoint/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphEndpointRequestBuilder' diff --git a/src/me/ownedDevices/index.ts b/src/me/ownedDevices/index.ts deleted file mode 100644 index 5d2602073e6..00000000000 --- a/src/me/ownedDevices/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ownedDevicesRequestBuilder' diff --git a/src/me/ownedDevices/item/directoryObjectItemRequestBuilder.ts b/src/me/ownedDevices/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index b787246631b..00000000000 --- a/src/me/ownedDevices/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphAppRoleAssignmentRequestBuilder } from './graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder'; -import { GraphDeviceRequestBuilder } from './graphDevice/graphDeviceRequestBuilder'; -import { GraphEndpointRequestBuilder } from './graphEndpoint/graphEndpointRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the ownedDevices property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to appRoleAssignment. - */ - public get graphAppRoleAssignment(): GraphAppRoleAssignmentRequestBuilder { - return new GraphAppRoleAssignmentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to device. - */ - public get graphDevice(): GraphDeviceRequestBuilder { - return new GraphDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to endpoint. - */ - public get graphEndpoint(): GraphEndpointRequestBuilder { - return new GraphEndpointRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/item/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts b/src/me/ownedDevices/item/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts deleted file mode 100644 index 2d9329dabc8..00000000000 --- a/src/me/ownedDevices/item/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AppRoleAssignment } from '../../../../models/'; -import { createAppRoleAssignmentFromDiscriminatorValue } from '../../../../models/appRoleAssignment'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAppRoleAssignmentRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to appRoleAssignment. - */ -export class GraphAppRoleAssignmentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphAppRoleAssignmentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/{directoryObject%2Did}/graph.appRoleAssignment{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAppRoleAssignmentRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAppRoleAssignmentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAppRoleAssignmentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/item/graphAppRoleAssignment/index.ts b/src/me/ownedDevices/item/graphAppRoleAssignment/index.ts deleted file mode 100644 index 143126fb9f4..00000000000 --- a/src/me/ownedDevices/item/graphAppRoleAssignment/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAppRoleAssignmentRequestBuilder' diff --git a/src/me/ownedDevices/item/graphDevice/graphDeviceRequestBuilder.ts b/src/me/ownedDevices/item/graphDevice/graphDeviceRequestBuilder.ts deleted file mode 100644 index d1047192a23..00000000000 --- a/src/me/ownedDevices/item/graphDevice/graphDeviceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Device } from '../../../../models/'; -import { createDeviceFromDiscriminatorValue } from '../../../../models/device'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDeviceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to device. - */ -export class GraphDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/{directoryObject%2Did}/graph.device{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Device - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDeviceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDeviceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/item/graphDevice/index.ts b/src/me/ownedDevices/item/graphDevice/index.ts deleted file mode 100644 index 9e1613fdd97..00000000000 --- a/src/me/ownedDevices/item/graphDevice/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDeviceRequestBuilder' diff --git a/src/me/ownedDevices/item/graphEndpoint/graphEndpointRequestBuilder.ts b/src/me/ownedDevices/item/graphEndpoint/graphEndpointRequestBuilder.ts deleted file mode 100644 index 91fecde725b..00000000000 --- a/src/me/ownedDevices/item/graphEndpoint/graphEndpointRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Endpoint } from '../../../../models/'; -import { createEndpointFromDiscriminatorValue } from '../../../../models/endpoint'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphEndpointRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to endpoint. - */ -export class GraphEndpointRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphEndpointRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices/{directoryObject%2Did}/graph.endpoint{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Endpoint - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEndpointFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphEndpointRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphEndpointRequestBuilder - */ - public withUrl(rawUrl: string) : GraphEndpointRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphEndpointRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphEndpointRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedDevices/item/graphEndpoint/index.ts b/src/me/ownedDevices/item/graphEndpoint/index.ts deleted file mode 100644 index ced6d90b90c..00000000000 --- a/src/me/ownedDevices/item/graphEndpoint/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphEndpointRequestBuilder' diff --git a/src/me/ownedDevices/item/index.ts b/src/me/ownedDevices/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/ownedDevices/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/ownedDevices/ownedDevicesRequestBuilder.ts b/src/me/ownedDevices/ownedDevicesRequestBuilder.ts deleted file mode 100644 index fec3559fbac..00000000000 --- a/src/me/ownedDevices/ownedDevicesRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphAppRoleAssignmentRequestBuilder } from './graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder'; -import { GraphDeviceRequestBuilder } from './graphDevice/graphDeviceRequestBuilder'; -import { GraphEndpointRequestBuilder } from './graphEndpoint/graphEndpointRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OwnedDevicesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the ownedDevices property of the microsoft.graph.user entity. - */ -export class OwnedDevicesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to appRoleAssignment. - */ - public get graphAppRoleAssignment(): GraphAppRoleAssignmentRequestBuilder { - return new GraphAppRoleAssignmentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to device. - */ - public get graphDevice(): GraphDeviceRequestBuilder { - return new GraphDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to endpoint. - */ - public get graphEndpoint(): GraphEndpointRequestBuilder { - return new GraphEndpointRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the ownedDevices property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OwnedDevicesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-owneddevices?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, ownedDevicesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ownedDevicesRequestBuilder - */ - public withUrl(rawUrl: string) : OwnedDevicesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OwnedDevicesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const ownedDevicesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/count/countRequestBuilder.ts b/src/me/ownedObjects/count/countRequestBuilder.ts deleted file mode 100644 index 431655fbef7..00000000000 --- a/src/me/ownedObjects/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/count/index.ts b/src/me/ownedObjects/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedObjects/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedObjects/graphApplication/count/countRequestBuilder.ts b/src/me/ownedObjects/graphApplication/count/countRequestBuilder.ts deleted file mode 100644 index 13ddd3e2af3..00000000000 --- a/src/me/ownedObjects/graphApplication/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/graph.application/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/graphApplication/count/index.ts b/src/me/ownedObjects/graphApplication/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedObjects/graphApplication/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedObjects/graphApplication/graphApplicationRequestBuilder.ts b/src/me/ownedObjects/graphApplication/graphApplicationRequestBuilder.ts deleted file mode 100644 index 60d88b08ee7..00000000000 --- a/src/me/ownedObjects/graphApplication/graphApplicationRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ApplicationCollectionResponse } from '../../../models/'; -import { createApplicationCollectionResponseFromDiscriminatorValue } from '../../../models/applicationCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphApplicationRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to application. - */ -export class GraphApplicationRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphApplicationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/graph.application{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ApplicationCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createApplicationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphApplicationRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphApplicationRequestBuilder - */ - public withUrl(rawUrl: string) : GraphApplicationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphApplicationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphApplicationRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/graphApplication/index.ts b/src/me/ownedObjects/graphApplication/index.ts deleted file mode 100644 index ab4c8af07eb..00000000000 --- a/src/me/ownedObjects/graphApplication/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphApplicationRequestBuilder' diff --git a/src/me/ownedObjects/graphGroup/count/countRequestBuilder.ts b/src/me/ownedObjects/graphGroup/count/countRequestBuilder.ts deleted file mode 100644 index a4bac9bfb64..00000000000 --- a/src/me/ownedObjects/graphGroup/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/graph.group/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/graphGroup/count/index.ts b/src/me/ownedObjects/graphGroup/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedObjects/graphGroup/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedObjects/graphGroup/graphGroupRequestBuilder.ts b/src/me/ownedObjects/graphGroup/graphGroupRequestBuilder.ts deleted file mode 100644 index c72223a812e..00000000000 --- a/src/me/ownedObjects/graphGroup/graphGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type GroupCollectionResponse } from '../../../models/'; -import { createGroupCollectionResponseFromDiscriminatorValue } from '../../../models/groupCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphGroupRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to group. - */ -export class GraphGroupRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GroupCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphGroupRequestBuilder - */ - public withUrl(rawUrl: string) : GraphGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphGroupRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/graphGroup/index.ts b/src/me/ownedObjects/graphGroup/index.ts deleted file mode 100644 index b6b54379339..00000000000 --- a/src/me/ownedObjects/graphGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphGroupRequestBuilder' diff --git a/src/me/ownedObjects/graphServicePrincipal/count/countRequestBuilder.ts b/src/me/ownedObjects/graphServicePrincipal/count/countRequestBuilder.ts deleted file mode 100644 index b79abb067f8..00000000000 --- a/src/me/ownedObjects/graphServicePrincipal/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/graph.servicePrincipal/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/graphServicePrincipal/count/index.ts b/src/me/ownedObjects/graphServicePrincipal/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/ownedObjects/graphServicePrincipal/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/ownedObjects/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts b/src/me/ownedObjects/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts deleted file mode 100644 index b420de571d4..00000000000 --- a/src/me/ownedObjects/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ServicePrincipalCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createServicePrincipalCollectionResponseFromDiscriminatorValue } from '../../../models/servicePrincipalCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphServicePrincipalRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to servicePrincipal. - */ -export class GraphServicePrincipalRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphServicePrincipalRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ServicePrincipalCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createServicePrincipalCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphServicePrincipalRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphServicePrincipalRequestBuilder - */ - public withUrl(rawUrl: string) : GraphServicePrincipalRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphServicePrincipalRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphServicePrincipalRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/graphServicePrincipal/index.ts b/src/me/ownedObjects/graphServicePrincipal/index.ts deleted file mode 100644 index 9f1db600668..00000000000 --- a/src/me/ownedObjects/graphServicePrincipal/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphServicePrincipalRequestBuilder' diff --git a/src/me/ownedObjects/index.ts b/src/me/ownedObjects/index.ts deleted file mode 100644 index 7a3a9b55e84..00000000000 --- a/src/me/ownedObjects/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ownedObjectsRequestBuilder' diff --git a/src/me/ownedObjects/item/directoryObjectItemRequestBuilder.ts b/src/me/ownedObjects/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index 85564bb7664..00000000000 --- a/src/me/ownedObjects/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphApplicationRequestBuilder } from './graphApplication/graphApplicationRequestBuilder'; -import { GraphGroupRequestBuilder } from './graphGroup/graphGroupRequestBuilder'; -import { GraphServicePrincipalRequestBuilder } from './graphServicePrincipal/graphServicePrincipalRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the ownedObjects property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to application. - */ - public get graphApplication(): GraphApplicationRequestBuilder { - return new GraphApplicationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to group. - */ - public get graphGroup(): GraphGroupRequestBuilder { - return new GraphGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to servicePrincipal. - */ - public get graphServicePrincipal(): GraphServicePrincipalRequestBuilder { - return new GraphServicePrincipalRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/item/graphApplication/graphApplicationRequestBuilder.ts b/src/me/ownedObjects/item/graphApplication/graphApplicationRequestBuilder.ts deleted file mode 100644 index 0385e835a97..00000000000 --- a/src/me/ownedObjects/item/graphApplication/graphApplicationRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Application } from '../../../../models/'; -import { createApplicationFromDiscriminatorValue } from '../../../../models/application'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphApplicationRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to application. - */ -export class GraphApplicationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphApplicationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/{directoryObject%2Did}/graph.application{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.application - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Application - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createApplicationFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.application - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphApplicationRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphApplicationRequestBuilder - */ - public withUrl(rawUrl: string) : GraphApplicationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphApplicationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphApplicationRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/item/graphApplication/index.ts b/src/me/ownedObjects/item/graphApplication/index.ts deleted file mode 100644 index ab4c8af07eb..00000000000 --- a/src/me/ownedObjects/item/graphApplication/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphApplicationRequestBuilder' diff --git a/src/me/ownedObjects/item/graphGroup/graphGroupRequestBuilder.ts b/src/me/ownedObjects/item/graphGroup/graphGroupRequestBuilder.ts deleted file mode 100644 index 196e5c2e11d..00000000000 --- a/src/me/ownedObjects/item/graphGroup/graphGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Group } from '../../../../models/'; -import { createGroupFromDiscriminatorValue } from '../../../../models/group'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to group. - */ -export class GraphGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/{directoryObject%2Did}/graph.group{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.group - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Group - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.group - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphGroupRequestBuilder - */ - public withUrl(rawUrl: string) : GraphGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/item/graphGroup/index.ts b/src/me/ownedObjects/item/graphGroup/index.ts deleted file mode 100644 index b6b54379339..00000000000 --- a/src/me/ownedObjects/item/graphGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphGroupRequestBuilder' diff --git a/src/me/ownedObjects/item/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts b/src/me/ownedObjects/item/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts deleted file mode 100644 index 93493f21b5b..00000000000 --- a/src/me/ownedObjects/item/graphServicePrincipal/graphServicePrincipalRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ServicePrincipal } from '../../../../models/'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createServicePrincipalFromDiscriminatorValue } from '../../../../models/servicePrincipal'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphServicePrincipalRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to servicePrincipal. - */ -export class GraphServicePrincipalRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphServicePrincipalRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ServicePrincipal - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createServicePrincipalFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphServicePrincipalRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphServicePrincipalRequestBuilder - */ - public withUrl(rawUrl: string) : GraphServicePrincipalRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphServicePrincipalRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphServicePrincipalRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/ownedObjects/item/graphServicePrincipal/index.ts b/src/me/ownedObjects/item/graphServicePrincipal/index.ts deleted file mode 100644 index 9f1db600668..00000000000 --- a/src/me/ownedObjects/item/graphServicePrincipal/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphServicePrincipalRequestBuilder' diff --git a/src/me/ownedObjects/item/index.ts b/src/me/ownedObjects/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/ownedObjects/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/ownedObjects/ownedObjectsRequestBuilder.ts b/src/me/ownedObjects/ownedObjectsRequestBuilder.ts deleted file mode 100644 index d6b98c22cc1..00000000000 --- a/src/me/ownedObjects/ownedObjectsRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphApplicationRequestBuilder } from './graphApplication/graphApplicationRequestBuilder'; -import { GraphGroupRequestBuilder } from './graphGroup/graphGroupRequestBuilder'; -import { GraphServicePrincipalRequestBuilder } from './graphServicePrincipal/graphServicePrincipalRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface OwnedObjectsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the ownedObjects property of the microsoft.graph.user entity. - */ -export class OwnedObjectsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to application. - */ - public get graphApplication(): GraphApplicationRequestBuilder { - return new GraphApplicationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to group. - */ - public get graphGroup(): GraphGroupRequestBuilder { - return new GraphGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to servicePrincipal. - */ - public get graphServicePrincipal(): GraphServicePrincipalRequestBuilder { - return new GraphServicePrincipalRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the ownedObjects property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new OwnedObjectsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/ownedObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-ownedobjects?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, ownedObjectsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ownedObjectsRequestBuilder - */ - public withUrl(rawUrl: string) : OwnedObjectsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new OwnedObjectsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const ownedObjectsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/people/count/countRequestBuilder.ts b/src/me/people/count/countRequestBuilder.ts deleted file mode 100644 index 79d12c0cc2a..00000000000 --- a/src/me/people/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/people/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/people/count/index.ts b/src/me/people/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/people/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/people/index.ts b/src/me/people/index.ts deleted file mode 100644 index 7d524cdd683..00000000000 --- a/src/me/people/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './peopleRequestBuilder' diff --git a/src/me/people/item/index.ts b/src/me/people/item/index.ts deleted file mode 100644 index e38d3315b66..00000000000 --- a/src/me/people/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './personItemRequestBuilder' diff --git a/src/me/people/item/personItemRequestBuilder.ts b/src/me/people/item/personItemRequestBuilder.ts deleted file mode 100644 index d8bdcbd7d1d..00000000000 --- a/src/me/people/item/personItemRequestBuilder.ts +++ /dev/null @@ -1,68 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Person } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createPersonFromDiscriminatorValue } from '../../../models/person'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PersonItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the people property of the microsoft.graph.user entity. - */ -export class PersonItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new PersonItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/people/{person%2Did}{?%24select}"); - }; - /** - * People that are relevant to the user. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Person - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPersonFromDiscriminatorValue, errorMapping); - }; - /** - * People that are relevant to the user. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, personItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PersonItemRequestBuilder - */ - public withUrl(rawUrl: string) : PersonItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PersonItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const personItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/people/peopleRequestBuilder.ts b/src/me/people/peopleRequestBuilder.ts deleted file mode 100644 index df5d71d0908..00000000000 --- a/src/me/people/peopleRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PersonCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createPersonCollectionResponseFromDiscriminatorValue } from '../../models/personCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PersonItemRequestBuilder } from './item/personItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PeopleRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -/** - * Provides operations to manage the people property of the microsoft.graph.user entity. - */ -export class PeopleRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the people property of the microsoft.graph.user entity. - * @param personId The unique identifier of person - * @returns a PersonItemRequestBuilder - */ - public byPersonId(personId: string) : PersonItemRequestBuilder { - if(!personId) throw new Error("personId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["person%2Did"] = personId - return new PersonItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PeopleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/people{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PersonCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-people?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPersonCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a collection of person objects ordered by their relevance to the user, which is determined by the user's communication and collaboration patterns, and business relationships. You can get this information via the People API. For examples, see the Examples section and the article Use the People API to get information about the people most relevant to you. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, peopleRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a peopleRequestBuilder - */ - public withUrl(rawUrl: string) : PeopleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PeopleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const peopleRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/photo/index.ts b/src/me/photo/index.ts deleted file mode 100644 index 447456bf7ef..00000000000 --- a/src/me/photo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './photoRequestBuilder' diff --git a/src/me/photo/photoRequestBuilder.ts b/src/me/photo/photoRequestBuilder.ts deleted file mode 100644 index 5c0b4378ea5..00000000000 --- a/src/me/photo/photoRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createProfilePhotoFromDiscriminatorValue, deserializeIntoProfilePhoto, serializeProfilePhoto, type ProfilePhoto } from '../../models/profilePhoto'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhotoRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the photo property of the microsoft.graph.user entity. - */ -export class PhotoRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PhotoRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/photo{?%24select}"); - }; - /** - * Delete navigation property photo for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they're stored in Microsoft Entra ID. You can get the metadata of the largest available photo or specify a size to get the metadata for that photo size.If the size you request is unavailable, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of the photo is available for download. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - * @see {@link https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public patch(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property photo for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they're stored in Microsoft Entra ID. You can get the metadata of the largest available photo or specify a size to get the metadata for that photo size.If the size you request is unavailable, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of the photo is available for download. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, photoRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property photo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ProfilePhoto, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeProfilePhoto); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a photoRequestBuilder - */ - public withUrl(rawUrl: string) : PhotoRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhotoRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const photoRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/photo/value/contentRequestBuilder.ts b/src/me/photo/value/contentRequestBuilder.ts deleted file mode 100644 index ea72032c831..00000000000 --- a/src/me/photo/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/photo/$value"); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property photo from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property photo in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/photos/index.ts b/src/me/photos/index.ts deleted file mode 100644 index 3b4c6a60ce8..00000000000 --- a/src/me/photos/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './photosRequestBuilder' diff --git a/src/me/photos/item/index.ts b/src/me/photos/item/index.ts deleted file mode 100644 index 7cb8dc76860..00000000000 --- a/src/me/photos/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './profilePhotoItemRequestBuilder' diff --git a/src/me/photos/item/profilePhotoItemRequestBuilder.ts b/src/me/photos/item/profilePhotoItemRequestBuilder.ts deleted file mode 100644 index 1cff9f34515..00000000000 --- a/src/me/photos/item/profilePhotoItemRequestBuilder.ts +++ /dev/null @@ -1,75 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ProfilePhoto } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createProfilePhotoFromDiscriminatorValue } from '../../../models/profilePhoto'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ProfilePhotoItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the photos property of the microsoft.graph.user entity. - */ -export class ProfilePhotoItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ProfilePhotoItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/photos/{profilePhoto%2Did}{?%24select}"); - }; - /** - * The collection of the user's profile photos in different sizes. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhoto - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of the user's profile photos in different sizes. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, profilePhotoItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ProfilePhotoItemRequestBuilder - */ - public withUrl(rawUrl: string) : ProfilePhotoItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ProfilePhotoItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const profilePhotoItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/photos/item/value/contentRequestBuilder.ts b/src/me/photos/item/value/contentRequestBuilder.ts deleted file mode 100644 index 9e89a2b6513..00000000000 --- a/src/me/photos/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/photos/{profilePhoto%2Did}/$value"); - }; - /** - * Get media content for the navigation property photos from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property photos in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property photos from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property photos in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/photos/photosRequestBuilder.ts b/src/me/photos/photosRequestBuilder.ts deleted file mode 100644 index 7ac5d3c615e..00000000000 --- a/src/me/photos/photosRequestBuilder.ts +++ /dev/null @@ -1,100 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ProfilePhotoCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createProfilePhotoCollectionResponseFromDiscriminatorValue } from '../../models/profilePhotoCollectionResponse'; -import { ProfilePhotoItemRequestBuilder } from './item/profilePhotoItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PhotosRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the photos property of the microsoft.graph.user entity. - */ -export class PhotosRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the photos property of the microsoft.graph.user entity. - * @param profilePhotoId The unique identifier of profilePhoto - * @returns a ProfilePhotoItemRequestBuilder - */ - public byProfilePhotoId(profilePhotoId: string) : ProfilePhotoItemRequestBuilder { - if(!profilePhotoId) throw new Error("profilePhotoId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["profilePhoto%2Did"] = profilePhotoId - return new ProfilePhotoItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PhotosRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/photos{?%24top,%24skip,%24filter,%24orderby,%24select}"); - }; - /** - * The collection of the user's profile photos in different sizes. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ProfilePhotoCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createProfilePhotoCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of the user's profile photos in different sizes. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, photosRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a photosRequestBuilder - */ - public withUrl(rawUrl: string) : PhotosRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PhotosRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const photosRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/index.ts b/src/me/planner/index.ts deleted file mode 100644 index 847d11c2306..00000000000 --- a/src/me/planner/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plannerRequestBuilder' diff --git a/src/me/planner/plannerRequestBuilder.ts b/src/me/planner/plannerRequestBuilder.ts deleted file mode 100644 index 0490e7979e8..00000000000 --- a/src/me/planner/plannerRequestBuilder.ts +++ /dev/null @@ -1,141 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createPlannerUserFromDiscriminatorValue, deserializeIntoPlannerUser, serializePlannerUser, type PlannerUser } from '../../models/plannerUser'; -import { PlansRequestBuilder } from './plans/plansRequestBuilder'; -import { TasksRequestBuilder } from './tasks/tasksRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlannerRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the planner property of the microsoft.graph.user entity. - */ -export class PlannerRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the plans property of the microsoft.graph.plannerUser entity. - */ - public get plans(): PlansRequestBuilder { - return new PlansRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.plannerUser entity. - */ - public get tasks(): TasksRequestBuilder { - return new TasksRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PlannerRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner{?%24select,%24expand}"); - }; - /** - * Delete navigation property planner for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Entry-point to the Planner resource that might exist for a user. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerUser - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerUserFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property planner in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerUser - */ - public patch(body: PlannerUser, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerUserFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property planner for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Entry-point to the Planner resource that might exist for a user. Read-only. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plannerRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property planner in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerUser, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerUser); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a plannerRequestBuilder - */ - public withUrl(rawUrl: string) : PlannerRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlannerRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plannerRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/count/countRequestBuilder.ts b/src/me/planner/plans/count/countRequestBuilder.ts deleted file mode 100644 index af589a6dd12..00000000000 --- a/src/me/planner/plans/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/count/index.ts b/src/me/planner/plans/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/planner/plans/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/planner/plans/index.ts b/src/me/planner/plans/index.ts deleted file mode 100644 index 54cdf9c3f16..00000000000 --- a/src/me/planner/plans/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plansRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/bucketsRequestBuilder.ts b/src/me/planner/plans/item/buckets/bucketsRequestBuilder.ts deleted file mode 100644 index 43ad42b84c2..00000000000 --- a/src/me/planner/plans/item/buckets/bucketsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PlannerBucketCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerBucketFromDiscriminatorValue, deserializeIntoPlannerBucket, serializePlannerBucket, type PlannerBucket } from '../../../../../models/plannerBucket'; -import { createPlannerBucketCollectionResponseFromDiscriminatorValue } from '../../../../../models/plannerBucketCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PlannerBucketItemRequestBuilder } from './item/plannerBucketItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface BucketsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. - */ -export class BucketsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. - * @param plannerBucketId The unique identifier of plannerBucket - * @returns a PlannerBucketItemRequestBuilder - */ - public byPlannerBucketId(plannerBucketId: string) : PlannerBucketItemRequestBuilder { - if(!plannerBucketId) throw new Error("plannerBucketId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["plannerBucket%2Did"] = plannerBucketId - return new PlannerBucketItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new BucketsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of plannerBucket objects contained by a plannerPlan object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/plannerplan-list-buckets?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to buckets for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucket - */ - public post(body: PlannerBucket, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of plannerBucket objects contained by a plannerPlan object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, bucketsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to buckets for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PlannerBucket, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerBucket); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a bucketsRequestBuilder - */ - public withUrl(rawUrl: string) : BucketsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new BucketsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const bucketsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/count/countRequestBuilder.ts b/src/me/planner/plans/item/buckets/count/countRequestBuilder.ts deleted file mode 100644 index 2c0a5ed9aaa..00000000000 --- a/src/me/planner/plans/item/buckets/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/count/index.ts b/src/me/planner/plans/item/buckets/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/planner/plans/item/buckets/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/index.ts b/src/me/planner/plans/item/buckets/index.ts deleted file mode 100644 index ddaecc05450..00000000000 --- a/src/me/planner/plans/item/buckets/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './bucketsRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/index.ts b/src/me/planner/plans/item/buckets/item/index.ts deleted file mode 100644 index ad19da75eda..00000000000 --- a/src/me/planner/plans/item/buckets/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plannerBucketItemRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/plannerBucketItemRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/plannerBucketItemRequestBuilder.ts deleted file mode 100644 index e087f040cb8..00000000000 --- a/src/me/planner/plans/item/buckets/item/plannerBucketItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createPlannerBucketFromDiscriminatorValue, deserializeIntoPlannerBucket, serializePlannerBucket, type PlannerBucket } from '../../../../../../models/plannerBucket'; -import { TasksRequestBuilder } from './tasks/tasksRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlannerBucketItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. - */ -export class PlannerBucketItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the tasks property of the microsoft.graph.plannerBucket entity. - */ - public get tasks(): TasksRequestBuilder { - return new TasksRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PlannerBucketItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property buckets for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read-only. Nullable. Collection of buckets in the plan. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucket - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property buckets in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucket - */ - public patch(body: PlannerBucket, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property buckets for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read-only. Nullable. Collection of buckets in the plan. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plannerBucketItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property buckets in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerBucket, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerBucket); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PlannerBucketItemRequestBuilder - */ - public withUrl(rawUrl: string) : PlannerBucketItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlannerBucketItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plannerBucketItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/count/countRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/count/countRequestBuilder.ts deleted file mode 100644 index e99fca8cc8c..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/count/index.ts b/src/me/planner/plans/item/buckets/item/tasks/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/index.ts b/src/me/planner/plans/item/buckets/item/tasks/index.ts deleted file mode 100644 index fc7e48e482b..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tasksRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index b6e0d5887fe..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerAssignedToTaskBoardTaskFormat, serializePlannerAssignedToTaskBoardTaskFormat, type PlannerAssignedToTaskBoardTaskFormat } from '../../../../../../../../../models/plannerAssignedToTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AssignedToTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the assignedToTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class AssignedToTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AssignedToTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/assignedToTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property assignedToTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerAssignedToTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property assignedToTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerAssignedToTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerAssignedToTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property assignedToTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, assignedToTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property assignedToTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerAssignedToTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerAssignedToTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a assignedToTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : AssignedToTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AssignedToTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const assignedToTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/assignedToTaskBoardFormat/index.ts b/src/me/planner/plans/item/buckets/item/tasks/item/assignedToTaskBoardFormat/index.ts deleted file mode 100644 index 9ebf21151ad..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/assignedToTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './assignedToTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index 73930a0ab46..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerBucketTaskBoardTaskFormat, serializePlannerBucketTaskBoardTaskFormat, type PlannerBucketTaskBoardTaskFormat } from '../../../../../../../../../models/plannerBucketTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface BucketTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the bucketTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class BucketTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new BucketTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/bucketTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property bucketTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property bucketTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerBucketTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property bucketTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, bucketTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property bucketTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerBucketTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerBucketTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a bucketTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : BucketTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new BucketTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const bucketTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/bucketTaskBoardFormat/index.ts b/src/me/planner/plans/item/buckets/item/tasks/item/bucketTaskBoardFormat/index.ts deleted file mode 100644 index 3ce8f8a6e8f..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/bucketTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './bucketTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/details/detailsRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/item/details/detailsRequestBuilder.ts deleted file mode 100644 index 3ffb7d42eb8..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/details/detailsRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskDetailsFromDiscriminatorValue, deserializeIntoPlannerTaskDetails, serializePlannerTaskDetails, type PlannerTaskDetails } from '../../../../../../../../../models/plannerTaskDetails'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DetailsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the details property of the microsoft.graph.plannerTask entity. - */ -export class DetailsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DetailsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/details{?%24select,%24expand}"); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerTaskDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskDetails - * @see {@link https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskDetails - * @see {@link https://learn.microsoft.com/graph/api/plannertaskdetails-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerTaskDetails, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerTaskDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, detailsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerTaskDetails, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTaskDetails); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a detailsRequestBuilder - */ - public withUrl(rawUrl: string) : DetailsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DetailsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const detailsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/details/index.ts b/src/me/planner/plans/item/buckets/item/tasks/item/details/index.ts deleted file mode 100644 index d58dccda1aa..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/details/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './detailsRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/index.ts b/src/me/planner/plans/item/buckets/item/tasks/item/index.ts deleted file mode 100644 index e45a01d748d..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plannerTaskItemRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/plannerTaskItemRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/item/plannerTaskItemRequestBuilder.ts deleted file mode 100644 index 7c9ef812c99..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/plannerTaskItemRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskFromDiscriminatorValue, deserializeIntoPlannerTask, serializePlannerTask, type PlannerTask } from '../../../../../../../../models/plannerTask'; -import { AssignedToTaskBoardFormatRequestBuilder } from './assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder'; -import { BucketTaskBoardFormatRequestBuilder } from './bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder'; -import { DetailsRequestBuilder } from './details/detailsRequestBuilder'; -import { ProgressTaskBoardFormatRequestBuilder } from './progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlannerTaskItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.plannerBucket entity. - */ -export class PlannerTaskItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the assignedToTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get assignedToTaskBoardFormat(): AssignedToTaskBoardFormatRequestBuilder { - return new AssignedToTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the bucketTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get bucketTaskBoardFormat(): BucketTaskBoardFormatRequestBuilder { - return new BucketTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the details property of the microsoft.graph.plannerTask entity. - */ - public get details(): DetailsRequestBuilder { - return new DetailsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get progressTaskBoardFormat(): ProgressTaskBoardFormatRequestBuilder { - return new ProgressTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PlannerTaskItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property tasks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read-only. Nullable. The collection of tasks in the bucket. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property tasks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public patch(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property tasks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read-only. Nullable. The collection of tasks in the bucket. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plannerTaskItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property tasks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PlannerTaskItemRequestBuilder - */ - public withUrl(rawUrl: string) : PlannerTaskItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlannerTaskItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plannerTaskItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/progressTaskBoardFormat/index.ts b/src/me/planner/plans/item/buckets/item/tasks/item/progressTaskBoardFormat/index.ts deleted file mode 100644 index 8b53284dc39..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/progressTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './progressTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/plans/item/buckets/item/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index 959be699e99..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerProgressTaskBoardTaskFormat, serializePlannerProgressTaskBoardTaskFormat, type PlannerProgressTaskBoardTaskFormat } from '../../../../../../../../../models/plannerProgressTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ProgressTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class ProgressTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ProgressTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks/{plannerTask%2Did}/progressTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property progressTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerProgressTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property progressTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerProgressTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerProgressTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property progressTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, progressTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property progressTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerProgressTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerProgressTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a progressTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : ProgressTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ProgressTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const progressTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/buckets/item/tasks/tasksRequestBuilder.ts b/src/me/planner/plans/item/buckets/item/tasks/tasksRequestBuilder.ts deleted file mode 100644 index d70a7e3d203..00000000000 --- a/src/me/planner/plans/item/buckets/item/tasks/tasksRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PlannerTaskCollectionResponse } from '../../../../../../../models/'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskFromDiscriminatorValue, deserializeIntoPlannerTask, serializePlannerTask, type PlannerTask } from '../../../../../../../models/plannerTask'; -import { createPlannerTaskCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/plannerTaskCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PlannerTaskItemRequestBuilder } from './item/plannerTaskItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TasksRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.plannerBucket entity. - */ -export class TasksRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.plannerBucket entity. - * @param plannerTaskId The unique identifier of plannerTask - * @returns a PlannerTaskItemRequestBuilder - */ - public byPlannerTaskId(plannerTaskId: string) : PlannerTaskItemRequestBuilder { - if(!plannerTaskId) throw new Error("plannerTaskId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["plannerTask%2Did"] = plannerTaskId - return new PlannerTaskItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TasksRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/buckets/{plannerBucket%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of plannerTask objects associated to a plannerBucket object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/plannerbucket-list-tasks?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to tasks for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public post(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of plannerTask objects associated to a plannerBucket object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tasksRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to tasks for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tasksRequestBuilder - */ - public withUrl(rawUrl: string) : TasksRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TasksRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tasksRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/details/detailsRequestBuilder.ts b/src/me/planner/plans/item/details/detailsRequestBuilder.ts deleted file mode 100644 index 77520727b9d..00000000000 --- a/src/me/planner/plans/item/details/detailsRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerPlanDetailsFromDiscriminatorValue, deserializeIntoPlannerPlanDetails, serializePlannerPlanDetails, type PlannerPlanDetails } from '../../../../../models/plannerPlanDetails'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DetailsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the details property of the microsoft.graph.plannerPlan entity. - */ -export class DetailsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DetailsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/details{?%24select,%24expand}"); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerPlanDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerPlanDetails - * @see {@link https://learn.microsoft.com/graph/api/plannerplandetails-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerPlanDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerPlanDetails - * @see {@link https://learn.microsoft.com/graph/api/plannerplandetails-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerPlanDetails, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerPlanDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerPlanDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, detailsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerPlanDetails, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerPlanDetails); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a detailsRequestBuilder - */ - public withUrl(rawUrl: string) : DetailsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DetailsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const detailsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/details/index.ts b/src/me/planner/plans/item/details/index.ts deleted file mode 100644 index d58dccda1aa..00000000000 --- a/src/me/planner/plans/item/details/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './detailsRequestBuilder' diff --git a/src/me/planner/plans/item/index.ts b/src/me/planner/plans/item/index.ts deleted file mode 100644 index 565d6ca06e8..00000000000 --- a/src/me/planner/plans/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plannerPlanItemRequestBuilder' diff --git a/src/me/planner/plans/item/plannerPlanItemRequestBuilder.ts b/src/me/planner/plans/item/plannerPlanItemRequestBuilder.ts deleted file mode 100644 index 52cfe1cce6d..00000000000 --- a/src/me/planner/plans/item/plannerPlanItemRequestBuilder.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createPlannerPlanFromDiscriminatorValue, deserializeIntoPlannerPlan, serializePlannerPlan, type PlannerPlan } from '../../../../models/plannerPlan'; -import { BucketsRequestBuilder } from './buckets/bucketsRequestBuilder'; -import { DetailsRequestBuilder } from './details/detailsRequestBuilder'; -import { TasksRequestBuilder } from './tasks/tasksRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlannerPlanItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the plans property of the microsoft.graph.plannerUser entity. - */ -export class PlannerPlanItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the buckets property of the microsoft.graph.plannerPlan entity. - */ - public get buckets(): BucketsRequestBuilder { - return new BucketsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the details property of the microsoft.graph.plannerPlan entity. - */ - public get details(): DetailsRequestBuilder { - return new DetailsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.plannerPlan entity. - */ - public get tasks(): TasksRequestBuilder { - return new TasksRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PlannerPlanItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property plans for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read-only. Nullable. Returns the plannerTasks assigned to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerPlan - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerPlanFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property plans in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerPlan - */ - public patch(body: PlannerPlan, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerPlanFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property plans for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read-only. Nullable. Returns the plannerTasks assigned to the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plannerPlanItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property plans in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerPlan, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerPlan); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PlannerPlanItemRequestBuilder - */ - public withUrl(rawUrl: string) : PlannerPlanItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlannerPlanItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plannerPlanItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/count/countRequestBuilder.ts b/src/me/planner/plans/item/tasks/count/countRequestBuilder.ts deleted file mode 100644 index f33e325d113..00000000000 --- a/src/me/planner/plans/item/tasks/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/count/index.ts b/src/me/planner/plans/item/tasks/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/planner/plans/item/tasks/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/index.ts b/src/me/planner/plans/item/tasks/index.ts deleted file mode 100644 index fc7e48e482b..00000000000 --- a/src/me/planner/plans/item/tasks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tasksRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts b/src/me/planner/plans/item/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index e46b253b783..00000000000 --- a/src/me/planner/plans/item/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerAssignedToTaskBoardTaskFormat, serializePlannerAssignedToTaskBoardTaskFormat, type PlannerAssignedToTaskBoardTaskFormat } from '../../../../../../../models/plannerAssignedToTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AssignedToTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the assignedToTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class AssignedToTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AssignedToTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/assignedToTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property assignedToTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerAssignedToTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property assignedToTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerAssignedToTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerAssignedToTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property assignedToTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, assignedToTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property assignedToTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerAssignedToTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerAssignedToTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a assignedToTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : AssignedToTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AssignedToTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const assignedToTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/item/assignedToTaskBoardFormat/index.ts b/src/me/planner/plans/item/tasks/item/assignedToTaskBoardFormat/index.ts deleted file mode 100644 index 9ebf21151ad..00000000000 --- a/src/me/planner/plans/item/tasks/item/assignedToTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './assignedToTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts b/src/me/planner/plans/item/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index 1e925e2aee8..00000000000 --- a/src/me/planner/plans/item/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerBucketTaskBoardTaskFormat, serializePlannerBucketTaskBoardTaskFormat, type PlannerBucketTaskBoardTaskFormat } from '../../../../../../../models/plannerBucketTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface BucketTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the bucketTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class BucketTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new BucketTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/bucketTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property bucketTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property bucketTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerBucketTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property bucketTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, bucketTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property bucketTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerBucketTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerBucketTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a bucketTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : BucketTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new BucketTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const bucketTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/item/bucketTaskBoardFormat/index.ts b/src/me/planner/plans/item/tasks/item/bucketTaskBoardFormat/index.ts deleted file mode 100644 index 3ce8f8a6e8f..00000000000 --- a/src/me/planner/plans/item/tasks/item/bucketTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './bucketTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/item/details/detailsRequestBuilder.ts b/src/me/planner/plans/item/tasks/item/details/detailsRequestBuilder.ts deleted file mode 100644 index 0d9b35b58f9..00000000000 --- a/src/me/planner/plans/item/tasks/item/details/detailsRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskDetailsFromDiscriminatorValue, deserializeIntoPlannerTaskDetails, serializePlannerTaskDetails, type PlannerTaskDetails } from '../../../../../../../models/plannerTaskDetails'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DetailsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the details property of the microsoft.graph.plannerTask entity. - */ -export class DetailsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DetailsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/details{?%24select,%24expand}"); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerTaskDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskDetails - * @see {@link https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskDetails - * @see {@link https://learn.microsoft.com/graph/api/plannertaskdetails-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerTaskDetails, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerTaskDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, detailsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerTaskDetails, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTaskDetails); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a detailsRequestBuilder - */ - public withUrl(rawUrl: string) : DetailsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DetailsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const detailsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/item/details/index.ts b/src/me/planner/plans/item/tasks/item/details/index.ts deleted file mode 100644 index d58dccda1aa..00000000000 --- a/src/me/planner/plans/item/tasks/item/details/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './detailsRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/item/index.ts b/src/me/planner/plans/item/tasks/item/index.ts deleted file mode 100644 index e45a01d748d..00000000000 --- a/src/me/planner/plans/item/tasks/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plannerTaskItemRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/item/plannerTaskItemRequestBuilder.ts b/src/me/planner/plans/item/tasks/item/plannerTaskItemRequestBuilder.ts deleted file mode 100644 index 72fd905e687..00000000000 --- a/src/me/planner/plans/item/tasks/item/plannerTaskItemRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskFromDiscriminatorValue, deserializeIntoPlannerTask, serializePlannerTask, type PlannerTask } from '../../../../../../models/plannerTask'; -import { AssignedToTaskBoardFormatRequestBuilder } from './assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder'; -import { BucketTaskBoardFormatRequestBuilder } from './bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder'; -import { DetailsRequestBuilder } from './details/detailsRequestBuilder'; -import { ProgressTaskBoardFormatRequestBuilder } from './progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlannerTaskItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.plannerPlan entity. - */ -export class PlannerTaskItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the assignedToTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get assignedToTaskBoardFormat(): AssignedToTaskBoardFormatRequestBuilder { - return new AssignedToTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the bucketTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get bucketTaskBoardFormat(): BucketTaskBoardFormatRequestBuilder { - return new BucketTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the details property of the microsoft.graph.plannerTask entity. - */ - public get details(): DetailsRequestBuilder { - return new DetailsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get progressTaskBoardFormat(): ProgressTaskBoardFormatRequestBuilder { - return new ProgressTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PlannerTaskItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property tasks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read-only. Nullable. Collection of tasks in the plan. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property tasks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public patch(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property tasks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read-only. Nullable. Collection of tasks in the plan. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plannerTaskItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property tasks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PlannerTaskItemRequestBuilder - */ - public withUrl(rawUrl: string) : PlannerTaskItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlannerTaskItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plannerTaskItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/item/progressTaskBoardFormat/index.ts b/src/me/planner/plans/item/tasks/item/progressTaskBoardFormat/index.ts deleted file mode 100644 index 8b53284dc39..00000000000 --- a/src/me/planner/plans/item/tasks/item/progressTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './progressTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/plans/item/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts b/src/me/planner/plans/item/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index d4ea582d1c4..00000000000 --- a/src/me/planner/plans/item/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerProgressTaskBoardTaskFormat, serializePlannerProgressTaskBoardTaskFormat, type PlannerProgressTaskBoardTaskFormat } from '../../../../../../../models/plannerProgressTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ProgressTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class ProgressTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ProgressTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks/{plannerTask%2Did}/progressTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property progressTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerProgressTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property progressTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerProgressTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerProgressTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property progressTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, progressTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property progressTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerProgressTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerProgressTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a progressTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : ProgressTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ProgressTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const progressTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/item/tasks/tasksRequestBuilder.ts b/src/me/planner/plans/item/tasks/tasksRequestBuilder.ts deleted file mode 100644 index 518cb995b3f..00000000000 --- a/src/me/planner/plans/item/tasks/tasksRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PlannerTaskCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskFromDiscriminatorValue, deserializeIntoPlannerTask, serializePlannerTask, type PlannerTask } from '../../../../../models/plannerTask'; -import { createPlannerTaskCollectionResponseFromDiscriminatorValue } from '../../../../../models/plannerTaskCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PlannerTaskItemRequestBuilder } from './item/plannerTaskItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TasksRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.plannerPlan entity. - */ -export class TasksRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.plannerPlan entity. - * @param plannerTaskId The unique identifier of plannerTask - * @returns a PlannerTaskItemRequestBuilder - */ - public byPlannerTaskId(plannerTaskId: string) : PlannerTaskItemRequestBuilder { - if(!plannerTaskId) throw new Error("plannerTaskId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["plannerTask%2Did"] = plannerTaskId - return new PlannerTaskItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TasksRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans/{plannerPlan%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of plannerTask objects associated with a plannerPlan object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/plannerplan-list-tasks?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to tasks for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public post(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of plannerTask objects associated with a plannerPlan object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tasksRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to tasks for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tasksRequestBuilder - */ - public withUrl(rawUrl: string) : TasksRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TasksRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tasksRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/plans/plansRequestBuilder.ts b/src/me/planner/plans/plansRequestBuilder.ts deleted file mode 100644 index 728011e1017..00000000000 --- a/src/me/planner/plans/plansRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PlannerPlanCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createPlannerPlanFromDiscriminatorValue, deserializeIntoPlannerPlan, serializePlannerPlan, type PlannerPlan } from '../../../models/plannerPlan'; -import { createPlannerPlanCollectionResponseFromDiscriminatorValue } from '../../../models/plannerPlanCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PlannerPlanItemRequestBuilder } from './item/plannerPlanItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlansRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the plans property of the microsoft.graph.plannerUser entity. - */ -export class PlansRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the plans property of the microsoft.graph.plannerUser entity. - * @param plannerPlanId The unique identifier of plannerPlan - * @returns a PlannerPlanItemRequestBuilder - */ - public byPlannerPlanId(plannerPlanId: string) : PlannerPlanItemRequestBuilder { - if(!plannerPlanId) throw new Error("plannerPlanId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["plannerPlan%2Did"] = plannerPlanId - return new PlannerPlanItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new PlansRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/plans{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of plannerplan objects shared with a user object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerPlanCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/planneruser-list-plans?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerPlanCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to plans for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerPlan - */ - public post(body: PlannerPlan, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerPlanFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of plannerplan objects shared with a user object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plansRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to plans for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PlannerPlan, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerPlan); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a plansRequestBuilder - */ - public withUrl(rawUrl: string) : PlansRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlansRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plansRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/count/countRequestBuilder.ts b/src/me/planner/tasks/count/countRequestBuilder.ts deleted file mode 100644 index 59327c9936c..00000000000 --- a/src/me/planner/tasks/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/count/index.ts b/src/me/planner/tasks/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/planner/tasks/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/planner/tasks/index.ts b/src/me/planner/tasks/index.ts deleted file mode 100644 index fc7e48e482b..00000000000 --- a/src/me/planner/tasks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tasksRequestBuilder' diff --git a/src/me/planner/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts b/src/me/planner/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index 488b6e65930..00000000000 --- a/src/me/planner/tasks/item/assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerAssignedToTaskBoardTaskFormat, serializePlannerAssignedToTaskBoardTaskFormat, type PlannerAssignedToTaskBoardTaskFormat } from '../../../../../models/plannerAssignedToTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AssignedToTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the assignedToTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class AssignedToTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new AssignedToTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks/{plannerTask%2Did}/assignedToTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property assignedToTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerAssignedToTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property assignedToTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerAssignedToTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerassignedtotaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerAssignedToTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property assignedToTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerAssignedToTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, assignedToTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property assignedToTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerAssignedToTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerAssignedToTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a assignedToTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : AssignedToTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AssignedToTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const assignedToTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/item/assignedToTaskBoardFormat/index.ts b/src/me/planner/tasks/item/assignedToTaskBoardFormat/index.ts deleted file mode 100644 index 9ebf21151ad..00000000000 --- a/src/me/planner/tasks/item/assignedToTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './assignedToTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts b/src/me/planner/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index 9755970be3a..00000000000 --- a/src/me/planner/tasks/item/bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerBucketTaskBoardTaskFormat, serializePlannerBucketTaskBoardTaskFormat, type PlannerBucketTaskBoardTaskFormat } from '../../../../../models/plannerBucketTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface BucketTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the bucketTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class BucketTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new BucketTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks/{plannerTask%2Did}/bucketTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property bucketTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property bucketTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerBucketTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerbuckettaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerBucketTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerBucketTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property bucketTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of plannerBucketTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, bucketTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property bucketTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerBucketTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerBucketTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a bucketTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : BucketTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new BucketTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const bucketTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/item/bucketTaskBoardFormat/index.ts b/src/me/planner/tasks/item/bucketTaskBoardFormat/index.ts deleted file mode 100644 index 3ce8f8a6e8f..00000000000 --- a/src/me/planner/tasks/item/bucketTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './bucketTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/tasks/item/details/detailsRequestBuilder.ts b/src/me/planner/tasks/item/details/detailsRequestBuilder.ts deleted file mode 100644 index ab145809010..00000000000 --- a/src/me/planner/tasks/item/details/detailsRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskDetailsFromDiscriminatorValue, deserializeIntoPlannerTaskDetails, serializePlannerTaskDetails, type PlannerTaskDetails } from '../../../../../models/plannerTaskDetails'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DetailsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the details property of the microsoft.graph.plannerTask entity. - */ -export class DetailsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DetailsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks/{plannerTask%2Did}/details{?%24select,%24expand}"); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a plannerTaskDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskDetails - * @see {@link https://learn.microsoft.com/graph/api/plannertaskdetails-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskDetails - * @see {@link https://learn.microsoft.com/graph/api/plannertaskdetails-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerTaskDetails, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskDetailsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property details for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a plannerTaskDetails object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, detailsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property details in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerTaskDetails, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTaskDetails); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a detailsRequestBuilder - */ - public withUrl(rawUrl: string) : DetailsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DetailsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const detailsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/item/details/index.ts b/src/me/planner/tasks/item/details/index.ts deleted file mode 100644 index d58dccda1aa..00000000000 --- a/src/me/planner/tasks/item/details/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './detailsRequestBuilder' diff --git a/src/me/planner/tasks/item/index.ts b/src/me/planner/tasks/item/index.ts deleted file mode 100644 index e45a01d748d..00000000000 --- a/src/me/planner/tasks/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plannerTaskItemRequestBuilder' diff --git a/src/me/planner/tasks/item/plannerTaskItemRequestBuilder.ts b/src/me/planner/tasks/item/plannerTaskItemRequestBuilder.ts deleted file mode 100644 index f090bbdea42..00000000000 --- a/src/me/planner/tasks/item/plannerTaskItemRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createPlannerTaskFromDiscriminatorValue, deserializeIntoPlannerTask, serializePlannerTask, type PlannerTask } from '../../../../models/plannerTask'; -import { AssignedToTaskBoardFormatRequestBuilder } from './assignedToTaskBoardFormat/assignedToTaskBoardFormatRequestBuilder'; -import { BucketTaskBoardFormatRequestBuilder } from './bucketTaskBoardFormat/bucketTaskBoardFormatRequestBuilder'; -import { DetailsRequestBuilder } from './details/detailsRequestBuilder'; -import { ProgressTaskBoardFormatRequestBuilder } from './progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PlannerTaskItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.plannerUser entity. - */ -export class PlannerTaskItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the assignedToTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get assignedToTaskBoardFormat(): AssignedToTaskBoardFormatRequestBuilder { - return new AssignedToTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the bucketTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get bucketTaskBoardFormat(): BucketTaskBoardFormatRequestBuilder { - return new BucketTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the details property of the microsoft.graph.plannerTask entity. - */ - public get details(): DetailsRequestBuilder { - return new DetailsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ - public get progressTaskBoardFormat(): ProgressTaskBoardFormatRequestBuilder { - return new ProgressTaskBoardFormatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PlannerTaskItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks/{plannerTask%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property tasks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read-only. Nullable. Returns the plannerPlans shared with the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property tasks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public patch(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property tasks for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read-only. Nullable. Returns the plannerPlans shared with the user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, plannerTaskItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property tasks in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a PlannerTaskItemRequestBuilder - */ - public withUrl(rawUrl: string) : PlannerTaskItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PlannerTaskItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const plannerTaskItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/item/progressTaskBoardFormat/index.ts b/src/me/planner/tasks/item/progressTaskBoardFormat/index.ts deleted file mode 100644 index 8b53284dc39..00000000000 --- a/src/me/planner/tasks/item/progressTaskBoardFormat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './progressTaskBoardFormatRequestBuilder' diff --git a/src/me/planner/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts b/src/me/planner/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts deleted file mode 100644 index d66f96e8baa..00000000000 --- a/src/me/planner/tasks/item/progressTaskBoardFormat/progressTaskBoardFormatRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, deserializeIntoPlannerProgressTaskBoardTaskFormat, serializePlannerProgressTaskBoardTaskFormat, type PlannerProgressTaskBoardTaskFormat } from '../../../../../models/plannerProgressTaskBoardTaskFormat'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ProgressTaskBoardFormatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the progressTaskBoardFormat property of the microsoft.graph.plannerTask entity. - */ -export class ProgressTaskBoardFormatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ProgressTaskBoardFormatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks/{plannerTask%2Did}/progressTaskBoardFormat{?%24select,%24expand}"); - }; - /** - * Delete navigation property progressTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerProgressTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property progressTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerProgressTaskBoardTaskFormat - * @see {@link https://learn.microsoft.com/graph/api/plannerprogresstaskboardtaskformat-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: PlannerProgressTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerProgressTaskBoardTaskFormatFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property progressTaskBoardFormat for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of plannerProgressTaskBoardTaskFormat object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, progressTaskBoardFormatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property progressTaskBoardFormat in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: PlannerProgressTaskBoardTaskFormat, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerProgressTaskBoardTaskFormat); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a progressTaskBoardFormatRequestBuilder - */ - public withUrl(rawUrl: string) : ProgressTaskBoardFormatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ProgressTaskBoardFormatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const progressTaskBoardFormatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/planner/tasks/tasksRequestBuilder.ts b/src/me/planner/tasks/tasksRequestBuilder.ts deleted file mode 100644 index 8340a75b133..00000000000 --- a/src/me/planner/tasks/tasksRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type PlannerTaskCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createPlannerTaskFromDiscriminatorValue, deserializeIntoPlannerTask, serializePlannerTask, type PlannerTask } from '../../../models/plannerTask'; -import { createPlannerTaskCollectionResponseFromDiscriminatorValue } from '../../../models/plannerTaskCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { PlannerTaskItemRequestBuilder } from './item/plannerTaskItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TasksRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.plannerUser entity. - */ -export class TasksRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.plannerUser entity. - * @param plannerTaskId The unique identifier of plannerTask - * @returns a PlannerTaskItemRequestBuilder - */ - public byPlannerTaskId(plannerTaskId: string) : PlannerTaskItemRequestBuilder { - if(!plannerTaskId) throw new Error("plannerTaskId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["plannerTask%2Did"] = plannerTaskId - return new PlannerTaskItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TasksRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/planner/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve a list of plannertask objects assigned to a User. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTaskCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/planneruser-list-tasks?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to tasks for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of PlannerTask - */ - public post(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPlannerTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve a list of plannertask objects assigned to a User. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tasksRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to tasks for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: PlannerTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePlannerTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tasksRequestBuilder - */ - public withUrl(rawUrl: string) : TasksRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TasksRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tasksRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/presence/clearPresence/clearPresencePostRequestBody.ts b/src/me/presence/clearPresence/clearPresencePostRequestBody.ts deleted file mode 100644 index 37c5ab6d012..00000000000 --- a/src/me/presence/clearPresence/clearPresencePostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export interface ClearPresencePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The sessionId property - */ - sessionId?: string; -} -export function createClearPresencePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoClearPresencePostRequestBody; -} -export function deserializeIntoClearPresencePostRequestBody(clearPresencePostRequestBody: ClearPresencePostRequestBody | undefined = {} as ClearPresencePostRequestBody) : Record void> { - return { - "sessionId": n => { clearPresencePostRequestBody.sessionId = n.getStringValue(); }, - } -} -export function serializeClearPresencePostRequestBody(writer: SerializationWriter, clearPresencePostRequestBody: ClearPresencePostRequestBody | undefined = {} as ClearPresencePostRequestBody) : void { - writer.writeStringValue("sessionId", clearPresencePostRequestBody.sessionId); - writer.writeAdditionalData(clearPresencePostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/presence/clearPresence/clearPresenceRequestBuilder.ts b/src/me/presence/clearPresence/clearPresenceRequestBuilder.ts deleted file mode 100644 index 50e8975e331..00000000000 --- a/src/me/presence/clearPresence/clearPresenceRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { deserializeIntoClearPresencePostRequestBody, serializeClearPresencePostRequestBody, type ClearPresencePostRequestBody } from './clearPresencePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the clearPresence method. - */ -export class ClearPresenceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ClearPresenceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/presence/clearPresence"); - }; - /** - * Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/presence-clearpresence?view=graph-rest-1.0|Find more info here} - */ - public post(body: ClearPresencePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Clear the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ClearPresencePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeClearPresencePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a clearPresenceRequestBuilder - */ - public withUrl(rawUrl: string) : ClearPresenceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ClearPresenceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/presence/clearPresence/index.ts b/src/me/presence/clearPresence/index.ts deleted file mode 100644 index 4428135381e..00000000000 --- a/src/me/presence/clearPresence/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './clearPresencePostRequestBody' -export * from './clearPresenceRequestBuilder' diff --git a/src/me/presence/clearUserPreferredPresence/clearUserPreferredPresenceRequestBuilder.ts b/src/me/presence/clearUserPreferredPresence/clearUserPreferredPresenceRequestBuilder.ts deleted file mode 100644 index 60b8791ff8d..00000000000 --- a/src/me/presence/clearUserPreferredPresence/clearUserPreferredPresenceRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the clearUserPreferredPresence method. - */ -export class ClearUserPreferredPresenceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ClearUserPreferredPresenceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/presence/clearUserPreferredPresence"); - }; - /** - * Clear the preferred availability and activity status for a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/presence-clearuserpreferredpresence?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Clear the preferred availability and activity status for a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a clearUserPreferredPresenceRequestBuilder - */ - public withUrl(rawUrl: string) : ClearUserPreferredPresenceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ClearUserPreferredPresenceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/presence/index.ts b/src/me/presence/index.ts deleted file mode 100644 index 24d472047b3..00000000000 --- a/src/me/presence/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './presenceRequestBuilder' diff --git a/src/me/presence/presenceRequestBuilder.ts b/src/me/presence/presenceRequestBuilder.ts deleted file mode 100644 index 73338a613fd..00000000000 --- a/src/me/presence/presenceRequestBuilder.ts +++ /dev/null @@ -1,163 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createPresenceFromDiscriminatorValue, deserializeIntoPresence, serializePresence, type Presence } from '../../models/presence'; -import { ClearPresenceRequestBuilder } from './clearPresence/clearPresenceRequestBuilder'; -import { ClearUserPreferredPresenceRequestBuilder } from './clearUserPreferredPresence/clearUserPreferredPresenceRequestBuilder'; -import { SetPresenceRequestBuilder } from './setPresence/setPresenceRequestBuilder'; -import { SetStatusMessageRequestBuilder } from './setStatusMessage/setStatusMessageRequestBuilder'; -import { SetUserPreferredPresenceRequestBuilder } from './setUserPreferredPresence/setUserPreferredPresenceRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface PresenceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the presence property of the microsoft.graph.user entity. - */ -export class PresenceRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to call the clearPresence method. - */ - public get clearPresence(): ClearPresenceRequestBuilder { - return new ClearPresenceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the clearUserPreferredPresence method. - */ - public get clearUserPreferredPresence(): ClearUserPreferredPresenceRequestBuilder { - return new ClearUserPreferredPresenceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setPresence method. - */ - public get setPresence(): SetPresenceRequestBuilder { - return new SetPresenceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setStatusMessage method. - */ - public get setStatusMessage(): SetStatusMessageRequestBuilder { - return new SetStatusMessageRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the setUserPreferredPresence method. - */ - public get setUserPreferredPresence(): SetUserPreferredPresenceRequestBuilder { - return new SetUserPreferredPresenceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new PresenceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/presence{?%24select,%24expand}"); - }; - /** - * Delete navigation property presence for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Set a presence status message for a user. An optional expiration date and time can be supplied. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Presence - * @see {@link https://learn.microsoft.com/graph/api/presence-setstatusmessage?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPresenceFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property presence in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Presence - */ - public patch(body: Presence, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createPresenceFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property presence for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Set a presence status message for a user. An optional expiration date and time can be supplied. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, presenceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property presence in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Presence, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePresence); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a presenceRequestBuilder - */ - public withUrl(rawUrl: string) : PresenceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new PresenceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const presenceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/presence/setPresence/index.ts b/src/me/presence/setPresence/index.ts deleted file mode 100644 index d577481fd59..00000000000 --- a/src/me/presence/setPresence/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './setPresencePostRequestBody' -export * from './setPresenceRequestBuilder' diff --git a/src/me/presence/setPresence/setPresencePostRequestBody.ts b/src/me/presence/setPresence/setPresencePostRequestBody.ts deleted file mode 100644 index e38e7b9045e..00000000000 --- a/src/me/presence/setPresence/setPresencePostRequestBody.ts +++ /dev/null @@ -1,48 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Duration, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetPresencePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetPresencePostRequestBody; -} -export function deserializeIntoSetPresencePostRequestBody(setPresencePostRequestBody: SetPresencePostRequestBody | undefined = {} as SetPresencePostRequestBody) : Record void> { - return { - "activity": n => { setPresencePostRequestBody.activity = n.getStringValue(); }, - "availability": n => { setPresencePostRequestBody.availability = n.getStringValue(); }, - "expirationDuration": n => { setPresencePostRequestBody.expirationDuration = n.getDurationValue(); }, - "sessionId": n => { setPresencePostRequestBody.sessionId = n.getStringValue(); }, - } -} -export function serializeSetPresencePostRequestBody(writer: SerializationWriter, setPresencePostRequestBody: SetPresencePostRequestBody | undefined = {} as SetPresencePostRequestBody) : void { - writer.writeStringValue("activity", setPresencePostRequestBody.activity); - writer.writeStringValue("availability", setPresencePostRequestBody.availability); - writer.writeDurationValue("expirationDuration", setPresencePostRequestBody.expirationDuration); - writer.writeStringValue("sessionId", setPresencePostRequestBody.sessionId); - writer.writeAdditionalData(setPresencePostRequestBody.additionalData); -} -export interface SetPresencePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * The activity property - */ - activity?: string; - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The availability property - */ - availability?: string; - /** - * The expirationDuration property - */ - expirationDuration?: Duration; - /** - * The sessionId property - */ - sessionId?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/presence/setPresence/setPresenceRequestBuilder.ts b/src/me/presence/setPresence/setPresenceRequestBuilder.ts deleted file mode 100644 index deb5fc989da..00000000000 --- a/src/me/presence/setPresence/setPresenceRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { deserializeIntoSetPresencePostRequestBody, serializeSetPresencePostRequestBody, type SetPresencePostRequestBody } from './setPresencePostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the setPresence method. - */ -export class SetPresenceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetPresenceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/presence/setPresence"); - }; - /** - * Set the state of a user's presence session as an application. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/presence-setpresence?view=graph-rest-1.0|Find more info here} - */ - public post(body: SetPresencePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Set the state of a user's presence session as an application. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetPresencePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetPresencePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setPresenceRequestBuilder - */ - public withUrl(rawUrl: string) : SetPresenceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetPresenceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/presence/setStatusMessage/index.ts b/src/me/presence/setStatusMessage/index.ts deleted file mode 100644 index 42fdde17ca9..00000000000 --- a/src/me/presence/setStatusMessage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './setStatusMessageRequestBuilder' diff --git a/src/me/presence/setStatusMessage/setStatusMessageRequestBuilder.ts b/src/me/presence/setStatusMessage/setStatusMessageRequestBuilder.ts deleted file mode 100644 index a4f6b4444eb..00000000000 --- a/src/me/presence/setStatusMessage/setStatusMessageRequestBuilder.ts +++ /dev/null @@ -1,85 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createPresenceStatusMessageFromDiscriminatorValue, serializePresenceStatusMessage, type PresenceStatusMessage } from '../../../models/presenceStatusMessage'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetStatusMessagePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetStatusMessagePostRequestBody; -} -export function deserializeIntoSetStatusMessagePostRequestBody(setStatusMessagePostRequestBody: SetStatusMessagePostRequestBody | undefined = {} as SetStatusMessagePostRequestBody) : Record void> { - return { - "statusMessage": n => { setStatusMessagePostRequestBody.statusMessage = n.getObjectValue(createPresenceStatusMessageFromDiscriminatorValue); }, - } -} -export function serializeSetStatusMessagePostRequestBody(writer: SerializationWriter, setStatusMessagePostRequestBody: SetStatusMessagePostRequestBody | undefined = {} as SetStatusMessagePostRequestBody) : void { - writer.writeObjectValue("statusMessage", setStatusMessagePostRequestBody.statusMessage, serializePresenceStatusMessage); - writer.writeAdditionalData(setStatusMessagePostRequestBody.additionalData); -} -export interface SetStatusMessagePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The statusMessage property - */ - statusMessage?: PresenceStatusMessage; -} -/** - * Provides operations to call the setStatusMessage method. - */ -export class SetStatusMessageRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetStatusMessageRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/presence/setStatusMessage"); - }; - /** - * Set a presence status message for a user. An optional expiration date and time can be supplied. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/presence-setstatusmessage?view=graph-rest-1.0|Find more info here} - */ - public post(body: SetStatusMessagePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Set a presence status message for a user. An optional expiration date and time can be supplied. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetStatusMessagePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetStatusMessagePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setStatusMessageRequestBuilder - */ - public withUrl(rawUrl: string) : SetStatusMessageRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetStatusMessageRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/presence/setUserPreferredPresence/index.ts b/src/me/presence/setUserPreferredPresence/index.ts deleted file mode 100644 index c514e2a7d46..00000000000 --- a/src/me/presence/setUserPreferredPresence/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './setUserPreferredPresenceRequestBuilder' diff --git a/src/me/presence/setUserPreferredPresence/setUserPreferredPresenceRequestBuilder.ts b/src/me/presence/setUserPreferredPresence/setUserPreferredPresenceRequestBuilder.ts deleted file mode 100644 index b732173bd8e..00000000000 --- a/src/me/presence/setUserPreferredPresence/setUserPreferredPresenceRequestBuilder.ts +++ /dev/null @@ -1,96 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Duration, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSetUserPreferredPresencePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSetUserPreferredPresencePostRequestBody; -} -export function deserializeIntoSetUserPreferredPresencePostRequestBody(setUserPreferredPresencePostRequestBody: SetUserPreferredPresencePostRequestBody | undefined = {} as SetUserPreferredPresencePostRequestBody) : Record void> { - return { - "activity": n => { setUserPreferredPresencePostRequestBody.activity = n.getStringValue(); }, - "availability": n => { setUserPreferredPresencePostRequestBody.availability = n.getStringValue(); }, - "expirationDuration": n => { setUserPreferredPresencePostRequestBody.expirationDuration = n.getDurationValue(); }, - } -} -export function serializeSetUserPreferredPresencePostRequestBody(writer: SerializationWriter, setUserPreferredPresencePostRequestBody: SetUserPreferredPresencePostRequestBody | undefined = {} as SetUserPreferredPresencePostRequestBody) : void { - writer.writeStringValue("activity", setUserPreferredPresencePostRequestBody.activity); - writer.writeStringValue("availability", setUserPreferredPresencePostRequestBody.availability); - writer.writeDurationValue("expirationDuration", setUserPreferredPresencePostRequestBody.expirationDuration); - writer.writeAdditionalData(setUserPreferredPresencePostRequestBody.additionalData); -} -export interface SetUserPreferredPresencePostRequestBody extends AdditionalDataHolder, Parsable { - /** - * The activity property - */ - activity?: string; - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The availability property - */ - availability?: string; - /** - * The expirationDuration property - */ - expirationDuration?: Duration; -} -/** - * Provides operations to call the setUserPreferredPresence method. - */ -export class SetUserPreferredPresenceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SetUserPreferredPresenceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/presence/setUserPreferredPresence"); - }; - /** - * Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/presence-setuserpreferredpresence?view=graph-rest-1.0|Find more info here} - */ - public post(body: SetUserPreferredPresencePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SetUserPreferredPresencePostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSetUserPreferredPresencePostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a setUserPreferredPresenceRequestBuilder - */ - public withUrl(rawUrl: string) : SetUserPreferredPresenceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SetUserPreferredPresenceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/count/countRequestBuilder.ts b/src/me/registeredDevices/count/countRequestBuilder.ts deleted file mode 100644 index b8c7c38f9a4..00000000000 --- a/src/me/registeredDevices/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/count/index.ts b/src/me/registeredDevices/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/registeredDevices/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/registeredDevices/graphAppRoleAssignment/count/countRequestBuilder.ts b/src/me/registeredDevices/graphAppRoleAssignment/count/countRequestBuilder.ts deleted file mode 100644 index 0738ea02edf..00000000000 --- a/src/me/registeredDevices/graphAppRoleAssignment/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/graph.appRoleAssignment/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/graphAppRoleAssignment/count/index.ts b/src/me/registeredDevices/graphAppRoleAssignment/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/registeredDevices/graphAppRoleAssignment/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/registeredDevices/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts b/src/me/registeredDevices/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts deleted file mode 100644 index ada2da2ec60..00000000000 --- a/src/me/registeredDevices/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AppRoleAssignmentCollectionResponse } from '../../../models/'; -import { createAppRoleAssignmentCollectionResponseFromDiscriminatorValue } from '../../../models/appRoleAssignmentCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAppRoleAssignmentRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to appRoleAssignment. - */ -export class GraphAppRoleAssignmentRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphAppRoleAssignmentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignmentCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAppRoleAssignmentRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAppRoleAssignmentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAppRoleAssignmentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/graphAppRoleAssignment/index.ts b/src/me/registeredDevices/graphAppRoleAssignment/index.ts deleted file mode 100644 index 143126fb9f4..00000000000 --- a/src/me/registeredDevices/graphAppRoleAssignment/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAppRoleAssignmentRequestBuilder' diff --git a/src/me/registeredDevices/graphDevice/count/countRequestBuilder.ts b/src/me/registeredDevices/graphDevice/count/countRequestBuilder.ts deleted file mode 100644 index 23cfd1be348..00000000000 --- a/src/me/registeredDevices/graphDevice/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/graph.device/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/graphDevice/count/index.ts b/src/me/registeredDevices/graphDevice/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/registeredDevices/graphDevice/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/registeredDevices/graphDevice/graphDeviceRequestBuilder.ts b/src/me/registeredDevices/graphDevice/graphDeviceRequestBuilder.ts deleted file mode 100644 index 56b72631669..00000000000 --- a/src/me/registeredDevices/graphDevice/graphDeviceRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DeviceCollectionResponse } from '../../../models/'; -import { createDeviceCollectionResponseFromDiscriminatorValue } from '../../../models/deviceCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDeviceRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to device. - */ -export class GraphDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeviceCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDeviceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDeviceRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/graphDevice/index.ts b/src/me/registeredDevices/graphDevice/index.ts deleted file mode 100644 index 9e1613fdd97..00000000000 --- a/src/me/registeredDevices/graphDevice/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDeviceRequestBuilder' diff --git a/src/me/registeredDevices/graphEndpoint/count/countRequestBuilder.ts b/src/me/registeredDevices/graphEndpoint/count/countRequestBuilder.ts deleted file mode 100644 index aaa824edcaa..00000000000 --- a/src/me/registeredDevices/graphEndpoint/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/graph.endpoint/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/graphEndpoint/count/index.ts b/src/me/registeredDevices/graphEndpoint/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/registeredDevices/graphEndpoint/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/registeredDevices/graphEndpoint/graphEndpointRequestBuilder.ts b/src/me/registeredDevices/graphEndpoint/graphEndpointRequestBuilder.ts deleted file mode 100644 index 9bccc20dc96..00000000000 --- a/src/me/registeredDevices/graphEndpoint/graphEndpointRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type EndpointCollectionResponse } from '../../../models/'; -import { createEndpointCollectionResponseFromDiscriminatorValue } from '../../../models/endpointCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphEndpointRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to endpoint. - */ -export class GraphEndpointRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphEndpointRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of EndpointCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEndpointCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphEndpointRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphEndpointRequestBuilder - */ - public withUrl(rawUrl: string) : GraphEndpointRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphEndpointRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphEndpointRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/graphEndpoint/index.ts b/src/me/registeredDevices/graphEndpoint/index.ts deleted file mode 100644 index ced6d90b90c..00000000000 --- a/src/me/registeredDevices/graphEndpoint/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphEndpointRequestBuilder' diff --git a/src/me/registeredDevices/index.ts b/src/me/registeredDevices/index.ts deleted file mode 100644 index a861cef8813..00000000000 --- a/src/me/registeredDevices/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './registeredDevicesRequestBuilder' diff --git a/src/me/registeredDevices/item/directoryObjectItemRequestBuilder.ts b/src/me/registeredDevices/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index b62df17a462..00000000000 --- a/src/me/registeredDevices/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphAppRoleAssignmentRequestBuilder } from './graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder'; -import { GraphDeviceRequestBuilder } from './graphDevice/graphDeviceRequestBuilder'; -import { GraphEndpointRequestBuilder } from './graphEndpoint/graphEndpointRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the registeredDevices property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to appRoleAssignment. - */ - public get graphAppRoleAssignment(): GraphAppRoleAssignmentRequestBuilder { - return new GraphAppRoleAssignmentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to device. - */ - public get graphDevice(): GraphDeviceRequestBuilder { - return new GraphDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to endpoint. - */ - public get graphEndpoint(): GraphEndpointRequestBuilder { - return new GraphEndpointRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/item/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts b/src/me/registeredDevices/item/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts deleted file mode 100644 index ffcad6fc493..00000000000 --- a/src/me/registeredDevices/item/graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AppRoleAssignment } from '../../../../models/'; -import { createAppRoleAssignmentFromDiscriminatorValue } from '../../../../models/appRoleAssignment'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAppRoleAssignmentRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to appRoleAssignment. - */ -export class GraphAppRoleAssignmentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphAppRoleAssignmentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/{directoryObject%2Did}/graph.appRoleAssignment{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AppRoleAssignment - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAppRoleAssignmentFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAppRoleAssignmentRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAppRoleAssignmentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAppRoleAssignmentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAppRoleAssignmentRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/item/graphAppRoleAssignment/index.ts b/src/me/registeredDevices/item/graphAppRoleAssignment/index.ts deleted file mode 100644 index 143126fb9f4..00000000000 --- a/src/me/registeredDevices/item/graphAppRoleAssignment/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAppRoleAssignmentRequestBuilder' diff --git a/src/me/registeredDevices/item/graphDevice/graphDeviceRequestBuilder.ts b/src/me/registeredDevices/item/graphDevice/graphDeviceRequestBuilder.ts deleted file mode 100644 index 4a5097dc9f2..00000000000 --- a/src/me/registeredDevices/item/graphDevice/graphDeviceRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Device } from '../../../../models/'; -import { createDeviceFromDiscriminatorValue } from '../../../../models/device'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDeviceRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to device. - */ -export class GraphDeviceRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphDeviceRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/{directoryObject%2Did}/graph.device{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Device - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeviceFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.device - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDeviceRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDeviceRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDeviceRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDeviceRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDeviceRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/item/graphDevice/index.ts b/src/me/registeredDevices/item/graphDevice/index.ts deleted file mode 100644 index 9e1613fdd97..00000000000 --- a/src/me/registeredDevices/item/graphDevice/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDeviceRequestBuilder' diff --git a/src/me/registeredDevices/item/graphEndpoint/graphEndpointRequestBuilder.ts b/src/me/registeredDevices/item/graphEndpoint/graphEndpointRequestBuilder.ts deleted file mode 100644 index e361c18f5ae..00000000000 --- a/src/me/registeredDevices/item/graphEndpoint/graphEndpointRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Endpoint } from '../../../../models/'; -import { createEndpointFromDiscriminatorValue } from '../../../../models/endpoint'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphEndpointRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to endpoint. - */ -export class GraphEndpointRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphEndpointRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices/{directoryObject%2Did}/graph.endpoint{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Endpoint - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createEndpointFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphEndpointRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphEndpointRequestBuilder - */ - public withUrl(rawUrl: string) : GraphEndpointRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphEndpointRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphEndpointRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/registeredDevices/item/graphEndpoint/index.ts b/src/me/registeredDevices/item/graphEndpoint/index.ts deleted file mode 100644 index ced6d90b90c..00000000000 --- a/src/me/registeredDevices/item/graphEndpoint/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphEndpointRequestBuilder' diff --git a/src/me/registeredDevices/item/index.ts b/src/me/registeredDevices/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/registeredDevices/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/registeredDevices/registeredDevicesRequestBuilder.ts b/src/me/registeredDevices/registeredDevicesRequestBuilder.ts deleted file mode 100644 index 3159275f968..00000000000 --- a/src/me/registeredDevices/registeredDevicesRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphAppRoleAssignmentRequestBuilder } from './graphAppRoleAssignment/graphAppRoleAssignmentRequestBuilder'; -import { GraphDeviceRequestBuilder } from './graphDevice/graphDeviceRequestBuilder'; -import { GraphEndpointRequestBuilder } from './graphEndpoint/graphEndpointRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface RegisteredDevicesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the registeredDevices property of the microsoft.graph.user entity. - */ -export class RegisteredDevicesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to appRoleAssignment. - */ - public get graphAppRoleAssignment(): GraphAppRoleAssignmentRequestBuilder { - return new GraphAppRoleAssignmentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to device. - */ - public get graphDevice(): GraphDeviceRequestBuilder { - return new GraphDeviceRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to endpoint. - */ - public get graphEndpoint(): GraphEndpointRequestBuilder { - return new GraphEndpointRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the registeredDevices property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new RegisteredDevicesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/registeredDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-registereddevices?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, registeredDevicesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a registeredDevicesRequestBuilder - */ - public withUrl(rawUrl: string) : RegisteredDevicesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RegisteredDevicesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const registeredDevicesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/reminderViewWithStartDateTimeWithEndDateTime/index.ts b/src/me/reminderViewWithStartDateTimeWithEndDateTime/index.ts deleted file mode 100644 index 7bf30f1e5fd..00000000000 --- a/src/me/reminderViewWithStartDateTimeWithEndDateTime/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './reminderViewWithStartDateTimeWithEndDateTimeGetResponse' -export * from './reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder' diff --git a/src/me/reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeGetResponse.ts b/src/me/reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeGetResponse.ts deleted file mode 100644 index 0822961406f..00000000000 --- a/src/me/reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeGetResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { createReminderFromDiscriminatorValue, serializeReminder, type Reminder } from '../../models/reminder'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createReminderViewWithStartDateTimeWithEndDateTimeGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoReminderViewWithStartDateTimeWithEndDateTimeGetResponse; -} -export function deserializeIntoReminderViewWithStartDateTimeWithEndDateTimeGetResponse(reminderViewWithStartDateTimeWithEndDateTimeGetResponse: ReminderViewWithStartDateTimeWithEndDateTimeGetResponse | undefined = {} as ReminderViewWithStartDateTimeWithEndDateTimeGetResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(reminderViewWithStartDateTimeWithEndDateTimeGetResponse), - "value": n => { reminderViewWithStartDateTimeWithEndDateTimeGetResponse.value = n.getCollectionOfObjectValues(createReminderFromDiscriminatorValue); }, - } -} -export interface ReminderViewWithStartDateTimeWithEndDateTimeGetResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: Reminder[]; -} -export function serializeReminderViewWithStartDateTimeWithEndDateTimeGetResponse(writer: SerializationWriter, reminderViewWithStartDateTimeWithEndDateTimeGetResponse: ReminderViewWithStartDateTimeWithEndDateTimeGetResponse | undefined = {} as ReminderViewWithStartDateTimeWithEndDateTimeGetResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, reminderViewWithStartDateTimeWithEndDateTimeGetResponse) - writer.writeCollectionOfObjectValues("value", reminderViewWithStartDateTimeWithEndDateTimeGetResponse.value, serializeReminder); -} -// tslint:enable -// eslint-enable diff --git a/src/me/reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder.ts b/src/me/reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder.ts deleted file mode 100644 index 11da8ecb210..00000000000 --- a/src/me/reminderViewWithStartDateTimeWithEndDateTime/reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder.ts +++ /dev/null @@ -1,92 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { type ReminderViewWithStartDateTimeWithEndDateTimeGetResponse } from './index'; -import { createReminderViewWithStartDateTimeWithEndDateTimeGetResponseFromDiscriminatorValue } from './reminderViewWithStartDateTimeWithEndDateTimeGetResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to call the reminderView method. - */ -export class ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder and sets the default values. - * @param EndDateTime Usage: EndDateTime='{EndDateTime}' - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - * @param StartDateTime Usage: StartDateTime='{StartDateTime}' - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter, endDateTime?: string | undefined, startDateTime?: string | undefined) { - super(pathParameters, requestAdapter, "{+baseurl}/me/reminderView(StartDateTime='{StartDateTime}',EndDateTime='{EndDateTime}'){?%24top,%24skip,%24search,%24filter,%24count}"); - this.pathParameters["EndDateTime"] = endDateTime - this.pathParameters["StartDateTime"] = startDateTime - }; - /** - * Invoke function reminderView - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ReminderViewWithStartDateTimeWithEndDateTimeGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createReminderViewWithStartDateTimeWithEndDateTimeGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function reminderView - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, reminderViewWithStartDateTimeWithEndDateTimeRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a reminderViewWithStartDateTimeWithEndDateTimeRequestBuilder - */ - public withUrl(rawUrl: string) : ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const reminderViewWithStartDateTimeWithEndDateTimeRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "search": "%24search", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/removeAllDevicesFromManagement/removeAllDevicesFromManagementRequestBuilder.ts b/src/me/removeAllDevicesFromManagement/removeAllDevicesFromManagementRequestBuilder.ts deleted file mode 100644 index 8ea8e322186..00000000000 --- a/src/me/removeAllDevicesFromManagement/removeAllDevicesFromManagementRequestBuilder.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the removeAllDevicesFromManagement method. - */ -export class RemoveAllDevicesFromManagementRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RemoveAllDevicesFromManagementRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/removeAllDevicesFromManagement"); - }; - /** - * Retire all devices from management for this user - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-devices-user-removealldevicesfrommanagement?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retire all devices from management for this user - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a removeAllDevicesFromManagementRequestBuilder - */ - public withUrl(rawUrl: string) : RemoveAllDevicesFromManagementRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RemoveAllDevicesFromManagementRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/reprocessLicenseAssignment/reprocessLicenseAssignmentRequestBuilder.ts b/src/me/reprocessLicenseAssignment/reprocessLicenseAssignmentRequestBuilder.ts deleted file mode 100644 index 107a5470c0a..00000000000 --- a/src/me/reprocessLicenseAssignment/reprocessLicenseAssignmentRequestBuilder.ts +++ /dev/null @@ -1,60 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type User } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createUserFromDiscriminatorValue } from '../../models/user'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the reprocessLicenseAssignment method. - */ -export class ReprocessLicenseAssignmentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ReprocessLicenseAssignmentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/reprocessLicenseAssignment"); - }; - /** - * Reprocess all group-based license assignments for the user. To learn more about group-based licensing, see What is group-based licensing in Microsoft Entra ID. Also see Identify and resolve license assignment problems for a group in Microsoft Entra ID for more details. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of User - * @see {@link https://learn.microsoft.com/graph/api/user-reprocesslicenseassignment?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserFromDiscriminatorValue, errorMapping); - }; - /** - * Reprocess all group-based license assignments for the user. To learn more about group-based licensing, see What is group-based licensing in Microsoft Entra ID. Also see Identify and resolve license assignment problems for a group in Microsoft Entra ID for more details. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a reprocessLicenseAssignmentRequestBuilder - */ - public withUrl(rawUrl: string) : ReprocessLicenseAssignmentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ReprocessLicenseAssignmentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/restore/restoreRequestBuilder.ts b/src/me/restore/restoreRequestBuilder.ts deleted file mode 100644 index 2ca72d270e9..00000000000 --- a/src/me/restore/restoreRequestBuilder.ts +++ /dev/null @@ -1,60 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../models/directoryObject'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the restore method. - */ -export class RestoreRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RestoreRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/restore"); - }; - /** - * Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - * @see {@link https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. However, security groups cannot be restored. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a restoreRequestBuilder - */ - public withUrl(rawUrl: string) : RestoreRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RestoreRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/retryServiceProvisioning/retryServiceProvisioningRequestBuilder.ts b/src/me/retryServiceProvisioning/retryServiceProvisioningRequestBuilder.ts deleted file mode 100644 index 6d601f6c3a4..00000000000 --- a/src/me/retryServiceProvisioning/retryServiceProvisioningRequestBuilder.ts +++ /dev/null @@ -1,56 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the retryServiceProvisioning method. - */ -export class RetryServiceProvisioningRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RetryServiceProvisioningRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/retryServiceProvisioning"); - }; - /** - * Invoke action retryServiceProvisioning - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Invoke action retryServiceProvisioning - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a retryServiceProvisioningRequestBuilder - */ - public withUrl(rawUrl: string) : RetryServiceProvisioningRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RetryServiceProvisioningRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/revokeSignInSessions/index.ts b/src/me/revokeSignInSessions/index.ts deleted file mode 100644 index de74e087aea..00000000000 --- a/src/me/revokeSignInSessions/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './revokeSignInSessionsPostResponse' -export * from './revokeSignInSessionsRequestBuilder' diff --git a/src/me/revokeSignInSessions/revokeSignInSessionsPostResponse.ts b/src/me/revokeSignInSessions/revokeSignInSessionsPostResponse.ts deleted file mode 100644 index 556172c11f9..00000000000 --- a/src/me/revokeSignInSessions/revokeSignInSessionsPostResponse.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createRevokeSignInSessionsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoRevokeSignInSessionsPostResponse; -} -export function deserializeIntoRevokeSignInSessionsPostResponse(revokeSignInSessionsPostResponse: RevokeSignInSessionsPostResponse | undefined = {} as RevokeSignInSessionsPostResponse) : Record void> { - return { - "value": n => { revokeSignInSessionsPostResponse.value = n.getBooleanValue(); }, - } -} -export interface RevokeSignInSessionsPostResponse extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The value property - */ - value?: boolean; -} -export function serializeRevokeSignInSessionsPostResponse(writer: SerializationWriter, revokeSignInSessionsPostResponse: RevokeSignInSessionsPostResponse | undefined = {} as RevokeSignInSessionsPostResponse) : void { - writer.writeBooleanValue("value", revokeSignInSessionsPostResponse.value); - writer.writeAdditionalData(revokeSignInSessionsPostResponse.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/revokeSignInSessions/revokeSignInSessionsRequestBuilder.ts b/src/me/revokeSignInSessions/revokeSignInSessionsRequestBuilder.ts deleted file mode 100644 index 4f654333837..00000000000 --- a/src/me/revokeSignInSessions/revokeSignInSessionsRequestBuilder.ts +++ /dev/null @@ -1,60 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { type RevokeSignInSessionsPostResponse } from './index'; -import { createRevokeSignInSessionsPostResponseFromDiscriminatorValue } from './revokeSignInSessionsPostResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the revokeSignInSessions method. - */ -export class RevokeSignInSessionsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new RevokeSignInSessionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/revokeSignInSessions"); - }; - /** - * Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of RevokeSignInSessionsPostResponse - * @see {@link https://learn.microsoft.com/graph/api/user-revokesigninsessions?view=graph-rest-1.0|Find more info here} - */ - public post(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createRevokeSignInSessionsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a revokeSignInSessionsRequestBuilder - */ - public withUrl(rawUrl: string) : RevokeSignInSessionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new RevokeSignInSessionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/scopedRoleMemberOf/count/countRequestBuilder.ts b/src/me/scopedRoleMemberOf/count/countRequestBuilder.ts deleted file mode 100644 index a2b125c8ede..00000000000 --- a/src/me/scopedRoleMemberOf/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/scopedRoleMemberOf/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/scopedRoleMemberOf/count/index.ts b/src/me/scopedRoleMemberOf/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/scopedRoleMemberOf/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/scopedRoleMemberOf/index.ts b/src/me/scopedRoleMemberOf/index.ts deleted file mode 100644 index 01a1776da01..00000000000 --- a/src/me/scopedRoleMemberOf/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './scopedRoleMemberOfRequestBuilder' diff --git a/src/me/scopedRoleMemberOf/item/index.ts b/src/me/scopedRoleMemberOf/item/index.ts deleted file mode 100644 index e2c8a5c03f0..00000000000 --- a/src/me/scopedRoleMemberOf/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './scopedRoleMembershipItemRequestBuilder' diff --git a/src/me/scopedRoleMemberOf/item/scopedRoleMembershipItemRequestBuilder.ts b/src/me/scopedRoleMemberOf/item/scopedRoleMembershipItemRequestBuilder.ts deleted file mode 100644 index a55ed7b0382..00000000000 --- a/src/me/scopedRoleMemberOf/item/scopedRoleMembershipItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createScopedRoleMembershipFromDiscriminatorValue, deserializeIntoScopedRoleMembership, serializeScopedRoleMembership, type ScopedRoleMembership } from '../../../models/scopedRoleMembership'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ScopedRoleMembershipItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the scopedRoleMemberOf property of the microsoft.graph.user entity. - */ -export class ScopedRoleMembershipItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ScopedRoleMembershipItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/scopedRoleMemberOf/{scopedRoleMembership%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property scopedRoleMemberOf for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get scopedRoleMemberOf from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ScopedRoleMembership - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createScopedRoleMembershipFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property scopedRoleMemberOf in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ScopedRoleMembership - */ - public patch(body: ScopedRoleMembership, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createScopedRoleMembershipFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property scopedRoleMemberOf for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get scopedRoleMemberOf from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, scopedRoleMembershipItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property scopedRoleMemberOf in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ScopedRoleMembership, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeScopedRoleMembership); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ScopedRoleMembershipItemRequestBuilder - */ - public withUrl(rawUrl: string) : ScopedRoleMembershipItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ScopedRoleMembershipItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const scopedRoleMembershipItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/scopedRoleMemberOf/scopedRoleMemberOfRequestBuilder.ts b/src/me/scopedRoleMemberOf/scopedRoleMemberOfRequestBuilder.ts deleted file mode 100644 index d678664b19f..00000000000 --- a/src/me/scopedRoleMemberOf/scopedRoleMemberOfRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ScopedRoleMembershipCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createScopedRoleMembershipFromDiscriminatorValue, deserializeIntoScopedRoleMembership, serializeScopedRoleMembership, type ScopedRoleMembership } from '../../models/scopedRoleMembership'; -import { createScopedRoleMembershipCollectionResponseFromDiscriminatorValue } from '../../models/scopedRoleMembershipCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ScopedRoleMembershipItemRequestBuilder } from './item/scopedRoleMembershipItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ScopedRoleMemberOfRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the scopedRoleMemberOf property of the microsoft.graph.user entity. - */ -export class ScopedRoleMemberOfRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the scopedRoleMemberOf property of the microsoft.graph.user entity. - * @param scopedRoleMembershipId The unique identifier of scopedRoleMembership - * @returns a ScopedRoleMembershipItemRequestBuilder - */ - public byScopedRoleMembershipId(scopedRoleMembershipId: string) : ScopedRoleMembershipItemRequestBuilder { - if(!scopedRoleMembershipId) throw new Error("scopedRoleMembershipId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["scopedRoleMembership%2Did"] = scopedRoleMembershipId - return new ScopedRoleMembershipItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ScopedRoleMemberOfRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/scopedRoleMemberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get scopedRoleMemberOf from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ScopedRoleMembershipCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createScopedRoleMembershipCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to scopedRoleMemberOf for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ScopedRoleMembership - */ - public post(body: ScopedRoleMembership, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createScopedRoleMembershipFromDiscriminatorValue, errorMapping); - }; - /** - * Get scopedRoleMemberOf from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, scopedRoleMemberOfRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to scopedRoleMemberOf for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ScopedRoleMembership, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeScopedRoleMembership); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a scopedRoleMemberOfRequestBuilder - */ - public withUrl(rawUrl: string) : ScopedRoleMemberOfRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ScopedRoleMemberOfRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const scopedRoleMemberOfRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/sendMail/index.ts b/src/me/sendMail/index.ts deleted file mode 100644 index 95737c27555..00000000000 --- a/src/me/sendMail/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './sendMailRequestBuilder' diff --git a/src/me/sendMail/sendMailRequestBuilder.ts b/src/me/sendMail/sendMailRequestBuilder.ts deleted file mode 100644 index 00d88b3a3f2..00000000000 --- a/src/me/sendMail/sendMailRequestBuilder.ts +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createMessageFromDiscriminatorValue, serializeMessage, type Message } from '../../models/message'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSendMailPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSendMailPostRequestBody; -} -export function deserializeIntoSendMailPostRequestBody(sendMailPostRequestBody: SendMailPostRequestBody | undefined = {} as SendMailPostRequestBody) : Record void> { - return { - "message": n => { sendMailPostRequestBody.message = n.getObjectValue(createMessageFromDiscriminatorValue); }, - "saveToSentItems": n => { sendMailPostRequestBody.saveToSentItems = n.getBooleanValue(); }, - } -} -export interface SendMailPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The Message property - */ - message?: Message; - /** - * The SaveToSentItems property - */ - saveToSentItems?: boolean; -} -export function serializeSendMailPostRequestBody(writer: SerializationWriter, sendMailPostRequestBody: SendMailPostRequestBody | undefined = {} as SendMailPostRequestBody) : void { - writer.writeObjectValue("Message", sendMailPostRequestBody.message, serializeMessage); - writer.writeBooleanValue("SaveToSentItems", sendMailPostRequestBody.saveToSentItems); - writer.writeAdditionalData(sendMailPostRequestBody.additionalData); -} -/** - * Provides operations to call the sendMail method. - */ -export class SendMailRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendMailRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/sendMail"); - }; - /** - * Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/user-sendmail?view=graph-rest-1.0|Find more info here} - */ - public post(body: SendMailPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SendMailPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSendMailPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendMailRequestBuilder - */ - public withUrl(rawUrl: string) : SendMailRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendMailRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/serviceProvisioningErrors/count/countRequestBuilder.ts b/src/me/serviceProvisioningErrors/count/countRequestBuilder.ts deleted file mode 100644 index 2b3a0125c1b..00000000000 --- a/src/me/serviceProvisioningErrors/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/serviceProvisioningErrors/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/serviceProvisioningErrors/count/index.ts b/src/me/serviceProvisioningErrors/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/serviceProvisioningErrors/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/serviceProvisioningErrors/index.ts b/src/me/serviceProvisioningErrors/index.ts deleted file mode 100644 index 1855ccd93ff..00000000000 --- a/src/me/serviceProvisioningErrors/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './serviceProvisioningErrorsRequestBuilder' diff --git a/src/me/serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder.ts b/src/me/serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder.ts deleted file mode 100644 index 236ed655966..00000000000 --- a/src/me/serviceProvisioningErrors/serviceProvisioningErrorsRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ServiceProvisioningErrorCollectionResponse } from '../../models/'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createServiceProvisioningErrorCollectionResponseFromDiscriminatorValue } from '../../models/serviceProvisioningErrorCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ServiceProvisioningErrorsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Builds and executes requests for operations under /me/serviceProvisioningErrors - */ -export class ServiceProvisioningErrorsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/serviceProvisioningErrors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get serviceProvisioningErrors property value - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ServiceProvisioningErrorCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createServiceProvisioningErrorCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get serviceProvisioningErrors property value - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, serviceProvisioningErrorsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a serviceProvisioningErrorsRequestBuilder - */ - public withUrl(rawUrl: string) : ServiceProvisioningErrorsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ServiceProvisioningErrorsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const serviceProvisioningErrorsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/settings/index.ts b/src/me/settings/index.ts deleted file mode 100644 index f138e680ffb..00000000000 --- a/src/me/settings/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './settingsRequestBuilder' diff --git a/src/me/settings/settingsRequestBuilder.ts b/src/me/settings/settingsRequestBuilder.ts deleted file mode 100644 index 94dc71d69b1..00000000000 --- a/src/me/settings/settingsRequestBuilder.ts +++ /dev/null @@ -1,136 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createUserSettingsFromDiscriminatorValue, deserializeIntoUserSettings, serializeUserSettings, type UserSettings } from '../../models/userSettings'; -import { ShiftPreferencesRequestBuilder } from './shiftPreferences/shiftPreferencesRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface SettingsRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the settings property of the microsoft.graph.user entity. - */ -export class SettingsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the shiftPreferences property of the microsoft.graph.userSettings entity. - */ - public get shiftPreferences(): ShiftPreferencesRequestBuilder { - return new ShiftPreferencesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new SettingsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/settings{?%24select,%24expand}"); - }; - /** - * Delete navigation property settings for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserSettings - * @see {@link https://learn.microsoft.com/graph/api/usersettings-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserSettingsFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserSettings - * @see {@link https://learn.microsoft.com/graph/api/usersettings-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: UserSettings, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserSettingsFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property settings for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, settingsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: UserSettings, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUserSettings); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a settingsRequestBuilder - */ - public withUrl(rawUrl: string) : SettingsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SettingsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const settingsRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/settings/shiftPreferences/index.ts b/src/me/settings/shiftPreferences/index.ts deleted file mode 100644 index 2a291646813..00000000000 --- a/src/me/settings/shiftPreferences/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shiftPreferencesRequestBuilder' diff --git a/src/me/settings/shiftPreferences/shiftPreferencesRequestBuilder.ts b/src/me/settings/shiftPreferences/shiftPreferencesRequestBuilder.ts deleted file mode 100644 index 6f4adefc31a..00000000000 --- a/src/me/settings/shiftPreferences/shiftPreferencesRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createShiftPreferencesFromDiscriminatorValue, deserializeIntoShiftPreferences, serializeShiftPreferences, type ShiftPreferences } from '../../../models/shiftPreferences'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ShiftPreferencesRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the shiftPreferences property of the microsoft.graph.userSettings entity. - */ -export class ShiftPreferencesRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ShiftPreferencesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/settings/shiftPreferences{?%24select,%24expand}"); - }; - /** - * Delete navigation property shiftPreferences for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the properties and relationships of a shiftPreferences object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ShiftPreferences - * @see {@link https://learn.microsoft.com/graph/api/shiftpreferences-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createShiftPreferencesFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties and relationships of a shiftPreferences object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ShiftPreferences - * @see {@link https://learn.microsoft.com/graph/api/shiftpreferences-put?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ShiftPreferences, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createShiftPreferencesFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property shiftPreferences for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the properties and relationships of a shiftPreferences object by ID. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, shiftPreferencesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties and relationships of a shiftPreferences object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ShiftPreferences, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeShiftPreferences); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a shiftPreferencesRequestBuilder - */ - public withUrl(rawUrl: string) : ShiftPreferencesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ShiftPreferencesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const shiftPreferencesRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/associatedTeams/associatedTeamsRequestBuilder.ts b/src/me/teamwork/associatedTeams/associatedTeamsRequestBuilder.ts deleted file mode 100644 index 78e8d47b2ce..00000000000 --- a/src/me/teamwork/associatedTeams/associatedTeamsRequestBuilder.ts +++ /dev/null @@ -1,154 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AssociatedTeamInfoCollectionResponse } from '../../../models/'; -import { createAssociatedTeamInfoFromDiscriminatorValue, deserializeIntoAssociatedTeamInfo, serializeAssociatedTeamInfo, type AssociatedTeamInfo } from '../../../models/associatedTeamInfo'; -import { createAssociatedTeamInfoCollectionResponseFromDiscriminatorValue } from '../../../models/associatedTeamInfoCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { AssociatedTeamInfoItemRequestBuilder } from './item/associatedTeamInfoItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AssociatedTeamsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the associatedTeams property of the microsoft.graph.userTeamwork entity. - */ -export class AssociatedTeamsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the associatedTeams property of the microsoft.graph.userTeamwork entity. - * @param associatedTeamInfoId The unique identifier of associatedTeamInfo - * @returns a AssociatedTeamInfoItemRequestBuilder - */ - public byAssociatedTeamInfoId(associatedTeamInfoId: string) : AssociatedTeamInfoItemRequestBuilder { - if(!associatedTeamInfoId) throw new Error("associatedTeamInfoId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["associatedTeamInfo%2Did"] = associatedTeamInfoId - return new AssociatedTeamInfoItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AssociatedTeamsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/associatedTeams{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AssociatedTeamInfoCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/associatedteaminfo-list?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAssociatedTeamInfoCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to associatedTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AssociatedTeamInfo - */ - public post(body: AssociatedTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAssociatedTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Get the list of teams in Microsoft Teams that a user is associated with.Currently, a user can be associated with a team in two different ways: - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, associatedTeamsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to associatedTeams for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AssociatedTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAssociatedTeamInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a associatedTeamsRequestBuilder - */ - public withUrl(rawUrl: string) : AssociatedTeamsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AssociatedTeamsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const associatedTeamsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/associatedTeams/count/countRequestBuilder.ts b/src/me/teamwork/associatedTeams/count/countRequestBuilder.ts deleted file mode 100644 index 4c69946f5ff..00000000000 --- a/src/me/teamwork/associatedTeams/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/associatedTeams/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/associatedTeams/count/index.ts b/src/me/teamwork/associatedTeams/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/teamwork/associatedTeams/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/teamwork/associatedTeams/index.ts b/src/me/teamwork/associatedTeams/index.ts deleted file mode 100644 index db775486fc3..00000000000 --- a/src/me/teamwork/associatedTeams/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './associatedTeamsRequestBuilder' diff --git a/src/me/teamwork/associatedTeams/item/associatedTeamInfoItemRequestBuilder.ts b/src/me/teamwork/associatedTeams/item/associatedTeamInfoItemRequestBuilder.ts deleted file mode 100644 index 99434552f13..00000000000 --- a/src/me/teamwork/associatedTeams/item/associatedTeamInfoItemRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAssociatedTeamInfoFromDiscriminatorValue, deserializeIntoAssociatedTeamInfo, serializeAssociatedTeamInfo, type AssociatedTeamInfo } from '../../../../models/associatedTeamInfo'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { TeamRequestBuilder } from './team/teamRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AssociatedTeamInfoItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the associatedTeams property of the microsoft.graph.userTeamwork entity. - */ -export class AssociatedTeamInfoItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the team property of the microsoft.graph.teamInfo entity. - */ - public get team(): TeamRequestBuilder { - return new TeamRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new AssociatedTeamInfoItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/associatedTeams/{associatedTeamInfo%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property associatedTeams for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The list of associatedTeamInfo objects that a user is associated with. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AssociatedTeamInfo - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAssociatedTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property associatedTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AssociatedTeamInfo - */ - public patch(body: AssociatedTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAssociatedTeamInfoFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property associatedTeams for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The list of associatedTeamInfo objects that a user is associated with. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, associatedTeamInfoItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property associatedTeams in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: AssociatedTeamInfo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAssociatedTeamInfo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AssociatedTeamInfoItemRequestBuilder - */ - public withUrl(rawUrl: string) : AssociatedTeamInfoItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AssociatedTeamInfoItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const associatedTeamInfoItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/associatedTeams/item/index.ts b/src/me/teamwork/associatedTeams/item/index.ts deleted file mode 100644 index f876c87b0bb..00000000000 --- a/src/me/teamwork/associatedTeams/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './associatedTeamInfoItemRequestBuilder' diff --git a/src/me/teamwork/associatedTeams/item/team/index.ts b/src/me/teamwork/associatedTeams/item/team/index.ts deleted file mode 100644 index 7da2dc0bf0d..00000000000 --- a/src/me/teamwork/associatedTeams/item/team/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamRequestBuilder' diff --git a/src/me/teamwork/associatedTeams/item/team/teamRequestBuilder.ts b/src/me/teamwork/associatedTeams/item/team/teamRequestBuilder.ts deleted file mode 100644 index 9dc95330c65..00000000000 --- a/src/me/teamwork/associatedTeams/item/team/teamRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Team } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamFromDiscriminatorValue } from '../../../../../models/team'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the team property of the microsoft.graph.teamInfo entity. - */ -export class TeamRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/associatedTeams/{associatedTeamInfo%2Did}/team{?%24select,%24expand}"); - }; - /** - * Get team from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Team - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamFromDiscriminatorValue, errorMapping); - }; - /** - * Get team from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamRequestBuilder - */ - public withUrl(rawUrl: string) : TeamRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/index.ts b/src/me/teamwork/index.ts deleted file mode 100644 index a33a959dcfa..00000000000 --- a/src/me/teamwork/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamworkRequestBuilder' diff --git a/src/me/teamwork/installedApps/count/countRequestBuilder.ts b/src/me/teamwork/installedApps/count/countRequestBuilder.ts deleted file mode 100644 index ad1c9459d4c..00000000000 --- a/src/me/teamwork/installedApps/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/installedApps/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/installedApps/count/index.ts b/src/me/teamwork/installedApps/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/teamwork/installedApps/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/teamwork/installedApps/index.ts b/src/me/teamwork/installedApps/index.ts deleted file mode 100644 index 230c18a7fbe..00000000000 --- a/src/me/teamwork/installedApps/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './installedAppsRequestBuilder' diff --git a/src/me/teamwork/installedApps/installedAppsRequestBuilder.ts b/src/me/teamwork/installedApps/installedAppsRequestBuilder.ts deleted file mode 100644 index 6b0d6adc297..00000000000 --- a/src/me/teamwork/installedApps/installedAppsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type UserScopeTeamsAppInstallationCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createUserScopeTeamsAppInstallationFromDiscriminatorValue, deserializeIntoUserScopeTeamsAppInstallation, serializeUserScopeTeamsAppInstallation, type UserScopeTeamsAppInstallation } from '../../../models/userScopeTeamsAppInstallation'; -import { createUserScopeTeamsAppInstallationCollectionResponseFromDiscriminatorValue } from '../../../models/userScopeTeamsAppInstallationCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { UserScopeTeamsAppInstallationItemRequestBuilder } from './item/userScopeTeamsAppInstallationItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface InstalledAppsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the installedApps property of the microsoft.graph.userTeamwork entity. - */ -export class InstalledAppsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the installedApps property of the microsoft.graph.userTeamwork entity. - * @param userScopeTeamsAppInstallationId The unique identifier of userScopeTeamsAppInstallation - * @returns a UserScopeTeamsAppInstallationItemRequestBuilder - */ - public byUserScopeTeamsAppInstallationId(userScopeTeamsAppInstallationId: string) : UserScopeTeamsAppInstallationItemRequestBuilder { - if(!userScopeTeamsAppInstallationId) throw new Error("userScopeTeamsAppInstallationId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["userScopeTeamsAppInstallation%2Did"] = userScopeTeamsAppInstallationId - return new UserScopeTeamsAppInstallationItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new InstalledAppsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/installedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Retrieve the list of apps installed in the personal scope of the specified user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserScopeTeamsAppInstallationCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/userteamwork-list-installedapps?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserScopeTeamsAppInstallationCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Install an app in the personal scope of the specified user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserScopeTeamsAppInstallation - * @see {@link https://learn.microsoft.com/graph/api/userteamwork-post-installedapps?view=graph-rest-1.0|Find more info here} - */ - public post(body: UserScopeTeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserScopeTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the list of apps installed in the personal scope of the specified user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, installedAppsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Install an app in the personal scope of the specified user. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: UserScopeTeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUserScopeTeamsAppInstallation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a installedAppsRequestBuilder - */ - public withUrl(rawUrl: string) : InstalledAppsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new InstalledAppsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const installedAppsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/installedApps/item/chat/chatRequestBuilder.ts b/src/me/teamwork/installedApps/item/chat/chatRequestBuilder.ts deleted file mode 100644 index d5b063189ca..00000000000 --- a/src/me/teamwork/installedApps/item/chat/chatRequestBuilder.ts +++ /dev/null @@ -1,74 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Chat } from '../../../../../models/'; -import { createChatFromDiscriminatorValue } from '../../../../../models/chat'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChatRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the chat property of the microsoft.graph.userScopeTeamsAppInstallation entity. - */ -export class ChatRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ChatRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/chat{?%24select,%24expand}"); - }; - /** - * Retrieve the chat of the specified user and Teams app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Chat - * @see {@link https://learn.microsoft.com/graph/api/userscopeteamsappinstallation-get-chat?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChatFromDiscriminatorValue, errorMapping); - }; - /** - * Retrieve the chat of the specified user and Teams app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, chatRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a chatRequestBuilder - */ - public withUrl(rawUrl: string) : ChatRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChatRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const chatRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/installedApps/item/chat/index.ts b/src/me/teamwork/installedApps/item/chat/index.ts deleted file mode 100644 index e28e5fb4e50..00000000000 --- a/src/me/teamwork/installedApps/item/chat/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chatRequestBuilder' diff --git a/src/me/teamwork/installedApps/item/index.ts b/src/me/teamwork/installedApps/item/index.ts deleted file mode 100644 index 3a0915fb977..00000000000 --- a/src/me/teamwork/installedApps/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './userScopeTeamsAppInstallationItemRequestBuilder' diff --git a/src/me/teamwork/installedApps/item/teamsApp/index.ts b/src/me/teamwork/installedApps/item/teamsApp/index.ts deleted file mode 100644 index 0e775e3b0c3..00000000000 --- a/src/me/teamwork/installedApps/item/teamsApp/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppRequestBuilder' diff --git a/src/me/teamwork/installedApps/item/teamsApp/teamsAppRequestBuilder.ts b/src/me/teamwork/installedApps/item/teamsApp/teamsAppRequestBuilder.ts deleted file mode 100644 index 5130a8ffaa8..00000000000 --- a/src/me/teamwork/installedApps/item/teamsApp/teamsAppRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsApp } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppFromDiscriminatorValue } from '../../../../../models/teamsApp'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. - */ -export class TeamsAppRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}"); - }; - /** - * The app that is installed. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsApp - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppFromDiscriminatorValue, errorMapping); - }; - /** - * The app that is installed. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/installedApps/item/teamsAppDefinition/index.ts b/src/me/teamwork/installedApps/item/teamsAppDefinition/index.ts deleted file mode 100644 index e9981aa7a58..00000000000 --- a/src/me/teamwork/installedApps/item/teamsAppDefinition/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './teamsAppDefinitionRequestBuilder' diff --git a/src/me/teamwork/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts b/src/me/teamwork/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts deleted file mode 100644 index 2c431683ef8..00000000000 --- a/src/me/teamwork/installedApps/item/teamsAppDefinition/teamsAppDefinitionRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TeamsAppDefinition } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTeamsAppDefinitionFromDiscriminatorValue } from '../../../../../models/teamsAppDefinition'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamsAppDefinitionRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. - */ -export class TeamsAppDefinitionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TeamsAppDefinitionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}"); - }; - /** - * The details of this version of the app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TeamsAppDefinition - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTeamsAppDefinitionFromDiscriminatorValue, errorMapping); - }; - /** - * The details of this version of the app. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamsAppDefinitionRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamsAppDefinitionRequestBuilder - */ - public withUrl(rawUrl: string) : TeamsAppDefinitionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamsAppDefinitionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamsAppDefinitionRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/installedApps/item/userScopeTeamsAppInstallationItemRequestBuilder.ts b/src/me/teamwork/installedApps/item/userScopeTeamsAppInstallationItemRequestBuilder.ts deleted file mode 100644 index 95086bc6e2a..00000000000 --- a/src/me/teamwork/installedApps/item/userScopeTeamsAppInstallationItemRequestBuilder.ts +++ /dev/null @@ -1,150 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createUserScopeTeamsAppInstallationFromDiscriminatorValue, deserializeIntoUserScopeTeamsAppInstallation, serializeUserScopeTeamsAppInstallation, type UserScopeTeamsAppInstallation } from '../../../../models/userScopeTeamsAppInstallation'; -import { ChatRequestBuilder } from './chat/chatRequestBuilder'; -import { TeamsAppRequestBuilder } from './teamsApp/teamsAppRequestBuilder'; -import { TeamsAppDefinitionRequestBuilder } from './teamsAppDefinition/teamsAppDefinitionRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface UserScopeTeamsAppInstallationItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the installedApps property of the microsoft.graph.userTeamwork entity. - */ -export class UserScopeTeamsAppInstallationItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the chat property of the microsoft.graph.userScopeTeamsAppInstallation entity. - */ - public get chat(): ChatRequestBuilder { - return new ChatRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the teamsApp property of the microsoft.graph.teamsAppInstallation entity. - */ - public get teamsApp(): TeamsAppRequestBuilder { - return new TeamsAppRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the teamsAppDefinition property of the microsoft.graph.teamsAppInstallation entity. - */ - public get teamsAppDefinition(): TeamsAppDefinitionRequestBuilder { - return new TeamsAppDefinitionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new UserScopeTeamsAppInstallationItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/installedApps/{userScopeTeamsAppInstallation%2Did}{?%24select,%24expand}"); - }; - /** - * Uninstall an app from the personal scope of the specified user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/userteamwork-delete-installedapps?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Retrieve the app installed in the personal scope of the specified user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserScopeTeamsAppInstallation - * @see {@link https://learn.microsoft.com/graph/api/userteamwork-get-installedapps?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserScopeTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property installedApps in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserScopeTeamsAppInstallation - */ - public patch(body: UserScopeTeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserScopeTeamsAppInstallationFromDiscriminatorValue, errorMapping); - }; - /** - * Uninstall an app from the personal scope of the specified user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Retrieve the app installed in the personal scope of the specified user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, userScopeTeamsAppInstallationItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property installedApps in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: UserScopeTeamsAppInstallation, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUserScopeTeamsAppInstallation); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a UserScopeTeamsAppInstallationItemRequestBuilder - */ - public withUrl(rawUrl: string) : UserScopeTeamsAppInstallationItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new UserScopeTeamsAppInstallationItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const userScopeTeamsAppInstallationItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/sendActivityNotification/index.ts b/src/me/teamwork/sendActivityNotification/index.ts deleted file mode 100644 index bfd7d6ecfe6..00000000000 --- a/src/me/teamwork/sendActivityNotification/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './sendActivityNotificationPostRequestBody' -export * from './sendActivityNotificationRequestBuilder' diff --git a/src/me/teamwork/sendActivityNotification/sendActivityNotificationPostRequestBody.ts b/src/me/teamwork/sendActivityNotification/sendActivityNotificationPostRequestBody.ts deleted file mode 100644 index 26774a19b1b..00000000000 --- a/src/me/teamwork/sendActivityNotification/sendActivityNotificationPostRequestBody.ts +++ /dev/null @@ -1,57 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createItemBodyFromDiscriminatorValue, serializeItemBody, type ItemBody } from '../../../models/itemBody'; -import { createKeyValuePairFromDiscriminatorValue, serializeKeyValuePair, type KeyValuePair } from '../../../models/keyValuePair'; -import { createTeamworkActivityTopicFromDiscriminatorValue, serializeTeamworkActivityTopic, type TeamworkActivityTopic } from '../../../models/teamworkActivityTopic'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createSendActivityNotificationPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoSendActivityNotificationPostRequestBody; -} -export function deserializeIntoSendActivityNotificationPostRequestBody(sendActivityNotificationPostRequestBody: SendActivityNotificationPostRequestBody | undefined = {} as SendActivityNotificationPostRequestBody) : Record void> { - return { - "activityType": n => { sendActivityNotificationPostRequestBody.activityType = n.getStringValue(); }, - "chainId": n => { sendActivityNotificationPostRequestBody.chainId = n.getNumberValue(); }, - "previewText": n => { sendActivityNotificationPostRequestBody.previewText = n.getObjectValue(createItemBodyFromDiscriminatorValue); }, - "templateParameters": n => { sendActivityNotificationPostRequestBody.templateParameters = n.getCollectionOfObjectValues(createKeyValuePairFromDiscriminatorValue); }, - "topic": n => { sendActivityNotificationPostRequestBody.topic = n.getObjectValue(createTeamworkActivityTopicFromDiscriminatorValue); }, - } -} -export interface SendActivityNotificationPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * The activityType property - */ - activityType?: string; - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The chainId property - */ - chainId?: number; - /** - * The previewText property - */ - previewText?: ItemBody; - /** - * The templateParameters property - */ - templateParameters?: KeyValuePair[]; - /** - * The topic property - */ - topic?: TeamworkActivityTopic; -} -export function serializeSendActivityNotificationPostRequestBody(writer: SerializationWriter, sendActivityNotificationPostRequestBody: SendActivityNotificationPostRequestBody | undefined = {} as SendActivityNotificationPostRequestBody) : void { - writer.writeStringValue("activityType", sendActivityNotificationPostRequestBody.activityType); - writer.writeNumberValue("chainId", sendActivityNotificationPostRequestBody.chainId); - writer.writeObjectValue("previewText", sendActivityNotificationPostRequestBody.previewText, serializeItemBody); - writer.writeCollectionOfObjectValues("templateParameters", sendActivityNotificationPostRequestBody.templateParameters, serializeKeyValuePair); - writer.writeObjectValue("topic", sendActivityNotificationPostRequestBody.topic, serializeTeamworkActivityTopic); - writer.writeAdditionalData(sendActivityNotificationPostRequestBody.additionalData); -} -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/sendActivityNotification/sendActivityNotificationRequestBuilder.ts b/src/me/teamwork/sendActivityNotification/sendActivityNotificationRequestBuilder.ts deleted file mode 100644 index 2bee18d0c40..00000000000 --- a/src/me/teamwork/sendActivityNotification/sendActivityNotificationRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { deserializeIntoSendActivityNotificationPostRequestBody, serializeSendActivityNotificationPostRequestBody, type SendActivityNotificationPostRequestBody } from './sendActivityNotificationPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the sendActivityNotification method. - */ -export class SendActivityNotificationRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new SendActivityNotificationRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork/sendActivityNotification"); - }; - /** - * Send an activity feed notification to a user. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/userteamwork-sendactivitynotification?view=graph-rest-1.0|Find more info here} - */ - public post(body: SendActivityNotificationPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Send an activity feed notification to a user. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: SendActivityNotificationPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeSendActivityNotificationPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a sendActivityNotificationRequestBuilder - */ - public withUrl(rawUrl: string) : SendActivityNotificationRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new SendActivityNotificationRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/teamwork/teamworkRequestBuilder.ts b/src/me/teamwork/teamworkRequestBuilder.ts deleted file mode 100644 index da0bf71b4e9..00000000000 --- a/src/me/teamwork/teamworkRequestBuilder.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createUserTeamworkFromDiscriminatorValue, deserializeIntoUserTeamwork, serializeUserTeamwork, type UserTeamwork } from '../../models/userTeamwork'; -import { AssociatedTeamsRequestBuilder } from './associatedTeams/associatedTeamsRequestBuilder'; -import { InstalledAppsRequestBuilder } from './installedApps/installedAppsRequestBuilder'; -import { SendActivityNotificationRequestBuilder } from './sendActivityNotification/sendActivityNotificationRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TeamworkRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the teamwork property of the microsoft.graph.user entity. - */ -export class TeamworkRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the associatedTeams property of the microsoft.graph.userTeamwork entity. - */ - public get associatedTeams(): AssociatedTeamsRequestBuilder { - return new AssociatedTeamsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the installedApps property of the microsoft.graph.userTeamwork entity. - */ - public get installedApps(): InstalledAppsRequestBuilder { - return new InstalledAppsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the sendActivityNotification method. - */ - public get sendActivityNotification(): SendActivityNotificationRequestBuilder { - return new SendActivityNotificationRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TeamworkRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/teamwork{?%24select,%24expand}"); - }; - /** - * Delete navigation property teamwork for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * A container for Microsoft Teams features available for the user. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserTeamwork - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserTeamworkFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property teamwork in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UserTeamwork - */ - public patch(body: UserTeamwork, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUserTeamworkFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property teamwork for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * A container for Microsoft Teams features available for the user. Read-only. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, teamworkRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property teamwork in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: UserTeamwork, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeUserTeamwork); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a teamworkRequestBuilder - */ - public withUrl(rawUrl: string) : TeamworkRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TeamworkRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const teamworkRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/index.ts b/src/me/todo/index.ts deleted file mode 100644 index 74a651b304b..00000000000 --- a/src/me/todo/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './todoRequestBuilder' diff --git a/src/me/todo/lists/count/countRequestBuilder.ts b/src/me/todo/lists/count/countRequestBuilder.ts deleted file mode 100644 index c47d78b1efd..00000000000 --- a/src/me/todo/lists/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/count/index.ts b/src/me/todo/lists/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/delta/deltaRequestBuilder.ts b/src/me/todo/lists/delta/deltaRequestBuilder.ts deleted file mode 100644 index b9dd49a5a7f..00000000000 --- a/src/me/todo/lists/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../models/baseDeltaFunctionResponse'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTodoTaskListFromDiscriminatorValue, serializeTodoTaskList, type TodoTaskList } from '../../../../models/todoTaskList'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: TodoTaskList[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createTodoTaskListFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeTodoTaskList); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/delta/index.ts b/src/me/todo/lists/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/todo/lists/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/todo/lists/index.ts b/src/me/todo/lists/index.ts deleted file mode 100644 index caa54d75fd1..00000000000 --- a/src/me/todo/lists/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './listsRequestBuilder' diff --git a/src/me/todo/lists/item/extensions/count/countRequestBuilder.ts b/src/me/todo/lists/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index d9e1da25820..00000000000 --- a/src/me/todo/lists/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/extensions/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/extensions/count/index.ts b/src/me/todo/lists/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/extensions/extensionsRequestBuilder.ts b/src/me/todo/lists/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 815b61f3a52..00000000000 --- a/src/me/todo/lists/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.todoTaskList entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.todoTaskList entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of open extensions defined for the task list. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of open extensions defined for the task list. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/extensions/index.ts b/src/me/todo/lists/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/todo/lists/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/todo/lists/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/todo/lists/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 3cbed4b7f8a..00000000000 --- a/src/me/todo/lists/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../models/extension'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.todoTaskList entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of open extensions defined for the task list. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of open extensions defined for the task list. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/extensions/item/index.ts b/src/me/todo/lists/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/todo/lists/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/todo/lists/item/index.ts b/src/me/todo/lists/item/index.ts deleted file mode 100644 index 096d921064e..00000000000 --- a/src/me/todo/lists/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './todoTaskListItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/count/countRequestBuilder.ts b/src/me/todo/lists/item/tasks/count/countRequestBuilder.ts deleted file mode 100644 index 8e8cdd46431..00000000000 --- a/src/me/todo/lists/item/tasks/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/count/index.ts b/src/me/todo/lists/item/tasks/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/tasks/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/delta/deltaRequestBuilder.ts b/src/me/todo/lists/item/tasks/delta/deltaRequestBuilder.ts deleted file mode 100644 index 5481ba6adfa..00000000000 --- a/src/me/todo/lists/item/tasks/delta/deltaRequestBuilder.ts +++ /dev/null @@ -1,118 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseDeltaFunctionResponse, serializeBaseDeltaFunctionResponse, type BaseDeltaFunctionResponse } from '../../../../../../models/baseDeltaFunctionResponse'; -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTodoTaskFromDiscriminatorValue, serializeTodoTask, type TodoTask } from '../../../../../../models/todoTask'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createDeltaGetResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoDeltaGetResponse; -} -export interface DeltaGetResponse extends BaseDeltaFunctionResponse, Parsable { - /** - * The value property - */ - value?: TodoTask[]; -} -export interface DeltaRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * 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; -} -export function deserializeIntoDeltaGetResponse(deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : Record void> { - return { - ...deserializeIntoBaseDeltaFunctionResponse(deltaGetResponse), - "value": n => { deltaGetResponse.value = n.getCollectionOfObjectValues(createTodoTaskFromDiscriminatorValue); }, - } -} -export function serializeDeltaGetResponse(writer: SerializationWriter, deltaGetResponse: DeltaGetResponse | undefined = {} as DeltaGetResponse) : void { - serializeBaseDeltaFunctionResponse(writer, deltaGetResponse) - writer.writeCollectionOfObjectValues("value", deltaGetResponse.value, serializeTodoTask); -} -/** - * Provides operations to call the delta method. - */ -export class DeltaRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new DeltaRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}"); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DeltaGetResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDeltaGetResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Invoke function delta - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, deltaRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a deltaRequestBuilder - */ - public withUrl(rawUrl: string) : DeltaRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DeltaRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const deltaRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/delta/index.ts b/src/me/todo/lists/item/tasks/delta/index.ts deleted file mode 100644 index a71516d240f..00000000000 --- a/src/me/todo/lists/item/tasks/delta/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './deltaRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/index.ts b/src/me/todo/lists/item/tasks/index.ts deleted file mode 100644 index fc7e48e482b..00000000000 --- a/src/me/todo/lists/item/tasks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './tasksRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/attachmentSessionsRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/attachmentSessionsRequestBuilder.ts deleted file mode 100644 index 8e6577b3d23..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/attachmentSessionsRequestBuilder.ts +++ /dev/null @@ -1,112 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentSessionCollectionResponse } from '../../../../../../../models/'; -import { createAttachmentSessionCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/attachmentSessionCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { AttachmentSessionItemRequestBuilder } from './item/attachmentSessionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentSessionsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachmentSessions property of the microsoft.graph.todoTask entity. - */ -export class AttachmentSessionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachmentSessions property of the microsoft.graph.todoTask entity. - * @param attachmentSessionId The unique identifier of attachmentSession - * @returns a AttachmentSessionItemRequestBuilder - */ - public byAttachmentSessionId(attachmentSessionId: string) : AttachmentSessionItemRequestBuilder { - if(!attachmentSessionId) throw new Error("attachmentSessionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachmentSession%2Did"] = attachmentSessionId - return new AttachmentSessionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentSessionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get attachmentSessions from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentSessionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentSessionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get attachmentSessions from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentSessionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentSessionsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentSessionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentSessionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentSessionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/count/countRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/count/countRequestBuilder.ts deleted file mode 100644 index 1ee314a3a83..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/count/index.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/index.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/index.ts deleted file mode 100644 index 34e77262f8d..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentSessionsRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/item/attachmentSessionItemRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/item/attachmentSessionItemRequestBuilder.ts deleted file mode 100644 index 6b353f4c121..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/item/attachmentSessionItemRequestBuilder.ts +++ /dev/null @@ -1,129 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentSessionFromDiscriminatorValue, deserializeIntoAttachmentSession, serializeAttachmentSession, type AttachmentSession } from '../../../../../../../../models/attachmentSession'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './content/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentSessionItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachmentSessions property of the microsoft.graph.todoTask entity. - */ -export class AttachmentSessionItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new AttachmentSessionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}{?%24select}"); - }; - /** - * Delete navigation property attachmentSessions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Get attachmentSessions from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentSession - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property attachmentSessions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentSession - */ - public patch(body: AttachmentSession, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property attachmentSessions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Get attachmentSessions from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentSessionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property attachmentSessions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: AttachmentSession, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachmentSession); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentSessionItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentSessionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentSessionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentSessionItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/item/content/contentRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/item/content/contentRequestBuilder.ts deleted file mode 100644 index eeae534dba3..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/item/content/contentRequestBuilder.ts +++ /dev/null @@ -1,89 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentSession } from '../../../../../../../../../models/'; -import { createAttachmentSessionFromDiscriminatorValue } from '../../../../../../../../../models/attachmentSession'; -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}/content"); - }; - /** - * The content streams that are uploaded. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * The content streams that are uploaded. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentSession - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentSessionFromDiscriminatorValue, errorMapping); - }; - /** - * The content streams that are uploaded. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * The content streams that are uploaded. - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a contentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachmentSessions/item/index.ts b/src/me/todo/lists/item/tasks/item/attachmentSessions/item/index.ts deleted file mode 100644 index 183f9fc67d6..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachmentSessions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentSessionItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachments/attachmentsRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachments/attachmentsRequestBuilder.ts deleted file mode 100644 index 0bda36ed6b0..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/attachmentsRequestBuilder.ts +++ /dev/null @@ -1,152 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentBaseCollectionResponse } from '../../../../../../../models/'; -import { createAttachmentBaseFromDiscriminatorValue, deserializeIntoAttachmentBase, serializeAttachmentBase, type AttachmentBase } from '../../../../../../../models/attachmentBase'; -import { createAttachmentBaseCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/attachmentBaseCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { CreateUploadSessionRequestBuilder } from './createUploadSession/createUploadSessionRequestBuilder'; -import { AttachmentBaseItemRequestBuilder } from './item/attachmentBaseItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentsRequestBuilderGetQueryParameters { - /** - * Include count of items - */ - count?: boolean; - /** - * Filter items by property values - */ - filter?: string; - /** - * Order items by property values - */ - orderby?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; - /** - * Skip the first n items - */ - skip?: number; - /** - * Show only the first n items - */ - top?: number; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.todoTask entity. - */ -export class AttachmentsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the createUploadSession method. - */ - public get createUploadSession(): CreateUploadSessionRequestBuilder { - return new CreateUploadSessionRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachments property of the microsoft.graph.todoTask entity. - * @param attachmentBaseId The unique identifier of attachmentBase - * @returns a AttachmentBaseItemRequestBuilder - */ - public byAttachmentBaseId(attachmentBaseId: string) : AttachmentBaseItemRequestBuilder { - if(!attachmentBaseId) throw new Error("attachmentBaseId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["attachmentBase%2Did"] = attachmentBaseId - return new AttachmentBaseItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new AttachmentsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"); - }; - /** - * Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentBaseCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/todotask-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentBaseCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentBase - * @see {@link https://learn.microsoft.com/graph/api/todotask-post-attachments?view=graph-rest-1.0|Find more info here} - */ - public post(body: AttachmentBase, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentBaseFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: AttachmentBase, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAttachmentBase); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a attachmentsRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "filter": "%24filter", - "orderby": "%24orderby", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachments/count/countRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachments/count/countRequestBuilder.ts deleted file mode 100644 index 3bed78f6c20..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/count/countRequestBuilder.ts +++ /dev/null @@ -1,66 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/$count{?%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachments/count/index.ts b/src/me/todo/lists/item/tasks/item/attachments/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts deleted file mode 100644 index f7141a76c64..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/createUploadSession/createUploadSessionRequestBuilder.ts +++ /dev/null @@ -1,87 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createAttachmentInfoFromDiscriminatorValue, serializeAttachmentInfo, type AttachmentInfo } from '../../../../../../../../models/attachmentInfo'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { createUploadSessionFromDiscriminatorValue, deserializeIntoUploadSession, serializeUploadSession, type UploadSession } from '../../../../../../../../models/uploadSession'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type AdditionalDataHolder, type Parsable, type ParsableFactory, type ParseNode, type RequestAdapter, type RequestConfiguration, type RequestOption, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createCreateUploadSessionPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoCreateUploadSessionPostRequestBody; -} -export interface CreateUploadSessionPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The attachmentInfo property - */ - attachmentInfo?: AttachmentInfo; -} -export function deserializeIntoCreateUploadSessionPostRequestBody(createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : Record void> { - return { - "attachmentInfo": n => { createUploadSessionPostRequestBody.attachmentInfo = n.getObjectValue(createAttachmentInfoFromDiscriminatorValue); }, - } -} -export function serializeCreateUploadSessionPostRequestBody(writer: SerializationWriter, createUploadSessionPostRequestBody: CreateUploadSessionPostRequestBody | undefined = {} as CreateUploadSessionPostRequestBody) : void { - writer.writeObjectValue("attachmentInfo", createUploadSessionPostRequestBody.attachmentInfo, serializeAttachmentInfo); - writer.writeAdditionalData(createUploadSessionPostRequestBody.additionalData); -} -/** - * Provides operations to call the createUploadSession method. - */ -export class CreateUploadSessionRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/createUploadSession"); - }; - /** - * Create an upload session to iteratively upload ranges of a file as an attachment to a todoTask. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. The request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows the transfer to be resumed, in case the network connection is dropped during the upload. The following are the steps to attach a file to a Microsoft To Do task using an upload session: For an example that describes the end-to-end attachment process, see attach files to a To Do task. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of UploadSession - * @see {@link https://learn.microsoft.com/graph/api/taskfileattachment-createuploadsession?view=graph-rest-1.0|Find more info here} - */ - public post(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createUploadSessionFromDiscriminatorValue, errorMapping); - }; - /** - * Create an upload session to iteratively upload ranges of a file as an attachment to a todoTask. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. The request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows the transfer to be resumed, in case the network connection is dropped during the upload. The following are the steps to attach a file to a Microsoft To Do task using an upload session: For an example that describes the end-to-end attachment process, see attach files to a To Do task. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: CreateUploadSessionPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeCreateUploadSessionPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a createUploadSessionRequestBuilder - */ - public withUrl(rawUrl: string) : CreateUploadSessionRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CreateUploadSessionRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachments/createUploadSession/index.ts b/src/me/todo/lists/item/tasks/item/attachments/createUploadSession/index.ts deleted file mode 100644 index e427d169074..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/createUploadSession/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './createUploadSessionRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachments/index.ts b/src/me/todo/lists/item/tasks/item/attachments/index.ts deleted file mode 100644 index 6cc033f08b1..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentsRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachments/item/attachmentBaseItemRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachments/item/attachmentBaseItemRequestBuilder.ts deleted file mode 100644 index 8ce8d44dc4e..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/item/attachmentBaseItemRequestBuilder.ts +++ /dev/null @@ -1,102 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AttachmentBase } from '../../../../../../../../models/'; -import { createAttachmentBaseFromDiscriminatorValue } from '../../../../../../../../models/attachmentBase'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { ContentRequestBuilder } from './value/contentRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface AttachmentBaseItemRequestBuilderGetQueryParameters { - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the attachments property of the microsoft.graph.todoTask entity. - */ -export class AttachmentBaseItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the media for the user entity. - */ - public get content(): ContentRequestBuilder { - return new ContentRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new AttachmentBaseItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}{?%24select}"); - }; - /** - * Delete a taskFileAttachment object from a todoTask resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/taskfileattachment-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a taskFileAttachment object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AttachmentBase - * @see {@link https://learn.microsoft.com/graph/api/taskfileattachment-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAttachmentBaseFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a taskFileAttachment object from a todoTask resource. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a taskFileAttachment object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, attachmentBaseItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a AttachmentBaseItemRequestBuilder - */ - public withUrl(rawUrl: string) : AttachmentBaseItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new AttachmentBaseItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const attachmentBaseItemRequestBuilderGetQueryParametersMapper: Record = { - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/attachments/item/index.ts b/src/me/todo/lists/item/tasks/item/attachments/item/index.ts deleted file mode 100644 index 0deef9c5c30..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './attachmentBaseItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/attachments/item/value/contentRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/attachments/item/value/contentRequestBuilder.ts deleted file mode 100644 index 1785fb4aaed..00000000000 --- a/src/me/todo/lists/item/tasks/item/attachments/item/value/contentRequestBuilder.ts +++ /dev/null @@ -1,88 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to manage the media for the user entity. - */ -export class ContentRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ContentRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}/$value"); - }; - /** - * Get media content for the navigation property attachments from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - * @see {@link https://learn.microsoft.com/graph/api/todotask-list-attachments?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Update media content for the navigation property attachments in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ArrayBuffer - */ - public put(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPutRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "ArrayBuffer", errorMapping); - }; - /** - * Get media content for the navigation property attachments from me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/octet-stream, application/json"); - return requestInfo; - }; - /** - * Update media content for the navigation property attachments in me - * @param body Binary request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPutRequestInformation(body: ArrayBuffer | undefined, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PUT, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setStreamContent(body, "application/octet-stream"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ContentRequestBuilder - */ - public withUrl(rawUrl: string) : ContentRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ContentRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/checklistItems/checklistItemsRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/checklistItems/checklistItemsRequestBuilder.ts deleted file mode 100644 index f80f9187a2f..00000000000 --- a/src/me/todo/lists/item/tasks/item/checklistItems/checklistItemsRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ChecklistItemCollectionResponse } from '../../../../../../../models/'; -import { createChecklistItemFromDiscriminatorValue, deserializeIntoChecklistItem, serializeChecklistItem, type ChecklistItem } from '../../../../../../../models/checklistItem'; -import { createChecklistItemCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/checklistItemCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ChecklistItemItemRequestBuilder } from './item/checklistItemItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChecklistItemsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the checklistItems property of the microsoft.graph.todoTask entity. - */ -export class ChecklistItemsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the checklistItems property of the microsoft.graph.todoTask entity. - * @param checklistItemId The unique identifier of checklistItem - * @returns a ChecklistItemItemRequestBuilder - */ - public byChecklistItemId(checklistItemId: string) : ChecklistItemItemRequestBuilder { - if(!checklistItemId) throw new Error("checklistItemId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["checklistItem%2Did"] = checklistItemId - return new ChecklistItemItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ChecklistItemsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChecklistItemCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/todotask-list-checklistitems?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChecklistItemCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new checklistItem object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChecklistItem - * @see {@link https://learn.microsoft.com/graph/api/todotask-post-checklistitems?view=graph-rest-1.0|Find more info here} - */ - public post(body: ChecklistItem, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChecklistItemFromDiscriminatorValue, errorMapping); - }; - /** - * Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, checklistItemsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new checklistItem object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: ChecklistItem, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChecklistItem); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a checklistItemsRequestBuilder - */ - public withUrl(rawUrl: string) : ChecklistItemsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChecklistItemsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const checklistItemsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/checklistItems/count/countRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/checklistItems/count/countRequestBuilder.ts deleted file mode 100644 index 564df76b3eb..00000000000 --- a/src/me/todo/lists/item/tasks/item/checklistItems/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/checklistItems/count/index.ts b/src/me/todo/lists/item/tasks/item/checklistItems/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/tasks/item/checklistItems/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/checklistItems/index.ts b/src/me/todo/lists/item/tasks/item/checklistItems/index.ts deleted file mode 100644 index 3cfc53d24c0..00000000000 --- a/src/me/todo/lists/item/tasks/item/checklistItems/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './checklistItemsRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/checklistItems/item/checklistItemItemRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/checklistItems/item/checklistItemItemRequestBuilder.ts deleted file mode 100644 index dff4529bd32..00000000000 --- a/src/me/todo/lists/item/tasks/item/checklistItems/item/checklistItemItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createChecklistItemFromDiscriminatorValue, deserializeIntoChecklistItem, serializeChecklistItem, type ChecklistItem } from '../../../../../../../../models/checklistItem'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ChecklistItemItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the checklistItems property of the microsoft.graph.todoTask entity. - */ -export class ChecklistItemItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ChecklistItemItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/{checklistItem%2Did}{?%24select,%24expand}"); - }; - /** - * Delete a checklistItem object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/checklistitem-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a checklistItem object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChecklistItem - * @see {@link https://learn.microsoft.com/graph/api/checklistitem-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChecklistItemFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a checklistItem object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ChecklistItem - * @see {@link https://learn.microsoft.com/graph/api/checklistitem-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: ChecklistItem, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createChecklistItemFromDiscriminatorValue, errorMapping); - }; - /** - * Delete a checklistItem object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a checklistItem object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, checklistItemItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a checklistItem object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: ChecklistItem, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeChecklistItem); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ChecklistItemItemRequestBuilder - */ - public withUrl(rawUrl: string) : ChecklistItemItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ChecklistItemItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const checklistItemItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/checklistItems/item/index.ts b/src/me/todo/lists/item/tasks/item/checklistItems/item/index.ts deleted file mode 100644 index d6bd73eb468..00000000000 --- a/src/me/todo/lists/item/tasks/item/checklistItems/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './checklistItemItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/extensions/count/countRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/extensions/count/countRequestBuilder.ts deleted file mode 100644 index 8f36c998b61..00000000000 --- a/src/me/todo/lists/item/tasks/item/extensions/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/extensions/count/index.ts b/src/me/todo/lists/item/tasks/item/extensions/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/tasks/item/extensions/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/extensions/extensionsRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/extensions/extensionsRequestBuilder.ts deleted file mode 100644 index 96b8645b17d..00000000000 --- a/src/me/todo/lists/item/tasks/item/extensions/extensionsRequestBuilder.ts +++ /dev/null @@ -1,153 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ExtensionCollectionResponse } from '../../../../../../../models/'; -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../models/extension'; -import { createExtensionCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/extensionCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { ExtensionItemRequestBuilder } from './item/extensionItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.todoTask entity. - */ -export class ExtensionsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.todoTask entity. - * @param extensionId The unique identifier of extension - * @returns a ExtensionItemRequestBuilder - */ - public byExtensionId(extensionId: string) : ExtensionItemRequestBuilder { - if(!extensionId) throw new Error("extensionId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["extension%2Did"] = extensionId - return new ExtensionItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ExtensionsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The collection of open extensions defined for the task. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of ExtensionCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public post(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * The collection of open extensions defined for the task. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create new navigation property to extensions for me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a extensionsRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/extensions/index.ts b/src/me/todo/lists/item/tasks/item/extensions/index.ts deleted file mode 100644 index 8ddb1ac8609..00000000000 --- a/src/me/todo/lists/item/tasks/item/extensions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionsRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/extensions/item/extensionItemRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/extensions/item/extensionItemRequestBuilder.ts deleted file mode 100644 index 50e31a46443..00000000000 --- a/src/me/todo/lists/item/tasks/item/extensions/item/extensionItemRequestBuilder.ts +++ /dev/null @@ -1,127 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createExtensionFromDiscriminatorValue, deserializeIntoExtension, serializeExtension, type Extension } from '../../../../../../../../models/extension'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ExtensionItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the extensions property of the microsoft.graph.todoTask entity. - */ -export class ExtensionItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new ExtensionItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/{extension%2Did}{?%24select,%24expand}"); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * The collection of open extensions defined for the task. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Extension - */ - public patch(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createExtensionFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property extensions for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * The collection of open extensions defined for the task. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, extensionItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property extensions in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Extension, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeExtension); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a ExtensionItemRequestBuilder - */ - public withUrl(rawUrl: string) : ExtensionItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ExtensionItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const extensionItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/extensions/item/index.ts b/src/me/todo/lists/item/tasks/item/extensions/item/index.ts deleted file mode 100644 index 0e1147d8c6b..00000000000 --- a/src/me/todo/lists/item/tasks/item/extensions/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './extensionItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/index.ts b/src/me/todo/lists/item/tasks/item/index.ts deleted file mode 100644 index 641e9a32432..00000000000 --- a/src/me/todo/lists/item/tasks/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './todoTaskItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/linkedResources/count/countRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/linkedResources/count/countRequestBuilder.ts deleted file mode 100644 index f0b687ebf3c..00000000000 --- a/src/me/todo/lists/item/tasks/item/linkedResources/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/linkedResources/count/index.ts b/src/me/todo/lists/item/tasks/item/linkedResources/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/todo/lists/item/tasks/item/linkedResources/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/linkedResources/index.ts b/src/me/todo/lists/item/tasks/item/linkedResources/index.ts deleted file mode 100644 index 7a2c96da86f..00000000000 --- a/src/me/todo/lists/item/tasks/item/linkedResources/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './linkedResourcesRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/linkedResources/item/index.ts b/src/me/todo/lists/item/tasks/item/linkedResources/item/index.ts deleted file mode 100644 index e0d1ebf8a4d..00000000000 --- a/src/me/todo/lists/item/tasks/item/linkedResources/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './linkedResourceItemRequestBuilder' diff --git a/src/me/todo/lists/item/tasks/item/linkedResources/item/linkedResourceItemRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/linkedResources/item/linkedResourceItemRequestBuilder.ts deleted file mode 100644 index 06c9daa2fb7..00000000000 --- a/src/me/todo/lists/item/tasks/item/linkedResources/item/linkedResourceItemRequestBuilder.ts +++ /dev/null @@ -1,130 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { createLinkedResourceFromDiscriminatorValue, deserializeIntoLinkedResource, serializeLinkedResource, type LinkedResource } from '../../../../../../../../models/linkedResource'; -import { type ODataError } from '../../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LinkedResourceItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the linkedResources property of the microsoft.graph.todoTask entity. - */ -export class LinkedResourceItemRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new LinkedResourceItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/{linkedResource%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a linkedResource object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/linkedresource-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a linkedResource object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LinkedResource - * @see {@link https://learn.microsoft.com/graph/api/linkedresource-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLinkedResourceFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a linkedResource object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LinkedResource - * @see {@link https://learn.microsoft.com/graph/api/linkedresource-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: LinkedResource, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLinkedResourceFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a linkedResource object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a linkedResource object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, linkedResourceItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a linkedResource object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: LinkedResource, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeLinkedResource); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a LinkedResourceItemRequestBuilder - */ - public withUrl(rawUrl: string) : LinkedResourceItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LinkedResourceItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const linkedResourceItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/linkedResources/linkedResourcesRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/linkedResources/linkedResourcesRequestBuilder.ts deleted file mode 100644 index fa5331994b4..00000000000 --- a/src/me/todo/lists/item/tasks/item/linkedResources/linkedResourcesRequestBuilder.ts +++ /dev/null @@ -1,155 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type LinkedResourceCollectionResponse } from '../../../../../../../models/'; -import { createLinkedResourceFromDiscriminatorValue, deserializeIntoLinkedResource, serializeLinkedResource, type LinkedResource } from '../../../../../../../models/linkedResource'; -import { createLinkedResourceCollectionResponseFromDiscriminatorValue } from '../../../../../../../models/linkedResourceCollectionResponse'; -import { type ODataError } from '../../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { LinkedResourceItemRequestBuilder } from './item/linkedResourceItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface LinkedResourcesRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the linkedResources property of the microsoft.graph.todoTask entity. - */ -export class LinkedResourcesRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the linkedResources property of the microsoft.graph.todoTask entity. - * @param linkedResourceId The unique identifier of linkedResource - * @returns a LinkedResourceItemRequestBuilder - */ - public byLinkedResourceId(linkedResourceId: string) : LinkedResourceItemRequestBuilder { - if(!linkedResourceId) throw new Error("linkedResourceId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["linkedResource%2Did"] = linkedResourceId - return new LinkedResourceItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new LinkedResourcesRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LinkedResourceCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/todotask-list-linkedresources?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLinkedResourceCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of LinkedResource - * @see {@link https://learn.microsoft.com/graph/api/todotask-post-linkedresources?view=graph-rest-1.0|Find more info here} - */ - public post(body: LinkedResource, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createLinkedResourceFromDiscriminatorValue, errorMapping); - }; - /** - * Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, linkedResourcesRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: LinkedResource, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeLinkedResource); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a linkedResourcesRequestBuilder - */ - public withUrl(rawUrl: string) : LinkedResourcesRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new LinkedResourcesRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const linkedResourcesRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/item/todoTaskItemRequestBuilder.ts b/src/me/todo/lists/item/tasks/item/todoTaskItemRequestBuilder.ts deleted file mode 100644 index de840c81231..00000000000 --- a/src/me/todo/lists/item/tasks/item/todoTaskItemRequestBuilder.ts +++ /dev/null @@ -1,165 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../../models/oDataErrors/oDataError'; -import { createTodoTaskFromDiscriminatorValue, deserializeIntoTodoTask, serializeTodoTask, type TodoTask } from '../../../../../../models/todoTask'; -import { AttachmentsRequestBuilder } from './attachments/attachmentsRequestBuilder'; -import { AttachmentSessionsRequestBuilder } from './attachmentSessions/attachmentSessionsRequestBuilder'; -import { ChecklistItemsRequestBuilder } from './checklistItems/checklistItemsRequestBuilder'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { LinkedResourcesRequestBuilder } from './linkedResources/linkedResourcesRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TodoTaskItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.todoTaskList entity. - */ -export class TodoTaskItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the attachments property of the microsoft.graph.todoTask entity. - */ - public get attachments(): AttachmentsRequestBuilder { - return new AttachmentsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the attachmentSessions property of the microsoft.graph.todoTask entity. - */ - public get attachmentSessions(): AttachmentSessionsRequestBuilder { - return new AttachmentSessionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the checklistItems property of the microsoft.graph.todoTask entity. - */ - public get checklistItems(): ChecklistItemsRequestBuilder { - return new ChecklistItemsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the extensions property of the microsoft.graph.todoTask entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the linkedResources property of the microsoft.graph.todoTask entity. - */ - public get linkedResources(): LinkedResourcesRequestBuilder { - return new LinkedResourcesRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TodoTaskItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a todoTask object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/todotask-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a todoTask object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTask - * @see {@link https://learn.microsoft.com/graph/api/todotask-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a todoTask object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTask - * @see {@link https://learn.microsoft.com/graph/api/todotask-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TodoTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a todoTask object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a todoTask object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, todoTaskItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a todoTask object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TodoTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTodoTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TodoTaskItemRequestBuilder - */ - public withUrl(rawUrl: string) : TodoTaskItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TodoTaskItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const todoTaskItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/tasks/tasksRequestBuilder.ts b/src/me/todo/lists/item/tasks/tasksRequestBuilder.ts deleted file mode 100644 index c42144833df..00000000000 --- a/src/me/todo/lists/item/tasks/tasksRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TodoTaskCollectionResponse } from '../../../../../models/'; -import { type ODataError } from '../../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../../models/oDataErrors/oDataError'; -import { createTodoTaskFromDiscriminatorValue, deserializeIntoTodoTask, serializeTodoTask, type TodoTask } from '../../../../../models/todoTask'; -import { createTodoTaskCollectionResponseFromDiscriminatorValue } from '../../../../../models/todoTaskCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { TodoTaskItemRequestBuilder } from './item/todoTaskItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TasksRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the tasks property of the microsoft.graph.todoTaskList entity. - */ -export class TasksRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.todoTaskList entity. - * @param todoTaskId The unique identifier of todoTask - * @returns a TodoTaskItemRequestBuilder - */ - public byTodoTaskId(todoTaskId: string) : TodoTaskItemRequestBuilder { - if(!todoTaskId) throw new Error("todoTaskId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["todoTask%2Did"] = todoTaskId - return new TodoTaskItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TasksRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the todoTask resources from the tasks navigation property of a specified todoTaskList. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTaskCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/todotasklist-list-tasks?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new task object in a specified todoTaskList. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTask - * @see {@link https://learn.microsoft.com/graph/api/todotasklist-post-tasks?view=graph-rest-1.0|Find more info here} - */ - public post(body: TodoTask, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskFromDiscriminatorValue, errorMapping); - }; - /** - * Get the todoTask resources from the tasks navigation property of a specified todoTaskList. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, tasksRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new task object in a specified todoTaskList. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TodoTask, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTodoTask); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a tasksRequestBuilder - */ - public withUrl(rawUrl: string) : TasksRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TasksRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const tasksRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/item/todoTaskListItemRequestBuilder.ts b/src/me/todo/lists/item/todoTaskListItemRequestBuilder.ts deleted file mode 100644 index bbcae26b6da..00000000000 --- a/src/me/todo/lists/item/todoTaskListItemRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { createTodoTaskListFromDiscriminatorValue, deserializeIntoTodoTaskList, serializeTodoTaskList, type TodoTaskList } from '../../../../models/todoTaskList'; -import { ExtensionsRequestBuilder } from './extensions/extensionsRequestBuilder'; -import { TasksRequestBuilder } from './tasks/tasksRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TodoTaskListItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the lists property of the microsoft.graph.todo entity. - */ -export class TodoTaskListItemRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the extensions property of the microsoft.graph.todoTaskList entity. - */ - public get extensions(): ExtensionsRequestBuilder { - return new ExtensionsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the tasks property of the microsoft.graph.todoTaskList entity. - */ - public get tasks(): TasksRequestBuilder { - return new TasksRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TodoTaskListItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists/{todoTaskList%2Did}{?%24select,%24expand}"); - }; - /** - * Deletes a todoTaskList object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/todotasklist-delete?view=graph-rest-1.0|Find more info here} - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Read the properties and relationships of a todoTaskList object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTaskList - * @see {@link https://learn.microsoft.com/graph/api/todotasklist-get?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskListFromDiscriminatorValue, errorMapping); - }; - /** - * Update the properties of a todoTaskList object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTaskList - * @see {@link https://learn.microsoft.com/graph/api/todotasklist-update?view=graph-rest-1.0|Find more info here} - */ - public patch(body: TodoTaskList, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskListFromDiscriminatorValue, errorMapping); - }; - /** - * Deletes a todoTaskList object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Read the properties and relationships of a todoTaskList object. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, todoTaskListItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the properties of a todoTaskList object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: TodoTaskList, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTodoTaskList); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a TodoTaskListItemRequestBuilder - */ - public withUrl(rawUrl: string) : TodoTaskListItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TodoTaskListItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const todoTaskListItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/lists/listsRequestBuilder.ts b/src/me/todo/lists/listsRequestBuilder.ts deleted file mode 100644 index 68995786daa..00000000000 --- a/src/me/todo/lists/listsRequestBuilder.ts +++ /dev/null @@ -1,162 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type TodoTaskListCollectionResponse } from '../../../models/'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { createTodoTaskListFromDiscriminatorValue, deserializeIntoTodoTaskList, serializeTodoTaskList, type TodoTaskList } from '../../../models/todoTaskList'; -import { createTodoTaskListCollectionResponseFromDiscriminatorValue } from '../../../models/todoTaskListCollectionResponse'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { DeltaRequestBuilder } from './delta/deltaRequestBuilder'; -import { TodoTaskListItemRequestBuilder } from './item/todoTaskListItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface ListsRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the lists property of the microsoft.graph.todo entity. - */ -export class ListsRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to call the delta method. - */ - public get delta(): DeltaRequestBuilder { - return new DeltaRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the lists property of the microsoft.graph.todo entity. - * @param todoTaskListId The unique identifier of todoTaskList - * @returns a TodoTaskListItemRequestBuilder - */ - public byTodoTaskListId(todoTaskListId: string) : TodoTaskListItemRequestBuilder { - if(!todoTaskListId) throw new Error("todoTaskListId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["todoTaskList%2Did"] = todoTaskListId - return new TodoTaskListItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new ListsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get a list of the todoTaskList objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTaskListCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/todo-list-lists?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskListCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Create a new lists object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TodoTaskList - * @see {@link https://learn.microsoft.com/graph/api/todo-post-lists?view=graph-rest-1.0|Find more info here} - */ - public post(body: TodoTaskList, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoTaskListFromDiscriminatorValue, errorMapping); - }; - /** - * Get a list of the todoTaskList objects and their properties. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, listsRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Create a new lists object. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TodoTaskList, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTodoTaskList); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a listsRequestBuilder - */ - public withUrl(rawUrl: string) : ListsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new ListsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const listsRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/todo/todoRequestBuilder.ts b/src/me/todo/todoRequestBuilder.ts deleted file mode 100644 index 5490cc678e5..00000000000 --- a/src/me/todo/todoRequestBuilder.ts +++ /dev/null @@ -1,134 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { createTodoFromDiscriminatorValue, deserializeIntoTodo, serializeTodo, type Todo } from '../../models/todo'; -import { ListsRequestBuilder } from './lists/listsRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TodoRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the todo property of the microsoft.graph.user entity. - */ -export class TodoRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to manage the lists property of the microsoft.graph.todo entity. - */ - public get lists(): ListsRequestBuilder { - return new ListsRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new TodoRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/todo{?%24select,%24expand}"); - }; - /** - * Delete navigation property todo for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - */ - public delete(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toDeleteRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Represents the To Do services available to a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Todo - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoFromDiscriminatorValue, errorMapping); - }; - /** - * Update the navigation property todo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Todo - */ - public patch(body: Todo, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPatchRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTodoFromDiscriminatorValue, errorMapping); - }; - /** - * Delete navigation property todo for me - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Represents the To Do services available to a user. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, todoRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Update the navigation property todo in me - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPatchRequestInformation(body: Todo, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTodo); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a todoRequestBuilder - */ - public withUrl(rawUrl: string) : TodoRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TodoRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const todoRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/count/countRequestBuilder.ts b/src/me/transitiveMemberOf/count/countRequestBuilder.ts deleted file mode 100644 index 31bcdbf8899..00000000000 --- a/src/me/transitiveMemberOf/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/count/index.ts b/src/me/transitiveMemberOf/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/transitiveMemberOf/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/transitiveMemberOf/graphAdministrativeUnit/count/countRequestBuilder.ts b/src/me/transitiveMemberOf/graphAdministrativeUnit/count/countRequestBuilder.ts deleted file mode 100644 index 34afbdb1a39..00000000000 --- a/src/me/transitiveMemberOf/graphAdministrativeUnit/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/graphAdministrativeUnit/count/index.ts b/src/me/transitiveMemberOf/graphAdministrativeUnit/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/transitiveMemberOf/graphAdministrativeUnit/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/transitiveMemberOf/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts b/src/me/transitiveMemberOf/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts deleted file mode 100644 index f4172cd0787..00000000000 --- a/src/me/transitiveMemberOf/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdministrativeUnitCollectionResponse } from '../../../models/'; -import { createAdministrativeUnitCollectionResponseFromDiscriminatorValue } from '../../../models/administrativeUnitCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAdministrativeUnitRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to administrativeUnit. - */ -export class GraphAdministrativeUnitRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AdministrativeUnitCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAdministrativeUnitCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAdministrativeUnitRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAdministrativeUnitRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAdministrativeUnitRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAdministrativeUnitRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAdministrativeUnitRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/graphAdministrativeUnit/index.ts b/src/me/transitiveMemberOf/graphAdministrativeUnit/index.ts deleted file mode 100644 index 956e6827ff4..00000000000 --- a/src/me/transitiveMemberOf/graphAdministrativeUnit/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAdministrativeUnitRequestBuilder' diff --git a/src/me/transitiveMemberOf/graphDirectoryRole/count/countRequestBuilder.ts b/src/me/transitiveMemberOf/graphDirectoryRole/count/countRequestBuilder.ts deleted file mode 100644 index 925750caf7c..00000000000 --- a/src/me/transitiveMemberOf/graphDirectoryRole/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/graph.directoryRole/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/graphDirectoryRole/count/index.ts b/src/me/transitiveMemberOf/graphDirectoryRole/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/transitiveMemberOf/graphDirectoryRole/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/transitiveMemberOf/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts b/src/me/transitiveMemberOf/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts deleted file mode 100644 index 09da12bdc75..00000000000 --- a/src/me/transitiveMemberOf/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryRoleCollectionResponse } from '../../../models/'; -import { createDirectoryRoleCollectionResponseFromDiscriminatorValue } from '../../../models/directoryRoleCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDirectoryRoleRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to directoryRole. - */ -export class GraphDirectoryRoleRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphDirectoryRoleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/graph.directoryRole{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryRoleCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryRoleCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDirectoryRoleRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDirectoryRoleRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDirectoryRoleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDirectoryRoleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDirectoryRoleRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/graphDirectoryRole/index.ts b/src/me/transitiveMemberOf/graphDirectoryRole/index.ts deleted file mode 100644 index ce4033a8241..00000000000 --- a/src/me/transitiveMemberOf/graphDirectoryRole/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDirectoryRoleRequestBuilder' diff --git a/src/me/transitiveMemberOf/graphGroup/count/countRequestBuilder.ts b/src/me/transitiveMemberOf/graphGroup/count/countRequestBuilder.ts deleted file mode 100644 index 8e7061245c9..00000000000 --- a/src/me/transitiveMemberOf/graphGroup/count/countRequestBuilder.ts +++ /dev/null @@ -1,71 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface CountRequestBuilderGetQueryParameters { - /** - * Filter items by property values - */ - filter?: string; - /** - * Search items by search phrases - */ - search?: string; -} -/** - * Provides operations to count the resources in the collection. - */ -export class CountRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new CountRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/graph.group/$count{?%24search,%24filter}"); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Integer - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendPrimitiveAsync(requestInfo, "number", errorMapping); - }; - /** - * Get the number of the resource - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, countRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "text/plain;q=0.9"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a CountRequestBuilder - */ - public withUrl(rawUrl: string) : CountRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new CountRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const countRequestBuilderGetQueryParametersMapper: Record = { - "filter": "%24filter", - "search": "%24search", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/graphGroup/count/index.ts b/src/me/transitiveMemberOf/graphGroup/count/index.ts deleted file mode 100644 index 6f4dcefa948..00000000000 --- a/src/me/transitiveMemberOf/graphGroup/count/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './countRequestBuilder' diff --git a/src/me/transitiveMemberOf/graphGroup/graphGroupRequestBuilder.ts b/src/me/transitiveMemberOf/graphGroup/graphGroupRequestBuilder.ts deleted file mode 100644 index 2c92df9bb6c..00000000000 --- a/src/me/transitiveMemberOf/graphGroup/graphGroupRequestBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type GroupCollectionResponse } from '../../../models/'; -import { createGroupCollectionResponseFromDiscriminatorValue } from '../../../models/groupCollectionResponse'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphGroupRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Casts the previous resource to group. - */ -export class GraphGroupRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new GraphGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of GroupCollectionResponse - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphGroupRequestBuilder - */ - public withUrl(rawUrl: string) : GraphGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphGroupRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/graphGroup/index.ts b/src/me/transitiveMemberOf/graphGroup/index.ts deleted file mode 100644 index b6b54379339..00000000000 --- a/src/me/transitiveMemberOf/graphGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphGroupRequestBuilder' diff --git a/src/me/transitiveMemberOf/index.ts b/src/me/transitiveMemberOf/index.ts deleted file mode 100644 index 6b1d29f3968..00000000000 --- a/src/me/transitiveMemberOf/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './transitiveMemberOfRequestBuilder' diff --git a/src/me/transitiveMemberOf/item/directoryObjectItemRequestBuilder.ts b/src/me/transitiveMemberOf/item/directoryObjectItemRequestBuilder.ts deleted file mode 100644 index 70cf295e2ab..00000000000 --- a/src/me/transitiveMemberOf/item/directoryObjectItemRequestBuilder.ts +++ /dev/null @@ -1,94 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObject } from '../../../models/'; -import { createDirectoryObjectFromDiscriminatorValue } from '../../../models/directoryObject'; -import { type ODataError } from '../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../models/oDataErrors/oDataError'; -import { GraphAdministrativeUnitRequestBuilder } from './graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder'; -import { GraphDirectoryRoleRequestBuilder } from './graphDirectoryRole/graphDirectoryRoleRequestBuilder'; -import { GraphGroupRequestBuilder } from './graphGroup/graphGroupRequestBuilder'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface DirectoryObjectItemRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Provides operations to manage the transitiveMemberOf property of the microsoft.graph.user entity. - */ -export class DirectoryObjectItemRequestBuilder extends BaseRequestBuilder { - /** - * Casts the previous resource to administrativeUnit. - */ - public get graphAdministrativeUnit(): GraphAdministrativeUnitRequestBuilder { - return new GraphAdministrativeUnitRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to directoryRole. - */ - public get graphDirectoryRole(): GraphDirectoryRoleRequestBuilder { - return new GraphDirectoryRoleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to group. - */ - public get graphGroup(): GraphGroupRequestBuilder { - return new GraphGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/{directoryObject%2Did}{?%24select,%24expand}"); - }; - /** - * The groups, including nested groups, and directory roles that a user is a member of. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObject - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectFromDiscriminatorValue, errorMapping); - }; - /** - * The groups, including nested groups, and directory roles that a user is a member of. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, directoryObjectItemRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a DirectoryObjectItemRequestBuilder - */ - public withUrl(rawUrl: string) : DirectoryObjectItemRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new DirectoryObjectItemRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const directoryObjectItemRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/item/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts b/src/me/transitiveMemberOf/item/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts deleted file mode 100644 index 9041679e70d..00000000000 --- a/src/me/transitiveMemberOf/item/graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdministrativeUnit } from '../../../../models/'; -import { createAdministrativeUnitFromDiscriminatorValue } from '../../../../models/administrativeUnit'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphAdministrativeUnitRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to administrativeUnit. - */ -export class GraphAdministrativeUnitRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of AdministrativeUnit - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createAdministrativeUnitFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphAdministrativeUnitRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphAdministrativeUnitRequestBuilder - */ - public withUrl(rawUrl: string) : GraphAdministrativeUnitRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphAdministrativeUnitRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphAdministrativeUnitRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/item/graphAdministrativeUnit/index.ts b/src/me/transitiveMemberOf/item/graphAdministrativeUnit/index.ts deleted file mode 100644 index 956e6827ff4..00000000000 --- a/src/me/transitiveMemberOf/item/graphAdministrativeUnit/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphAdministrativeUnitRequestBuilder' diff --git a/src/me/transitiveMemberOf/item/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts b/src/me/transitiveMemberOf/item/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts deleted file mode 100644 index 012ed58ff55..00000000000 --- a/src/me/transitiveMemberOf/item/graphDirectoryRole/graphDirectoryRoleRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryRole } from '../../../../models/'; -import { createDirectoryRoleFromDiscriminatorValue } from '../../../../models/directoryRole'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphDirectoryRoleRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to directoryRole. - */ -export class GraphDirectoryRoleRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphDirectoryRoleRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/{directoryObject%2Did}/graph.directoryRole{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryRole - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryRoleFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphDirectoryRoleRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphDirectoryRoleRequestBuilder - */ - public withUrl(rawUrl: string) : GraphDirectoryRoleRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphDirectoryRoleRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphDirectoryRoleRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/item/graphDirectoryRole/index.ts b/src/me/transitiveMemberOf/item/graphDirectoryRole/index.ts deleted file mode 100644 index ce4033a8241..00000000000 --- a/src/me/transitiveMemberOf/item/graphDirectoryRole/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphDirectoryRoleRequestBuilder' diff --git a/src/me/transitiveMemberOf/item/graphGroup/graphGroupRequestBuilder.ts b/src/me/transitiveMemberOf/item/graphGroup/graphGroupRequestBuilder.ts deleted file mode 100644 index bcb5de27b03..00000000000 --- a/src/me/transitiveMemberOf/item/graphGroup/graphGroupRequestBuilder.ts +++ /dev/null @@ -1,73 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type Group } from '../../../../models/'; -import { createGroupFromDiscriminatorValue } from '../../../../models/group'; -import { type ODataError } from '../../../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../../../models/oDataErrors/oDataError'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface GraphGroupRequestBuilderGetQueryParameters { - /** - * Expand related entities - */ - expand?: string[]; - /** - * Select properties to be returned - */ - select?: string[]; -} -/** - * Casts the previous resource to group. - */ -export class GraphGroupRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new GraphGroupRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf/{directoryObject%2Did}/graph.group{?%24select,%24expand}"); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.group - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of Group - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createGroupFromDiscriminatorValue, errorMapping); - }; - /** - * Get the item of type microsoft.graph.directoryObject as microsoft.graph.group - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, graphGroupRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a graphGroupRequestBuilder - */ - public withUrl(rawUrl: string) : GraphGroupRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new GraphGroupRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const graphGroupRequestBuilderGetQueryParametersMapper: Record = { - "expand": "%24expand", - "select": "%24select", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/transitiveMemberOf/item/graphGroup/index.ts b/src/me/transitiveMemberOf/item/graphGroup/index.ts deleted file mode 100644 index b6b54379339..00000000000 --- a/src/me/transitiveMemberOf/item/graphGroup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './graphGroupRequestBuilder' diff --git a/src/me/transitiveMemberOf/item/index.ts b/src/me/transitiveMemberOf/item/index.ts deleted file mode 100644 index 71d2756160d..00000000000 --- a/src/me/transitiveMemberOf/item/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './directoryObjectItemRequestBuilder' diff --git a/src/me/transitiveMemberOf/transitiveMemberOfRequestBuilder.ts b/src/me/transitiveMemberOf/transitiveMemberOfRequestBuilder.ts deleted file mode 100644 index ed9b7f7c924..00000000000 --- a/src/me/transitiveMemberOf/transitiveMemberOfRequestBuilder.ts +++ /dev/null @@ -1,144 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type DirectoryObjectCollectionResponse } from '../../models/'; -import { createDirectoryObjectCollectionResponseFromDiscriminatorValue } from '../../models/directoryObjectCollectionResponse'; -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { CountRequestBuilder } from './count/countRequestBuilder'; -import { GraphAdministrativeUnitRequestBuilder } from './graphAdministrativeUnit/graphAdministrativeUnitRequestBuilder'; -import { GraphDirectoryRoleRequestBuilder } from './graphDirectoryRole/graphDirectoryRoleRequestBuilder'; -import { GraphGroupRequestBuilder } from './graphGroup/graphGroupRequestBuilder'; -import { DirectoryObjectItemRequestBuilder } from './item/directoryObjectItemRequestBuilder'; -import { BaseRequestBuilder, getPathParameters, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -export interface TransitiveMemberOfRequestBuilderGetQueryParameters { - /** - * 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; -} -/** - * Provides operations to manage the transitiveMemberOf property of the microsoft.graph.user entity. - */ -export class TransitiveMemberOfRequestBuilder extends BaseRequestBuilder { - /** - * Provides operations to count the resources in the collection. - */ - public get count(): CountRequestBuilder { - return new CountRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to administrativeUnit. - */ - public get graphAdministrativeUnit(): GraphAdministrativeUnitRequestBuilder { - return new GraphAdministrativeUnitRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to directoryRole. - */ - public get graphDirectoryRole(): GraphDirectoryRoleRequestBuilder { - return new GraphDirectoryRoleRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Casts the previous resource to group. - */ - public get graphGroup(): GraphGroupRequestBuilder { - return new GraphGroupRequestBuilder(this.pathParameters, this.requestAdapter); - } - /** - * Provides operations to manage the transitiveMemberOf property of the microsoft.graph.user entity. - * @param directoryObjectId The unique identifier of directoryObject - * @returns a DirectoryObjectItemRequestBuilder - */ - public byDirectoryObjectId(directoryObjectId: string) : DirectoryObjectItemRequestBuilder { - if(!directoryObjectId) throw new Error("directoryObjectId cannot be undefined"); - const urlTplParams = getPathParameters(this.pathParameters); - urlTplParams["directoryObject%2Did"] = directoryObjectId - return new DirectoryObjectItemRequestBuilder(urlTplParams, this.requestAdapter); - }; - /** - * Instantiates a new TransitiveMemberOfRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/transitiveMemberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"); - }; - /** - * The groups, including nested groups, and directory roles that a user is a member of. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of DirectoryObjectCollectionResponse - * @see {@link https://learn.microsoft.com/graph/api/user-list-transitivememberof?view=graph-rest-1.0|Find more info here} - */ - public get(requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toGetRequestInformation( - requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createDirectoryObjectCollectionResponseFromDiscriminatorValue, errorMapping); - }; - /** - * The groups, including nested groups, and directory roles that a user is a member of. Nullable. - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration, transitiveMemberOfRequestBuilderGetQueryParametersMapper); - requestInfo.headers.tryAdd("Accept", "application/json"); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a transitiveMemberOfRequestBuilder - */ - public withUrl(rawUrl: string) : TransitiveMemberOfRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TransitiveMemberOfRequestBuilder(rawUrl, this.requestAdapter); - }; -} -const transitiveMemberOfRequestBuilderGetQueryParametersMapper: Record = { - "count": "%24count", - "expand": "%24expand", - "filter": "%24filter", - "orderby": "%24orderby", - "search": "%24search", - "select": "%24select", - "skip": "%24skip", - "top": "%24top", -}; -// tslint:enable -// eslint-enable diff --git a/src/me/translateExchangeIds/index.ts b/src/me/translateExchangeIds/index.ts deleted file mode 100644 index 4d724250ef4..00000000000 --- a/src/me/translateExchangeIds/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './translateExchangeIdsPostRequestBody' -export * from './translateExchangeIdsPostResponse' -export * from './translateExchangeIdsRequestBuilder' diff --git a/src/me/translateExchangeIds/translateExchangeIdsPostRequestBody.ts b/src/me/translateExchangeIds/translateExchangeIdsPostRequestBody.ts deleted file mode 100644 index 3057c8dc484..00000000000 --- a/src/me/translateExchangeIds/translateExchangeIdsPostRequestBody.ts +++ /dev/null @@ -1,43 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { ExchangeIdFormat } from '../../models/exchangeIdFormat'; -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTranslateExchangeIdsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTranslateExchangeIdsPostRequestBody; -} -export function deserializeIntoTranslateExchangeIdsPostRequestBody(translateExchangeIdsPostRequestBody: TranslateExchangeIdsPostRequestBody | undefined = {} as TranslateExchangeIdsPostRequestBody) : Record void> { - return { - "inputIds": n => { translateExchangeIdsPostRequestBody.inputIds = n.getCollectionOfPrimitiveValues(); }, - "sourceIdType": n => { translateExchangeIdsPostRequestBody.sourceIdType = n.getEnumValue(ExchangeIdFormat); }, - "targetIdType": n => { translateExchangeIdsPostRequestBody.targetIdType = n.getEnumValue(ExchangeIdFormat); }, - } -} -export function serializeTranslateExchangeIdsPostRequestBody(writer: SerializationWriter, translateExchangeIdsPostRequestBody: TranslateExchangeIdsPostRequestBody | undefined = {} as TranslateExchangeIdsPostRequestBody) : void { - writer.writeCollectionOfPrimitiveValues("InputIds", translateExchangeIdsPostRequestBody.inputIds); - writer.writeEnumValue("SourceIdType", translateExchangeIdsPostRequestBody.sourceIdType); - writer.writeEnumValue("TargetIdType", translateExchangeIdsPostRequestBody.targetIdType); - writer.writeAdditionalData(translateExchangeIdsPostRequestBody.additionalData); -} -export interface TranslateExchangeIdsPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The InputIds property - */ - inputIds?: string[]; - /** - * The SourceIdType property - */ - sourceIdType?: ExchangeIdFormat; - /** - * The TargetIdType property - */ - targetIdType?: ExchangeIdFormat; -} -// tslint:enable -// eslint-enable diff --git a/src/me/translateExchangeIds/translateExchangeIdsPostResponse.ts b/src/me/translateExchangeIds/translateExchangeIdsPostResponse.ts deleted file mode 100644 index 8d5609d5189..00000000000 --- a/src/me/translateExchangeIds/translateExchangeIdsPostResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, type BaseCollectionPaginationCountResponse } from '../../models/baseCollectionPaginationCountResponse'; -import { createConvertIdResultFromDiscriminatorValue, serializeConvertIdResult, type ConvertIdResult } from '../../models/convertIdResult'; -import { type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createTranslateExchangeIdsPostResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoTranslateExchangeIdsPostResponse; -} -export function deserializeIntoTranslateExchangeIdsPostResponse(translateExchangeIdsPostResponse: TranslateExchangeIdsPostResponse | undefined = {} as TranslateExchangeIdsPostResponse) : Record void> { - return { - ...deserializeIntoBaseCollectionPaginationCountResponse(translateExchangeIdsPostResponse), - "value": n => { translateExchangeIdsPostResponse.value = n.getCollectionOfObjectValues(createConvertIdResultFromDiscriminatorValue); }, - } -} -export function serializeTranslateExchangeIdsPostResponse(writer: SerializationWriter, translateExchangeIdsPostResponse: TranslateExchangeIdsPostResponse | undefined = {} as TranslateExchangeIdsPostResponse) : void { - serializeBaseCollectionPaginationCountResponse(writer, translateExchangeIdsPostResponse) - writer.writeCollectionOfObjectValues("value", translateExchangeIdsPostResponse.value, serializeConvertIdResult); -} -export interface TranslateExchangeIdsPostResponse extends BaseCollectionPaginationCountResponse, Parsable { - /** - * The value property - */ - value?: ConvertIdResult[]; -} -// tslint:enable -// eslint-enable diff --git a/src/me/translateExchangeIds/translateExchangeIdsRequestBuilder.ts b/src/me/translateExchangeIds/translateExchangeIdsRequestBuilder.ts deleted file mode 100644 index 2dd78702b0e..00000000000 --- a/src/me/translateExchangeIds/translateExchangeIdsRequestBuilder.ts +++ /dev/null @@ -1,64 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { deserializeIntoTranslateExchangeIdsPostRequestBody, serializeTranslateExchangeIdsPostRequestBody, type TranslateExchangeIdsPostRequestBody } from './translateExchangeIdsPostRequestBody'; -import { createTranslateExchangeIdsPostResponseFromDiscriminatorValue, deserializeIntoTranslateExchangeIdsPostResponse, serializeTranslateExchangeIdsPostResponse, type TranslateExchangeIdsPostResponse } from './translateExchangeIdsPostResponse'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the translateExchangeIds method. - */ -export class TranslateExchangeIdsRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new TranslateExchangeIdsRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/translateExchangeIds"); - }; - /** - * Translate identifiers of Outlook-related resources between formats. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a Promise of TranslateExchangeIdsPostResponse - * @see {@link https://learn.microsoft.com/graph/api/user-translateexchangeids?view=graph-rest-1.0|Find more info here} - */ - public post(body: TranslateExchangeIdsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendAsync(requestInfo, createTranslateExchangeIdsPostResponseFromDiscriminatorValue, errorMapping); - }; - /** - * Translate identifiers of Outlook-related resources between formats. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: TranslateExchangeIdsPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeTranslateExchangeIdsPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a translateExchangeIdsRequestBuilder - */ - public withUrl(rawUrl: string) : TranslateExchangeIdsRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new TranslateExchangeIdsRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable diff --git a/src/me/wipeManagedAppRegistrationsByDeviceTag/index.ts b/src/me/wipeManagedAppRegistrationsByDeviceTag/index.ts deleted file mode 100644 index 64449f6df75..00000000000 --- a/src/me/wipeManagedAppRegistrationsByDeviceTag/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './wipeManagedAppRegistrationsByDeviceTagPostRequestBody' -export * from './wipeManagedAppRegistrationsByDeviceTagRequestBuilder' diff --git a/src/me/wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagPostRequestBody.ts b/src/me/wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagPostRequestBody.ts deleted file mode 100644 index acc10b419f1..00000000000 --- a/src/me/wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagPostRequestBody.ts +++ /dev/null @@ -1,30 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type AdditionalDataHolder, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions'; - -export function createWipeManagedAppRegistrationsByDeviceTagPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) { - if(!parseNode) throw new Error("parseNode cannot be undefined"); - return deserializeIntoWipeManagedAppRegistrationsByDeviceTagPostRequestBody; -} -export function deserializeIntoWipeManagedAppRegistrationsByDeviceTagPostRequestBody(wipeManagedAppRegistrationsByDeviceTagPostRequestBody: WipeManagedAppRegistrationsByDeviceTagPostRequestBody | undefined = {} as WipeManagedAppRegistrationsByDeviceTagPostRequestBody) : Record void> { - return { - "deviceTag": n => { wipeManagedAppRegistrationsByDeviceTagPostRequestBody.deviceTag = n.getStringValue(); }, - } -} -export function serializeWipeManagedAppRegistrationsByDeviceTagPostRequestBody(writer: SerializationWriter, wipeManagedAppRegistrationsByDeviceTagPostRequestBody: WipeManagedAppRegistrationsByDeviceTagPostRequestBody | undefined = {} as WipeManagedAppRegistrationsByDeviceTagPostRequestBody) : void { - writer.writeStringValue("deviceTag", wipeManagedAppRegistrationsByDeviceTagPostRequestBody.deviceTag); - writer.writeAdditionalData(wipeManagedAppRegistrationsByDeviceTagPostRequestBody.additionalData); -} -export interface WipeManagedAppRegistrationsByDeviceTagPostRequestBody extends AdditionalDataHolder, Parsable { - /** - * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - */ - additionalData?: Record; - /** - * The deviceTag property - */ - deviceTag?: string; -} -// tslint:enable -// eslint-enable diff --git a/src/me/wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagRequestBuilder.ts b/src/me/wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagRequestBuilder.ts deleted file mode 100644 index 808bff2e8af..00000000000 --- a/src/me/wipeManagedAppRegistrationsByDeviceTag/wipeManagedAppRegistrationsByDeviceTagRequestBuilder.ts +++ /dev/null @@ -1,62 +0,0 @@ -// tslint:disable -// eslint-disable -// Generated by Microsoft Kiota -import { type ODataError } from '../../models/oDataErrors/'; -import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError'; -import { deserializeIntoWipeManagedAppRegistrationsByDeviceTagPostRequestBody, serializeWipeManagedAppRegistrationsByDeviceTagPostRequestBody, type WipeManagedAppRegistrationsByDeviceTagPostRequestBody } from './wipeManagedAppRegistrationsByDeviceTagPostRequestBody'; -import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; - -/** - * Provides operations to call the wipeManagedAppRegistrationsByDeviceTag method. - */ -export class WipeManagedAppRegistrationsByDeviceTagRequestBuilder extends BaseRequestBuilder { - /** - * Instantiates a new WipeManagedAppRegistrationsByDeviceTagRequestBuilder and sets the default values. - * @param pathParameters The raw url or the Url template parameters for the request. - * @param requestAdapter The request adapter to use to execute the requests. - */ - public constructor(pathParameters: Record | string | undefined, requestAdapter: RequestAdapter) { - super(pathParameters, requestAdapter, "{+baseurl}/me/wipeManagedAppRegistrationsByDeviceTag"); - }; - /** - * Issues a wipe operation on an app registration with specified device tag. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @see {@link https://learn.microsoft.com/graph/api/intune-mam-user-wipemanagedappregistrationsbydevicetag?view=graph-rest-1.0|Find more info here} - */ - public post(body: WipeManagedAppRegistrationsByDeviceTagPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : Promise { - const requestInfo = this.toPostRequestInformation( - body, requestConfiguration - ); - const errorMapping = { - "4XX": createODataErrorFromDiscriminatorValue, - "5XX": createODataErrorFromDiscriminatorValue, - } as Record>; - return this.requestAdapter.sendNoResponseContentAsync(requestInfo, errorMapping); - }; - /** - * Issues a wipe operation on an app registration with specified device tag. - * @param body The request body - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns a RequestInformation - */ - public toPostRequestInformation(body: WipeManagedAppRegistrationsByDeviceTagPostRequestBody, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation { - if(!body) throw new Error("body cannot be undefined"); - const requestInfo = new RequestInformation(HttpMethod.POST, this.urlTemplate, this.pathParameters); - requestInfo.configure(requestConfiguration); - requestInfo.headers.tryAdd("Accept", "application/json"); - requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeWipeManagedAppRegistrationsByDeviceTagPostRequestBody); - return requestInfo; - }; - /** - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. - * @param rawUrl The raw URL to use for the request builder. - * @returns a wipeManagedAppRegistrationsByDeviceTagRequestBuilder - */ - public withUrl(rawUrl: string) : WipeManagedAppRegistrationsByDeviceTagRequestBuilder { - if(!rawUrl) throw new Error("rawUrl cannot be undefined"); - return new WipeManagedAppRegistrationsByDeviceTagRequestBuilder(rawUrl, this.requestAdapter); - }; -} -// tslint:enable -// eslint-enable