Renamed schemas files to conform to Apple official names. Todos have been added for next major

This commit is contained in:
Alexander Cerutti
2021-08-25 22:56:44 +02:00
parent 4470da11ca
commit 1f41ce7602
8 changed files with 35 additions and 15 deletions

View File

@@ -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"

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -1,5 +1,5 @@
import Joi from "joi";
import { Field } from "./field";
import { Field } from "./PassFieldContent";
export interface PassFields {
auxiliaryFields: (Field & { row?: number })[];

View File

@@ -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");