generated from NativeScript/plugin-seed
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.ts
174 lines (148 loc) · 2.9 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
export enum EncryptionType {
Open = 'open',
WPA = 'wpa',
WEP = 'wep',
Unknown = 'unknown'
}
export interface WiFi {
encryptionType: EncryptionType
password: string
ssid: string
}
export interface UrlBookmark {
title?: string
url?: string
}
export interface Sms {
message: string
phoneNumber: string
}
export enum PhoneType {
Unknown = "unknown",
Home = "home",
Work = "work",
Fax = "fax",
Mobile = "mobile"
}
export interface Phone {
number: string
type: PhoneType
}
export enum EmailType {
Unknown = "unknown",
Home = "home",
Work = "work"
}
export interface Email {
address: string
subject: string
body: string
type: EmailType
}
export interface DriverLicense {
documentType: string;
firstName: string;
middleName: string;
lastName: string;
gender: string;
addressStreet: string;
addressCity: string;
addressState: string;
addressZip: string;
licenseNumber: string;
issueDate: string;
expiryDate: string;
birthDate: string;
issuingCountry: string;
}
export interface CalenderEvent {
description?: string
location?: string
organizer?: string
status?: string
summary?: string;
start?: string
end?: string
}
export enum AddressType {
Unknown = "unknown",
Home = "home",
Work = "work"
}
export interface Address {
addressLines: string[]
type: AddressType;
}
export interface ContactInfo {
addresses: Address[]
}
export interface Origin {
x: number;
y: number;
}
export interface Size {
width: number;
height: number;
}
export interface Bounds {
origin: Origin;
size: Size;
}
export interface Point {
x: number;
y: number;
}
export interface GeoPoint {
lat: number;
lng: number;
}
export enum ValueType {
ContactInfo = "contactInfo",
Email = "email",
ISBN = "isbn",
Phone = "phone",
Product = "product",
Text = "text",
Sms = "sms",
URL = "url",
WiFi = "wifi",
Geo = "geo",
CalenderEvent = "calender",
DriverLicense = "driverLicense",
Unknown = "unknown"
}
export enum BarcodeFormats {
ALL = 'all',
CODE_128 = 'code_128',
CODE_39 = 'code_39',
CODE_93 = 'code_93',
CODABAR = 'codabar',
DATA_MATRIX = 'data_matrix',
EAN_13 = 'ean_13',
EAN_8 = 'ean_8',
ITF = 'itf',
QR_CODE = 'qr_code',
UPC_A = 'upc_a',
UPC_E = 'upc_e',
PDF417 = 'pdf417',
AZTEC = 'aztec',
UNKOWN = 'unknown'
}
export interface BarcodeResult {
calendarEvent?: CalenderEvent
contactInfo?: ContactInfo
bounds?: Bounds
points?: Point[]
displayValue?: string
driverLicense?: DriverLicense
email?: Email
format: BarcodeFormats
geoPoint?: GeoPoint
phone?: Phone
rawBytes?: any[]
rawValue?: string;
sms?: Sms
url?: UrlBookmark
valueType?: ValueType
wifi?: WiFi
}