datocms-plugin-sdk 0.5.3 → 0.6.0

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 { Field, ModelBlock } from './SiteApiSchema';
1
+ import { Field, ItemType } from './SiteApiSchema';
2
2
  import { AssetSource, ContentAreaSidebarItem, FieldExtensionOverride, InitPropertiesAndMethods, ItemFormSidebarPanel, MainNavigationTab, ManualFieldExtension, OnBootPropertiesAndMethods, RenderAssetSourcePropertiesAndMethods, RenderConfigScreenPropertiesAndMethods, RenderFieldExtensionPropertiesAndMethods, RenderManualFieldExtensionConfigScreenPropertiesAndMethods, RenderModalPropertiesAndMethods, RenderPagePropertiesAndMethods, RenderSidebarPanelPropertiesAndMethods, SettingsAreaSidebarItemGroup } from './types';
3
3
  import { ItemFormOutlet, RenderItemFormOutletPropertiesAndMethods, StructuredTextCustomBlockStyle, StructuredTextCustomMark } from '.';
4
4
  export declare type SizingUtilities = {
@@ -17,11 +17,11 @@ export declare type SizingUtilities = {
17
17
  */
18
18
  updateHeight: (newHeight?: number) => void;
19
19
  };
20
- export type { Field, ModelBlock };
20
+ export type { Field, ItemType };
21
21
  export declare type IntentCtx = InitPropertiesAndMethods;
22
22
  export declare type OnBootCtx = OnBootPropertiesAndMethods;
23
23
  export declare type FieldIntentCtx = InitPropertiesAndMethods & {
24
- itemType: ModelBlock;
24
+ itemType: ItemType;
25
25
  };
26
26
  export declare type RenderPageCtx = RenderPagePropertiesAndMethods;
27
27
  export declare type RenderModalCtx = RenderModalPropertiesAndMethods & SizingUtilities;
@@ -78,14 +78,14 @@ export declare type FullConnectParameters = {
78
78
  *
79
79
  * @group sidebarPanels
80
80
  */
81
- itemFormSidebarPanels: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormSidebarPanel[];
81
+ itemFormSidebarPanels: (itemType: ItemType, ctx: IntentCtx) => ItemFormSidebarPanel[];
82
82
  /**
83
83
  * Use this function to declare custom outlets to be shown at the top of the
84
84
  * record's editing page
85
85
  *
86
86
  * @group itemFormOutlets
87
87
  */
88
- itemFormOutlets: (itemType: ModelBlock, ctx: IntentCtx) => ItemFormOutlet[];
88
+ itemFormOutlets: (itemType: ItemType, ctx: IntentCtx) => ItemFormOutlet[];
89
89
  /**
90
90
  * Use this function to automatically force one or more field extensions to a
91
91
  * particular field
@@ -1,4 +1,4 @@
1
- import { Account, Field, Item, ModelBlock, Plugin, Site, SsoUser, Upload, User, Role } from './SiteApiSchema';
2
- export type { Account, Field, Item, ModelBlock, Plugin, Site, SsoUser, Upload, User, Role, };
1
+ import { Account, Field, Item, ItemType, Plugin, Site, SsoUser, Upload, User, Role } from './SiteApiSchema';
2
+ export type { Account, Field, Item, ItemType, Plugin, Site, SsoUser, Upload, User, Role, };
3
3
  export * from './connect';
4
4
  export * from './types';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BlockNodeTypeWithCustomStyle } from 'datocms-structured-text-utils';
3
- import { Account, Field, Fieldset, Item, ModelBlock, Plugin, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
3
+ import { Account, Field, Fieldset, Item, ItemType, Plugin, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
4
4
  export declare type Icon = string | {
5
5
  type: 'svg';
6
6
  viewBox: string;
@@ -454,7 +454,7 @@ export declare type CommonProperties = {
454
454
  /** The ID of the current environment */
455
455
  environment: string;
456
456
  /** All the models of the current DatoCMS project, indexed by ID */
457
- itemTypes: Partial<Record<string, ModelBlock>>;
457
+ itemTypes: Partial<Record<string, ItemType>>;
458
458
  /**
459
459
  * The current DatoCMS user. It can either be the owner or one of the
460
460
  * collaborators (regular or SSO).
@@ -1011,7 +1011,7 @@ export declare type ItemFormAdditionalProperties = {
1011
1011
  /** If an already persisted record is being edited, returns the full record entity */
1012
1012
  item: Item | null;
1013
1013
  /** The model for the record being edited */
1014
- itemType: ModelBlock;
1014
+ itemType: ItemType;
1015
1015
  /** The complete internal form state */
1016
1016
  formValues: Record<string, unknown>;
1017
1017
  /** The current status of the record being edited */
@@ -1331,7 +1331,7 @@ export declare type RenderManualFieldExtensionConfigScreenAdditionalProperties =
1331
1331
  /** The field entity that is being edited in the form */
1332
1332
  pendingField: PendingField;
1333
1333
  /** The model for the field being edited */
1334
- itemType: ModelBlock;
1334
+ itemType: ItemType;
1335
1335
  };
1336
1336
  export declare type RenderManualFieldExtensionConfigScreenProperties = RenderProperties & RenderManualFieldExtensionConfigScreenAdditionalProperties;
1337
1337
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datocms-plugin-sdk",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "DatoCMS Plugin SDK",
5
5
  "keywords": [
6
6
  "datocms",
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "typedoc": "^0.22.8"
45
45
  },
46
- "gitHead": "9eb83096fe166cc59d3c9713b337e97a71fcf5bb"
46
+ "gitHead": "85441797761ad968fcf4f8eb50b13c6613459df7"
47
47
  }