@qpjoy/electron-plugin-sdk 0.1.1 → 0.1.2
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/index.d.ts +20 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -65,7 +65,27 @@ export interface PluginHostBridge {
|
|
|
65
65
|
*/
|
|
66
66
|
marketplaceDb?: {
|
|
67
67
|
raw(): unknown;
|
|
68
|
+
getMeta?(key: string): string | null;
|
|
69
|
+
setMeta?(key: string, value: string): void;
|
|
70
|
+
getActiveSession?(): {
|
|
71
|
+
accessToken: string | null;
|
|
72
|
+
refreshToken: string | null;
|
|
73
|
+
expiresAt: string | null;
|
|
74
|
+
user: Record<string, unknown> | null;
|
|
75
|
+
} | null;
|
|
76
|
+
setSession?(session: {
|
|
77
|
+
accessToken: string | null;
|
|
78
|
+
refreshToken: string | null;
|
|
79
|
+
expiresAt: string | null;
|
|
80
|
+
user: Record<string, unknown> | null;
|
|
81
|
+
}): void;
|
|
68
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Resolved marketplace server URL from the host, or null when the host is
|
|
85
|
+
* intentionally offline. Plugins should prefer this over hard-coded
|
|
86
|
+
* endpoints so packaged apps do not accidentally talk to dev defaults.
|
|
87
|
+
*/
|
|
88
|
+
serverBaseUrl?: string | null;
|
|
69
89
|
/** Ask the host to re-apply session proxy. Requires `system:proxy`. */
|
|
70
90
|
applyProxy(): Promise<void>;
|
|
71
91
|
}
|
package/package.json
CHANGED