IF Commons GitHub

graph

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-anyfs-onedrive-store FR-008, 0002-anyfs-onedrive-store FR-001

The client of Microsoft Graph: it puts the bearer token of the token source on every request to the service, asks again once with a new token when the service refuses the first, follows the redirect of a download to its pre-authenticated address without the token (and only to an https address), and gives what the service answered, or why it did not, as a value. It knows nothing of what an item is.

import { makeGraph } from "./graph.ts";
// const graph = makeGraph({ endpoint: "https://graph.microsoft.com/v1.0", token, transport, timeoutMs: 30000 });
// await graph.send({ method: "GET", address: "/me/drive/root" });

Source: commons/anyfs-onedrive/src/graph.ts

2 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

staticTokenconst
const staticToken: (token: string) => TokenSource

The token that is always the same text, for a program that holds one for a short time.

Imported by 1 test of the run (0 passed, 0 failed): the library's results

TokenSourcetype
type TokenSource = () => Promise<Result<string, string>>;

Where a bearer token comes from: a function that gives one, or says why it cannot. It is asked for every request, so that it may refresh.

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.