Renamed schema files and removed few TODOs

This commit is contained in:
Alexander Cerutti
2021-10-16 14:02:03 +02:00
parent c256d1638b
commit c432b45b00
7 changed files with 12 additions and 17 deletions

View File

@@ -2,7 +2,6 @@ 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 =

View File

@@ -2,7 +2,6 @@ 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 {

View File

@@ -1,9 +1,8 @@
import Joi from "joi";
import { Semantics } from "./SemanticTags";
import { Semantics } from "./Semantics";
/**
* @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 {

View File

@@ -2,7 +2,6 @@ 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 {

View File

@@ -1,5 +1,5 @@
import Joi from "joi";
import { Field } from "./PassFieldContent";
import { Field } from "./Field";
export type TransitType =
| "PKTransitTypeAir"

View File

@@ -52,8 +52,8 @@ const CurrencyAmount = Joi.object<SemanticTagType.CurrencyAmount>().keys({
amount: Joi.string(),
});
const PersonNameComponent = Joi.object<SemanticTagType.PersonNameComponents>().keys(
{
const PersonNameComponent =
Joi.object<SemanticTagType.PersonNameComponents>().keys({
givenName: Joi.string(),
familyName: Joi.string(),
middleName: Joi.string(),
@@ -61,8 +61,7 @@ const PersonNameComponent = Joi.object<SemanticTagType.PersonNameComponents>().k
nameSuffix: Joi.string(),
nickname: Joi.string(),
phoneticRepresentation: Joi.string(),
},
);
});
const seat = Joi.object<SemanticTagType.Seat>().keys({
seatSection: Joi.string(),

View File

@@ -1,21 +1,21 @@
export * from "./Barcodes";
export * from "./Beacons";
export * from "./Barcode";
export * from "./Beacon";
export * from "./Location";
export * from "./PassFieldContent";
export * from "./Field";
export * from "./NFC";
export * from "./SemanticTags";
export * from "./Semantics";
export * from "./PassFields";
export * from "./Personalize";
export * from "./Certificates";
import Joi from "joi";
import { Barcode } from "./Barcodes";
import { Barcode } from "./Barcode";
import { Location } from "./Location";
import { Beacon } from "./Beacons";
import { Beacon } from "./Beacon";
import { NFC } from "./NFC";
import { PassFields, TransitType } from "./PassFields";
import { Semantics } from "./SemanticTags";
import { Semantics } from "./Semantics";
import { CertificatesSchema } from "./Certificates";
import formatMessage, * as Messages from "../messages";