datocms-plugin-sdk 0.3.24-alpha.3 → 0.3.27

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.
@@ -1,4 +1,4 @@
1
- import { Account, Field, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload, UploadCreateSchema, User } from './SiteApiSchema';
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;
@@ -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
- defaultFieldMetadata?: NonNullable<Record<string, UploadCreateSchema['data']['attributes']['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 = {
@@ -1,4 +1,4 @@
1
- import { Account, Field, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload, UploadCreateSchema, User } from './SiteApiSchema';
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;
@@ -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
- defaultFieldMetadata?: NonNullable<Record<string, UploadCreateSchema['data']['attributes']['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.24-alpha.3",
3
+ "version": "0.3.27",
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
- "sistema",
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": "e0d3595cc0a4b048f5f10fbd65a5b8aa3be13936"
44
+ "gitHead": "f28932bfb68e15a81b74c3f185b2cdd9a4a44ec3"
45
45
  }