@hygraph/app-sdk 0.0.5 → 0.0.7
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/app-sdk.cjs.development.js +7 -10
- package/dist/app-sdk.cjs.development.js.map +1 -1
- package/dist/app-sdk.cjs.production.min.js +1 -1
- package/dist/app-sdk.cjs.production.min.js.map +1 -1
- package/dist/app-sdk.esm.js +7 -10
- package/dist/app-sdk.esm.js.map +1 -1
- package/dist/app-sdk.umd.development.js +7 -10
- package/dist/app-sdk.umd.development.js.map +1 -1
- package/dist/app-sdk.umd.production.min.js +1 -1
- package/dist/app-sdk.umd.production.min.js.map +1 -1
- package/dist/base.d.ts +2 -4
- package/dist/type-helpers/getModelFields.d.ts +1115 -0
- package/dist/type-helpers/model.d.ts +2 -0
- package/dist/type-helpers/stage.d.ts +1 -1
- package/package.json +9 -7
- package/src/base.ts +2 -5
- package/src/type-helpers/getModelFields.ts +2287 -0
- package/src/type-helpers/model.ts +4 -0
- package/src/type-helpers/stage.ts +5 -10
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GetModelFields } from './getModelFields';
|
|
1
2
|
export declare type Model = {
|
|
2
3
|
apiId: string;
|
|
3
4
|
apiIdPlural: string;
|
|
@@ -5,4 +6,5 @@ export declare type Model = {
|
|
|
5
6
|
description?: string | null | undefined;
|
|
6
7
|
displayName: string;
|
|
7
8
|
isLocalized: boolean;
|
|
9
|
+
getFields: GetModelFields;
|
|
8
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type ColorPalette = '
|
|
1
|
+
export declare type ColorPalette = 'PINK' | 'PURPLE' | 'ORANGE' | 'RED' | 'BROWN' | 'TEAL' | 'GREEN' | 'YELLOW';
|
|
2
2
|
export declare type Stage = {
|
|
3
3
|
id: string;
|
|
4
4
|
apiId: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hygraph/app-sdk",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"author": "Hygraph",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
"unpkg": "dist/app-sdk.umd.production.min.js",
|
|
13
13
|
"typings": "dist/index.d.ts",
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsdx build --format cjs,esm,umd",
|
|
17
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
18
|
+
"lint": "tsdx lint",
|
|
19
|
+
"prepare": "npm run build"
|
|
20
|
+
},
|
|
15
21
|
"files": [
|
|
16
22
|
"dist",
|
|
17
23
|
"src"
|
|
@@ -31,9 +37,5 @@
|
|
|
31
37
|
"tslib": "^2.3.0",
|
|
32
38
|
"typescript": "^4.3.5"
|
|
33
39
|
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
37
|
-
"lint": "tsdx lint"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
+
"gitHead": "a38ad45c905af8b10710628e7be4a2e9ecd28ed4"
|
|
41
|
+
}
|
package/src/base.ts
CHANGED
|
@@ -117,13 +117,10 @@ export interface ExtensionPropsBase {
|
|
|
117
117
|
openDialog: OpenDialog;
|
|
118
118
|
showToast: ShowToast;
|
|
119
119
|
openAssetPicker: OpenAssetPicker;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
historyPush: (url: string | HistoryCallback) => Promise<void>;
|
|
120
|
+
reloadPage: () => void;
|
|
121
|
+
clearSearchParams: () => void;
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
export interface ExtensionDialogProps extends ExtensionPropsBase {
|
|
126
125
|
onCloseDialog: (value: any) => void;
|
|
127
126
|
}
|
|
128
|
-
|
|
129
|
-
type HistoryCallback = (href: Location['href']) => string;
|