airtable-ts-codegen
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -19,3 +19,11 @@ "use strict"; | ||
case 'externalSyncSource': | ||
case 'aiText': | ||
case 'singleCollaborator': | ||
case 'createdBy': | ||
case 'lastModifiedBy': | ||
case 'barcode': | ||
case 'button': | ||
return 'string'; | ||
case 'multipleAttachments': | ||
case 'multipleCollaborators': | ||
case 'multipleRecordLinks': | ||
@@ -53,30 +61,7 @@ case 'multipleSelects': | ||
throw new Error(`Invalid ${field.type} field (no options.result): ${field.id}`); | ||
// Special cases we don't yet support; for now, skip these fields | ||
// case 'aiText': | ||
// return 'AiTextObject'; | ||
// case 'singleCollaborator': | ||
// case 'createdBy': | ||
// case 'lastModifiedBy': | ||
// return 'CollaboratorObject'; | ||
// case 'multipleCollaborators': | ||
// return 'CollaboratorObject[]'; | ||
// case 'multipleAttachments': | ||
// return 'AttachmentObject[]'; | ||
// case 'barcode': | ||
// return 'BarcodeObject'; | ||
// case 'button': | ||
// return 'ButtonObject'; | ||
case 'aiText': | ||
case 'singleCollaborator': | ||
case 'createdBy': | ||
case 'lastModifiedBy': | ||
case 'multipleCollaborators': | ||
case 'multipleAttachments': | ||
case 'barcode': | ||
case 'button': | ||
default: | ||
console.warn(`Could not convert Airtable type '${field.type}' to a TypeScript type for field ${field.id}`); | ||
return null; | ||
default: | ||
throw new Error(`Could not convert Airtable type '${field.type}' to a TypeScript type for field ${field.id}`); | ||
} | ||
}; | ||
exports.jsTypeForAirtableType = jsTypeForAirtableType; |
{ | ||
"name": "airtable-ts-codegen", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Autogenerate TypeScript definitions for your Airtable base", | ||
@@ -37,3 +37,3 @@ "license": "MIT", | ||
"@types/node": "^20.12.8", | ||
"airtable-ts": "^1.1.0", | ||
"airtable-ts": "^1.4.0", | ||
"eslint": "^8.57.0", | ||
@@ -40,0 +40,0 @@ "eslint-config-domdomegg": "^1.2.3", |
14739
255