datocms-plugin-sdk 0.3.24-alpha.5 → 0.3.30
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/esm/types.d.ts +22 -4
- package/dist/types/types.d.ts +22 -4
- package/package.json +3 -3
- package/src/SiteApiSchema.ts +6419 -0
- package/src/connect.ts +527 -0
- package/src/definitions.d.ts +1 -0
- package/src/guards.ts +48 -0
- package/src/index.ts +28 -0
- package/src/types.ts +1398 -0
- package/types.json +837 -560
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, Field, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload,
|
|
1
|
+
import { Account, Field, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
|
|
2
2
|
export declare type Icon = string | {
|
|
3
3
|
type: 'svg';
|
|
4
4
|
viewBox: string;
|
|
@@ -142,7 +142,7 @@ export declare type ManualFieldExtension = {
|
|
|
142
142
|
startOpen: boolean;
|
|
143
143
|
};
|
|
144
144
|
/** The type of fields that the field extension in compatible with */
|
|
145
|
-
fieldTypes: NonNullable<PluginAttributes['field_types']
|
|
145
|
+
fieldTypes: NonNullable<PluginAttributes['field_types']> | 'all';
|
|
146
146
|
/**
|
|
147
147
|
* Whether this field extension needs some configuration options before being
|
|
148
148
|
* installed in a field or not. Will trigger the
|
|
@@ -896,7 +896,7 @@ export declare type IframeMethods = {
|
|
|
896
896
|
/** Sets the height for the iframe */
|
|
897
897
|
setHeight: (number: number) => Promise<void>;
|
|
898
898
|
};
|
|
899
|
-
export declare type RenderMethods = LoadDataMethods & UpdateParametersMethods & ToastMethods & CustomDialogMethods & NavigateMethods;
|
|
899
|
+
export declare type RenderMethods = LoadDataMethods & UpdateParametersMethods & ToastMethods & ItemDialogMethods & UploadDialogMethods & CustomDialogMethods & NavigateMethods;
|
|
900
900
|
/**
|
|
901
901
|
* These information describe the current state of the form that's being shown
|
|
902
902
|
* to the end-user to edit a record
|
|
@@ -1121,7 +1121,25 @@ export declare type NewUpload = {
|
|
|
1121
1121
|
* An hash containing, for each locale of the project, the default metadata to
|
|
1122
1122
|
* apply to the asset
|
|
1123
1123
|
*/
|
|
1124
|
-
default_field_metadata?:
|
|
1124
|
+
default_field_metadata?: {
|
|
1125
|
+
[k: string]: {
|
|
1126
|
+
/** Alternate text for the asset */
|
|
1127
|
+
alt: string | null;
|
|
1128
|
+
/** Title for the asset */
|
|
1129
|
+
title: string | null;
|
|
1130
|
+
/** Object with arbitrary metadata */
|
|
1131
|
+
custom_data: {
|
|
1132
|
+
[k: string]: unknown;
|
|
1133
|
+
};
|
|
1134
|
+
/** Focal point (only for image assets) */
|
|
1135
|
+
focal_point?: {
|
|
1136
|
+
/** Horizontal position expressed as float between 0 and 1 */
|
|
1137
|
+
x: number;
|
|
1138
|
+
/** Vertical position expressed as float between 0 and 1 */
|
|
1139
|
+
y: number;
|
|
1140
|
+
} | null;
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1125
1143
|
};
|
|
1126
1144
|
/** Use these methods to confirm */
|
|
1127
1145
|
export declare type RenderAssetSourceAdditionalMethods = {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, Field, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload,
|
|
1
|
+
import { Account, Field, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
|
|
2
2
|
export declare type Icon = string | {
|
|
3
3
|
type: 'svg';
|
|
4
4
|
viewBox: string;
|
|
@@ -142,7 +142,7 @@ export declare type ManualFieldExtension = {
|
|
|
142
142
|
startOpen: boolean;
|
|
143
143
|
};
|
|
144
144
|
/** The type of fields that the field extension in compatible with */
|
|
145
|
-
fieldTypes: NonNullable<PluginAttributes['field_types']
|
|
145
|
+
fieldTypes: NonNullable<PluginAttributes['field_types']> | 'all';
|
|
146
146
|
/**
|
|
147
147
|
* Whether this field extension needs some configuration options before being
|
|
148
148
|
* installed in a field or not. Will trigger the
|
|
@@ -896,7 +896,7 @@ export declare type IframeMethods = {
|
|
|
896
896
|
/** Sets the height for the iframe */
|
|
897
897
|
setHeight: (number: number) => Promise<void>;
|
|
898
898
|
};
|
|
899
|
-
export declare type RenderMethods = LoadDataMethods & UpdateParametersMethods & ToastMethods & CustomDialogMethods & NavigateMethods;
|
|
899
|
+
export declare type RenderMethods = LoadDataMethods & UpdateParametersMethods & ToastMethods & ItemDialogMethods & UploadDialogMethods & CustomDialogMethods & NavigateMethods;
|
|
900
900
|
/**
|
|
901
901
|
* These information describe the current state of the form that's being shown
|
|
902
902
|
* to the end-user to edit a record
|
|
@@ -1121,7 +1121,25 @@ export declare type NewUpload = {
|
|
|
1121
1121
|
* An hash containing, for each locale of the project, the default metadata to
|
|
1122
1122
|
* apply to the asset
|
|
1123
1123
|
*/
|
|
1124
|
-
default_field_metadata?:
|
|
1124
|
+
default_field_metadata?: {
|
|
1125
|
+
[k: string]: {
|
|
1126
|
+
/** Alternate text for the asset */
|
|
1127
|
+
alt: string | null;
|
|
1128
|
+
/** Title for the asset */
|
|
1129
|
+
title: string | null;
|
|
1130
|
+
/** Object with arbitrary metadata */
|
|
1131
|
+
custom_data: {
|
|
1132
|
+
[k: string]: unknown;
|
|
1133
|
+
};
|
|
1134
|
+
/** Focal point (only for image assets) */
|
|
1135
|
+
focal_point?: {
|
|
1136
|
+
/** Horizontal position expressed as float between 0 and 1 */
|
|
1137
|
+
x: number;
|
|
1138
|
+
/** Vertical position expressed as float between 0 and 1 */
|
|
1139
|
+
y: number;
|
|
1140
|
+
} | null;
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1125
1143
|
};
|
|
1126
1144
|
/** Use these methods to confirm */
|
|
1127
1145
|
export declare type RenderAssetSourceAdditionalMethods = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datocms-plugin-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.30",
|
|
4
4
|
"description": "DatoCMS Plugin SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
|
-
"
|
|
23
|
+
"src",
|
|
24
24
|
"types.json"
|
|
25
25
|
],
|
|
26
26
|
"repository": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"typedoc": "^0.22.8"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "ff419344f09be141cc04bf3e3cc28bd5f1d77903"
|
|
45
45
|
}
|