@universe/models
Advanced tools
Comparing version 3.0.9 to 3.0.10
@@ -1,2 +0,2 @@ | ||
import { IAccount, IAddress, IEmail, IExperience, IPartialPerson, IPerson, IPersonPhone, IPhone } from '../index.js'; | ||
import { IAccount, IAddress, IEmail, IExperience, IPartialPerson, IPerson, IPhone } from '../index.js'; | ||
import { AccountType } from './Account.js'; | ||
@@ -14,3 +14,3 @@ export type Validator<T> = { | ||
static getAccountId(acctType: AccountType, person: IPerson): IAccount | null; | ||
static preferredPhone(person?: Partial<IPerson> | null): IPhone | IPersonPhone | null; | ||
static preferredPhone(person?: Partial<IPerson> | null): IPhone | null; | ||
static currentRole(person?: Partial<IPerson> | null): IExperience | null; | ||
@@ -29,3 +29,3 @@ static preferredEmail(person?: Partial<IPerson> | null): IEmail | null; | ||
export declare const personValidator: Validator<IPerson>; | ||
export declare const personProps: Set<string>; | ||
export declare const personProps: Set<keyof IPerson>; | ||
export declare const isPersonProp: (key: string) => key is keyof IPerson; | ||
@@ -32,0 +32,0 @@ export declare function isValidPerson(o: unknown, log?: Logger): o is IPerson; |
@@ -5,3 +5,10 @@ import { isNumber, isNumberOrNull, isStringOrNull, isUuid, } from '@universe/util'; | ||
import { Person as PersonAPI } from '../types/helpers.js'; | ||
import { PhoneType } from './Phone.js'; | ||
import { PhoneType, stampPhone } from './Phone.js'; | ||
// Given an IPersonPhone, always return a valid IPhone object, even if it's missing the phone on itself. | ||
function getPhone(personPhone) { | ||
if (!personPhone) { | ||
return null; | ||
} | ||
return personPhone.phone || stampPhone({ number: personPhone.phoneId }); | ||
} | ||
// Given two addresses, return the more "complete" object. | ||
@@ -72,16 +79,16 @@ // TODO: Make more intelligent. | ||
case PhoneType.PERS: | ||
cell = phone.phone || null; | ||
cell = getPhone(phone) || null; | ||
break; | ||
case PhoneType.HOME: | ||
home = phone.phone || null; | ||
home = getPhone(phone) || null; | ||
break; | ||
case PhoneType.WORK: | ||
work = phone.phone || null; | ||
work = getPhone(phone) || null; | ||
break; | ||
case PhoneType.OTHER: | ||
other = phone.phone || null; | ||
other = getPhone(phone) || null; | ||
break; | ||
} | ||
} | ||
return cell || home || work || other || person.phones[0]?.phone || person.phones[0] || null; | ||
return cell || home || work || other || getPhone(person.phones[0]) || null; | ||
} | ||
@@ -255,2 +262,2 @@ // TODO: Make better | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGVyc29uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21vZGVscy9QZXJzb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFFBQVEsRUFDUixjQUFjLEVBQ2QsY0FBYyxFQUNkLE1BQU0sR0FDUCxNQUFNLGdCQUFnQixDQUFDO0FBRXhCLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMxRCxPQUFPLEVBQ0wsV0FBVyxFQVVYLGtCQUFrQixFQUVsQixlQUFlLEVBQ2YsaUJBQWlCLEVBQ2pCLGlCQUFpQixFQUNqQixjQUFjLEVBQ2Qsb0JBQW9CLEVBQ3BCLHNCQUFzQixFQUN0QixrQkFBa0IsRUFDbEIsYUFBYSxFQUNiLG1CQUFtQixFQUNuQixrQkFBa0IsRUFDbEIsZ0JBQWdCLEVBQ2hCLGFBQWEsR0FFZCxNQUFNLGFBQWEsQ0FBQztBQUNyQixPQUFPLEVBQUUsTUFBTSxJQUFJLFNBQVMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRTFELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFNdkMsMERBQTBEO0FBQzFELCtCQUErQjtBQUMvQixNQUFNLFVBQVUsZ0JBQWdCLENBQUMsS0FBc0IsRUFBRSxLQUFzQjtJQUM3RSxJQUFJLENBQUMsS0FBSyxJQUFJLENBQUMsS0FBSyxFQUFFO1FBQUUsT0FBTyxLQUFLL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0aWFsPElQZXJzb24+IHwgbnVsbCk6IElQaG9uZSB8IG51bGwge1xuICAgIGlmICghcGVyc29uKSB7IHJldHVybiBudWxsOyB9XG4gICAgaWYgKCFwZXJzb24ucGhvbmVzIHx8IHBlcnNvbi5waG9uZXMubGVuZ3RoID09PSAwKSB7IHJldHVybiBudWxsOyB9XG5cbiAgICBsZXQgY2VsbDogSVBob25lIHwgbnVsbCA9IG51bGw7XG4gICAgbGV0IGhvbWU6IElQaG9uZSB8IG51bGwgPSBudWxsO1xuICAgIGxldCB3b3JrOiBJUGhvbmUgfCBudWxsID0gbnVsbDtcbiAgICBsZXQgb3RoZXI6IElQaG9uZSB8IG51bGwgPSBudWxsO1xuXG4gICAgZm9yIChjb25zdCBwaG9uZSBvZiBwZXJzb24ucGhvbmVzKSB7XG4gICAgICBpZiAoIXBob25lKSB7IGNvbnRpbnVlOyB9XG4gICAgICBzd2l0Y2ggKHBob25lLnR5cGUpIHtcbiAgICAgICAgY2FzZSBQaG9uZVR5cGUuUEVSUzogY2VsbCA9IGdldFBob25lKHBob25lKSB8fCBudWxsOyBicmVhaztcbiAgICAgICAgY2FzZSBQaG9uZVR5cGUuSE9NRTogaG9tZSA9IGdldFBob25lKHBob25lKSB8fCBudWxsOyBicmVhaztcbiAgICAgICAgY2FzZSBQaG9uZVR5cGUuV09SSzogd29yayA9IGdldFBob25lKHBob25lKSB8fCBudWxsOyBicmVhaztcbiAgICAgICAgY2FzZSBQaG9uZVR5cGUuT1RIRVI6IG90aGVyID0gZ2V0UGhvbmUocGhvbmUpIHx8IG51bGw7IGJyZWFrO1xuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gY2VsbCB8fCBob21lIHx8IHdvcmsgfHwgb3RoZXIgfHwgZ2V0UGhvbmUocGVyc29uLnBob25lc1swXSkgfHwgbnVsbDtcbiAgfVxuXG4gIC8vIFRPRE86IE1ha2UgYmV0dGVyXG4gIHN0YXRpYyBjdXJyZW50Um9sZShwZXJzb24/OiBQYXJ0aW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W2tleV0/LihvW2tleV0pKSB7IChvW2tleV0gYXMgdW5rbm93bikgPSBkZWZhdWx0UGVyc29uW2tleV07IH1cbiAgfVxuICByZXR1cm4gUGVyc29uQVBJLmh5ZHJhdGUobyk7XG59XG5cbmV4cG9ydCB7IElQZXJzb24gfTtcbiJdfQ== |
{ | ||
"name": "@universe/models", | ||
"version": "3.0.9", | ||
"version": "3.0.10", | ||
"main": "esm/src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Universe data models.", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1970443
16439
0