Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated models and request builders #661

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,595 changes: 1,355 additions & 1,240 deletions packages/kiota-dom-export.txt

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions packages/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"descriptionHash": "BA6CA5190B0AC85A44C36602A82AF7FA211073DD0FDBCCF30634DB35D0C9BB110104E1FE8590A7057B970EBA56F7B46A45164236D3D3426D8EB74A9362D17F7A",
"descriptionHash": "E8C58B9E7D0737F125B46642DD10349452886D3991D072A5549EF231E3AB647E521BEEE339112445B6BBE5F42F0CD10593CA2E7B03AE41B325473F3F6C5DD3B8",
"descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.18.0",
"kiotaVersion": "1.19.0",
"clientClassName": "GraphBaseServiceClient",
"typeAccessModifier": "Public",
"clientNamespaceName": "github.com/microsoftgraph/msgraph-sdk-typescript/",
"language": "TypeScript",
"usesBackingStore": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,77 @@
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createDirectoryObjectFromDiscriminatorValue, type DirectoryObject } from '@microsoft/msgraph-sdk/models/index.js';
import { createDirectoryObjectFromDiscriminatorValue, serializeDirectoryObject, type DirectoryObject } from '@microsoft/msgraph-sdk/models/index.js';
// @ts-ignore
import { createODataErrorFromDiscriminatorValue, type ODataError } from '@microsoft/msgraph-sdk/models/oDataErrors/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
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';

/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {RestorePostRequestBody}
*/
// @ts-ignore
export function createRestorePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoRestorePostRequestBody;
}
/**
* The deserialization information for the current model
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoRestorePostRequestBody(restorePostRequestBody: Partial<RestorePostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"autoReconcileProxyConflict": n => { restorePostRequestBody.autoReconcileProxyConflict = n.getBooleanValue(); },
"backingStoreEnabled": n => { restorePostRequestBody.backingStoreEnabled = true; },
}
}
export interface RestorePostRequestBody extends AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*/
additionalData?: Record<string, unknown>;
/**
* The autoReconcileProxyConflict property
*/
autoReconcileProxyConflict?: boolean | null;
/**
* Stores model information.
*/
backingStoreEnabled?: boolean | null;
}
/**
* Provides operations to call the restore method.
*/
export interface RestoreRequestBuilder extends BaseRequestBuilder<RestoreRequestBuilder> {
/**
* 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. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* 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 can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<DirectoryObject>}
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
* @see {@link https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0|Find more info here}
*/
post(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DirectoryObject | undefined>;
post(body: RestorePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DirectoryObject | undefined>;
/**
* 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. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* 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 can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/
toPostRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
toPostRequestInformation(body: RestorePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeRestorePostRequestBody(writer: SerializationWriter, restorePostRequestBody: Partial<RestorePostRequestBody> | undefined | null = {}) : void {
if (restorePostRequestBody) {
writer.writeBooleanValue("autoReconcileProxyConflict", restorePostRequestBody.autoReconcileProxyConflict);
writer.writeAdditionalData(restorePostRequestBody.additionalData);
}
}
/**
* Uri template for the request builder.
Expand All @@ -43,6 +90,9 @@ export const RestoreRequestBuilderRequestsMetadata: RequestsMetadata = {
},
adapterMethodName: "send",
responseBodyFactory: createDirectoryObjectFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeRestorePostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
Expand Down
8 changes: 4 additions & 4 deletions packages/msgraph-sdk-chats/chats/item/members/item/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export interface ConversationMemberItemRequestBuilder extends BaseRequestBuilder
*/
delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<void>;
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<ConversationMember>}
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
* @see {@link https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0|Find more info here}
* @see {@link https://learn.microsoft.com/graph/api/chat-get-members?view=graph-rest-1.0|Find more info here}
*/
get(requestConfiguration?: RequestConfiguration<ConversationMemberItemRequestBuilderGetQueryParameters> | undefined) : Promise<ConversationMember | undefined>;
/**
Expand All @@ -42,7 +42,7 @@ export interface ConversationMemberItemRequestBuilder extends BaseRequestBuilder
*/
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/
Expand All @@ -56,7 +56,7 @@ export interface ConversationMemberItemRequestBuilder extends BaseRequestBuilder
toPatchRequestInformation(body: ConversationMember, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Retrieve a conversationMember from a chat or channel.
* Retrieve a conversationMember from a chat.
*/
export interface ConversationMemberItemRequestBuilderGetQueryParameters {
/**
Expand Down
6 changes: 3 additions & 3 deletions packages/msgraph-sdk-chats/chats/item/messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export interface MessagesRequestBuilder extends BaseRequestBuilder<MessagesReque
*/
get(requestConfiguration?: RequestConfiguration<MessagesRequestBuilderGetQueryParameters> | undefined) : Promise<ChatMessageCollectionResponse | undefined>;
/**
* Send a new chatMessage in the specified channel or a chat.
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<ChatMessage>}
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
* @see {@link https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0|Find more info here}
* @see {@link https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0|Find more info here}
*/
post(body: ChatMessage, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<ChatMessage | undefined>;
/**
Expand All @@ -56,7 +56,7 @@ export interface MessagesRequestBuilder extends BaseRequestBuilder<MessagesReque
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<MessagesRequestBuilderGetQueryParameters> | undefined) : RequestInformation;
/**
* Send a new chatMessage in the specified channel or a chat.
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
Expand Down
62 changes: 56 additions & 6 deletions packages/msgraph-sdk-contacts/contacts/item/restore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,77 @@
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createDirectoryObjectFromDiscriminatorValue, type DirectoryObject } from '@microsoft/msgraph-sdk/models/index.js';
import { createDirectoryObjectFromDiscriminatorValue, serializeDirectoryObject, type DirectoryObject } from '@microsoft/msgraph-sdk/models/index.js';
// @ts-ignore
import { createODataErrorFromDiscriminatorValue, type ODataError } from '@microsoft/msgraph-sdk/models/oDataErrors/index.js';
// @ts-ignore
import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
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';

/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {RestorePostRequestBody}
*/
// @ts-ignore
export function createRestorePostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
return deserializeIntoRestorePostRequestBody;
}
/**
* The deserialization information for the current model
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoRestorePostRequestBody(restorePostRequestBody: Partial<RestorePostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> {
return {
"autoReconcileProxyConflict": n => { restorePostRequestBody.autoReconcileProxyConflict = n.getBooleanValue(); },
"backingStoreEnabled": n => { restorePostRequestBody.backingStoreEnabled = true; },
}
}
export interface RestorePostRequestBody extends AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*/
additionalData?: Record<string, unknown>;
/**
* The autoReconcileProxyConflict property
*/
autoReconcileProxyConflict?: boolean | null;
/**
* Stores model information.
*/
backingStoreEnabled?: boolean | null;
}
/**
* Provides operations to call the restore method.
*/
export interface RestoreRequestBuilder extends BaseRequestBuilder<RestoreRequestBuilder> {
/**
* 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. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* 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 can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<DirectoryObject>}
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
* @see {@link https://learn.microsoft.com/graph/api/directory-deleteditems-restore?view=graph-rest-1.0|Find more info here}
*/
post(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DirectoryObject | undefined>;
post(body: RestorePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<DirectoryObject | undefined>;
/**
* 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. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* 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 can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/
toPostRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
toPostRequestInformation(body: RestorePostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeRestorePostRequestBody(writer: SerializationWriter, restorePostRequestBody: Partial<RestorePostRequestBody> | undefined | null = {}) : void {
if (restorePostRequestBody) {
writer.writeBooleanValue("autoReconcileProxyConflict", restorePostRequestBody.autoReconcileProxyConflict);
writer.writeAdditionalData(restorePostRequestBody.additionalData);
}
}
/**
* Uri template for the request builder.
Expand All @@ -43,6 +90,9 @@ export const RestoreRequestBuilderRequestsMetadata: RequestsMetadata = {
},
adapterMethodName: "send",
responseBodyFactory: createDirectoryObjectFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeRestorePostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
Expand Down
Loading