From 810cd6e49b5fac20581ac3959e68d456d5ccc2d0 Mon Sep 17 00:00:00 2001 From: Steven Petryk Date: Mon, 11 Mar 2019 06:22:34 -0700 Subject: [PATCH] fix(types): Correct the type for Field['items'] (#313) The `items` attribute in a Content Type is not an array, it's an object, and it gives a summary of the types that are IN the array. This PR fixes the type. Example response straight from the API for proof: ```json { "id": "logos", "name": "Logos", "type": "Array", "localized": false, "required": true, "validations": [{ "size": { "min": 5, "max": 15 } }], "disabled": false, "omitted": false, "items": { "type": "Link", "validations": [{ "linkContentType": ["logo"] }], "linkType": "Entry" } } ``` --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 7e5d21ee0..13b841635 100644 --- a/index.d.ts +++ b/index.d.ts @@ -151,7 +151,7 @@ export interface Field { required: boolean; type: FieldType; validations: FieldValidation[]; - items?: FieldItem[]; + items?: FieldItem; } export type FieldType = 'Symbol' | 'Text' | 'Integer' | 'Number' | 'Date' | 'Boolean' | 'Location' | 'Link' | 'Array' | 'Object' | 'RichText';