mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 22:25:24 +00:00
Merge pull request #139 from Songkeys/fix-pass-field-types
fix: complete pass field types for typescript
This commit is contained in:
@@ -1,6 +1,31 @@
|
|||||||
import Joi from "joi";
|
import Joi from "joi";
|
||||||
import { Semantics } from "./Semantics";
|
import { Semantics } from "./Semantics";
|
||||||
|
|
||||||
|
export type PKDataDetectorType =
|
||||||
|
| "PKDataDetectorTypePhoneNumber"
|
||||||
|
| "PKDataDetectorTypeLink"
|
||||||
|
| "PKDataDetectorTypeAddress"
|
||||||
|
| "PKDataDetectorTypeCalendarEvent";
|
||||||
|
|
||||||
|
export type PKTextAlignmentType =
|
||||||
|
| "PKTextAlignmentLeft"
|
||||||
|
| "PKTextAlignmentCenter"
|
||||||
|
| "PKTextAlignmentRight"
|
||||||
|
| "PKTextAlignmentNatural";
|
||||||
|
|
||||||
|
export type PKDateStyleType =
|
||||||
|
| "PKDateStyleNone"
|
||||||
|
| "PKDateStyleShort"
|
||||||
|
| "PKDateStyleMedium"
|
||||||
|
| "PKDateStyleLong"
|
||||||
|
| "PKDateStyleFull";
|
||||||
|
|
||||||
|
export type PKNumberStyleType =
|
||||||
|
| "PKNumberStyleDecimal"
|
||||||
|
| "PKNumberStylePercent"
|
||||||
|
| "PKNumberStyleScientific"
|
||||||
|
| "PKNumberStyleSpellOut";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://developer.apple.com/documentation/walletpasses/passfieldcontent
|
* @see https://developer.apple.com/documentation/walletpasses/passfieldcontent
|
||||||
*/
|
*/
|
||||||
@@ -8,18 +33,18 @@ import { Semantics } from "./Semantics";
|
|||||||
export interface Field {
|
export interface Field {
|
||||||
attributedValue?: string | number | Date;
|
attributedValue?: string | number | Date;
|
||||||
changeMessage?: string;
|
changeMessage?: string;
|
||||||
dataDetectorTypes?: string[];
|
dataDetectorTypes?: PKDataDetectorType[];
|
||||||
label?: string;
|
label?: string;
|
||||||
textAlignment?: string;
|
textAlignment?: PKTextAlignmentType;
|
||||||
key: string;
|
key: string;
|
||||||
value: string | number | Date;
|
value: string | number | Date;
|
||||||
semantics?: Semantics;
|
semantics?: Semantics;
|
||||||
dateStyle?: string;
|
dateStyle?: PKDateStyleType;
|
||||||
ignoresTimeZone?: boolean;
|
ignoresTimeZone?: boolean;
|
||||||
isRelative?: boolean;
|
isRelative?: boolean;
|
||||||
timeStyle?: string;
|
timeStyle?: string;
|
||||||
currencyCode?: string;
|
currencyCode?: string;
|
||||||
numberStyle?: string;
|
numberStyle?: PKNumberStyleType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FieldWithRow extends Field {
|
export interface FieldWithRow extends Field {
|
||||||
|
|||||||
Reference in New Issue
Block a user