Skip to content

Commit

Permalink
Merge pull request #443 from microsoftgraph/v1.0/pipelinebuild/129590
Browse files Browse the repository at this point in the history
V1.0/pipelinebuild/129590
  • Loading branch information
baywet authored Nov 24, 2023
2 parents 1c3d2fd + e102742 commit 6ae5cd6
Show file tree
Hide file tree
Showing 13,150 changed files with 155,928 additions and 366,327 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
66 changes: 33 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/msgraph-sdk-javascript",
"version": "1.0.0-preview.6",
"version": "1.0.0-preview.7",
"description": "",
"main": "lib/src/graphclient/index.js",
"types": "lib/src/graphclient/index.d.ts",
Expand Down
63 changes: 15 additions & 48 deletions src/admin/adminRequestBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EdgeRequestBuilder } from './edge/edgeRequestBuilder';
import { PeopleRequestBuilder } from './people/peopleRequestBuilder';
import { ServiceAnnouncementRequestBuilder } from './serviceAnnouncement/serviceAnnouncementRequestBuilder';
import { SharepointRequestBuilder } from './sharepoint/sharepointRequestBuilder';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestOption } from '@microsoft/kiota-abstractions';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions';

export interface AdminRequestBuilderGetQueryParameters {
/**
Expand All @@ -20,30 +20,6 @@ export interface AdminRequestBuilderGetQueryParameters {
*/
select?: string[];
}
export interface AdminRequestBuilderGetRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
/**
* Request query parameters
*/
queryParameters?: AdminRequestBuilderGetQueryParameters;
}
export interface AdminRequestBuilderPatchRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
}
/**
* Provides operations to manage the admin singleton.
*/
Expand Down Expand Up @@ -85,7 +61,7 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Admin
*/
public get(requestConfiguration?: AdminRequestBuilderGetRequestConfiguration | undefined) : Promise<Admin | undefined> {
public get(requestConfiguration?: RequestConfiguration<AdminRequestBuilderGetQueryParameters> | undefined) : Promise<Admin | undefined> {
const requestInfo = this.toGetRequestInformation(
requestConfiguration
);
Expand All @@ -101,7 +77,7 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Admin
*/
public patch(body: Admin, requestConfiguration?: AdminRequestBuilderPatchRequestConfiguration | undefined) : Promise<Admin | undefined> {
public patch(body: Admin, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Admin | undefined> {
const requestInfo = this.toPatchRequestInformation(
body, requestConfiguration
);
Expand All @@ -116,17 +92,10 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toGetRequestInformation(requestConfiguration?: AdminRequestBuilderGetRequestConfiguration | undefined) : RequestInformation {
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.setQueryStringParametersFromRawObject(requestConfiguration.queryParameters);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.GET;
requestInfo.tryAddRequestHeaders("Accept", "application/json;q=1");
public toGetRequestInformation(requestConfiguration?: RequestConfiguration<AdminRequestBuilderGetQueryParameters> | undefined) : RequestInformation {
const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters);
requestInfo.configure(requestConfiguration, adminRequestBuilderGetQueryParametersMapper);
requestInfo.headers.tryAdd("Accept", "application/json");
return requestInfo;
};
/**
Expand All @@ -135,17 +104,11 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toPatchRequestInformation(body: Admin, requestConfiguration?: AdminRequestBuilderPatchRequestConfiguration | undefined) : RequestInformation {
public toPatchRequestInformation(body: Admin, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation {
if(!body) throw new Error("body cannot be undefined");
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.PATCH;
requestInfo.tryAddRequestHeaders("Accept", "application/json;q=1");
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, serializeAdmin);
return requestInfo;
};
Expand All @@ -159,5 +122,9 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
return new AdminRequestBuilder(rawUrl, this.requestAdapter);
};
}
const adminRequestBuilderGetQueryParametersMapper: Record<string, string> = {
"expand": "%24expand",
"select": "%24select",
};
// tslint:enable
// eslint-enable
Loading

0 comments on commit 6ae5cd6

Please sign in to comment.