UNPKG

datocms-plugin-sdk

Version:
2,422 lines (2,421 loc) 259 kB
{ "id": 0, "name": "datocms-plugin-sdk", "kind": 1, "kindString": "Project", "flags": {}, "originalName": "", "children": [ { "id": 1, "name": "Account", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "DatoCMS account", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"account\".\n" }, "children": [ { "id": 4, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1929, "character": 2 } ], "type": { "type": "reference", "name": "AccountAttributes" } }, { "id": 3, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1928, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 2, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1927, "character": 2 } ], "type": { "type": "literal", "value": "account" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 4, 3, 2 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1926, "character": 17 } ] }, { "id": 5, "name": "Field", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "Each Model consists of a set of fields. Using the database metaphore, fields are like\ntable columns, and when creating them you need to specify their type (`string`,\n`file`, `float`, etc.) and any required validation.", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"field\".\n" }, "children": [ { "id": 8, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2539, "character": 2 } ], "type": { "type": "reference", "name": "FieldAttributes" } }, { "id": 7, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2538, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 9, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2540, "character": 2 } ], "type": { "type": "reference", "name": "FieldRelationships" } }, { "id": 6, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2537, "character": 2 } ], "type": { "type": "literal", "value": "field" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 8, 7, 9, 6 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2536, "character": 17 } ] }, { "id": 10, "name": "Item", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "DatoCMS stores the individual pieces of content you create from a model as records,\nwhich are much like table rows in a database. For backward-compatibility reasons, the\nAPI refers to records as \"items\".", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"item\".\n" }, "children": [ { "id": 13, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3563, "character": 2 } ], "type": { "type": "reference", "name": "ItemAttributes" } }, { "id": 12, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3562, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 15, "name": "meta", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3565, "character": 2 } ], "type": { "type": "reference", "name": "ItemMeta" } }, { "id": 14, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3564, "character": 2 } ], "type": { "type": "reference", "name": "ItemRelationships" } }, { "id": 11, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3561, "character": 2 } ], "type": { "type": "literal", "value": "item" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 13, 12, 15, 14, 11 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3560, "character": 17 } ] }, { "id": 16, "name": "ModelBlock", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "The way you define the kind of content you can edit inside your administrative area\npasses through the concept of Models, which are much like database tables. For\nbackward-compatibility reasons, the API refers to models as \"item types\".", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition`\n\"item_type\".\n" }, "children": [ { "id": 19, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2261, "character": 2 } ], "type": { "type": "reference", "name": "ItemTypeAttributes" } }, { "id": 18, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2260, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 20, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2262, "character": 2 } ], "type": { "type": "reference", "name": "ItemTypeRelationships" } }, { "id": 17, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2259, "character": 2 } ], "type": { "type": "literal", "value": "item_type" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 19, 18, 20, 17 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 2258, "character": 17 } ] }, { "id": 21, "name": "Plugin", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "Plugins enable developers to replace DatoCMS field components with HTML5 applications\nso the editing experiences of the DatoCMS web app can be customized.", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"plugin\".\n" }, "children": [ { "id": 24, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3165, "character": 2 } ], "type": { "type": "reference", "name": "PluginAttributes" } }, { "id": 23, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3164, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 25, "name": "meta", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3166, "character": 2 } ], "type": { "type": "reference", "name": "PluginMeta" } }, { "id": 22, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3163, "character": 2 } ], "type": { "type": "literal", "value": "plugin" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 24, 23, 25, 22 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 3162, "character": 17 } ] }, { "id": 48, "name": "Role", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "A Role represents a specific set of actions an editor (or an API token) can perform on\nyour administrative area.", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"role\".\n" }, "children": [ { "id": 51, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 930, "character": 2 } ], "type": { "type": "reference", "name": "RoleAttributes" } }, { "id": 50, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 929, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 53, "name": "meta", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 932, "character": 2 } ], "type": { "type": "reference", "name": "RoleMeta" } }, { "id": 52, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 931, "character": 2 } ], "type": { "type": "reference", "name": "RoleRelationships" } }, { "id": 49, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 928, "character": 2 } ], "type": { "type": "literal", "value": "role" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 51, 50, 53, 52, 49 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 927, "character": 17 } ] }, { "id": 26, "name": "Site", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "A site represents a specific DatoCMS administrative area", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"site\".\n" }, "children": [ { "id": 29, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 6053, "character": 2 } ], "type": { "type": "reference", "name": "SiteAttributes" } }, { "id": 28, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 6052, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 30, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 6054, "character": 2 } ], "type": { "type": "reference", "name": "SiteRelationships" } }, { "id": 27, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 6051, "character": 2 } ], "type": { "type": "literal", "value": "site" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 29, 28, 30, 27 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 6050, "character": 17 } ] }, { "id": 31, "name": "SsoUser", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "A Single Sign-On user exists when a DatoCMS project is connected to an external\nIdentity Provider. An SSO user will not use the standard login procedure but has to go\nthrough SAML authentication. It can also be linked to one or more IdP groups.", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"sso_user\".\n" }, "children": [ { "id": 34, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1717, "character": 2 } ], "type": { "type": "reference", "name": "SsoUserAttributes" } }, { "id": 33, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1716, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 36, "name": "meta", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1719, "character": 2 } ], "type": { "type": "reference", "name": "SsoUserMeta" } }, { "id": 35, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1718, "character": 2 } ], "type": { "type": "reference", "name": "SsoUserRelationships" } }, { "id": 32, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1715, "character": 2 } ], "type": { "type": "literal", "value": "sso_user" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 34, 33, 36, 35, 32 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1714, "character": 17 } ] }, { "id": 37, "name": "Upload", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "Every file you upload to DatoCMS will be retrievable from this endpoint.", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"upload\".\n" }, "children": [ { "id": 40, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 4044, "character": 2 } ], "type": { "type": "reference", "name": "UploadAttributes" } }, { "id": 39, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 4043, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 41, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 4045, "character": 2 } ], "type": { "type": "reference", "name": "UploadRelationships" } }, { "id": 38, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 4042, "character": 2 } ], "type": { "type": "literal", "value": "upload" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 40, 39, 41, 38 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 4041, "character": 17 } ] }, { "id": 42, "name": "User", "kind": 256, "kindString": "Interface", "flags": {}, "comment": { "shortText": "A DatoCMS administrative area can be accessed by multiple people. Every collaborator\nis linked to a specific Role, which describes what actions it will be able to perform\nonce logged in.", "text": "This interface was referenced by `DatoCMSSiteAPI`'s JSON-Schema via the `definition` \"user\".\n" }, "children": [ { "id": 45, "name": "attributes", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1626, "character": 2 } ], "type": { "type": "reference", "name": "UserAttributes" } }, { "id": 44, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1625, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 47, "name": "meta", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1628, "character": 2 } ], "type": { "type": "reference", "name": "UserMeta" } }, { "id": 46, "name": "relationships", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1627, "character": 2 } ], "type": { "type": "reference", "name": "UserRelationships" } }, { "id": 43, "name": "type", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1624, "character": 2 } ], "type": { "type": "literal", "value": "user" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 45, 44, 47, 46, 43 ] } ], "sources": [ { "fileName": "SiteApiSchema.ts", "line": 1623, "character": 17 } ] }, { "id": 194, "name": "AddonOverride", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "A field addon extension forced on a field" }, "sources": [ { "fileName": "types.ts", "line": 265, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 195, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 196, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "ID of field extension. Will be the first argument for the\n`renderFieldExtension` function" }, "sources": [ { "fileName": "types.ts", "line": 270, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 199, "name": "initialHeight", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "The initial height to set for the iframe that will render the field extension" }, "sources": [ { "fileName": "types.ts", "line": 285, "character": 2 } ], "type": { "type": "intrinsic", "name": "number" } }, { "id": 197, "name": "parameters", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "An arbitrary configuration object that will be passed as the `parameters`\nproperty of the second argument of the `renderFieldExtension` function" }, "sources": [ { "fileName": "types.ts", "line": 275, "character": 2 } ], "type": { "type": "reference", "typeArguments": [ { "type": "intrinsic", "name": "string" }, { "type": "intrinsic", "name": "unknown" } ], "name": "Record" } }, { "id": 198, "name": "rank", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "If multiple addons are present for a field, they will be sorted by\nascending `rank`. If you want to specify an explicit value for `rank`, make\nsure to offer a way for final users to customize it inside the plugin's\nsettings form, otherwise the hardcoded value you choose might clash with\nthe one of another plugin! *" }, "sources": [ { "fileName": "types.ts", "line": 283, "character": 2 } ], "type": { "type": "intrinsic", "name": "number" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 196, 199, 197, 198 ] } ], "sources": [ { "fileName": "types.ts", "line": 265, "character": 28 } ] } } }, { "id": 252, "name": "CommonProperties", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "Generic properties available in all the hooks" }, "sources": [ { "fileName": "types.ts", "line": 400, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 253, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 258, "name": "currentRole", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The role for the current DatoCMS user" }, "sources": [ { "fileName": "types.ts", "line": 413, "character": 2 } ], "type": { "type": "reference", "id": 48, "name": "Role" } }, { "id": 257, "name": "currentUser", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The current DatoCMS user. It can either be the owner or one of the\ncollaborators (regular or SSO)." }, "sources": [ { "fileName": "types.ts", "line": 411, "character": 2 } ], "type": { "type": "union", "types": [ { "type": "reference", "id": 42, "name": "User" }, { "type": "reference", "id": 31, "name": "SsoUser" }, { "type": "reference", "id": 1, "name": "Account" } ] } }, { "id": 259, "name": "currentUserAccessToken", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The access token to perform API calls on behalf of the current user. Only\navailable if `currentUserAccessToken` additional permission is granted" }, "sources": [ { "fileName": "types.ts", "line": 418, "character": 2 } ], "type": { "type": "union", "types": [ { "type": "intrinsic", "name": "string" }, { "type": "intrinsic", "name": "undefined" } ] } }, { "id": 255, "name": "environment", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The ID of the current environment" }, "sources": [ { "fileName": "types.ts", "line": 404, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 256, "name": "itemTypes", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "All the models of the current DatoCMS project, indexed by ID" }, "sources": [ { "fileName": "types.ts", "line": 406, "character": 2 } ], "type": { "type": "reference", "typeArguments": [ { "type": "reference", "typeArguments": [ { "type": "intrinsic", "name": "string" }, { "type": "reference", "id": 16, "name": "ModelBlock" } ], "name": "Record" } ], "name": "Partial" } }, { "id": 260, "name": "plugin", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The current plugin" }, "sources": [ { "fileName": "types.ts", "line": 420, "character": 2 } ], "type": { "type": "reference", "id": 21, "name": "Plugin" } }, { "id": 254, "name": "site", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The current DatoCMS project" }, "sources": [ { "fileName": "types.ts", "line": 402, "character": 2 } ], "type": { "type": "reference", "id": 26, "name": "Site" } }, { "id": 261, "name": "ui", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "UI preferences of the current user (right now, only the preferred locale is\navailable)" }, "sources": [ { "fileName": "types.ts", "line": 425, "character": 2 } ], "type": { "type": "reflection", "declaration": { "id": 262, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 263, "name": "locale", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "Preferred locale" }, "sources": [ { "fileName": "types.ts", "line": 427, "character": 4 } ], "type": { "type": "intrinsic", "name": "string" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 263 ] } ], "sources": [ { "fileName": "types.ts", "line": 425, "character": 6 } ] } } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 258, 257, 259, 255, 256, 260, 254, 261 ] } ], "sources": [ { "fileName": "types.ts", "line": 400, "character": 31 } ] } } }, { "id": 241, "name": "ConfirmChoice", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "A choice presented in a `openConfirm` panel" }, "sources": [ { "fileName": "types.ts", "line": 375, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 242, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 245, "name": "intent", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "The intent of the button. Will present the button in a different color accent." }, "sources": [ { "fileName": "types.ts", "line": 384, "character": 2 } ], "type": { "type": "union", "types": [ { "type": "literal", "value": "positive" }, { "type": "literal", "value": "negative" } ] } }, { "id": 243, "name": "label", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The label to be shown for the choice" }, "sources": [ { "fileName": "types.ts", "line": 377, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 244, "name": "value", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The value to be returned by the `openConfirm` promise if the button is\nclicked by the user" }, "sources": [ { "fileName": "types.ts", "line": 382, "character": 2 } ], "type": { "type": "intrinsic", "name": "unknown" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 245, 243, 244 ] } ], "sources": [ { "fileName": "types.ts", "line": 375, "character": 28 } ] } } }, { "id": 246, "name": "ConfirmOptions", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "Options for the `openConfirm` function" }, "sources": [ { "fileName": "types.ts", "line": 388, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 247, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 251, "name": "cancel", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The cancel option to present to the user" }, "sources": [ { "fileName": "types.ts", "line": 396, "character": 2 } ], "type": { "type": "reference", "id": 241, "name": "ConfirmChoice" } }, { "id": 250, "name": "choices", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The different options the user can choose from" }, "sources": [ { "fileName": "types.ts", "line": 394, "character": 2 } ], "type": { "type": "array", "elementType": { "type": "reference", "id": 241, "name": "ConfirmChoice" } } }, { "id": 249, "name": "content", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The main message to be shown inside the confirmation panel" }, "sources": [ { "fileName": "types.ts", "line": 392, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 248, "name": "title", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "The title to be shown inside the confirmation panel" }, "sources": [ { "fileName": "types.ts", "line": 390, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 251, 250, 249, 248 ] } ], "sources": [ { "fileName": "types.ts", "line": 388, "character": 29 } ] } } }, { "id": 151, "name": "ContentAreaSidebarItem", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "The sidebar in the Content Area presents a number of user-defined menu-items.\nThis object represents a new item to be added in the sidebar." }, "sources": [ { "fileName": "types.ts", "line": 127, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 152, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 154, "name": "icon", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "FontAwesome icon name to be shown alongside the label" }, "sources": [ { "fileName": "types.ts", "line": 131, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 153, "name": "label", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "Label to be shown. Must be unique." }, "sources": [ { "fileName": "types.ts", "line": 129, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 158, "name": "placement", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "Expresses where you want the item to be placed inside the sidebar. If not\nspecified, the item will be placed after the standard items provided by\nDatoCMS itself." }, "sources": [ { "fileName": "types.ts", "line": 141, "character": 2 } ], "type": { "type": "tuple", "elements": [ { "type": "union", "types": [ { "type": "literal", "value": "before" }, { "type": "literal", "value": "after" } ] }, { "type": "union", "types": [ { "type": "literal", "value": "menuItems" }, { "type": "literal", "value": "settings" } ] } ] } }, { "id": 155, "name": "pointsTo", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "ID of the page linked to the item" }, "sources": [ { "fileName": "types.ts", "line": 133, "character": 2 } ], "type": { "type": "reflection", "declaration": { "id": 156, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 157, "name": "pageId", "kind": 1024, "kindString": "Property", "flags": {}, "sources": [ { "fileName": "types.ts", "line": 134, "character": 4 } ], "type": { "type": "intrinsic", "name": "string" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 157 ] } ], "sources": [ { "fileName": "types.ts", "line": 133, "character": 12 } ] } } }, { "id": 159, "name": "rank", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "If different plugins specify the same `placement` for their panels, they\nwill be displayed by ascending `rank`. If you want to specify an explicit\nvalue for `rank`, make sure to offer a way for final users to customize it\ninside the plugin's settings form, otherwise the hardcoded value you choose\nmight clash with the one of another plugin! *" }, "sources": [ { "fileName": "types.ts", "line": 149, "character": 2 } ], "type": { "type": "intrinsic", "name": "number" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 154, 153, 158, 155, 159 ] } ], "sources": [ { "fileName": "types.ts", "line": 127, "character": 37 } ] } } }, { "id": 379, "name": "CustomDialogMethods", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "These methods can be used to open custom dialogs/confirmation panels" }, "sources": [ { "fileName": "types.ts", "line": 864, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 380, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 384, "name": "openConfirm", "kind": 2048, "kindString": "Method", "flags": {}, "sources": [ { "fileName": "types.ts", "line": 923, "character": 2 } ], "signatures": [ { "id": 385, "name": "openConfirm", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Opens a UI-consistent confirmation dialog. Returns a promise resolved with\nthe value of the choice made by the user", "tags": [ { "tag": "example", "text": "\n\n```js\nconst result = await ctx.openConfirm({\n title: 'Custom title',\n content:\n 'Lorem Ipsum is simply dummy text of the printing and typesetting industry',\n choices: [\n {\n label: 'Positive',\n value: 'positive',\n intent: 'positive',\n },\n {\n label: 'Negative',\n value: 'negative',\n intent: 'negative',\n },\n ],\n cancel: {\n label: 'Cancel',\n value: false,\n },\n});\n\nif (result) {\n ctx.notice(`Success! ${result}`);\n} else {\n ctx.alert('Cancelled!');\n}\n```\n" } ] }, "parameters": [ { "id": 386, "name": "options", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", "id": 246, "name": "ConfirmOptions" } } ], "type": { "type": "reference", "typeArguments": [ { "type": "intrinsic", "name": "unknown" } ], "name": "Promise" } } ] }, { "id": 381, "name": "openModal", "kind": 2048, "kindString": "Method", "flags": {}, "sources": [ { "fileName": "types.ts", "line": 886, "character": 2 } ], "signatures": [ { "id": 382, "name": "openModal", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Opens a custom modal. Returns a promise resolved with what the modal itself\nreturns calling the `resolve()` function", "tags": [ { "tag": "example", "text": "\n\n```js\nconst result = await ctx.openModal({\n id: 'regular',\n title: 'Custom title!',\n width: 'l',\n parameters: { foo: 'bar' },\n});\n\nif (result) {\n ctx.notice(`Success! ${JSON.stringify(result)}`);\n} else {\n ctx.alert('Closed!');\n}\n```\n" } ] }, "parameters": [ { "id": 383, "name": "modal", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", "id": 222, "name": "Modal" } } ], "type": { "type": "reference", "typeArguments": [ { "type": "intrinsic", "name": "unknown" } ], "name": "Promise" } } ] } ], "groups": [ { "title": "Methods", "kind": 2048, "children": [ 384, 381 ] } ], "sources": [ { "fileName": "types.ts", "line": 864, "character": 34 } ] } } }, { "id": 184, "name": "EditorOverride", "kind": 4194304, "kindString": "Type alias", "flags": {}, "comment": { "shortText": "A field editor/sidebar forced on a field" }, "sources": [ { "fileName": "types.ts", "line": 237, "character": 12 } ], "type": { "type": "reflection", "declaration": { "id": 185, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 187, "name": "asSidebarPanel", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "Moves the field to the sidebar of the record editing page, mimicking a sidebar panel" }, "sources": [ { "fileName": "types.ts", "line": 244, "character": 2 } ], "type": { "type": "union", "types": [ { "type": "intrinsic", "name": "boolean" }, { "type": "reflection", "declaration": { "id": 188, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { "id": 190, "name": "placement", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "sources": [ { "fileName": "types.ts", "line": 246, "character": 29 } ], "type": { "type": "reference", "id": 174, "name": "ItemFormSidebarPanelPlacement" } }, { "id": 189, "name": "startOpen", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "sources": [ { "fileName": "types.ts", "line": 246, "character": 8 } ], "type": { "type": "intrinsic", "name": "boolean" } } ], "groups": [ { "title": "Properties", "kind": 1024, "children": [ 190, 189 ] } ], "sources": [ { "fileName": "types.ts", "line": 246, "character": 6 } ] } } ] } }, { "id": 186, "name": "id", "kind": 1024, "kindString": "Property", "flags": {}, "comment": { "shortText": "ID of field extension. Will be the first argument for the\n`renderFieldExtension` function" }, "sources": [ { "fileName": "types.ts", "line": 242, "character": 2 } ], "type": { "type": "intrinsic", "name": "string" } }, { "id": 193, "name": "initialHeight", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "The initial height to set for the iframe that will render the field extension" }, "sources": [ { "fileName": "types.ts", "line": 261, "character": 2 } ], "type": { "type": "intrinsic", "name": "number" } }, { "id": 191, "name": "parameters", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "An arbitrary configuration object that will be passed as the `parameters`\nproperty of the second argument of the `renderFieldExtension` function" }, "sources": [ { "fileName": "types.ts", "line": 251, "character": 2 } ], "type": { "type": "reference", "typeArguments": [ { "type": "intrinsic", "name": "string" }, { "type": "intrinsic", "name": "unknown" } ], "name": "Record" } }, { "id": 192, "name": "rank", "kind": 1024, "kindString": "Property", "flags": { "isOptional": true }, "comment": { "shortText": "If multiple plugins override a field, the one with the highest `rank` will\nwin. If you want to specify an explicit value for `rank`, make sure to\noffer a way for final users to customize it inside the plugin's settings\nform, otherwise the hardcoded value you choose might clash with the one of\nanother plugin! *" }, "sources": [ {