Skip to content

Commit f2c154e

Browse files
microsoft-graph-devx-bot[bot]Microsoft Graph DevX Tooling
andauthored
feat(generation): update request builders and models (#926)
Update generated files with build 204842 Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com>
1 parent 226aac0 commit f2c154e

File tree

73 files changed

+10530
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+10530
-48
lines changed

packages/kiota-dom-export.txt

Lines changed: 1340 additions & 3 deletions
Large diffs are not rendered by default.

packages/kiota-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"descriptionHash": "D282F35F1C4502D8A194AC720C40CD42328A0D407D96EA32125D5E6F3F4483C6070BED2C504A5E1B5E49A4B1ABA6C9BEBA0FE6749B51318AC512B5FF4DD00ECC",
2+
"descriptionHash": "B243F90AAC3F548EAA1D4BB9C012663E5F123A401E193B25D219B7D016381FF78B94701C2AF3F0DBDF12C8E8952F4095F9956FF17DE3320747B1A1BB91287751",
33
"descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml",
44
"lockFileVersion": "1.0.0",
55
"kiotaVersion": "1.30.0",

packages/msgraph-sdk-chats/chats/item/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { PermissionGrantsRequestBuilderNavigationMetadata, PermissionGrantsReque
2424
// @ts-ignore
2525
import { PinnedMessagesRequestBuilderNavigationMetadata, PinnedMessagesRequestBuilderRequestsMetadata, type PinnedMessagesRequestBuilder } from './pinnedMessages/index.js';
2626
// @ts-ignore
27+
import { RemoveAllAccessForUserRequestBuilderRequestsMetadata, type RemoveAllAccessForUserRequestBuilder } from './removeAllAccessForUser/index.js';
28+
// @ts-ignore
2729
import { SendActivityNotificationRequestBuilderRequestsMetadata, type SendActivityNotificationRequestBuilder } from './sendActivityNotification/index.js';
2830
// @ts-ignore
2931
import { TabsRequestBuilderNavigationMetadata, TabsRequestBuilderRequestsMetadata, type TabsRequestBuilder } from './tabs/index.js';
@@ -72,6 +74,10 @@ export interface ChatItemRequestBuilder extends BaseRequestBuilder<ChatItemReque
7274
* Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity.
7375
*/
7476
get pinnedMessages(): PinnedMessagesRequestBuilder;
77+
/**
78+
* Provides operations to call the removeAllAccessForUser method.
79+
*/
80+
get removeAllAccessForUser(): RemoveAllAccessForUserRequestBuilder;
7581
/**
7682
* Provides operations to call the sendActivityNotification method.
7783
*/
@@ -188,6 +194,9 @@ export const ChatItemRequestBuilderNavigationMetadata: Record<Exclude<keyof Chat
188194
requestsMetadata: PinnedMessagesRequestBuilderRequestsMetadata,
189195
navigationMetadata: PinnedMessagesRequestBuilderNavigationMetadata,
190196
},
197+
removeAllAccessForUser: {
198+
requestsMetadata: RemoveAllAccessForUserRequestBuilderRequestsMetadata,
199+
},
191200
sendActivityNotification: {
192201
requestsMetadata: SendActivityNotificationRequestBuilderRequestsMetadata,
193202
},
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
// Generated by Microsoft Kiota
4+
// @ts-ignore
5+
import { createTeamworkUserIdentityFromDiscriminatorValue, serializeTeamworkUserIdentity, type TeamworkUserIdentity } from '@microsoft/msgraph-sdk/models/index.js';
6+
// @ts-ignore
7+
import { createODataErrorFromDiscriminatorValue, type ODataError } from '@microsoft/msgraph-sdk/models/oDataErrors/index.js';
8+
// @ts-ignore
9+
import { type AdditionalDataHolder, type BackedModel, type BackingStore, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions';
10+
11+
/**
12+
* Creates a new instance of the appropriate class based on discriminator value
13+
* @param parseNode The parse node to use to read the discriminator value and create the object
14+
* @returns {RemoveAllAccessForUserPostRequestBody}
15+
*/
16+
// @ts-ignore
17+
export function createRemoveAllAccessForUserPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
18+
return deserializeIntoRemoveAllAccessForUserPostRequestBody;
19+
}
20+
/**
21+
* The deserialization information for the current model
22+
* @param RemoveAllAccessForUserPostRequestBody The instance to deserialize into.
23+
* @returns {Record<string, (node: ParseNode) => void>}
24+
*/
25+
// @ts-ignore
26+
export function deserializeIntoRemoveAllAccessForUserPostRequestBody(removeAllAccessForUserPostRequestBody: Partial<RemoveAllAccessForUserPostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
27+
return {
28+
"backingStoreEnabled": n => { removeAllAccessForUserPostRequestBody.backingStoreEnabled = true; },
29+
"user": n => { removeAllAccessForUserPostRequestBody.user = n.getObjectValue<TeamworkUserIdentity>(createTeamworkUserIdentityFromDiscriminatorValue); },
30+
}
31+
}
32+
export interface RemoveAllAccessForUserPostRequestBody extends AdditionalDataHolder, BackedModel, Parsable {
33+
/**
34+
* Stores model information.
35+
*/
36+
backingStoreEnabled?: boolean | null;
37+
/**
38+
* The user property
39+
*/
40+
user?: TeamworkUserIdentity | null;
41+
}
42+
/**
43+
* Provides operations to call the removeAllAccessForUser method.
44+
*/
45+
export interface RemoveAllAccessForUserRequestBuilder extends BaseRequestBuilder<RemoveAllAccessForUserRequestBuilder> {
46+
/**
47+
* Remove access to a chat for a user.
48+
* @param body The request body
49+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
50+
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
51+
* @see {@link https://learn.microsoft.com/graph/api/chat-removeallaccessforuser?view=graph-rest-1.0|Find more info here}
52+
*/
53+
post(body: RemoveAllAccessForUserPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<void>;
54+
/**
55+
* Remove access to a chat for a user.
56+
* @param body The request body
57+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
58+
* @returns {RequestInformation}
59+
*/
60+
toPostRequestInformation(body: RemoveAllAccessForUserPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
61+
}
62+
/**
63+
* Serializes information the current object
64+
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
65+
* @param RemoveAllAccessForUserPostRequestBody The instance to serialize from.
66+
* @param writer Serialization writer to use to serialize this model
67+
*/
68+
// @ts-ignore
69+
export function serializeRemoveAllAccessForUserPostRequestBody(writer: SerializationWriter, removeAllAccessForUserPostRequestBody: Partial<RemoveAllAccessForUserPostRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
70+
if (!removeAllAccessForUserPostRequestBody || isSerializingDerivedType) { return; }
71+
writer.writeObjectValue<TeamworkUserIdentity>("user", removeAllAccessForUserPostRequestBody.user, serializeTeamworkUserIdentity);
72+
writer.writeAdditionalData(removeAllAccessForUserPostRequestBody.additionalData);
73+
}
74+
/**
75+
* Uri template for the request builder.
76+
*/
77+
export const RemoveAllAccessForUserRequestBuilderUriTemplate = "{+baseurl}/chats/{chat%2Did}/removeAllAccessForUser";
78+
/**
79+
* Metadata for all the requests in the request builder.
80+
*/
81+
export const RemoveAllAccessForUserRequestBuilderRequestsMetadata: RequestsMetadata = {
82+
post: {
83+
uriTemplate: RemoveAllAccessForUserRequestBuilderUriTemplate,
84+
responseBodyContentType: "application/json",
85+
errorMappings: {
86+
XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>,
87+
},
88+
adapterMethodName: "sendNoResponseContent",
89+
requestBodyContentType: "application/json",
90+
requestBodySerializer: serializeRemoveAllAccessForUserPostRequestBody,
91+
requestInformationContentSetMethod: "setContentFromParsable",
92+
},
93+
};
94+
/* tslint:enable */
95+
/* eslint-enable */

packages/msgraph-sdk-drives/drives/item/items/item/retentionLabel/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ export interface RetentionLabelRequestBuilder extends BaseRequestBuilder<Retenti
2020
*/
2121
delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<void>;
2222
/**
23-
* Information about retention label and settings enforced on the driveItem. Read-write.
23+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
2424
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
2525
* @returns {Promise<ItemRetentionLabel>}
2626
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
27+
* @see {@link https://learn.microsoft.com/graph/api/driveitem-getretentionlabel?view=graph-rest-1.0|Find more info here}
2728
*/
2829
get(requestConfiguration?: RequestConfiguration<RetentionLabelRequestBuilderGetQueryParameters> | undefined) : Promise<ItemRetentionLabel | undefined>;
2930
/**
@@ -42,7 +43,7 @@ export interface RetentionLabelRequestBuilder extends BaseRequestBuilder<Retenti
4243
*/
4344
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
4445
/**
45-
* Information about retention label and settings enforced on the driveItem. Read-write.
46+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
4647
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
4748
* @returns {RequestInformation}
4849
*/
@@ -56,7 +57,7 @@ export interface RetentionLabelRequestBuilder extends BaseRequestBuilder<Retenti
5657
toPatchRequestInformation(body: ItemRetentionLabel, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
5758
}
5859
/**
59-
* Information about retention label and settings enforced on the driveItem. Read-write.
60+
* Get metadata information for a retention label applied on a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
6061
*/
6162
export interface RetentionLabelRequestBuilderGetQueryParameters {
6263
/**
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
// Generated by Microsoft Kiota
4+
// @ts-ignore
5+
import { createODataErrorFromDiscriminatorValue, type ODataError } from '@microsoft/msgraph-sdk/models/oDataErrors/index.js';
6+
// @ts-ignore
7+
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
8+
9+
/**
10+
* Provides operations to count the resources in the collection.
11+
*/
12+
export interface CountRequestBuilder extends BaseRequestBuilder<CountRequestBuilder> {
13+
/**
14+
* Get the number of the resource
15+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
16+
* @returns {Promise<number>}
17+
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
18+
*/
19+
get(requestConfiguration?: RequestConfiguration<CountRequestBuilderGetQueryParameters> | undefined) : Promise<number | undefined>;
20+
/**
21+
* Get the number of the resource
22+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
23+
* @returns {RequestInformation}
24+
*/
25+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<CountRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
26+
}
27+
/**
28+
* Get the number of the resource
29+
*/
30+
export interface CountRequestBuilderGetQueryParameters {
31+
/**
32+
* Filter items by property values
33+
*/
34+
filter?: string;
35+
/**
36+
* Search items by search phrases
37+
*/
38+
search?: string;
39+
}
40+
/**
41+
* Uri template for the request builder.
42+
*/
43+
export const CountRequestBuilderUriTemplate = "{+baseurl}/places/graph.building/$count{?%24filter,%24search}";
44+
/**
45+
* Mapper for query parameters from symbol name to serialization name represented as a constant.
46+
*/
47+
const CountRequestBuilderGetQueryParametersMapper: Record<string, string> = {
48+
"filter": "%24filter",
49+
"search": "%24search",
50+
};
51+
/**
52+
* Metadata for all the requests in the request builder.
53+
*/
54+
export const CountRequestBuilderRequestsMetadata: RequestsMetadata = {
55+
get: {
56+
uriTemplate: CountRequestBuilderUriTemplate,
57+
responseBodyContentType: "text/plain;q=0.9",
58+
errorMappings: {
59+
XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>,
60+
},
61+
adapterMethodName: "sendPrimitive",
62+
responseBodyFactory: "number",
63+
queryParametersMapper: CountRequestBuilderGetQueryParametersMapper,
64+
},
65+
};
66+
/* tslint:enable */
67+
/* eslint-enable */
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
// Generated by Microsoft Kiota
4+
// @ts-ignore
5+
import { createBuildingCollectionResponseFromDiscriminatorValue, type BuildingCollectionResponse } from '@microsoft/msgraph-sdk/models/index.js';
6+
// @ts-ignore
7+
import { createODataErrorFromDiscriminatorValue, type ODataError } from '@microsoft/msgraph-sdk/models/oDataErrors/index.js';
8+
// @ts-ignore
9+
import { CountRequestBuilderRequestsMetadata, type CountRequestBuilder } from './count/index.js';
10+
// @ts-ignore
11+
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
12+
13+
/**
14+
* Casts the previous resource to building.
15+
*/
16+
export interface GraphBuildingRequestBuilder extends BaseRequestBuilder<GraphBuildingRequestBuilder> {
17+
/**
18+
* Provides operations to count the resources in the collection.
19+
*/
20+
get count(): CountRequestBuilder;
21+
/**
22+
* Get the items of type microsoft.graph.building in the microsoft.graph.place collection
23+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
24+
* @returns {Promise<BuildingCollectionResponse>}
25+
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
26+
*/
27+
get(requestConfiguration?: RequestConfiguration<GraphBuildingRequestBuilderGetQueryParameters> | undefined) : Promise<BuildingCollectionResponse | undefined>;
28+
/**
29+
* Get the items of type microsoft.graph.building in the microsoft.graph.place collection
30+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
31+
* @returns {RequestInformation}
32+
*/
33+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<GraphBuildingRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
34+
}
35+
/**
36+
* Get the items of type microsoft.graph.building in the microsoft.graph.place collection
37+
*/
38+
export interface GraphBuildingRequestBuilderGetQueryParameters {
39+
/**
40+
* Include count of items
41+
*/
42+
count?: boolean;
43+
/**
44+
* Expand related entities
45+
*/
46+
expand?: string[];
47+
/**
48+
* Filter items by property values
49+
*/
50+
filter?: string;
51+
/**
52+
* Order items by property values
53+
*/
54+
orderby?: string[];
55+
/**
56+
* Search items by search phrases
57+
*/
58+
search?: string;
59+
/**
60+
* Select properties to be returned
61+
*/
62+
select?: string[];
63+
/**
64+
* Skip the first n items
65+
*/
66+
skip?: number;
67+
/**
68+
* Show only the first n items
69+
*/
70+
top?: number;
71+
}
72+
/**
73+
* Uri template for the request builder.
74+
*/
75+
export const GraphBuildingRequestBuilderUriTemplate = "{+baseurl}/places/graph.building{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}";
76+
/**
77+
* Mapper for query parameters from symbol name to serialization name represented as a constant.
78+
*/
79+
const GraphBuildingRequestBuilderGetQueryParametersMapper: Record<string, string> = {
80+
"count": "%24count",
81+
"expand": "%24expand",
82+
"filter": "%24filter",
83+
"orderby": "%24orderby",
84+
"search": "%24search",
85+
"select": "%24select",
86+
"skip": "%24skip",
87+
"top": "%24top",
88+
};
89+
/**
90+
* Metadata for all the navigation properties in the request builder.
91+
*/
92+
export const GraphBuildingRequestBuilderNavigationMetadata: Record<Exclude<keyof GraphBuildingRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = {
93+
count: {
94+
requestsMetadata: CountRequestBuilderRequestsMetadata,
95+
},
96+
};
97+
/**
98+
* Metadata for all the requests in the request builder.
99+
*/
100+
export const GraphBuildingRequestBuilderRequestsMetadata: RequestsMetadata = {
101+
get: {
102+
uriTemplate: GraphBuildingRequestBuilderUriTemplate,
103+
responseBodyContentType: "application/json",
104+
errorMappings: {
105+
XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>,
106+
},
107+
adapterMethodName: "send",
108+
responseBodyFactory: createBuildingCollectionResponseFromDiscriminatorValue,
109+
queryParametersMapper: GraphBuildingRequestBuilderGetQueryParametersMapper,
110+
},
111+
};
112+
/* tslint:enable */
113+
/* eslint-enable */

0 commit comments

Comments
 (0)