@open-webapp/drive-sync 0.5.6 → 0.6.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/dist/types.d.ts CHANGED
@@ -4,6 +4,34 @@ export interface DriveSyncOptions {
4
4
  clientId: string;
5
5
  folderPath: string[];
6
6
  logger?: Logger;
7
+ /**
8
+ * Opt-in: when set, connect() runs the server-mediated token-exchange flow
9
+ * against this URL instead of the legacy GIS implicit flow. When absent,
10
+ * the legacy implicit flow is used unchanged.
11
+ */
12
+ tokenExchangeUrl?: string;
13
+ }
14
+ /**
15
+ * Decoded contents of an {@link Envelope}'s `payload`. Mirrors the fields of
16
+ * a Google OAuth token response that drive-sync needs.
17
+ */
18
+ export interface EnvelopePayload {
19
+ access_token: string;
20
+ expiry_date: number;
21
+ token_type: 'Bearer';
22
+ scope: string;
23
+ }
24
+ /**
25
+ * Opaque envelope returned by the server-side token-exchange endpoint. The
26
+ * `sig` is a server-side signature that is NEVER verified client-side —
27
+ * drive-sync treats the whole structure as opaque and simply forwards the
28
+ * decoded `payload` into its normal token storage.
29
+ */
30
+ export interface Envelope {
31
+ v: 2;
32
+ guid: string;
33
+ payload: EnvelopePayload;
34
+ sig: string;
7
35
  }
8
36
  /**
9
37
  * Durable connection state returned by getConnection(). Survives token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-webapp/drive-sync",
3
- "version": "0.5.6",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",