feat(types): Add "URL" to Barcode types & export additional TS types (#2613)
* Add "URL" to flow types * add "URL" to barcodes & export additional TS types * add optional format to flow * add optionl format prop to TS
This commit is contained in:
parent
ecb20719d0
commit
3f1334c5e0
@ -140,6 +140,7 @@ type TrackedBarcodeFeature = {
|
||||
data: string,
|
||||
dataRaw: string,
|
||||
type: BarcodeType,
|
||||
format?: string,
|
||||
addresses?: {
|
||||
addressesType?: 'UNKNOWN' | 'Work' | 'Home',
|
||||
addressLines?: string[],
|
||||
@ -202,7 +203,8 @@ type BarcodeType =
|
||||
| 'WIFI'
|
||||
| 'TEXT'
|
||||
| 'ISBN'
|
||||
| 'PRODUCT';
|
||||
| 'PRODUCT'
|
||||
| 'URL';
|
||||
|
||||
type Email = {
|
||||
address?: string,
|
||||
|
||||
18
types/index.d.ts
vendored
18
types/index.d.ts
vendored
@ -235,7 +235,7 @@ interface Size<T = number> {
|
||||
height: T;
|
||||
}
|
||||
|
||||
interface Barcode {
|
||||
export interface Barcode {
|
||||
bounds: {
|
||||
size: Size;
|
||||
origin: Point;
|
||||
@ -243,6 +243,7 @@ interface Barcode {
|
||||
data: string;
|
||||
dataRaw: string;
|
||||
type: BarcodeType;
|
||||
format?: string;
|
||||
addresses?: {
|
||||
addressesType?: "UNKNOWN" | "Work" | "Home";
|
||||
addressLines?: string[];
|
||||
@ -294,7 +295,7 @@ interface Barcode {
|
||||
message?: string;
|
||||
}
|
||||
|
||||
type BarcodeType =
|
||||
export type BarcodeType =
|
||||
|"EMAIL"
|
||||
|"PHONE"
|
||||
|"CALENDAR_EVENT"
|
||||
@ -306,20 +307,21 @@ type BarcodeType =
|
||||
|"TEXT"
|
||||
|"ISBN"
|
||||
|"PRODUCT"
|
||||
|"URL"
|
||||
|
||||
interface Email {
|
||||
export interface Email {
|
||||
address?: string;
|
||||
body?: string;
|
||||
subject?: string;
|
||||
emailType?: "UNKNOWN" | "Work" | "Home";
|
||||
}
|
||||
|
||||
interface Phone {
|
||||
export interface Phone {
|
||||
number?: string;
|
||||
phoneType?: "UNKNOWN" | "Work" | "Home" | "Fax" | "Mobile";
|
||||
}
|
||||
|
||||
interface Face {
|
||||
export interface Face {
|
||||
faceID?: number;
|
||||
bounds: {
|
||||
size: Size;
|
||||
@ -343,7 +345,7 @@ interface Face {
|
||||
rollAngle?: number;
|
||||
}
|
||||
|
||||
interface TrackedTextFeature {
|
||||
export interface TrackedTextFeature {
|
||||
type: 'block' | 'line' | 'element';
|
||||
bounds: {
|
||||
size: Size;
|
||||
@ -371,7 +373,7 @@ interface TakePictureOptions {
|
||||
forceUpOrientation?: boolean;
|
||||
}
|
||||
|
||||
interface TakePictureResponse {
|
||||
export interface TakePictureResponse {
|
||||
width: number;
|
||||
height: number;
|
||||
uri: string;
|
||||
@ -395,7 +397,7 @@ interface RecordOptions {
|
||||
codec?: keyof VideoCodec | VideoCodec[keyof VideoCodec];
|
||||
}
|
||||
|
||||
interface RecordResponse {
|
||||
export interface RecordResponse {
|
||||
/** Path to the video saved on your app's cache directory. */
|
||||
uri: string;
|
||||
videoOrientation: number;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user