datocms-plugin-sdk 0.3.32 → 0.3.33

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, Fieldset, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
1
+ import { Account, Field, Fieldset, Item, ModelBlock, Plugin, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
2
2
  export declare type Icon = string | {
3
3
  type: 'svg';
4
4
  viewBox: string;
@@ -114,6 +114,7 @@ export declare type ContentAreaSidebarItem = {
114
114
  rank?: number;
115
115
  };
116
116
  export declare type FieldExtensionType = 'editor' | 'addon';
117
+ export declare type FieldType = 'boolean' | 'color' | 'date_time' | 'date' | 'file' | 'float' | 'gallery' | 'integer' | 'json' | 'lat_lon' | 'link' | 'links' | 'rich_text' | 'seo' | 'slug' | 'string' | 'structured_text' | 'text' | 'video';
117
118
  /**
118
119
  * Field extensions extend the basic functionality of DatoCMS when it comes to
119
120
  * presenting record's fields to the final user. Depending on the extension type
@@ -141,8 +142,11 @@ export declare type ManualFieldExtension = {
141
142
  asSidebarPanel?: boolean | {
142
143
  startOpen: boolean;
143
144
  };
144
- /** The type of fields that the field extension in compatible with */
145
- fieldTypes: NonNullable<PluginAttributes['field_types']> | 'all';
145
+ /**
146
+ * The type of fields that the field extension in compatible with. You can use
147
+ * the shortcut `all` to target all types of fields
148
+ */
149
+ fieldTypes: 'all' | FieldType[];
146
150
  /**
147
151
  * Whether this field extension needs some configuration options before being
148
152
  * installed in a field or not. Will trigger the
@@ -1,4 +1,4 @@
1
- import { Account, Field, Fieldset, Item, ModelBlock, Plugin, PluginAttributes, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
1
+ import { Account, Field, Fieldset, Item, ModelBlock, Plugin, Role, Site, SsoUser, Upload, User } from './SiteApiSchema';
2
2
  export declare type Icon = string | {
3
3
  type: 'svg';
4
4
  viewBox: string;
@@ -114,6 +114,7 @@ export declare type ContentAreaSidebarItem = {
114
114
  rank?: number;
115
115
  };
116
116
  export declare type FieldExtensionType = 'editor' | 'addon';
117
+ export declare type FieldType = 'boolean' | 'color' | 'date_time' | 'date' | 'file' | 'float' | 'gallery' | 'integer' | 'json' | 'lat_lon' | 'link' | 'links' | 'rich_text' | 'seo' | 'slug' | 'string' | 'structured_text' | 'text' | 'video';
117
118
  /**
118
119
  * Field extensions extend the basic functionality of DatoCMS when it comes to
119
120
  * presenting record's fields to the final user. Depending on the extension type
@@ -141,8 +142,11 @@ export declare type ManualFieldExtension = {
141
142
  asSidebarPanel?: boolean | {
142
143
  startOpen: boolean;
143
144
  };
144
- /** The type of fields that the field extension in compatible with */
145
- fieldTypes: NonNullable<PluginAttributes['field_types']> | 'all';
145
+ /**
146
+ * The type of fields that the field extension in compatible with. You can use
147
+ * the shortcut `all` to target all types of fields
148
+ */
149
+ fieldTypes: 'all' | FieldType[];
146
150
  /**
147
151
  * Whether this field extension needs some configuration options before being
148
152
  * installed in a field or not. Will trigger the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datocms-plugin-sdk",
3
- "version": "0.3.32",
3
+ "version": "0.3.33",
4
4
  "description": "DatoCMS Plugin SDK",
5
5
  "keywords": [
6
6
  "datocms",
@@ -41,5 +41,5 @@
41
41
  "devDependencies": {
42
42
  "typedoc": "^0.22.8"
43
43
  },
44
- "gitHead": "db31347c59fa5ef6bfc050f36ff89f59846a7952"
44
+ "gitHead": "d3b87c5972cffb40d248f09246211fa772c4244b"
45
45
  }
package/src/types.ts CHANGED
@@ -5,7 +5,6 @@ import {
5
5
  Item,
6
6
  ModelBlock,
7
7
  Plugin,
8
- PluginAttributes,
9
8
  Role,
10
9
  Site,
11
10
  SsoUser,
@@ -139,6 +138,27 @@ export type ContentAreaSidebarItem = {
139
138
 
140
139
  export type FieldExtensionType = 'editor' | 'addon';
141
140
 
141
+ export type FieldType =
142
+ | 'boolean'
143
+ | 'color'
144
+ | 'date_time'
145
+ | 'date'
146
+ | 'file'
147
+ | 'float'
148
+ | 'gallery'
149
+ | 'integer'
150
+ | 'json'
151
+ | 'lat_lon'
152
+ | 'link'
153
+ | 'links'
154
+ | 'rich_text'
155
+ | 'seo'
156
+ | 'slug'
157
+ | 'string'
158
+ | 'structured_text'
159
+ | 'text'
160
+ | 'video';
161
+
142
162
  /**
143
163
  * Field extensions extend the basic functionality of DatoCMS when it comes to
144
164
  * presenting record's fields to the final user. Depending on the extension type
@@ -164,8 +184,11 @@ export type ManualFieldExtension = {
164
184
  * editing page, mimicking a sidebar panel
165
185
  */
166
186
  asSidebarPanel?: boolean | { startOpen: boolean };
167
- /** The type of fields that the field extension in compatible with */
168
- fieldTypes: NonNullable<PluginAttributes['field_types']> | 'all';
187
+ /**
188
+ * The type of fields that the field extension in compatible with. You can use
189
+ * the shortcut `all` to target all types of fields
190
+ */
191
+ fieldTypes: 'all' | FieldType[];
169
192
  /**
170
193
  * Whether this field extension needs some configuration options before being
171
194
  * installed in a field or not. Will trigger the