diff --git a/src/schemas/barcode.ts b/src/schemas/Barcodes.ts similarity index 80% rename from src/schemas/barcode.ts rename to src/schemas/Barcodes.ts index bbcba0b..426289e 100644 --- a/src/schemas/barcode.ts +++ b/src/schemas/Barcodes.ts @@ -1,5 +1,10 @@ import Joi from "joi"; +/** + * @see https://developer.apple.com/documentation/walletpasses/pass/barcodes + * @TODO Rename "Barcode" in "Barcodes". It will be done in v3.0 + */ + export type BarcodeFormat = | "PKBarcodeFormatQR" | "PKBarcodeFormatPDF417" diff --git a/src/schemas/beacon.ts b/src/schemas/Beacons.ts similarity index 72% rename from src/schemas/beacon.ts rename to src/schemas/Beacons.ts index d946b3b..47f4ff8 100644 --- a/src/schemas/beacon.ts +++ b/src/schemas/Beacons.ts @@ -1,5 +1,10 @@ import Joi from "joi"; +/** + * @see https://developer.apple.com/documentation/walletpasses/pass/beacons + * @TODO Rename "Beacon" in "Beacons". This will be done in v3.0 + */ + export interface Beacon { major?: number; minor?: number; diff --git a/src/schemas/location.ts b/src/schemas/Location.ts similarity index 67% rename from src/schemas/location.ts rename to src/schemas/Location.ts index f99cd82..3e08cbb 100644 --- a/src/schemas/location.ts +++ b/src/schemas/Location.ts @@ -1,5 +1,10 @@ import Joi from "joi"; +/** + * @see https://developer.apple.com/documentation/walletpasses/pass/locations + * @TODO Rename "Location" in "Locations". This will be done in v3.0 + */ + export interface Location { relevantText?: string; altitude?: number; diff --git a/src/schemas/nfc.ts b/src/schemas/NFC.ts similarity index 100% rename from src/schemas/nfc.ts rename to src/schemas/NFC.ts diff --git a/src/schemas/field.ts b/src/schemas/PassFieldContent.ts similarity index 89% rename from src/schemas/field.ts rename to src/schemas/PassFieldContent.ts index 42f71bf..0445639 100644 --- a/src/schemas/field.ts +++ b/src/schemas/PassFieldContent.ts @@ -1,5 +1,10 @@ import Joi from "joi"; -import { Semantics } from "./semantics"; +import { Semantics } from "./SemanticTags"; + +/** + * @see https://developer.apple.com/documentation/walletpasses/passfieldcontent + * @TODO Rename interface to PassFieldContent to conform to above. This will be done in v3.0 + */ export interface Field { attributedValue?: string | number | Date; diff --git a/src/schemas/passFields.ts b/src/schemas/PassFields.ts similarity index 95% rename from src/schemas/passFields.ts rename to src/schemas/PassFields.ts index 9b4fb86..cdc43b1 100644 --- a/src/schemas/passFields.ts +++ b/src/schemas/PassFields.ts @@ -1,5 +1,5 @@ import Joi from "joi"; -import { Field } from "./field"; +import { Field } from "./PassFieldContent"; export interface PassFields { auxiliaryFields: (Field & { row?: number })[]; diff --git a/src/schemas/semantics.ts b/src/schemas/SemanticTags.ts similarity index 100% rename from src/schemas/semantics.ts rename to src/schemas/SemanticTags.ts diff --git a/src/schemas/index.ts b/src/schemas/index.ts index bca6bff..16548aa 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1,21 +1,21 @@ -export * from "./barcode"; -export * from "./beacon"; -export * from "./location"; -export * from "./field"; -export * from "./nfc"; -export * from "./semantics"; -export * from "./passFields"; +export * from "./Barcodes"; +export * from "./Beacons"; +export * from "./Location"; +export * from "./PassFieldContent"; +export * from "./NFC"; +export * from "./SemanticTags"; +export * from "./PassFields"; export * from "./personalization"; import Joi from "joi"; import debug from "debug"; -import { Barcode } from "./barcode"; -import { Location } from "./location"; -import { Beacon } from "./beacon"; -import { NFC } from "./nfc"; -import { Field } from "./field"; -import { PassFields, TransitType } from "./passFields"; +import { Barcode } from "./Barcodes"; +import { Location } from "./Location"; +import { Beacon } from "./Beacons"; +import { NFC } from "./NFC"; +import { Field } from "./PassFieldContent"; +import { PassFields, TransitType } from "./PassFields"; import { Personalization } from "./personalization"; const schemaDebug = debug("Schema");