Preliminary support for destinationUuid field

This commit is contained in:
Fedor Indutny
2021-11-12 22:26:52 +01:00
committed by GitHub
parent bb15cfc622
commit 066a23a6a9
8 changed files with 154 additions and 36 deletions

View File

@@ -8,6 +8,12 @@ import { strictAssert } from '../util/assert';
export type UUIDStringType =
`${string}-${string}-${string}-${string}-${string}`;
export enum UUIDKind {
ACI = 'ACI',
PNI = 'PNI',
Unknown = 'Unknown',
}
export const isValidUuid = (value: unknown): value is UUIDStringType =>
typeof value === 'string' &&
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i.test(