uomlibrarycommons-core
Advanced tools
Comparing version 0.10.2 to 1.0.0
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UOMLIBRARYCOMMONS_REGEX_CARD_ID = exports.UOMLIBRARYCOMMONS_REGEX_SPOT_ID = void 0; | ||
exports.UOMLIBRARYCOMMONS_REGEX_SPOT_ID = /^[1-9][0-9]{6,7}$/; | ||
exports.UOMLIBRARYCOMMONS_REGEX_CARD_ID = /^90+([1-9][0-9]{6,7})([0-9])$/; | ||
export const UOMLIBRARYCOMMONS_REGEX_SPOT_ID = /^[1-9][0-9]{6,7}$/; | ||
export const UOMLIBRARYCOMMONS_REGEX_CARD_ID = /^90+([1-9][0-9]{6,7})([0-9])$/; | ||
//# sourceMappingURL=commons-regex.js.map |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.keyToEUomLibraryAffiliation = exports.isEUomLibraryAffiliation = exports.fromEUomLibraryAffiliation = exports.toEUomLibraryAffiliation = exports.EUomLibraryAffiliation = void 0; | ||
const tscommons_core_1 = require("tscommons-core"); | ||
var EUomLibraryAffiliation; | ||
import { commonsTypeIsString } from 'tscommons-es-core'; | ||
export var EUomLibraryAffiliation; | ||
(function (EUomLibraryAffiliation) { | ||
@@ -15,4 +12,4 @@ EUomLibraryAffiliation["MEMBER"] = "member"; | ||
EUomLibraryAffiliation["LIBRARY_WALK_IN"] = "library-walk-in"; | ||
})(EUomLibraryAffiliation = exports.EUomLibraryAffiliation || (exports.EUomLibraryAffiliation = {})); | ||
function toEUomLibraryAffiliation(value) { | ||
})(EUomLibraryAffiliation || (EUomLibraryAffiliation = {})); | ||
export function toEUomLibraryAffiliation(value) { | ||
// we allow case-insensitive for LDAP since we can't guarantee the source data is lowercase | ||
@@ -40,4 +37,3 @@ switch (value.toLowerCase()) { | ||
} | ||
exports.toEUomLibraryAffiliation = toEUomLibraryAffiliation; | ||
function fromEUomLibraryAffiliation(value) { | ||
export function fromEUomLibraryAffiliation(value) { | ||
switch (value) { | ||
@@ -63,5 +59,4 @@ case EUomLibraryAffiliation.MEMBER: | ||
} | ||
exports.fromEUomLibraryAffiliation = fromEUomLibraryAffiliation; | ||
function isEUomLibraryAffiliation(test) { | ||
if (!tscommons_core_1.CommonsType.isString(test)) | ||
export function isEUomLibraryAffiliation(test) { | ||
if (!commonsTypeIsString(test)) | ||
return false; | ||
@@ -72,4 +67,3 @@ if (toEUomLibraryAffiliation(test) === undefined) | ||
} | ||
exports.isEUomLibraryAffiliation = isEUomLibraryAffiliation; | ||
function keyToEUomLibraryAffiliation(key) { | ||
export function keyToEUomLibraryAffiliation(key) { | ||
switch (key) { | ||
@@ -95,3 +89,2 @@ case 'MEMBER': | ||
} | ||
exports.keyToEUomLibraryAffiliation = keyToEUomLibraryAffiliation; | ||
//# sourceMappingURL=euom-library-affiliation.js.map |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isEUomLibraryCardVariation = exports.fromEUomLibraryCardVariation = exports.toEUomLibraryCardVariation = exports.EUomLibraryCardVariation = void 0; | ||
const tscommons_core_1 = require("tscommons-core"); | ||
var EUomLibraryCardVariation; | ||
import { commonsTypeIsString } from 'tscommons-es-core'; | ||
export var EUomLibraryCardVariation; | ||
(function (EUomLibraryCardVariation) { | ||
@@ -10,4 +7,4 @@ EUomLibraryCardVariation["STAFF"] = "staff"; | ||
EUomLibraryCardVariation["CONTRACTOR"] = "contractor"; | ||
})(EUomLibraryCardVariation = exports.EUomLibraryCardVariation || (exports.EUomLibraryCardVariation = {})); | ||
function toEUomLibraryCardVariation(value) { | ||
})(EUomLibraryCardVariation || (EUomLibraryCardVariation = {})); | ||
export function toEUomLibraryCardVariation(value) { | ||
switch (value) { | ||
@@ -22,4 +19,3 @@ case EUomLibraryCardVariation.STAFF.toString(): | ||
} | ||
exports.toEUomLibraryCardVariation = toEUomLibraryCardVariation; | ||
function fromEUomLibraryCardVariation(value) { | ||
export function fromEUomLibraryCardVariation(value) { | ||
switch (value) { | ||
@@ -33,9 +29,7 @@ case EUomLibraryCardVariation.STAFF: | ||
} | ||
exports.fromEUomLibraryCardVariation = fromEUomLibraryCardVariation; | ||
function isEUomLibraryCardVariation(test) { | ||
if (!tscommons_core_1.CommonsType.isString(test)) | ||
export function isEUomLibraryCardVariation(test) { | ||
if (!commonsTypeIsString(test)) | ||
return false; | ||
return toEUomLibraryCardVariation(test) !== undefined; | ||
} | ||
exports.isEUomLibraryCardVariation = isEUomLibraryCardVariation; | ||
//# sourceMappingURL=euom-library-card-variation.js.map |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EUOM_LIBRARY_FACULTIES = exports.prettyFromEUomLibraryFaculty = exports.keyToEUomLibraryFaculty = exports.isEUomLibraryFaculty = exports.fromEUomLibraryFaculty = exports.mappingDataToEUomLibraryFaculty = exports.toEUomLibraryFaculty = exports.EUomLibraryFaculty = void 0; | ||
const tscommons_core_1 = require("tscommons-core"); | ||
var EUomLibraryFaculty; | ||
import { commonsTypeIsString } from 'tscommons-es-core'; | ||
export var EUomLibraryFaculty; | ||
(function (EUomLibraryFaculty) { | ||
@@ -11,4 +8,4 @@ EUomLibraryFaculty["SE"] = "se"; | ||
EUomLibraryFaculty["PS"] = "ps"; | ||
})(EUomLibraryFaculty = exports.EUomLibraryFaculty || (exports.EUomLibraryFaculty = {})); | ||
function toEUomLibraryFaculty(value) { | ||
})(EUomLibraryFaculty || (EUomLibraryFaculty = {})); | ||
export function toEUomLibraryFaculty(value) { | ||
switch (value) { | ||
@@ -27,4 +24,3 @@ case EUomLibraryFaculty.SE.toString(): | ||
} | ||
exports.toEUomLibraryFaculty = toEUomLibraryFaculty; | ||
function mappingDataToEUomLibraryFaculty(value) { | ||
export function mappingDataToEUomLibraryFaculty(value) { | ||
switch (value) { | ||
@@ -43,4 +39,3 @@ case 'Faculty of Science and Engineering': | ||
} | ||
exports.mappingDataToEUomLibraryFaculty = mappingDataToEUomLibraryFaculty; | ||
function fromEUomLibraryFaculty(value) { | ||
export function fromEUomLibraryFaculty(value) { | ||
switch (value) { | ||
@@ -58,5 +53,4 @@ case EUomLibraryFaculty.SE: | ||
} | ||
exports.fromEUomLibraryFaculty = fromEUomLibraryFaculty; | ||
function isEUomLibraryFaculty(test) { | ||
if (!tscommons_core_1.CommonsType.isString(test)) | ||
export function isEUomLibraryFaculty(test) { | ||
if (!commonsTypeIsString(test)) | ||
return false; | ||
@@ -67,4 +61,3 @@ if (toEUomLibraryFaculty(test) === undefined) | ||
} | ||
exports.isEUomLibraryFaculty = isEUomLibraryFaculty; | ||
function keyToEUomLibraryFaculty(key) { | ||
export function keyToEUomLibraryFaculty(key) { | ||
switch (key) { | ||
@@ -82,4 +75,3 @@ case 'SE': | ||
} | ||
exports.keyToEUomLibraryFaculty = keyToEUomLibraryFaculty; | ||
function prettyFromEUomLibraryFaculty(site) { | ||
export function prettyFromEUomLibraryFaculty(site) { | ||
switch (site) { | ||
@@ -97,5 +89,4 @@ case EUomLibraryFaculty.PS: | ||
} | ||
exports.prettyFromEUomLibraryFaculty = prettyFromEUomLibraryFaculty; | ||
exports.EUOM_LIBRARY_FACULTIES = Object.keys(EUomLibraryFaculty) | ||
export const EUOM_LIBRARY_FACULTIES = Object.keys(EUomLibraryFaculty) | ||
.map((e) => keyToEUomLibraryFaculty(e)); | ||
//# sourceMappingURL=euom-library-faculty.js.map |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.keyToEUomLibraryMemberType = exports.isEUomLibraryMemberType = exports.fromEUomLibraryMemberType = exports.toEUomLibraryMemberType = exports.EUomLibraryMemberType = void 0; | ||
const tscommons_core_1 = require("tscommons-core"); | ||
var EUomLibraryMemberType; | ||
import { commonsTypeIsString } from 'tscommons-es-core'; | ||
export var EUomLibraryMemberType; | ||
(function (EUomLibraryMemberType) { | ||
@@ -12,4 +9,4 @@ EUomLibraryMemberType["UNDERGRADUATE"] = "Undergraduate"; | ||
EUomLibraryMemberType["OTHER"] = "Other"; | ||
})(EUomLibraryMemberType = exports.EUomLibraryMemberType || (exports.EUomLibraryMemberType = {})); | ||
function toEUomLibraryMemberType(value) { | ||
})(EUomLibraryMemberType || (EUomLibraryMemberType = {})); | ||
export function toEUomLibraryMemberType(value) { | ||
// we allow case-insensitive for LDAP since we can't guarantee the source data is lowercase | ||
@@ -31,4 +28,3 @@ switch (value.toLowerCase()) { | ||
} | ||
exports.toEUomLibraryMemberType = toEUomLibraryMemberType; | ||
function fromEUomLibraryMemberType(value) { | ||
export function fromEUomLibraryMemberType(value) { | ||
switch (value) { | ||
@@ -48,5 +44,4 @@ case EUomLibraryMemberType.UNDERGRADUATE: | ||
} | ||
exports.fromEUomLibraryMemberType = fromEUomLibraryMemberType; | ||
function isEUomLibraryMemberType(test) { | ||
if (!tscommons_core_1.CommonsType.isString(test)) | ||
export function isEUomLibraryMemberType(test) { | ||
if (!commonsTypeIsString(test)) | ||
return false; | ||
@@ -57,4 +52,3 @@ if (toEUomLibraryMemberType(test) === undefined) | ||
} | ||
exports.isEUomLibraryMemberType = isEUomLibraryMemberType; | ||
function keyToEUomLibraryMemberType(key) { | ||
export function keyToEUomLibraryMemberType(key) { | ||
switch (key) { | ||
@@ -74,3 +68,2 @@ case 'UNDERGRADUATE': | ||
} | ||
exports.keyToEUomLibraryMemberType = keyToEUomLibraryMemberType; | ||
//# sourceMappingURL=euom-library-member-type.js.map |
@@ -10,3 +10,4 @@ export declare enum EUomLibrarySite { | ||
CHRISTIES = "christies", | ||
ODDFELLOWS = "oddfellows" | ||
ODDFELLOWS = "oddfellows", | ||
RYLANDS = "rylands" | ||
} | ||
@@ -13,0 +14,0 @@ export declare function toEUomLibrarySite(type: string): EUomLibrarySite | undefined; |
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.prettyFromEUomLibrarySite = exports.EUOM_LIBRARY_SITES = exports.keyToEUomLibrarySite = exports.isEUomLibrarySite = exports.fromEUomLibrarySite = exports.toEUomLibrarySite = exports.EUomLibrarySite = void 0; | ||
const tscommons_core_1 = require("tscommons-core"); | ||
var EUomLibrarySite; | ||
import { commonsTypeIsString } from 'tscommons-es-core'; | ||
export var EUomLibrarySite; | ||
(function (EUomLibrarySite) { | ||
@@ -16,4 +13,5 @@ EUomLibrarySite["JOULE"] = "joule"; | ||
EUomLibrarySite["ODDFELLOWS"] = "oddfellows"; | ||
})(EUomLibrarySite = exports.EUomLibrarySite || (exports.EUomLibrarySite = {})); | ||
function toEUomLibrarySite(type) { | ||
EUomLibrarySite["RYLANDS"] = "rylands"; | ||
})(EUomLibrarySite || (EUomLibrarySite = {})); | ||
export function toEUomLibrarySite(type) { | ||
switch (type) { | ||
@@ -38,7 +36,8 @@ case EUomLibrarySite.JOULE.toString(): | ||
return EUomLibrarySite.ODDFELLOWS; | ||
case EUomLibrarySite.RYLANDS.toString(): | ||
return EUomLibrarySite.RYLANDS; | ||
} | ||
return undefined; | ||
} | ||
exports.toEUomLibrarySite = toEUomLibrarySite; | ||
function fromEUomLibrarySite(type) { | ||
export function fromEUomLibrarySite(type) { | ||
switch (type) { | ||
@@ -63,13 +62,13 @@ case EUomLibrarySite.JOULE: | ||
return EUomLibrarySite.ODDFELLOWS.toString(); | ||
case EUomLibrarySite.RYLANDS: | ||
return EUomLibrarySite.RYLANDS.toString(); | ||
} | ||
throw new Error('Unknown EUomLibrarySite'); | ||
} | ||
exports.fromEUomLibrarySite = fromEUomLibrarySite; | ||
function isEUomLibrarySite(test) { | ||
if (!tscommons_core_1.CommonsType.isString(test)) | ||
export function isEUomLibrarySite(test) { | ||
if (!commonsTypeIsString(test)) | ||
return false; | ||
return toEUomLibrarySite(test) !== undefined; | ||
} | ||
exports.isEUomLibrarySite = isEUomLibrarySite; | ||
function keyToEUomLibrarySite(key) { | ||
export function keyToEUomLibrarySite(key) { | ||
switch (key) { | ||
@@ -94,9 +93,10 @@ case 'JOULE': | ||
return EUomLibrarySite.ODDFELLOWS; | ||
case 'RYLANDS': | ||
return EUomLibrarySite.RYLANDS; | ||
} | ||
throw new Error(`Unable to obtain EUomLibrarySite for key: ${key}`); | ||
} | ||
exports.keyToEUomLibrarySite = keyToEUomLibrarySite; | ||
exports.EUOM_LIBRARY_SITES = Object.keys(EUomLibrarySite) | ||
export const EUOM_LIBRARY_SITES = Object.keys(EUomLibrarySite) | ||
.map((e) => keyToEUomLibrarySite(e)); | ||
function prettyFromEUomLibrarySite(site) { | ||
export function prettyFromEUomLibrarySite(site) { | ||
switch (site) { | ||
@@ -121,6 +121,7 @@ case EUomLibrarySite.AGLC: | ||
return 'Oddfellows Hall'; | ||
case EUomLibrarySite.RYLANDS: | ||
return 'John Rylands Library'; | ||
} | ||
throw new Error('Unable to obtain pretty for EUomLibrarySite'); | ||
} | ||
exports.prettyFromEUomLibrarySite = prettyFromEUomLibrarySite; | ||
//# sourceMappingURL=euom-library-site.js.map |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.keyToEUomLibraryYearPeriod = exports.fromEUomLibraryYearPeriod = exports.toEUomLibraryYearPeriod = exports.EUomLibraryYearPeriod = void 0; | ||
var EUomLibraryYearPeriod; | ||
export var EUomLibraryYearPeriod; | ||
(function (EUomLibraryYearPeriod) { | ||
@@ -13,4 +10,4 @@ EUomLibraryYearPeriod["SOY"] = "soy"; | ||
EUomLibraryYearPeriod["CLOSURE"] = "closure"; | ||
})(EUomLibraryYearPeriod = exports.EUomLibraryYearPeriod || (exports.EUomLibraryYearPeriod = {})); | ||
function toEUomLibraryYearPeriod(value) { | ||
})(EUomLibraryYearPeriod || (EUomLibraryYearPeriod = {})); | ||
export function toEUomLibraryYearPeriod(value) { | ||
switch (value) { | ||
@@ -35,4 +32,3 @@ case EUomLibraryYearPeriod.SOY.toString(): | ||
} | ||
exports.toEUomLibraryYearPeriod = toEUomLibraryYearPeriod; | ||
function fromEUomLibraryYearPeriod(value) { | ||
export function fromEUomLibraryYearPeriod(value) { | ||
switch (value) { | ||
@@ -56,4 +52,3 @@ case EUomLibraryYearPeriod.SOY: | ||
} | ||
exports.fromEUomLibraryYearPeriod = fromEUomLibraryYearPeriod; | ||
function keyToEUomLibraryYearPeriod(key) { | ||
export function keyToEUomLibraryYearPeriod(key) { | ||
switch (key) { | ||
@@ -77,3 +72,2 @@ case 'SOY': | ||
} | ||
exports.keyToEUomLibraryYearPeriod = keyToEUomLibraryYearPeriod; | ||
//# sourceMappingURL=euom-library-year-period.js.map |
@@ -1,3 +0,9 @@ | ||
export * from './consts'; | ||
export * from './enums'; | ||
export * from './interfaces'; | ||
import { EUomLibraryMemberType, toEUomLibraryMemberType, fromEUomLibraryMemberType, isEUomLibraryMemberType, keyToEUomLibraryMemberType } from './enums/euom-library-member-type'; | ||
import { EUomLibraryAffiliation, toEUomLibraryAffiliation, fromEUomLibraryAffiliation, isEUomLibraryAffiliation, keyToEUomLibraryAffiliation } from './enums/euom-library-affiliation'; | ||
import { EUomLibrarySite, toEUomLibrarySite, fromEUomLibrarySite, isEUomLibrarySite, keyToEUomLibrarySite, EUOM_LIBRARY_SITES, prettyFromEUomLibrarySite } from './enums/euom-library-site'; | ||
import { EUomLibraryFaculty, toEUomLibraryFaculty, mappingDataToEUomLibraryFaculty, fromEUomLibraryFaculty, isEUomLibraryFaculty, keyToEUomLibraryFaculty, prettyFromEUomLibraryFaculty, EUOM_LIBRARY_FACULTIES } from './enums/euom-library-faculty'; | ||
import { EUomLibraryYearPeriod, toEUomLibraryYearPeriod, fromEUomLibraryYearPeriod, keyToEUomLibraryYearPeriod } from './enums/euom-library-year-period'; | ||
import { EUomLibraryCardVariation, toEUomLibraryCardVariation, fromEUomLibraryCardVariation, isEUomLibraryCardVariation } from './enums/euom-library-card-variation'; | ||
import { UOMLIBRARYCOMMONS_REGEX_SPOT_ID, UOMLIBRARYCOMMONS_REGEX_CARD_ID } from './consts/commons-regex'; | ||
import { IUomLibraryLdapData, isIUomLibraryLdapData } from './interfaces/iuom-library-ldap-data'; | ||
export { EUomLibraryMemberType, toEUomLibraryMemberType, fromEUomLibraryMemberType, isEUomLibraryMemberType, keyToEUomLibraryMemberType, EUomLibraryAffiliation, toEUomLibraryAffiliation, fromEUomLibraryAffiliation, isEUomLibraryAffiliation, keyToEUomLibraryAffiliation, EUomLibrarySite, toEUomLibrarySite, fromEUomLibrarySite, isEUomLibrarySite, keyToEUomLibrarySite, EUOM_LIBRARY_SITES, prettyFromEUomLibrarySite, EUomLibraryFaculty, toEUomLibraryFaculty, mappingDataToEUomLibraryFaculty, fromEUomLibraryFaculty, isEUomLibraryFaculty, keyToEUomLibraryFaculty, prettyFromEUomLibraryFaculty, EUOM_LIBRARY_FACULTIES, EUomLibraryYearPeriod, toEUomLibraryYearPeriod, fromEUomLibraryYearPeriod, keyToEUomLibraryYearPeriod, EUomLibraryCardVariation, toEUomLibraryCardVariation, fromEUomLibraryCardVariation, isEUomLibraryCardVariation, UOMLIBRARYCOMMONS_REGEX_SPOT_ID, UOMLIBRARYCOMMONS_REGEX_CARD_ID, IUomLibraryLdapData, isIUomLibraryLdapData }; |
@@ -1,17 +0,11 @@ | ||
"use strict"; | ||
// created from 'create-ts-index' | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./consts"), exports); | ||
__exportStar(require("./enums"), exports); | ||
__exportStar(require("./interfaces"), exports); | ||
// tslint:disable | ||
import { EUomLibraryMemberType, toEUomLibraryMemberType, fromEUomLibraryMemberType, isEUomLibraryMemberType, keyToEUomLibraryMemberType } from './enums/euom-library-member-type'; | ||
import { EUomLibraryAffiliation, toEUomLibraryAffiliation, fromEUomLibraryAffiliation, isEUomLibraryAffiliation, keyToEUomLibraryAffiliation } from './enums/euom-library-affiliation'; | ||
import { EUomLibrarySite, toEUomLibrarySite, fromEUomLibrarySite, isEUomLibrarySite, keyToEUomLibrarySite, EUOM_LIBRARY_SITES, prettyFromEUomLibrarySite } from './enums/euom-library-site'; | ||
import { EUomLibraryFaculty, toEUomLibraryFaculty, mappingDataToEUomLibraryFaculty, fromEUomLibraryFaculty, isEUomLibraryFaculty, keyToEUomLibraryFaculty, prettyFromEUomLibraryFaculty, EUOM_LIBRARY_FACULTIES } from './enums/euom-library-faculty'; | ||
import { EUomLibraryYearPeriod, toEUomLibraryYearPeriod, fromEUomLibraryYearPeriod, keyToEUomLibraryYearPeriod } from './enums/euom-library-year-period'; | ||
import { EUomLibraryCardVariation, toEUomLibraryCardVariation, fromEUomLibraryCardVariation, isEUomLibraryCardVariation } from './enums/euom-library-card-variation'; | ||
import { UOMLIBRARYCOMMONS_REGEX_SPOT_ID, UOMLIBRARYCOMMONS_REGEX_CARD_ID } from './consts/commons-regex'; | ||
import { isIUomLibraryLdapData } from './interfaces/iuom-library-ldap-data'; | ||
export { EUomLibraryMemberType, toEUomLibraryMemberType, fromEUomLibraryMemberType, isEUomLibraryMemberType, keyToEUomLibraryMemberType, EUomLibraryAffiliation, toEUomLibraryAffiliation, fromEUomLibraryAffiliation, isEUomLibraryAffiliation, keyToEUomLibraryAffiliation, EUomLibrarySite, toEUomLibrarySite, fromEUomLibrarySite, isEUomLibrarySite, keyToEUomLibrarySite, EUOM_LIBRARY_SITES, prettyFromEUomLibrarySite, EUomLibraryFaculty, toEUomLibraryFaculty, mappingDataToEUomLibraryFaculty, fromEUomLibraryFaculty, isEUomLibraryFaculty, keyToEUomLibraryFaculty, prettyFromEUomLibraryFaculty, EUOM_LIBRARY_FACULTIES, EUomLibraryYearPeriod, toEUomLibraryYearPeriod, fromEUomLibraryYearPeriod, keyToEUomLibraryYearPeriod, EUomLibraryCardVariation, toEUomLibraryCardVariation, fromEUomLibraryCardVariation, isEUomLibraryCardVariation, UOMLIBRARYCOMMONS_REGEX_SPOT_ID, UOMLIBRARYCOMMONS_REGEX_CARD_ID, isIUomLibraryLdapData }; | ||
//# sourceMappingURL=index.js.map |
@@ -1,45 +0,41 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isIUomLibraryLdapData = void 0; | ||
const tscommons_core_1 = require("tscommons-core"); | ||
const euom_library_member_type_1 = require("../enums/euom-library-member-type"); | ||
const euom_library_affiliation_1 = require("../enums/euom-library-affiliation"); | ||
function isIUomLibraryLdapData(test) { | ||
if (!tscommons_core_1.CommonsType.hasPropertyString(test, 'regno')) | ||
import { commonsTypeHasPropertyString, commonsTypeHasPropertyStringOrUndefined, commonsTypeHasProperty, commonsTypeHasPropertyEnum, commonsTypeHasPropertyEnumArray, commonsTypeHasPropertyEnumOrUndefined } from 'tscommons-es-core'; | ||
import { isEUomLibraryMemberType } from '../enums/euom-library-member-type'; | ||
import { isEUomLibraryAffiliation } from '../enums/euom-library-affiliation'; | ||
export function isIUomLibraryLdapData(test) { | ||
if (!commonsTypeHasPropertyString(test, 'regno')) | ||
return false; | ||
if (!/^[0-9]+$/.test(test.regno)) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyString(test, 'username')) | ||
if (!commonsTypeHasPropertyString(test, 'username')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyString(test, 'firstname')) | ||
if (!commonsTypeHasPropertyString(test, 'firstname')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyString(test, 'surname')) | ||
if (!commonsTypeHasPropertyString(test, 'surname')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyString(test, 'firstname')) | ||
if (!commonsTypeHasPropertyString(test, 'firstname')) | ||
return false; | ||
if (tscommons_core_1.CommonsType.hasProperty(test, 'affiliation') | ||
&& !tscommons_core_1.CommonsType.hasPropertyEnum(test, 'affiliation', euom_library_affiliation_1.isEUomLibraryAffiliation) | ||
&& !tscommons_core_1.CommonsType.hasPropertyEnumArray(test, 'affiliation', euom_library_affiliation_1.isEUomLibraryAffiliation)) | ||
if (commonsTypeHasProperty(test, 'affiliation') | ||
&& !commonsTypeHasPropertyEnum(test, 'affiliation', isEUomLibraryAffiliation) | ||
&& !commonsTypeHasPropertyEnumArray(test, 'affiliation', isEUomLibraryAffiliation)) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyEnumOrUndefined(test, 'type', euom_library_member_type_1.isEUomLibraryMemberType)) | ||
if (!commonsTypeHasPropertyEnumOrUndefined(test, 'type', isEUomLibraryMemberType)) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'school')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'school')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'title')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'title')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'email')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'email')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'magstripe')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'magstripe')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'programme')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'programme')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'year')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'year')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'principlename')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'principlename')) | ||
return false; | ||
if (!tscommons_core_1.CommonsType.hasPropertyStringOrUndefined(test, 'umanroleid')) | ||
if (!commonsTypeHasPropertyStringOrUndefined(test, 'umanroleid')) | ||
return false; | ||
return true; | ||
} | ||
exports.isIUomLibraryLdapData = isIUomLibraryLdapData; | ||
//# sourceMappingURL=iuom-library-ldap-data.js.map |
{ | ||
"name": "uomlibrarycommons-core", | ||
"version": "0.10.2", | ||
"version": "1.0.0", | ||
"description": "Common Node and Angular code for UoM library development", | ||
"scripts": { | ||
"preprepare": "rm -rf ./dist; cti ./src && tsc", | ||
"preprepare": "rm -rf ./dist; php ~/Dev/eti.php src/ && tsc", | ||
"publish-major": "rm -rf dist; tsc && tslint -p . && npm run preprepare && npm version major && npm install && npm publish && git add . && git commit -m 'publish'", | ||
"publish-minor": "rm -rf dist; tsc && tslint -p . && npm run preprepare && npm version minor && npm install && npm publish && git add . && git commit -m 'publish'", | ||
"publish-patch": "rm -rf dist; tsc && tslint -p . && npm run preprepare && npm version patch && npm install && npm publish && git add . && git commit -m 'publish'" | ||
@@ -11,6 +13,7 @@ }, | ||
"types": "dist/index.d.js", | ||
"type": "module", | ||
"author": "UoM Library DTS", | ||
"license": "ISC", | ||
"dependencies": { | ||
"tscommons-core": "^2.4.7" | ||
"tscommons-es-core": "^0.2.6" | ||
}, | ||
@@ -17,0 +20,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
Yes
47323
28
615
+ Addedtscommons-es-core@^0.2.6
+ Addedtscommons-es-core@0.2.6(transitive)
- Removedtscommons-core@^2.4.7
- Removedtscommons-core@2.6.0(transitive)