Skip to content

Commit

Permalink
Revert "Adding initial thoughts on Kiota JS for Graph"
Browse files Browse the repository at this point in the history
This reverts commit 774d226.
  • Loading branch information
sebastienlevert committed Jan 14, 2022
1 parent 774d226 commit d261c77
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 174 deletions.
10 changes: 8 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

name: Bug report about: Create a report to help us improve title: "" labels: "" assignees: "" ---# Bug Report
---

# Bug Report

## Prerequisites

Expand Down Expand Up @@ -34,7 +41,6 @@ For more information, see the `CONTRIBUTING` guide.
Add any other context about the problem here..

## Usage Information

Request ID - Value of the `requestId` field if you are receiving a Graph API error response

SDK Version - [SDK version you are using]
Expand Down
9 changes: 8 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

name: Feature request about: Suggest an idea for this project title: "" labels: "" assignees: "" ---# Feature Request
---

# Feature Request

## Is your feature request related to a problem? Please describe

Expand Down
5 changes: 2 additions & 3 deletions changelogs/v3-upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
## Enhancements

### Introducing support for `@azure/msal-browser`

- The 3.0.0 version introduces `AuthCodeMSALBrowserAuthenticationProvider` which supports authentication using the [MSAL Browser](https://www.npmjs.com/package/@azure/msal-browser)
- `AuthCodeMSALBrowserAuthenticationProvider` enables authorization using the Authentication Code Flow with PKCE. Learn more about the [AuthCodeMSALBrowserAuthenticationProvider](https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/AuthCodeMSALBrowserAuthenticationProvider.md).
- The 3.0.0 version introduces `AuthCodeMSALBrowserAuthenticationProvider` which supports authentication using the [MSAL Browser](https://www.npmjs.com/package/@azure/msal-browser)
- `AuthCodeMSALBrowserAuthenticationProvider` enables authorization using the Authentication Code Flow with PKCE. Learn more about the [AuthCodeMSALBrowserAuthenticationProvider](https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/AuthCodeMSALBrowserAuthenticationProvider.md).

### Introducing support for `@azure/identity TokenCredentials`

Expand Down
147 changes: 0 additions & 147 deletions design/kiota-e2e.md

This file was deleted.

25 changes: 18 additions & 7 deletions design/large-file-upload-task-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document proposes high-level design modifications to the `LargeFileUploadTa

- Enhancement - Support Node.js Stream upload. Issue [#320](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/320).
- Bug Fix - Support large file uploads to Outlook API. Issue [#359](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/359).
- Enhancement- Support upload progress handler callback. Issue [#305](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/305).
- Enhancement- Support upload progress handler callback. Issue [#305](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/305).

Outline of the current implementation -

Expand Down Expand Up @@ -75,10 +75,21 @@ sliceFile(range: Range): ArrayBuffer | Blob {
- The LargeFileUploadTask should allow uploads to OneDrive API, Outlook API and PrintDocument API.
- Proposed changes-
- Add class `UploadResult` containing `location` and `responseBody` properties.
- `location` provides access to the `location` field in the response headers.
- `responseBody` provides access to the Graph API response body.
- The `upload` task should return the `UploadResult` object on successful completion of task.

- `location` provides access to the `location` field in the response headers.
- `responseBody` provides access to the Graph API response body.
- The `upload` task should return the `UploadResult` object on successful completion of task.
###### 3. Support upload progress handler callback

- Proposed changes - - Add interface -> `interface UploadEventHandler{ extraCallbackParam?: unknown; progress(range: Range, extraCallbackParam?: unknown):void }` - Add uploadEventHandlers option to -> `interface LargeFileUploadTaskOptions { rangeSize?: number; uploadEventHandlers?: UploadEventHandler; }` - In the `upload` function call the `uploadEventHandlers.progress()` function if defined.
- Proposed changes -
- Add interface -> `interface UploadEventHandler{
extraCallbackParam?: unknown;
progress(range: Range, extraCallbackParam?: unknown):void
}`
- Add uploadEventHandlers option to ->
```
interface LargeFileUploadTaskOptions {
rangeSize?: number;
uploadEventHandlers?: UploadEventHandler;
}
```
- In the `upload` function call the `uploadEventHandlers.progress()` function if defined.
2 changes: 1 addition & 1 deletion design/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

##### Current set up -

1. TypeScript Source Code
1. TypeScript Source Code
/ \
Transpiles into JavaScript
'lib' folder
Expand Down
23 changes: 11 additions & 12 deletions docs/CancellingAHTTPRequest.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Cancel a HTTP request

> The `abort()` method of the AbortController interface aborts a DOM request (e.g. a Fetch request)
>
> The `abort()` method of the AbortController interface aborts a DOM request (e.g. a Fetch request)
>
> -- [AbortController interface](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)
References -

- [AbortController interface](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)
- [abortcontroller npm](https://www.npmjs.com/package/abort-controller)
- [abortcontroller-polyfill](https://www.npmjs.com/package/abortcontroller-polyfill)
- [Example of the AbortController implementation](https://github.com/node-fetch/node-fetch#request-cancellation-with-abortsignal)
References -
* [AbortController interface](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)
* [abortcontroller npm](https://www.npmjs.com/package/abort-controller)
* [abortcontroller-polyfill](https://www.npmjs.com/package/abortcontroller-polyfill)
* [Example of the AbortController implementation](https://github.com/node-fetch/node-fetch#request-cancellation-with-abortsignal)

#### Following is how canceling a fetch call works:

- Create an AbortController instance.
- That instance has a signal property.
- Pass the signal as a fetch option for signal.
- Call the AbortController's abort property to cancel all fetches that use that signal.
* Create an AbortController instance.
* That instance has a signal property.
* Pass the signal as a fetch option for signal.
* Call the AbortController's abort property to cancel all fetches that use that signal.

#### Setting the AbortController.signal as a fetch option while creating the MSGraph SDK Client instance:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

4. Navigate to the samples folder [./samples]and run `npm install`

5. Navigate to secrets.js[./secrets] and populate all the values (tenantId, clientId, clientSecret, scopes)
5. Navigate to secrets.js[./secrets] and populate all the values (tenantId, clientId, clientSecret, scopes)

6. Navigate to tokenCredentialAuthenticationProvider[./samples/javascript/clientInitialization/tokenCredentialAuthenticationProvider] in the samples directory.

Expand Down

0 comments on commit d261c77

Please sign in to comment.