datacite-ts
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -5,2 +5,14 @@ # Changelog | ||
### [0.1.3](https://github.com/thewilkybarkid/datacite-ts/compare/v0.1.2...v0.1.3) (2023-05-24) | ||
### Features | ||
* add name identifiers ([fdeb1c1](https://github.com/thewilkybarkid/datacite-ts/commit/fdeb1c1b45b606cf055ad09a4ba043f80eaa8d2e)), closes [/support.datacite.org/docs/schema-mandatory-properties-v43#24](https://github.com/thewilkybarkid//support.datacite.org/docs/schema-mandatory-properties-v43/issues/24) | ||
### Bug Fixes | ||
* support personal names without an explicit nameType ([f6c4ccf](https://github.com/thewilkybarkid/datacite-ts/commit/f6c4ccfa8b9561dca6397abdedc7a0779afdfc37)) | ||
### [0.1.2](https://github.com/thewilkybarkid/datacite-ts/compare/v0.1.1...v0.1.2) (2022-12-05) | ||
@@ -7,0 +19,0 @@ |
@@ -25,2 +25,6 @@ /** | ||
familyName: string; | ||
nameIdentifiers: ReadonlyArray<{ | ||
nameIdentifier: string; | ||
nameIdentifierScheme: string; | ||
}>; | ||
} | { | ||
@@ -27,0 +31,0 @@ name: string; |
@@ -86,8 +86,10 @@ "use strict"; | ||
const OrganizationCreatorC = C.struct({ name: C.string }); | ||
const PersonCreatorC = (0, function_1.pipe)(C.struct({ familyName: C.string, nameType: C.literal('Personal') }), C.intersect(C.partial({ | ||
const PersonCreatorC = (0, function_1.pipe)(C.struct({ familyName: C.string }), C.intersect(C.partial({ | ||
givenName: C.string, | ||
nameType: C.literal('Personal'), | ||
nameIdentifiers: ReadonlyArrayC(C.struct({ nameIdentifier: C.string, nameIdentifierScheme: C.string })), | ||
})), C.imap((_a) => { | ||
var { nameType } = _a, props = __rest(_a, ["nameType"]); | ||
return props; | ||
}, creator => (Object.assign(Object.assign({}, creator), { nameType: 'Personal' })))); | ||
return (Object.assign({ nameIdentifiers: [] }, props)); | ||
}, function_1.identity)); | ||
/** | ||
@@ -94,0 +96,0 @@ * @category codecs |
{ | ||
"name": "datacite-ts", | ||
"description": "A DataCite API client for use with fp-ts.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/thewilkybarkid/datacite-ts", |
14953
213