datocms-plugin-sdk 0.6.15-alpha.1 → 0.6.17
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/cjs/SiteApiSchema.js +0 -1
- package/dist/cjs/SiteApiSchema.js.map +1 -1
- package/dist/cjs/connect.js +30 -17
- package/dist/cjs/connect.js.map +1 -1
- package/dist/cjs/guards.js +1 -2
- package/dist/cjs/guards.js.map +1 -1
- package/dist/esm/SiteApiSchema.d.ts +536 -275
- package/dist/esm/SiteApiSchema.js +0 -1
- package/dist/esm/SiteApiSchema.js.map +1 -1
- package/dist/esm/connect.d.ts +9 -16
- package/dist/esm/connect.js +31 -18
- package/dist/esm/connect.js.map +1 -1
- package/dist/esm/guards.d.ts +1 -4
- package/dist/esm/guards.js +0 -1
- package/dist/esm/guards.js.map +1 -1
- package/dist/types/SiteApiSchema.d.ts +536 -275
- package/dist/types/connect.d.ts +9 -16
- package/dist/types/guards.d.ts +1 -4
- package/package.json +2 -2
- package/src/SiteApiSchema.ts +601 -277
- package/src/connect.ts +64 -54
- package/src/guards.ts +0 -3
- package/types.json +2194 -2243
package/dist/types/connect.d.ts
CHANGED
|
@@ -42,40 +42,33 @@ export declare type FullConnectParameters = {
|
|
|
42
42
|
*/
|
|
43
43
|
onBoot: (ctx: OnBootCtx) => void;
|
|
44
44
|
/**
|
|
45
|
-
* This function will be called before destroying
|
|
45
|
+
* This function will be called before destroying records. You can stop the
|
|
46
46
|
* action by returning `false`
|
|
47
47
|
*
|
|
48
48
|
* @tag beforeHooks
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
onBeforeItemsDestroy: (items: Item[], ctx: OnBootCtx) => MaybePromise<boolean>;
|
|
51
51
|
/**
|
|
52
|
-
* This function will be called before
|
|
52
|
+
* This function will be called before publishing records. You can stop the
|
|
53
53
|
* action by returning `false`
|
|
54
54
|
*
|
|
55
55
|
* @tag beforeHooks
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
onBeforeItemsPublish: (items: Item[], ctx: OnBootCtx) => MaybePromise<boolean>;
|
|
58
58
|
/**
|
|
59
|
-
* This function will be called before
|
|
60
|
-
* can stop the action by returning `false`
|
|
61
|
-
*
|
|
62
|
-
* @tag beforeHooks
|
|
63
|
-
*/
|
|
64
|
-
onBeforeItemUpdate: (payload: ItemUpdateSchema, ctx: OnBootCtx) => MaybePromise<ItemUpdateSchema | false>;
|
|
65
|
-
/**
|
|
66
|
-
* This function will be called before publishing a record. You can stop the
|
|
59
|
+
* This function will be called before unpublishing records. You can stop the
|
|
67
60
|
* action by returning `false`
|
|
68
61
|
*
|
|
69
62
|
* @tag beforeHooks
|
|
70
63
|
*/
|
|
71
|
-
|
|
64
|
+
onBeforeItemsUnpublish: (items: Item[], ctx: OnBootCtx) => MaybePromise<boolean>;
|
|
72
65
|
/**
|
|
73
|
-
* This function will be called before
|
|
74
|
-
* action by returning `false`
|
|
66
|
+
* This function will be called before saving a new version of a record. You
|
|
67
|
+
* can stop the action by returning `false`
|
|
75
68
|
*
|
|
76
69
|
* @tag beforeHooks
|
|
77
70
|
*/
|
|
78
|
-
|
|
71
|
+
onBeforeItemUpsert: (createOrUpdateItemPayload: ItemUpdateSchema | ItemCreateSchema, ctx: OnBootCtx) => MaybePromise<boolean>;
|
|
79
72
|
/**
|
|
80
73
|
* Use this function to declare new tabs you want to add in the top-bar of the
|
|
81
74
|
* UI
|
package/dist/types/guards.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { RenderItemFormOutletMethods } from '.';
|
|
2
|
-
import {
|
|
2
|
+
import { OnBootMethods, RenderPageMethods, RenderFieldExtensionMethods, RenderConfigScreenMethods, RenderManualFieldExtensionConfigScreenMethods, RenderSidebarPanelMethods, RenderModalMethods, RenderAssetSourceMethods } from './types';
|
|
3
3
|
export declare type Parent = {
|
|
4
4
|
getSettings: () => Promise<{
|
|
5
5
|
mode: string;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
|
-
export declare const isInitParent: (parent: Parent, settings: {
|
|
9
|
-
mode: string;
|
|
10
|
-
}) => parent is InitMethods;
|
|
11
8
|
export declare const isOnBootParent: (parent: Parent, settings: {
|
|
12
9
|
mode: string;
|
|
13
10
|
}) => parent is OnBootMethods;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datocms-plugin-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.17",
|
|
4
4
|
"description": "DatoCMS Plugin SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typedoc": "^0.23.20"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "6661d3a021dd1a6166311924818ce674af2f5c15"
|
|
47
47
|
}
|