@sentry/junior-google 0.301.0 → 0.302.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/dist/credentials.d.ts +8 -1
- package/dist/index.js +1044 -973
- package/dist/links/files.d.ts +39 -3
- package/dist/links/thumbnails.d.ts +8 -0
- package/dist/tools/cancel-event.d.ts +86 -4
- package/dist/tools/create-doc.d.ts +86 -4
- package/dist/tools/create-event.d.ts +86 -4
- package/dist/tools/find-meeting-times.d.ts +86 -4
- package/dist/tools/insert-doc-content.d.ts +86 -4
- package/dist/tools/list-events.d.ts +86 -4
- package/dist/tools/list-file-comments.d.ts +86 -4
- package/dist/tools/read-file.d.ts +86 -4
- package/dist/tools/read-meeting-transcript.d.ts +86 -4
- package/dist/tools/replace-doc-content.d.ts +86 -4
- package/dist/tools/replace-doc-text.d.ts +86 -4
- package/dist/tools/search-files.d.ts +86 -4
- package/dist/tools/shared.d.ts +42 -1
- package/dist/tools/update-event.d.ts +86 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -38,14 +38,18 @@ have no owner, so search shows them only when they are shared with the
|
|
|
38
38
|
requester by name. Search returns nothing for a requester outside those
|
|
39
39
|
domains.
|
|
40
40
|
|
|
41
|
-
The dashboard shows a card for a Doc, Sheet, Slides,
|
|
42
|
-
only when the signed-in viewer can open it
|
|
41
|
+
The dashboard shows a card for a Doc, Sheet, Slides, Drive file, Drive
|
|
42
|
+
folder, or Calendar event link only when the signed-in viewer can open it
|
|
43
|
+
too. A file must name the
|
|
43
44
|
viewer's email as a reader, writer, or owner, be open to anyone with the
|
|
44
45
|
link, or be open to the viewer's domain and owned in that domain. Access
|
|
45
46
|
through a Google group gets no card. An event must be on the Junior
|
|
46
47
|
account's calendar, with the viewer as its organizer, creator, or a guest.
|
|
47
|
-
A file card shows the title, type, owner, and modified time.
|
|
48
|
-
|
|
48
|
+
A file card shows the title, type, owner, and modified time. A Drive link to
|
|
49
|
+
a Doc, Sheet, or Slides file shows the same card as its Docs link. Other
|
|
50
|
+
Drive files also show a thumbnail. The image route checks the viewer again
|
|
51
|
+
on each read, and sends Junior's credential only to Google's thumbnail host.
|
|
52
|
+
An event card shows the title and time. Cards never show guests.
|
|
49
53
|
|
|
50
54
|
Junior edits a Doc only for a requester who can edit it through their own
|
|
51
55
|
email, their domain, or an editable link. Access through a Google group is not
|
package/dist/credentials.d.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* account. They enforce disclosure and invite rules in code, so the sandbox
|
|
6
6
|
* and other callers get no Google credential at all.
|
|
7
7
|
*/
|
|
8
|
-
import { type EgressHookContext, type IssueCredentialHookContext, type PluginCredentialResult, type PluginGrant } from "@sentry/junior-plugin-api";
|
|
8
|
+
import { type EgressHookContext, type IssueCredentialHookContext, type PluginContext, type PluginCredentialResult, type PluginGrant } from "@sentry/junior-plugin-api";
|
|
9
|
+
import { type GoogleConfig } from "./config";
|
|
9
10
|
/** Calendar and Drive API host. */
|
|
10
11
|
export declare const GOOGLE_API_DOMAIN = "www.googleapis.com";
|
|
11
12
|
/** Every host that receives Junior's Google access token. */
|
|
@@ -142,5 +143,11 @@ export declare const GOOGLE_OPERATIONS: {
|
|
|
142
143
|
export type GoogleOperation = keyof typeof GOOGLE_OPERATIONS;
|
|
143
144
|
/** Select the grant for one Google request, or deny it. */
|
|
144
145
|
export declare function googleGrantForEgress(ctx: EgressHookContext): PluginGrant;
|
|
146
|
+
/**
|
|
147
|
+
* Return a fresh access token for Junior's Google account, for a request
|
|
148
|
+
* that cannot go through egress, such as a Drive thumbnail that the image
|
|
149
|
+
* proxy fetches. Return nothing when the account is not connected.
|
|
150
|
+
*/
|
|
151
|
+
export declare function readGoogleAccessToken(ctx: Pick<PluginContext, "db" | "log">, config: GoogleConfig): Promise<string | undefined>;
|
|
145
152
|
/** Mint a short-lived access token for Junior's Google account. */
|
|
146
153
|
export declare function issueGoogleCredential(ctx: IssueCredentialHookContext): Promise<PluginCredentialResult>;
|