@webority/mobile-core 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/android/build.gradle +65 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/AppSignatureHelper.kt +57 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/SmsRetrieverModule.kt +20 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/SmsRetrieverModuleImpl.kt +146 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/SmsRetrieverPackage.kt +33 -0
- package/lib/commonjs/api/baseUrl.js +34 -0
- package/lib/commonjs/api/curl.js +109 -0
- package/lib/commonjs/api/publicClient.js +73 -0
- package/lib/commonjs/api/retry.js +75 -0
- package/lib/commonjs/api/tokenRefresh.js +205 -0
- package/lib/commonjs/api/userClient.js +255 -0
- package/lib/commonjs/auth/authStore.js +232 -0
- package/lib/commonjs/auth/index.js +44 -0
- package/lib/commonjs/auth/jwt.js +112 -0
- package/lib/commonjs/config/index.js +66 -0
- package/lib/commonjs/deepLink/index.js +286 -0
- package/lib/commonjs/download/adapters/expoFs.js +69 -0
- package/lib/commonjs/download/adapters/shared.js +13 -0
- package/lib/commonjs/download/index.js +250 -0
- package/lib/commonjs/formatters/currency.js +69 -0
- package/lib/commonjs/formatters/date.js +168 -0
- package/lib/commonjs/formatters/dateMath.js +310 -0
- package/lib/commonjs/formatters/index.js +246 -0
- package/lib/commonjs/formatters/initials.js +32 -0
- package/lib/commonjs/formatters/number.js +88 -0
- package/lib/commonjs/formatters/phone.js +369 -0
- package/lib/commonjs/formatters/windowsToIanaTable.js +164 -0
- package/lib/commonjs/geolocation/adapters/expoLocation.js +126 -0
- package/lib/commonjs/geolocation/index.js +355 -0
- package/lib/commonjs/index.js +630 -0
- package/lib/commonjs/initSDK.js +66 -0
- package/lib/commonjs/initUserAuth.js +37 -0
- package/lib/commonjs/logger/index.js +291 -0
- package/lib/commonjs/network/index.js +31 -0
- package/lib/commonjs/network/networkStatus.js +133 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/permissions/calendar.js +14 -0
- package/lib/commonjs/permissions/camera.js +14 -0
- package/lib/commonjs/permissions/contacts.js +10 -0
- package/lib/commonjs/permissions/index.js +133 -0
- package/lib/commonjs/permissions/location.js +14 -0
- package/lib/commonjs/permissions/mediaLibrary.js +10 -0
- package/lib/commonjs/permissions/notifications.js +10 -0
- package/lib/commonjs/permissions/photos.js +14 -0
- package/lib/commonjs/phone/countries.js +265 -0
- package/lib/commonjs/share/index.js +70 -0
- package/lib/commonjs/smsRetriever/index.js +91 -0
- package/lib/commonjs/specs/NativeSmsRetriever.js +15 -0
- package/lib/commonjs/sqlite/adapters/expo.js +53 -0
- package/lib/commonjs/sqlite/index.js +604 -0
- package/lib/commonjs/storage/index.js +214 -0
- package/lib/commonjs/types/globals.d.js +6 -0
- package/lib/commonjs/utils/imageCompression.js +389 -0
- package/lib/commonjs/utils/index.js +19 -0
- package/lib/commonjs/validators/index.js +227 -0
- package/lib/commonjs/versionCheck/index.js +419 -0
- package/lib/module/api/baseUrl.js +30 -0
- package/lib/module/api/curl.js +104 -0
- package/lib/module/api/publicClient.js +69 -0
- package/lib/module/api/retry.js +69 -0
- package/lib/module/api/tokenRefresh.js +192 -0
- package/lib/module/api/userClient.js +233 -0
- package/lib/module/auth/authStore.js +224 -0
- package/lib/module/auth/index.js +5 -0
- package/lib/module/auth/jwt.js +106 -0
- package/lib/module/config/index.js +58 -0
- package/lib/module/deepLink/index.js +280 -0
- package/lib/module/download/adapters/expoFs.js +64 -0
- package/lib/module/download/adapters/shared.js +8 -0
- package/lib/module/download/index.js +242 -0
- package/lib/module/formatters/currency.js +64 -0
- package/lib/module/formatters/date.js +160 -0
- package/lib/module/formatters/dateMath.js +294 -0
- package/lib/module/formatters/index.js +9 -0
- package/lib/module/formatters/initials.js +27 -0
- package/lib/module/formatters/number.js +81 -0
- package/lib/module/formatters/phone.js +302 -0
- package/lib/module/formatters/windowsToIanaTable.js +160 -0
- package/lib/module/geolocation/adapters/expoLocation.js +121 -0
- package/lib/module/geolocation/index.js +347 -0
- package/lib/module/index.js +54 -0
- package/lib/module/initSDK.js +61 -0
- package/lib/module/initUserAuth.js +33 -0
- package/lib/module/logger/index.js +285 -0
- package/lib/module/network/index.js +4 -0
- package/lib/module/network/networkStatus.js +124 -0
- package/lib/module/package.json +1 -0
- package/lib/module/permissions/calendar.js +15 -0
- package/lib/module/permissions/camera.js +15 -0
- package/lib/module/permissions/contacts.js +11 -0
- package/lib/module/permissions/index.js +128 -0
- package/lib/module/permissions/location.js +15 -0
- package/lib/module/permissions/mediaLibrary.js +11 -0
- package/lib/module/permissions/notifications.js +11 -0
- package/lib/module/permissions/photos.js +15 -0
- package/lib/module/phone/countries.js +261 -0
- package/lib/module/share/index.js +64 -0
- package/lib/module/smsRetriever/index.js +86 -0
- package/lib/module/specs/NativeSmsRetriever.js +13 -0
- package/lib/module/sqlite/adapters/expo.js +48 -0
- package/lib/module/sqlite/index.js +594 -0
- package/lib/module/storage/index.js +208 -0
- package/lib/module/types/globals.d.js +10 -0
- package/lib/module/utils/imageCompression.js +383 -0
- package/lib/module/utils/index.js +4 -0
- package/lib/module/validators/index.js +205 -0
- package/lib/module/versionCheck/index.js +413 -0
- package/lib/typescript/commonjs/api/baseUrl.d.ts +20 -0
- package/lib/typescript/commonjs/api/curl.d.ts +18 -0
- package/lib/typescript/commonjs/api/publicClient.d.ts +11 -0
- package/lib/typescript/commonjs/api/retry.d.ts +27 -0
- package/lib/typescript/commonjs/api/tokenRefresh.d.ts +43 -0
- package/lib/typescript/commonjs/api/userClient.d.ts +37 -0
- package/lib/typescript/commonjs/auth/authStore.d.ts +79 -0
- package/lib/typescript/commonjs/auth/index.d.ts +5 -0
- package/lib/typescript/commonjs/auth/jwt.d.ts +31 -0
- package/lib/typescript/commonjs/config/index.d.ts +55 -0
- package/lib/typescript/commonjs/deepLink/index.d.ts +54 -0
- package/lib/typescript/commonjs/download/adapters/expoFs.d.ts +38 -0
- package/lib/typescript/commonjs/download/adapters/shared.d.ts +3 -0
- package/lib/typescript/commonjs/download/index.d.ts +86 -0
- package/lib/typescript/commonjs/formatters/currency.d.ts +24 -0
- package/lib/typescript/commonjs/formatters/date.d.ts +22 -0
- package/lib/typescript/commonjs/formatters/dateMath.d.ts +88 -0
- package/lib/typescript/commonjs/formatters/index.d.ts +10 -0
- package/lib/typescript/commonjs/formatters/initials.d.ts +11 -0
- package/lib/typescript/commonjs/formatters/number.d.ts +15 -0
- package/lib/typescript/commonjs/formatters/phone.d.ts +133 -0
- package/lib/typescript/commonjs/formatters/windowsToIanaTable.d.ts +18 -0
- package/lib/typescript/commonjs/geolocation/adapters/expoLocation.d.ts +42 -0
- package/lib/typescript/commonjs/geolocation/index.d.ts +90 -0
- package/lib/typescript/commonjs/index.d.ts +54 -0
- package/lib/typescript/commonjs/initSDK.d.ts +72 -0
- package/lib/typescript/commonjs/initUserAuth.d.ts +41 -0
- package/lib/typescript/commonjs/logger/index.d.ts +81 -0
- package/lib/typescript/commonjs/network/index.d.ts +3 -0
- package/lib/typescript/commonjs/network/networkStatus.d.ts +43 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/permissions/calendar.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/camera.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/contacts.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/index.d.ts +48 -0
- package/lib/typescript/commonjs/permissions/location.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/mediaLibrary.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/notifications.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/photos.d.ts +2 -0
- package/lib/typescript/commonjs/phone/countries.d.ts +13 -0
- package/lib/typescript/commonjs/share/index.d.ts +29 -0
- package/lib/typescript/commonjs/smsRetriever/index.d.ts +30 -0
- package/lib/typescript/commonjs/specs/NativeSmsRetriever.d.ts +15 -0
- package/lib/typescript/commonjs/sqlite/adapters/expo.d.ts +30 -0
- package/lib/typescript/commonjs/sqlite/index.d.ts +113 -0
- package/lib/typescript/commonjs/storage/index.d.ts +64 -0
- package/lib/typescript/commonjs/utils/imageCompression.d.ts +152 -0
- package/lib/typescript/commonjs/utils/index.d.ts +3 -0
- package/lib/typescript/commonjs/validators/index.d.ts +51 -0
- package/lib/typescript/commonjs/versionCheck/index.d.ts +80 -0
- package/lib/typescript/module/api/baseUrl.d.ts +20 -0
- package/lib/typescript/module/api/curl.d.ts +18 -0
- package/lib/typescript/module/api/publicClient.d.ts +11 -0
- package/lib/typescript/module/api/retry.d.ts +27 -0
- package/lib/typescript/module/api/tokenRefresh.d.ts +43 -0
- package/lib/typescript/module/api/userClient.d.ts +37 -0
- package/lib/typescript/module/auth/authStore.d.ts +79 -0
- package/lib/typescript/module/auth/index.d.ts +5 -0
- package/lib/typescript/module/auth/jwt.d.ts +31 -0
- package/lib/typescript/module/config/index.d.ts +55 -0
- package/lib/typescript/module/deepLink/index.d.ts +54 -0
- package/lib/typescript/module/download/adapters/expoFs.d.ts +38 -0
- package/lib/typescript/module/download/adapters/shared.d.ts +3 -0
- package/lib/typescript/module/download/index.d.ts +86 -0
- package/lib/typescript/module/formatters/currency.d.ts +24 -0
- package/lib/typescript/module/formatters/date.d.ts +22 -0
- package/lib/typescript/module/formatters/dateMath.d.ts +88 -0
- package/lib/typescript/module/formatters/index.d.ts +10 -0
- package/lib/typescript/module/formatters/initials.d.ts +11 -0
- package/lib/typescript/module/formatters/number.d.ts +15 -0
- package/lib/typescript/module/formatters/phone.d.ts +133 -0
- package/lib/typescript/module/formatters/windowsToIanaTable.d.ts +18 -0
- package/lib/typescript/module/geolocation/adapters/expoLocation.d.ts +42 -0
- package/lib/typescript/module/geolocation/index.d.ts +90 -0
- package/lib/typescript/module/index.d.ts +54 -0
- package/lib/typescript/module/initSDK.d.ts +72 -0
- package/lib/typescript/module/initUserAuth.d.ts +41 -0
- package/lib/typescript/module/logger/index.d.ts +81 -0
- package/lib/typescript/module/network/index.d.ts +3 -0
- package/lib/typescript/module/network/networkStatus.d.ts +43 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/permissions/calendar.d.ts +2 -0
- package/lib/typescript/module/permissions/camera.d.ts +2 -0
- package/lib/typescript/module/permissions/contacts.d.ts +2 -0
- package/lib/typescript/module/permissions/index.d.ts +48 -0
- package/lib/typescript/module/permissions/location.d.ts +2 -0
- package/lib/typescript/module/permissions/mediaLibrary.d.ts +2 -0
- package/lib/typescript/module/permissions/notifications.d.ts +2 -0
- package/lib/typescript/module/permissions/photos.d.ts +2 -0
- package/lib/typescript/module/phone/countries.d.ts +13 -0
- package/lib/typescript/module/share/index.d.ts +29 -0
- package/lib/typescript/module/smsRetriever/index.d.ts +30 -0
- package/lib/typescript/module/specs/NativeSmsRetriever.d.ts +15 -0
- package/lib/typescript/module/sqlite/adapters/expo.d.ts +30 -0
- package/lib/typescript/module/sqlite/index.d.ts +113 -0
- package/lib/typescript/module/storage/index.d.ts +64 -0
- package/lib/typescript/module/utils/imageCompression.d.ts +152 -0
- package/lib/typescript/module/utils/index.d.ts +3 -0
- package/lib/typescript/module/validators/index.d.ts +51 -0
- package/lib/typescript/module/versionCheck/index.d.ts +80 -0
- package/package.json +298 -0
- package/src/specs/NativeSmsRetriever.ts +16 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _index = require("./index.js");
|
|
4
|
+
/** The one place `expo-notifications` is named. Import only if you use notifications. */
|
|
5
|
+
const m = require('expo-notifications');
|
|
6
|
+
(0, _index.registerPermissionAdapter)('notifications', {
|
|
7
|
+
check: m.getPermissionsAsync,
|
|
8
|
+
request: m.requestPermissionsAsync
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _index = require("./index.js");
|
|
4
|
+
/** The one place `expo-image-picker` is named. Import only if you use photos/photosAdd. */
|
|
5
|
+
const m = require('expo-image-picker');
|
|
6
|
+
(0, _index.registerPermissionAdapter)('photos', {
|
|
7
|
+
check: () => m.getMediaLibraryPermissionsAsync(false),
|
|
8
|
+
request: () => m.requestMediaLibraryPermissionsAsync(false)
|
|
9
|
+
});
|
|
10
|
+
(0, _index.registerPermissionAdapter)('photosAdd', {
|
|
11
|
+
check: () => m.getMediaLibraryPermissionsAsync(true),
|
|
12
|
+
request: () => m.requestMediaLibraryPermissionsAsync(true)
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=photos.js.map
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PHONE_COUNTRY_NAMES = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* English display names for every country libphonenumber-js knows, keyed by
|
|
9
|
+
* ISO 3166-1 alpha-2. GENERATED by scripts/gen-phone-countries.mjs from Node's
|
|
10
|
+
* Intl.DisplayNames('en', { type: 'region' }) over getCountries() on 2026-09-14;
|
|
11
|
+
* '&' is written as 'and'. Re-run the script rather than editing by hand.
|
|
12
|
+
*
|
|
13
|
+
* Lives on its own import path (mobile-core/phone/countries) so an app that
|
|
14
|
+
* never opens a full country list does not carry these 245 strings in its
|
|
15
|
+
* bundle. Pair with getPhoneCountries() from the package root for the calling
|
|
16
|
+
* codes; a country picker that needs another language supplies its own names.
|
|
17
|
+
*/
|
|
18
|
+
const PHONE_COUNTRY_NAMES = exports.PHONE_COUNTRY_NAMES = {
|
|
19
|
+
AF: 'Afghanistan',
|
|
20
|
+
AX: 'Åland Islands',
|
|
21
|
+
AL: 'Albania',
|
|
22
|
+
DZ: 'Algeria',
|
|
23
|
+
AS: 'American Samoa',
|
|
24
|
+
AD: 'Andorra',
|
|
25
|
+
AO: 'Angola',
|
|
26
|
+
AI: 'Anguilla',
|
|
27
|
+
AG: 'Antigua and Barbuda',
|
|
28
|
+
AR: 'Argentina',
|
|
29
|
+
AM: 'Armenia',
|
|
30
|
+
AW: 'Aruba',
|
|
31
|
+
AC: 'Ascension Island',
|
|
32
|
+
AU: 'Australia',
|
|
33
|
+
AT: 'Austria',
|
|
34
|
+
AZ: 'Azerbaijan',
|
|
35
|
+
BS: 'Bahamas',
|
|
36
|
+
BH: 'Bahrain',
|
|
37
|
+
BD: 'Bangladesh',
|
|
38
|
+
BB: 'Barbados',
|
|
39
|
+
BY: 'Belarus',
|
|
40
|
+
BE: 'Belgium',
|
|
41
|
+
BZ: 'Belize',
|
|
42
|
+
BJ: 'Benin',
|
|
43
|
+
BM: 'Bermuda',
|
|
44
|
+
BT: 'Bhutan',
|
|
45
|
+
BO: 'Bolivia',
|
|
46
|
+
BA: 'Bosnia and Herzegovina',
|
|
47
|
+
BW: 'Botswana',
|
|
48
|
+
BR: 'Brazil',
|
|
49
|
+
IO: 'British Indian Ocean Territory',
|
|
50
|
+
VG: 'British Virgin Islands',
|
|
51
|
+
BN: 'Brunei',
|
|
52
|
+
BG: 'Bulgaria',
|
|
53
|
+
BF: 'Burkina Faso',
|
|
54
|
+
BI: 'Burundi',
|
|
55
|
+
KH: 'Cambodia',
|
|
56
|
+
CM: 'Cameroon',
|
|
57
|
+
CA: 'Canada',
|
|
58
|
+
CV: 'Cape Verde',
|
|
59
|
+
BQ: 'Caribbean Netherlands',
|
|
60
|
+
KY: 'Cayman Islands',
|
|
61
|
+
CF: 'Central African Republic',
|
|
62
|
+
TD: 'Chad',
|
|
63
|
+
CL: 'Chile',
|
|
64
|
+
CN: 'China',
|
|
65
|
+
CX: 'Christmas Island',
|
|
66
|
+
CC: 'Cocos (Keeling) Islands',
|
|
67
|
+
CO: 'Colombia',
|
|
68
|
+
KM: 'Comoros',
|
|
69
|
+
CG: 'Congo - Brazzaville',
|
|
70
|
+
CD: 'Congo - Kinshasa',
|
|
71
|
+
CK: 'Cook Islands',
|
|
72
|
+
CR: 'Costa Rica',
|
|
73
|
+
CI: 'Côte d’Ivoire',
|
|
74
|
+
HR: 'Croatia',
|
|
75
|
+
CU: 'Cuba',
|
|
76
|
+
CW: 'Curaçao',
|
|
77
|
+
CY: 'Cyprus',
|
|
78
|
+
CZ: 'Czechia',
|
|
79
|
+
DK: 'Denmark',
|
|
80
|
+
DJ: 'Djibouti',
|
|
81
|
+
DM: 'Dominica',
|
|
82
|
+
DO: 'Dominican Republic',
|
|
83
|
+
EC: 'Ecuador',
|
|
84
|
+
EG: 'Egypt',
|
|
85
|
+
SV: 'El Salvador',
|
|
86
|
+
GQ: 'Equatorial Guinea',
|
|
87
|
+
ER: 'Eritrea',
|
|
88
|
+
EE: 'Estonia',
|
|
89
|
+
SZ: 'Eswatini',
|
|
90
|
+
ET: 'Ethiopia',
|
|
91
|
+
FK: 'Falkland Islands',
|
|
92
|
+
FO: 'Faroe Islands',
|
|
93
|
+
FJ: 'Fiji',
|
|
94
|
+
FI: 'Finland',
|
|
95
|
+
FR: 'France',
|
|
96
|
+
GF: 'French Guiana',
|
|
97
|
+
PF: 'French Polynesia',
|
|
98
|
+
GA: 'Gabon',
|
|
99
|
+
GM: 'Gambia',
|
|
100
|
+
GE: 'Georgia',
|
|
101
|
+
DE: 'Germany',
|
|
102
|
+
GH: 'Ghana',
|
|
103
|
+
GI: 'Gibraltar',
|
|
104
|
+
GR: 'Greece',
|
|
105
|
+
GL: 'Greenland',
|
|
106
|
+
GD: 'Grenada',
|
|
107
|
+
GP: 'Guadeloupe',
|
|
108
|
+
GU: 'Guam',
|
|
109
|
+
GT: 'Guatemala',
|
|
110
|
+
GG: 'Guernsey',
|
|
111
|
+
GN: 'Guinea',
|
|
112
|
+
GW: 'Guinea-Bissau',
|
|
113
|
+
GY: 'Guyana',
|
|
114
|
+
HT: 'Haiti',
|
|
115
|
+
HN: 'Honduras',
|
|
116
|
+
HK: 'Hong Kong SAR China',
|
|
117
|
+
HU: 'Hungary',
|
|
118
|
+
IS: 'Iceland',
|
|
119
|
+
IN: 'India',
|
|
120
|
+
ID: 'Indonesia',
|
|
121
|
+
IR: 'Iran',
|
|
122
|
+
IQ: 'Iraq',
|
|
123
|
+
IE: 'Ireland',
|
|
124
|
+
IM: 'Isle of Man',
|
|
125
|
+
IL: 'Israel',
|
|
126
|
+
IT: 'Italy',
|
|
127
|
+
JM: 'Jamaica',
|
|
128
|
+
JP: 'Japan',
|
|
129
|
+
JE: 'Jersey',
|
|
130
|
+
JO: 'Jordan',
|
|
131
|
+
KZ: 'Kazakhstan',
|
|
132
|
+
KE: 'Kenya',
|
|
133
|
+
KI: 'Kiribati',
|
|
134
|
+
XK: 'Kosovo',
|
|
135
|
+
KW: 'Kuwait',
|
|
136
|
+
KG: 'Kyrgyzstan',
|
|
137
|
+
LA: 'Laos',
|
|
138
|
+
LV: 'Latvia',
|
|
139
|
+
LB: 'Lebanon',
|
|
140
|
+
LS: 'Lesotho',
|
|
141
|
+
LR: 'Liberia',
|
|
142
|
+
LY: 'Libya',
|
|
143
|
+
LI: 'Liechtenstein',
|
|
144
|
+
LT: 'Lithuania',
|
|
145
|
+
LU: 'Luxembourg',
|
|
146
|
+
MO: 'Macao SAR China',
|
|
147
|
+
MG: 'Madagascar',
|
|
148
|
+
MW: 'Malawi',
|
|
149
|
+
MY: 'Malaysia',
|
|
150
|
+
MV: 'Maldives',
|
|
151
|
+
ML: 'Mali',
|
|
152
|
+
MT: 'Malta',
|
|
153
|
+
MH: 'Marshall Islands',
|
|
154
|
+
MQ: 'Martinique',
|
|
155
|
+
MR: 'Mauritania',
|
|
156
|
+
MU: 'Mauritius',
|
|
157
|
+
YT: 'Mayotte',
|
|
158
|
+
MX: 'Mexico',
|
|
159
|
+
FM: 'Micronesia',
|
|
160
|
+
MD: 'Moldova',
|
|
161
|
+
MC: 'Monaco',
|
|
162
|
+
MN: 'Mongolia',
|
|
163
|
+
ME: 'Montenegro',
|
|
164
|
+
MS: 'Montserrat',
|
|
165
|
+
MA: 'Morocco',
|
|
166
|
+
MZ: 'Mozambique',
|
|
167
|
+
MM: 'Myanmar (Burma)',
|
|
168
|
+
NA: 'Namibia',
|
|
169
|
+
NR: 'Nauru',
|
|
170
|
+
NP: 'Nepal',
|
|
171
|
+
NL: 'Netherlands',
|
|
172
|
+
NC: 'New Caledonia',
|
|
173
|
+
NZ: 'New Zealand',
|
|
174
|
+
NI: 'Nicaragua',
|
|
175
|
+
NE: 'Niger',
|
|
176
|
+
NG: 'Nigeria',
|
|
177
|
+
NU: 'Niue',
|
|
178
|
+
NF: 'Norfolk Island',
|
|
179
|
+
KP: 'North Korea',
|
|
180
|
+
MK: 'North Macedonia',
|
|
181
|
+
MP: 'Northern Mariana Islands',
|
|
182
|
+
NO: 'Norway',
|
|
183
|
+
OM: 'Oman',
|
|
184
|
+
PK: 'Pakistan',
|
|
185
|
+
PW: 'Palau',
|
|
186
|
+
PS: 'Palestinian Territories',
|
|
187
|
+
PA: 'Panama',
|
|
188
|
+
PG: 'Papua New Guinea',
|
|
189
|
+
PY: 'Paraguay',
|
|
190
|
+
PE: 'Peru',
|
|
191
|
+
PH: 'Philippines',
|
|
192
|
+
PL: 'Poland',
|
|
193
|
+
PT: 'Portugal',
|
|
194
|
+
PR: 'Puerto Rico',
|
|
195
|
+
QA: 'Qatar',
|
|
196
|
+
RE: 'Réunion',
|
|
197
|
+
RO: 'Romania',
|
|
198
|
+
RU: 'Russia',
|
|
199
|
+
RW: 'Rwanda',
|
|
200
|
+
WS: 'Samoa',
|
|
201
|
+
SM: 'San Marino',
|
|
202
|
+
ST: 'São Tomé and Príncipe',
|
|
203
|
+
SA: 'Saudi Arabia',
|
|
204
|
+
SN: 'Senegal',
|
|
205
|
+
RS: 'Serbia',
|
|
206
|
+
SC: 'Seychelles',
|
|
207
|
+
SL: 'Sierra Leone',
|
|
208
|
+
SG: 'Singapore',
|
|
209
|
+
SX: 'Sint Maarten',
|
|
210
|
+
SK: 'Slovakia',
|
|
211
|
+
SI: 'Slovenia',
|
|
212
|
+
SB: 'Solomon Islands',
|
|
213
|
+
SO: 'Somalia',
|
|
214
|
+
ZA: 'South Africa',
|
|
215
|
+
KR: 'South Korea',
|
|
216
|
+
SS: 'South Sudan',
|
|
217
|
+
ES: 'Spain',
|
|
218
|
+
LK: 'Sri Lanka',
|
|
219
|
+
BL: 'St. Barthélemy',
|
|
220
|
+
SH: 'St. Helena',
|
|
221
|
+
KN: 'St. Kitts and Nevis',
|
|
222
|
+
LC: 'St. Lucia',
|
|
223
|
+
MF: 'St. Martin',
|
|
224
|
+
PM: 'St. Pierre and Miquelon',
|
|
225
|
+
VC: 'St. Vincent and Grenadines',
|
|
226
|
+
SD: 'Sudan',
|
|
227
|
+
SR: 'Suriname',
|
|
228
|
+
SJ: 'Svalbard and Jan Mayen',
|
|
229
|
+
SE: 'Sweden',
|
|
230
|
+
CH: 'Switzerland',
|
|
231
|
+
SY: 'Syria',
|
|
232
|
+
TW: 'Taiwan',
|
|
233
|
+
TJ: 'Tajikistan',
|
|
234
|
+
TZ: 'Tanzania',
|
|
235
|
+
TH: 'Thailand',
|
|
236
|
+
TL: 'Timor-Leste',
|
|
237
|
+
TG: 'Togo',
|
|
238
|
+
TK: 'Tokelau',
|
|
239
|
+
TO: 'Tonga',
|
|
240
|
+
TT: 'Trinidad and Tobago',
|
|
241
|
+
TA: 'Tristan da Cunha',
|
|
242
|
+
TN: 'Tunisia',
|
|
243
|
+
TR: 'Türkiye',
|
|
244
|
+
TM: 'Turkmenistan',
|
|
245
|
+
TC: 'Turks and Caicos Islands',
|
|
246
|
+
TV: 'Tuvalu',
|
|
247
|
+
VI: 'U.S. Virgin Islands',
|
|
248
|
+
UG: 'Uganda',
|
|
249
|
+
UA: 'Ukraine',
|
|
250
|
+
AE: 'United Arab Emirates',
|
|
251
|
+
GB: 'United Kingdom',
|
|
252
|
+
US: 'United States',
|
|
253
|
+
UY: 'Uruguay',
|
|
254
|
+
UZ: 'Uzbekistan',
|
|
255
|
+
VU: 'Vanuatu',
|
|
256
|
+
VA: 'Vatican City',
|
|
257
|
+
VE: 'Venezuela',
|
|
258
|
+
VN: 'Vietnam',
|
|
259
|
+
WF: 'Wallis and Futuna',
|
|
260
|
+
EH: 'Western Sahara',
|
|
261
|
+
YE: 'Yemen',
|
|
262
|
+
ZM: 'Zambia',
|
|
263
|
+
ZW: 'Zimbabwe'
|
|
264
|
+
};
|
|
265
|
+
//# sourceMappingURL=countries.js.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.shareFile = exports.ShareError = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Opens a downloaded file through the system share sheet, where the person picks
|
|
9
|
+
* a viewer or saves it. A separate entry point because it names expo-sharing, an
|
|
10
|
+
* optional peer: Metro resolves every require reachable from an import, so keeping
|
|
11
|
+
* it off the main barrel and off `/download` lets an app skip the package when it
|
|
12
|
+
* never opens files.
|
|
13
|
+
*
|
|
14
|
+
* The share sheet rather than `Linking.openURL`: Android 7 and later refuse a
|
|
15
|
+
* `file://` link, and a `content://` link sent through Linking carries no read
|
|
16
|
+
* grant, so the OS-open route never reached a viewer there.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const PREFIX = '[@webority/mobile-core]';
|
|
20
|
+
/** The one place `expo-sharing` is named, and only this subpath reaches it. */
|
|
21
|
+
const sharing = () => require('expo-sharing');
|
|
22
|
+
|
|
23
|
+
// iOS picks the apps it offers from the UTI, not the MIME type.
|
|
24
|
+
const UTIS = {
|
|
25
|
+
'application/pdf': 'com.adobe.pdf',
|
|
26
|
+
'text/plain': 'public.plain-text',
|
|
27
|
+
'text/csv': 'public.comma-separated-values-text',
|
|
28
|
+
'image/jpeg': 'public.jpeg',
|
|
29
|
+
'image/png': 'public.png'
|
|
30
|
+
};
|
|
31
|
+
class ShareError extends Error {
|
|
32
|
+
constructor(code, message) {
|
|
33
|
+
super(`${PREFIX} ${message}`);
|
|
34
|
+
this.name = 'ShareError';
|
|
35
|
+
this.code = code;
|
|
36
|
+
// Babel's class transform can drop the prototype link, which makes
|
|
37
|
+
// `instanceof ShareError` false in the transpiled build.
|
|
38
|
+
Object.setPrototypeOf(this, ShareError.prototype);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ShareError = ShareError;
|
|
42
|
+
const HAS_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Hands a local file (the `path` `downloadFile` returns) to the share sheet.
|
|
46
|
+
* A bare path is given a `file://` scheme. Rejects with `ShareError`: `unavailable`
|
|
47
|
+
* when the device has no share sheet, `failed` when the sheet could not open the file.
|
|
48
|
+
*/
|
|
49
|
+
const shareFile = async (path, options = {}) => {
|
|
50
|
+
const url = HAS_SCHEME.test(path) ? path : `file://${path}`;
|
|
51
|
+
const m = sharing();
|
|
52
|
+
if (!(await m.isAvailableAsync())) {
|
|
53
|
+
throw new ShareError('unavailable', `Sharing is not available on this device, so ${url} cannot be opened.`);
|
|
54
|
+
}
|
|
55
|
+
const {
|
|
56
|
+
mimeType,
|
|
57
|
+
dialogTitle
|
|
58
|
+
} = options;
|
|
59
|
+
try {
|
|
60
|
+
await m.shareAsync(url, {
|
|
61
|
+
mimeType,
|
|
62
|
+
UTI: mimeType ? UTIS[mimeType] : undefined,
|
|
63
|
+
dialogTitle
|
|
64
|
+
});
|
|
65
|
+
} catch (error) {
|
|
66
|
+
throw new ShareError('failed', `${url}${mimeType ? ` (${mimeType})` : ''} could not be shared: ${error instanceof Error ? error.message : String(error)}`);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.shareFile = shareFile;
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setSmsRetrieverImplementation = exports.SmsRetriever = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _index = require("../logger/index.js");
|
|
9
|
+
const OTP_EVENT = 'WeborityMobileCoreSmsRetrieved';
|
|
10
|
+
const ERROR_EVENT = 'WeborityMobileCoreSmsRetrieverError';
|
|
11
|
+
let backend = null;
|
|
12
|
+
|
|
13
|
+
/** Test-only injection point. Pass `null` to reset to the native module. */
|
|
14
|
+
const setSmsRetrieverImplementation = impl => {
|
|
15
|
+
backend = impl;
|
|
16
|
+
};
|
|
17
|
+
exports.setSmsRetrieverImplementation = setSmsRetrieverImplementation;
|
|
18
|
+
let nativeModule;
|
|
19
|
+
const resolveNativeModule = () => {
|
|
20
|
+
if (nativeModule !== undefined) {
|
|
21
|
+
return nativeModule;
|
|
22
|
+
}
|
|
23
|
+
if (_reactNative.Platform.OS !== 'android') {
|
|
24
|
+
nativeModule = null;
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
nativeModule = require('../specs/NativeSmsRetriever').default ?? null;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
_index.Logger.warn('[smsRetriever] native module not available', error);
|
|
31
|
+
nativeModule = null;
|
|
32
|
+
}
|
|
33
|
+
return nativeModule ?? null;
|
|
34
|
+
};
|
|
35
|
+
const defaultBackend = {
|
|
36
|
+
getAppHash: async () => {
|
|
37
|
+
const m = resolveNativeModule();
|
|
38
|
+
if (!m) {
|
|
39
|
+
throw new Error('[smsRetriever] getAppHash: native module unavailable (Android only).');
|
|
40
|
+
}
|
|
41
|
+
return m.getAppHash();
|
|
42
|
+
},
|
|
43
|
+
startListening: (onMessage, onError) => {
|
|
44
|
+
const m = resolveNativeModule();
|
|
45
|
+
if (!m) {
|
|
46
|
+
onError?.({
|
|
47
|
+
type: 'SERVICE_UNAVAILABLE',
|
|
48
|
+
message: 'SMS Retriever is Android-only, or the native module is not linked.'
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
remove: () => undefined
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const messageSub = _reactNative.DeviceEventEmitter.addListener(OTP_EVENT, payload => onMessage(payload.message));
|
|
55
|
+
const errorSub = onError ? _reactNative.DeviceEventEmitter.addListener(ERROR_EVENT, payload => onError(payload)) : null;
|
|
56
|
+
try {
|
|
57
|
+
m.startSMSListener();
|
|
58
|
+
} catch (error) {
|
|
59
|
+
_index.Logger.error('[smsRetriever] startSMSListener failed', error);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
remove: () => {
|
|
63
|
+
messageSub.remove();
|
|
64
|
+
errorSub?.remove();
|
|
65
|
+
try {
|
|
66
|
+
m.stopSMSListener();
|
|
67
|
+
} catch (error) {
|
|
68
|
+
_index.Logger.error('[smsRetriever] stopSMSListener failed', error);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The Play Services SMS Retriever API — auto-reads an incoming OTP SMS with
|
|
77
|
+
* no SMS permission, matched by an 11-character app-signature hash
|
|
78
|
+
* (`getAppHash`) the backend appends to the message. Android only; every
|
|
79
|
+
* method is safe to call on iOS and resolves/reports unavailable rather than
|
|
80
|
+
* throwing, so a caller doesn't need a platform check at every call site.
|
|
81
|
+
*
|
|
82
|
+
* OTP extraction is left to the caller — `onMessage` receives the raw SMS
|
|
83
|
+
* text, since the expected OTP format (digit count, prefix) is a backend
|
|
84
|
+
* concern, not this module's.
|
|
85
|
+
*/
|
|
86
|
+
const SmsRetriever = exports.SmsRetriever = {
|
|
87
|
+
isAvailable: () => resolveNativeModule() !== null,
|
|
88
|
+
getAppHash: () => (backend ?? defaultBackend).getAppHash(),
|
|
89
|
+
startListening: (onMessage, onError) => (backend ?? defaultBackend).startListening(onMessage, onError)
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
/**
|
|
9
|
+
* Android-only — the Play Services SMS Retriever API has no iOS equivalent.
|
|
10
|
+
* The JS wrapper in `smsRetriever/index.ts` never touches this module on
|
|
11
|
+
* iOS, so `getEnforcing` only ever runs on Android, where autolinking has
|
|
12
|
+
* registered `SmsRetrieverPackage`.
|
|
13
|
+
*/
|
|
14
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('WeborityMobileCoreSmsRetriever');
|
|
15
|
+
//# sourceMappingURL=NativeSmsRetriever.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.adaptExpoSqlite = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* expo-sqlite. Shape verified against 57.0.2 rather than assumed, and it is the
|
|
9
|
+
* one driver that cannot share an adapter with the others: expo splits reads
|
|
10
|
+
* from writes. `getAllAsync` yields rows but no change count, `runAsync` yields
|
|
11
|
+
* `{ changes, lastInsertRowId }` but no rows, and SqliteResultSet needs all
|
|
12
|
+
* three from one call. `prepareAsync` + `executeAsync` is the only call that
|
|
13
|
+
* returns both, so every statement goes through it rather than being routed by
|
|
14
|
+
* sniffing the SQL for a leading SELECT.
|
|
15
|
+
*
|
|
16
|
+
* The REQUIRE lives in the driver entry point beside this file, never here.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const adaptExpoSqlite = mod => ({
|
|
20
|
+
// expo takes the directory as a third positional argument rather than an
|
|
21
|
+
// option, so `location` cannot be passed through the options object.
|
|
22
|
+
open: async (name, options) => {
|
|
23
|
+
const db = await mod.openDatabaseAsync(name, undefined, options?.location);
|
|
24
|
+
return {
|
|
25
|
+
execute: async (sql, params) => {
|
|
26
|
+
const statement = await db.prepareAsync(sql);
|
|
27
|
+
try {
|
|
28
|
+
const result = await statement.executeAsync(params ? [...params] : []);
|
|
29
|
+
// Safe on a write: expo returns [] when the statement produced no
|
|
30
|
+
// first row rather than stepping the statement a second time.
|
|
31
|
+
const rows = await result.getAllAsync();
|
|
32
|
+
return {
|
|
33
|
+
rows,
|
|
34
|
+
rowsAffected: result.changes,
|
|
35
|
+
// expo always reports lastInsertRowId, so unlike the other drivers
|
|
36
|
+
// this is never undefined. It is the connection's last insert rowid,
|
|
37
|
+
// which is only meaningful immediately after an INSERT.
|
|
38
|
+
insertId: result.lastInsertRowId
|
|
39
|
+
};
|
|
40
|
+
} finally {
|
|
41
|
+
// A statement left unfinalised holds a native handle for the life of
|
|
42
|
+
// the connection, and the core executes one per call.
|
|
43
|
+
await statement.finalizeAsync();
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
close: async () => {
|
|
47
|
+
await db.closeAsync();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
exports.adaptExpoSqlite = adaptExpoSqlite;
|
|
53
|
+
//# sourceMappingURL=expo.js.map
|