@blinkk/root-cms 1.0.0-rc.9 → 1.0.1
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/LICENSE +22 -0
- package/README.md +66 -0
- package/bin/root-cms.js +5 -23
- package/dist/app.js +67 -14
- package/dist/cli.js +210 -100
- package/dist/client.d.ts +81 -4
- package/dist/client.js +267 -8
- package/dist/core.d.ts +2 -3
- package/dist/core.js +275 -8
- package/dist/functions.d.ts +1 -1
- package/dist/functions.js +553 -98
- package/dist/plugin.d.ts +18 -5
- package/dist/plugin.js +668 -140
- package/dist/project.d.ts +2 -2
- package/dist/richtext.d.ts +73 -0
- package/dist/richtext.js +129 -0
- package/dist/{schema-fad0a59a.d.ts → schema--v3Ho5Lj.d.ts} +27 -39
- package/dist/ui/signin.css +8 -0
- package/dist/ui/signin.js +571 -407
- package/dist/ui/ui.css +1006 -27
- package/dist/ui/ui.js +26228 -8796
- package/package.json +53 -36
package/dist/plugin.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Request, Plugin } from '@blinkk/root';
|
|
2
2
|
import { App } from 'firebase-admin/app';
|
|
3
|
-
import { DecodedIdToken } from 'firebase-admin/auth';
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
interface CMSUser {
|
|
5
|
+
email: string;
|
|
6
|
+
}
|
|
6
7
|
type CMSPluginOptions = {
|
|
7
8
|
/**
|
|
8
9
|
* The ID of the project. Data will be stored under the namespace
|
|
@@ -24,8 +25,16 @@ type CMSPluginOptions = {
|
|
|
24
25
|
authDomain: string;
|
|
25
26
|
projectId: string;
|
|
26
27
|
storageBucket: string;
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* GAPI credentials. Include if using Google Drive and Google Sheets features.
|
|
31
|
+
* See: https://developers.google.com/sheets/api/quickstart/js
|
|
32
|
+
*/
|
|
33
|
+
gapi?: {
|
|
34
|
+
/** https://developers.google.com/sheets/api/quickstart/js#create_an_api_key */
|
|
35
|
+
apiKey: string;
|
|
36
|
+
/** https://developers.google.com/sheets/api/quickstart/js#authorize_credentials_for_a_web_application */
|
|
37
|
+
clientId: string;
|
|
29
38
|
};
|
|
30
39
|
/**
|
|
31
40
|
* Secret value(s) used for signing the user authentication cookie.
|
|
@@ -35,6 +44,10 @@ type CMSPluginOptions = {
|
|
|
35
44
|
cookieSecret?: string | string[];
|
|
36
45
|
/** Function called to check if a user should have access to the CMS. */
|
|
37
46
|
isUserAuthorized?: (req: Request, user: CMSUser) => boolean | Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Function to call to check if login is required for a particular request.
|
|
49
|
+
*/
|
|
50
|
+
isLoginRequired?: (req: Request) => boolean;
|
|
38
51
|
/**
|
|
39
52
|
* URL to GCI service for transforming uploaded GCS images to a Google App
|
|
40
53
|
* Engine Images API serving URL.
|
|
@@ -60,4 +73,4 @@ type CMSPlugin = Plugin & {
|
|
|
60
73
|
};
|
|
61
74
|
declare function cmsPlugin(options: CMSPluginOptions): CMSPlugin;
|
|
62
75
|
|
|
63
|
-
export { CMSPlugin, CMSPluginOptions, CMSUser, cmsPlugin };
|
|
76
|
+
export { type CMSPlugin, type CMSPluginOptions, type CMSUser, cmsPlugin };
|