@capgo/capacitor-android-age-signals 0.0.1

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.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +103 -0
  3. package/android/build.gradle +59 -0
  4. package/android/src/main/AndroidManifest.xml +3 -0
  5. package/android/src/main/java/app/capgo/androidagesignals/AgeSignals.java +75 -0
  6. package/android/src/main/java/app/capgo/androidagesignals/AgeSignalsPlugin.java +78 -0
  7. package/android/src/main/java/app/capgo/androidagesignals/classes/CustomException.java +19 -0
  8. package/android/src/main/java/app/capgo/androidagesignals/classes/CustomExceptions.java +43 -0
  9. package/android/src/main/java/app/capgo/androidagesignals/classes/results/CheckAgeSignalsResult.java +72 -0
  10. package/android/src/main/java/app/capgo/androidagesignals/enums/UserStatus.java +10 -0
  11. package/android/src/main/java/app/capgo/androidagesignals/interfaces/Callback.java +5 -0
  12. package/android/src/main/java/app/capgo/androidagesignals/interfaces/NonEmptyResultCallback.java +7 -0
  13. package/android/src/main/java/app/capgo/androidagesignals/interfaces/Result.java +7 -0
  14. package/dist/docs.json +203 -0
  15. package/dist/esm/definitions.d.ts +192 -0
  16. package/dist/esm/definitions.js +123 -0
  17. package/dist/esm/definitions.js.map +1 -0
  18. package/dist/esm/index.d.ts +4 -0
  19. package/dist/esm/index.js +7 -0
  20. package/dist/esm/index.js.map +1 -0
  21. package/dist/esm/web.d.ts +5 -0
  22. package/dist/esm/web.js +7 -0
  23. package/dist/esm/web.js.map +1 -0
  24. package/dist/plugin.cjs.js +144 -0
  25. package/dist/plugin.cjs.js.map +1 -0
  26. package/dist/plugin.js +147 -0
  27. package/dist/plugin.js.map +1 -0
  28. package/package.json +75 -0
  29. package/src/definitions.ts +197 -0
  30. package/src/index.ts +10 -0
  31. package/src/web.ts +9 -0
package/dist/docs.json ADDED
@@ -0,0 +1,203 @@
1
+ {
2
+ "api": {
3
+ "name": "AgeSignalsPlugin",
4
+ "slug": "agesignalsplugin",
5
+ "docs": "Capacitor interface for retrieving Play Age Signals.",
6
+ "tags": [
7
+ {
8
+ "text": "0.0.1",
9
+ "name": "since"
10
+ }
11
+ ],
12
+ "methods": [
13
+ {
14
+ "name": "checkAgeSignals",
15
+ "signature": "() => Promise<CheckAgeSignalsResult>",
16
+ "parameters": [],
17
+ "returns": "Promise<CheckAgeSignalsResult>",
18
+ "tags": [
19
+ {
20
+ "name": "since",
21
+ "text": "0.0.1"
22
+ }
23
+ ],
24
+ "docs": "Request the current Play Age Signals for the active user.\n\nOnly available on Android devices with Google Play installed.",
25
+ "complexTypes": [
26
+ "CheckAgeSignalsResult"
27
+ ],
28
+ "slug": "checkagesignals"
29
+ }
30
+ ],
31
+ "properties": []
32
+ },
33
+ "interfaces": [
34
+ {
35
+ "name": "CheckAgeSignalsResult",
36
+ "slug": "checkagesignalsresult",
37
+ "docs": "Structured result returned by {@link AgeSignalsPlugin.checkAgeSignals}.",
38
+ "tags": [
39
+ {
40
+ "text": "0.0.1",
41
+ "name": "since"
42
+ }
43
+ ],
44
+ "methods": [],
45
+ "properties": [
46
+ {
47
+ "name": "userStatus",
48
+ "tags": [
49
+ {
50
+ "text": "0.0.1",
51
+ "name": "since"
52
+ }
53
+ ],
54
+ "docs": "The user's verification status as reported by Google Play.",
55
+ "complexTypes": [
56
+ "UserStatus"
57
+ ],
58
+ "type": "UserStatus"
59
+ },
60
+ {
61
+ "name": "ageLower",
62
+ "tags": [
63
+ {
64
+ "text": "0.0.1",
65
+ "name": "since"
66
+ },
67
+ {
68
+ "text": "13",
69
+ "name": "example"
70
+ }
71
+ ],
72
+ "docs": "Inclusive lower bound of the supervised user's age range.\n\nPresent only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.",
73
+ "complexTypes": [],
74
+ "type": "number | undefined"
75
+ },
76
+ {
77
+ "name": "ageUpper",
78
+ "tags": [
79
+ {
80
+ "text": "0.0.1",
81
+ "name": "since"
82
+ },
83
+ {
84
+ "text": "15",
85
+ "name": "example"
86
+ }
87
+ ],
88
+ "docs": "Inclusive upper bound of the supervised user's age range.\n\nPresent only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`\nand the user's age is reported as less than 18.",
89
+ "complexTypes": [],
90
+ "type": "number | undefined"
91
+ },
92
+ {
93
+ "name": "mostRecentApprovalDate",
94
+ "tags": [
95
+ {
96
+ "text": "0.0.1",
97
+ "name": "since"
98
+ },
99
+ {
100
+ "text": "\"2024-01-15\"",
101
+ "name": "example"
102
+ }
103
+ ],
104
+ "docs": "Effective date for the most recent significant change that received guardian approval.\n\nPresent only when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.",
105
+ "complexTypes": [],
106
+ "type": "string | undefined"
107
+ },
108
+ {
109
+ "name": "installId",
110
+ "tags": [
111
+ {
112
+ "text": "0.0.1",
113
+ "name": "since"
114
+ },
115
+ {
116
+ "text": "\"abc123xyz\"",
117
+ "name": "example"
118
+ }
119
+ ],
120
+ "docs": "Identifier assigned to supervised installs in Google Play for revocation notifications.\n\nPresent only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.",
121
+ "complexTypes": [],
122
+ "type": "string | undefined"
123
+ }
124
+ ]
125
+ }
126
+ ],
127
+ "enums": [
128
+ {
129
+ "name": "UserStatus",
130
+ "slug": "userstatus",
131
+ "members": [
132
+ {
133
+ "name": "Verified",
134
+ "value": "'VERIFIED'",
135
+ "tags": [
136
+ {
137
+ "text": "0.0.1",
138
+ "name": "since"
139
+ }
140
+ ],
141
+ "docs": "The user is over 18 and their age has been verified by Google."
142
+ },
143
+ {
144
+ "name": "Supervised",
145
+ "value": "'SUPERVISED'",
146
+ "tags": [
147
+ {
148
+ "text": "0.0.1",
149
+ "name": "since"
150
+ }
151
+ ],
152
+ "docs": "The user has a supervised Google Account managed by a guardian.\n\nUse `ageLower` and `ageUpper` to determine the user's age range."
153
+ },
154
+ {
155
+ "name": "SupervisedApprovalPending",
156
+ "value": "'SUPERVISED_APPROVAL_PENDING'",
157
+ "tags": [
158
+ {
159
+ "text": "0.0.1",
160
+ "name": "since"
161
+ }
162
+ ],
163
+ "docs": "The supervised user has pending significant changes awaiting guardian approval.\n\nUse `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`\nto identify the most recent approved change."
164
+ },
165
+ {
166
+ "name": "SupervisedApprovalDenied",
167
+ "value": "'SUPERVISED_APPROVAL_DENIED'",
168
+ "tags": [
169
+ {
170
+ "text": "0.0.1",
171
+ "name": "since"
172
+ }
173
+ ],
174
+ "docs": "The supervised user's guardian denied one or more significant changes.\n\nUse `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`\nto identify the last approved change."
175
+ },
176
+ {
177
+ "name": "Unknown",
178
+ "value": "'UNKNOWN'",
179
+ "tags": [
180
+ {
181
+ "text": "0.0.1",
182
+ "name": "since"
183
+ }
184
+ ],
185
+ "docs": "The user is not verified or supervised in supported regions.\n\nYou should prompt the user to resolve their status in the Play Store."
186
+ },
187
+ {
188
+ "name": "Empty",
189
+ "value": "'EMPTY'",
190
+ "tags": [
191
+ {
192
+ "text": "0.0.1",
193
+ "name": "since"
194
+ }
195
+ ],
196
+ "docs": "All other users return this value."
197
+ }
198
+ ]
199
+ }
200
+ ],
201
+ "typeAliases": [],
202
+ "pluginConfigs": []
203
+ }
@@ -0,0 +1,192 @@
1
+ import type { PermissionState } from '@capacitor/core';
2
+ /**
3
+ * Capacitor interface for retrieving Play Age Signals.
4
+ *
5
+ * @since 0.0.1
6
+ */
7
+ export interface AgeSignalsPlugin {
8
+ /**
9
+ * Request the current Play Age Signals for the active user.
10
+ *
11
+ * Only available on Android devices with Google Play installed.
12
+ *
13
+ * @since 0.0.1
14
+ */
15
+ checkAgeSignals(): Promise<CheckAgeSignalsResult>;
16
+ }
17
+ /**
18
+ * Structured result returned by {@link AgeSignalsPlugin.checkAgeSignals}.
19
+ *
20
+ * @since 0.0.1
21
+ */
22
+ export interface CheckAgeSignalsResult {
23
+ /**
24
+ * The user's verification status as reported by Google Play.
25
+ *
26
+ * @since 0.0.1
27
+ */
28
+ userStatus: UserStatus;
29
+ /**
30
+ * Inclusive lower bound of the supervised user's age range.
31
+ *
32
+ * Present only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.
33
+ *
34
+ * @since 0.0.1
35
+ * @example 13
36
+ */
37
+ ageLower?: number;
38
+ /**
39
+ * Inclusive upper bound of the supervised user's age range.
40
+ *
41
+ * Present only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`
42
+ * and the user's age is reported as less than 18.
43
+ *
44
+ * @since 0.0.1
45
+ * @example 15
46
+ */
47
+ ageUpper?: number;
48
+ /**
49
+ * Effective date for the most recent significant change that received guardian approval.
50
+ *
51
+ * Present only when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.
52
+ *
53
+ * @since 0.0.1
54
+ * @example "2024-01-15"
55
+ */
56
+ mostRecentApprovalDate?: string;
57
+ /**
58
+ * Identifier assigned to supervised installs in Google Play for revocation notifications.
59
+ *
60
+ * Present only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.
61
+ *
62
+ * @since 0.0.1
63
+ * @example "abc123xyz"
64
+ */
65
+ installId?: string;
66
+ }
67
+ /**
68
+ * Status values reported by Google Play Age Signals.
69
+ *
70
+ * @since 0.0.1
71
+ */
72
+ export declare enum UserStatus {
73
+ /**
74
+ * The user is over 18 and their age has been verified by Google.
75
+ *
76
+ * @since 0.0.1
77
+ */
78
+ Verified = "VERIFIED",
79
+ /**
80
+ * The user has a supervised Google Account managed by a guardian.
81
+ *
82
+ * Use `ageLower` and `ageUpper` to determine the user's age range.
83
+ *
84
+ * @since 0.0.1
85
+ */
86
+ Supervised = "SUPERVISED",
87
+ /**
88
+ * The supervised user has pending significant changes awaiting guardian approval.
89
+ *
90
+ * Use `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`
91
+ * to identify the most recent approved change.
92
+ *
93
+ * @since 0.0.1
94
+ */
95
+ SupervisedApprovalPending = "SUPERVISED_APPROVAL_PENDING",
96
+ /**
97
+ * The supervised user's guardian denied one or more significant changes.
98
+ *
99
+ * Use `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`
100
+ * to identify the last approved change.
101
+ *
102
+ * @since 0.0.1
103
+ */
104
+ SupervisedApprovalDenied = "SUPERVISED_APPROVAL_DENIED",
105
+ /**
106
+ * The user is not verified or supervised in supported regions.
107
+ *
108
+ * You should prompt the user to resolve their status in the Play Store.
109
+ *
110
+ * @since 0.0.1
111
+ */
112
+ Unknown = "UNKNOWN",
113
+ /**
114
+ * All other users return this value.
115
+ *
116
+ * @since 0.0.1
117
+ */
118
+ Empty = "EMPTY"
119
+ }
120
+ /**
121
+ * Error codes representing failures returned by the Play Age Signals API.
122
+ *
123
+ * @since 0.0.1
124
+ */
125
+ export declare enum ErrorCode {
126
+ /**
127
+ * The Play Age Signals API is not available. The installed Play Store version might be outdated.
128
+ *
129
+ * @since 0.0.1
130
+ */
131
+ ApiNotAvailable = "API_NOT_AVAILABLE",
132
+ /**
133
+ * No Play Store app was found on the device.
134
+ *
135
+ * @since 0.0.1
136
+ */
137
+ PlayStoreNotFound = "PLAY_STORE_NOT_FOUND",
138
+ /**
139
+ * No network connection is currently available.
140
+ *
141
+ * @since 0.0.1
142
+ */
143
+ NetworkError = "NETWORK_ERROR",
144
+ /**
145
+ * Google Play services is missing or too old.
146
+ *
147
+ * @since 0.0.1
148
+ */
149
+ PlayServicesNotFound = "PLAY_SERVICES_NOT_FOUND",
150
+ /**
151
+ * The Play Store service binding failed.
152
+ *
153
+ * @since 0.0.1
154
+ */
155
+ CannotBindToService = "CANNOT_BIND_TO_SERVICE",
156
+ /**
157
+ * The Play Store application needs to be updated.
158
+ *
159
+ * @since 0.0.1
160
+ */
161
+ PlayStoreVersionOutdated = "PLAY_STORE_VERSION_OUTDATED",
162
+ /**
163
+ * Google Play services needs to be updated.
164
+ *
165
+ * @since 0.0.1
166
+ */
167
+ PlayServicesVersionOutdated = "PLAY_SERVICES_VERSION_OUTDATED",
168
+ /**
169
+ * A transient error occurred on the client device.
170
+ *
171
+ * @since 0.0.1
172
+ */
173
+ ClientTransientError = "CLIENT_TRANSIENT_ERROR",
174
+ /**
175
+ * The app was not installed through Google Play.
176
+ *
177
+ * @since 0.0.1
178
+ */
179
+ AppNotOwned = "APP_NOT_OWNED",
180
+ /**
181
+ * An unknown internal error occurred.
182
+ *
183
+ * @since 0.0.1
184
+ */
185
+ InternalError = "INTERNAL_ERROR"
186
+ }
187
+ /**
188
+ * @deprecated Permissions are not required for this plugin.
189
+ *
190
+ * @since 0.0.1
191
+ */
192
+ export type AgeSignalsPermissionState = PermissionState;
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Status values reported by Google Play Age Signals.
3
+ *
4
+ * @since 0.0.1
5
+ */
6
+ export var UserStatus;
7
+ (function (UserStatus) {
8
+ /**
9
+ * The user is over 18 and their age has been verified by Google.
10
+ *
11
+ * @since 0.0.1
12
+ */
13
+ UserStatus["Verified"] = "VERIFIED";
14
+ /**
15
+ * The user has a supervised Google Account managed by a guardian.
16
+ *
17
+ * Use `ageLower` and `ageUpper` to determine the user's age range.
18
+ *
19
+ * @since 0.0.1
20
+ */
21
+ UserStatus["Supervised"] = "SUPERVISED";
22
+ /**
23
+ * The supervised user has pending significant changes awaiting guardian approval.
24
+ *
25
+ * Use `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`
26
+ * to identify the most recent approved change.
27
+ *
28
+ * @since 0.0.1
29
+ */
30
+ UserStatus["SupervisedApprovalPending"] = "SUPERVISED_APPROVAL_PENDING";
31
+ /**
32
+ * The supervised user's guardian denied one or more significant changes.
33
+ *
34
+ * Use `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`
35
+ * to identify the last approved change.
36
+ *
37
+ * @since 0.0.1
38
+ */
39
+ UserStatus["SupervisedApprovalDenied"] = "SUPERVISED_APPROVAL_DENIED";
40
+ /**
41
+ * The user is not verified or supervised in supported regions.
42
+ *
43
+ * You should prompt the user to resolve their status in the Play Store.
44
+ *
45
+ * @since 0.0.1
46
+ */
47
+ UserStatus["Unknown"] = "UNKNOWN";
48
+ /**
49
+ * All other users return this value.
50
+ *
51
+ * @since 0.0.1
52
+ */
53
+ UserStatus["Empty"] = "EMPTY";
54
+ })(UserStatus || (UserStatus = {}));
55
+ /**
56
+ * Error codes representing failures returned by the Play Age Signals API.
57
+ *
58
+ * @since 0.0.1
59
+ */
60
+ export var ErrorCode;
61
+ (function (ErrorCode) {
62
+ /**
63
+ * The Play Age Signals API is not available. The installed Play Store version might be outdated.
64
+ *
65
+ * @since 0.0.1
66
+ */
67
+ ErrorCode["ApiNotAvailable"] = "API_NOT_AVAILABLE";
68
+ /**
69
+ * No Play Store app was found on the device.
70
+ *
71
+ * @since 0.0.1
72
+ */
73
+ ErrorCode["PlayStoreNotFound"] = "PLAY_STORE_NOT_FOUND";
74
+ /**
75
+ * No network connection is currently available.
76
+ *
77
+ * @since 0.0.1
78
+ */
79
+ ErrorCode["NetworkError"] = "NETWORK_ERROR";
80
+ /**
81
+ * Google Play services is missing or too old.
82
+ *
83
+ * @since 0.0.1
84
+ */
85
+ ErrorCode["PlayServicesNotFound"] = "PLAY_SERVICES_NOT_FOUND";
86
+ /**
87
+ * The Play Store service binding failed.
88
+ *
89
+ * @since 0.0.1
90
+ */
91
+ ErrorCode["CannotBindToService"] = "CANNOT_BIND_TO_SERVICE";
92
+ /**
93
+ * The Play Store application needs to be updated.
94
+ *
95
+ * @since 0.0.1
96
+ */
97
+ ErrorCode["PlayStoreVersionOutdated"] = "PLAY_STORE_VERSION_OUTDATED";
98
+ /**
99
+ * Google Play services needs to be updated.
100
+ *
101
+ * @since 0.0.1
102
+ */
103
+ ErrorCode["PlayServicesVersionOutdated"] = "PLAY_SERVICES_VERSION_OUTDATED";
104
+ /**
105
+ * A transient error occurred on the client device.
106
+ *
107
+ * @since 0.0.1
108
+ */
109
+ ErrorCode["ClientTransientError"] = "CLIENT_TRANSIENT_ERROR";
110
+ /**
111
+ * The app was not installed through Google Play.
112
+ *
113
+ * @since 0.0.1
114
+ */
115
+ ErrorCode["AppNotOwned"] = "APP_NOT_OWNED";
116
+ /**
117
+ * An unknown internal error occurred.
118
+ *
119
+ * @since 0.0.1
120
+ */
121
+ ErrorCode["InternalError"] = "INTERNAL_ERROR";
122
+ })(ErrorCode || (ErrorCode = {}));
123
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAqEA;;;;GAIG;AACH,MAAM,CAAN,IAAY,UA+CX;AA/CD,WAAY,UAAU;IACpB;;;;OAIG;IACH,mCAAqB,CAAA;IACrB;;;;;;OAMG;IACH,uCAAyB,CAAA;IACzB;;;;;;;OAOG;IACH,uEAAyD,CAAA;IACzD;;;;;;;OAOG;IACH,qEAAuD,CAAA;IACvD;;;;;;OAMG;IACH,iCAAmB,CAAA;IACnB;;;;OAIG;IACH,6BAAe,CAAA;AACjB,CAAC,EA/CW,UAAU,KAAV,UAAU,QA+CrB;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,SA6DX;AA7DD,WAAY,SAAS;IACnB;;;;OAIG;IACH,kDAAqC,CAAA;IACrC;;;;OAIG;IACH,uDAA0C,CAAA;IAC1C;;;;OAIG;IACH,2CAA8B,CAAA;IAC9B;;;;OAIG;IACH,6DAAgD,CAAA;IAChD;;;;OAIG;IACH,2DAA8C,CAAA;IAC9C;;;;OAIG;IACH,qEAAwD,CAAA;IACxD;;;;OAIG;IACH,2EAA8D,CAAA;IAC9D;;;;OAIG;IACH,4DAA+C,CAAA;IAC/C;;;;OAIG;IACH,0CAA6B,CAAA;IAC7B;;;;OAIG;IACH,6CAAgC,CAAA;AAClC,CAAC,EA7DW,SAAS,KAAT,SAAS,QA6DpB","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\n/**\n * Capacitor interface for retrieving Play Age Signals.\n *\n * @since 0.0.1\n */\nexport interface AgeSignalsPlugin {\n /**\n * Request the current Play Age Signals for the active user.\n *\n * Only available on Android devices with Google Play installed.\n *\n * @since 0.0.1\n */\n checkAgeSignals(): Promise<CheckAgeSignalsResult>;\n}\n\n/**\n * Structured result returned by {@link AgeSignalsPlugin.checkAgeSignals}.\n *\n * @since 0.0.1\n */\nexport interface CheckAgeSignalsResult {\n /**\n * The user's verification status as reported by Google Play.\n *\n * @since 0.0.1\n */\n userStatus: UserStatus;\n /**\n * Inclusive lower bound of the supervised user's age range.\n *\n * Present only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.\n *\n * @since 0.0.1\n * @example 13\n */\n ageLower?: number;\n /**\n * Inclusive upper bound of the supervised user's age range.\n *\n * Present only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`\n * and the user's age is reported as less than 18.\n *\n * @since 0.0.1\n * @example 15\n */\n ageUpper?: number;\n /**\n * Effective date for the most recent significant change that received guardian approval.\n *\n * Present only when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.\n *\n * @since 0.0.1\n * @example \"2024-01-15\"\n */\n mostRecentApprovalDate?: string;\n /**\n * Identifier assigned to supervised installs in Google Play for revocation notifications.\n *\n * Present only when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.\n *\n * @since 0.0.1\n * @example \"abc123xyz\"\n */\n installId?: string;\n}\n\n/**\n * Status values reported by Google Play Age Signals.\n *\n * @since 0.0.1\n */\nexport enum UserStatus {\n /**\n * The user is over 18 and their age has been verified by Google.\n *\n * @since 0.0.1\n */\n Verified = 'VERIFIED',\n /**\n * The user has a supervised Google Account managed by a guardian.\n *\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n *\n * @since 0.0.1\n */\n Supervised = 'SUPERVISED',\n /**\n * The supervised user has pending significant changes awaiting guardian approval.\n *\n * Use `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`\n * to identify the most recent approved change.\n *\n * @since 0.0.1\n */\n SupervisedApprovalPending = 'SUPERVISED_APPROVAL_PENDING',\n /**\n * The supervised user's guardian denied one or more significant changes.\n *\n * Use `ageLower` and `ageUpper` to determine the user's age range and `mostRecentApprovalDate`\n * to identify the last approved change.\n *\n * @since 0.0.1\n */\n SupervisedApprovalDenied = 'SUPERVISED_APPROVAL_DENIED',\n /**\n * The user is not verified or supervised in supported regions.\n *\n * You should prompt the user to resolve their status in the Play Store.\n *\n * @since 0.0.1\n */\n Unknown = 'UNKNOWN',\n /**\n * All other users return this value.\n *\n * @since 0.0.1\n */\n Empty = 'EMPTY',\n}\n\n/**\n * Error codes representing failures returned by the Play Age Signals API.\n *\n * @since 0.0.1\n */\nexport enum ErrorCode {\n /**\n * The Play Age Signals API is not available. The installed Play Store version might be outdated.\n *\n * @since 0.0.1\n */\n ApiNotAvailable = 'API_NOT_AVAILABLE',\n /**\n * No Play Store app was found on the device.\n *\n * @since 0.0.1\n */\n PlayStoreNotFound = 'PLAY_STORE_NOT_FOUND',\n /**\n * No network connection is currently available.\n *\n * @since 0.0.1\n */\n NetworkError = 'NETWORK_ERROR',\n /**\n * Google Play services is missing or too old.\n *\n * @since 0.0.1\n */\n PlayServicesNotFound = 'PLAY_SERVICES_NOT_FOUND',\n /**\n * The Play Store service binding failed.\n *\n * @since 0.0.1\n */\n CannotBindToService = 'CANNOT_BIND_TO_SERVICE',\n /**\n * The Play Store application needs to be updated.\n *\n * @since 0.0.1\n */\n PlayStoreVersionOutdated = 'PLAY_STORE_VERSION_OUTDATED',\n /**\n * Google Play services needs to be updated.\n *\n * @since 0.0.1\n */\n PlayServicesVersionOutdated = 'PLAY_SERVICES_VERSION_OUTDATED',\n /**\n * A transient error occurred on the client device.\n *\n * @since 0.0.1\n */\n ClientTransientError = 'CLIENT_TRANSIENT_ERROR',\n /**\n * The app was not installed through Google Play.\n *\n * @since 0.0.1\n */\n AppNotOwned = 'APP_NOT_OWNED',\n /**\n * An unknown internal error occurred.\n *\n * @since 0.0.1\n */\n InternalError = 'INTERNAL_ERROR',\n}\n\n/**\n * @deprecated Permissions are not required for this plugin.\n *\n * @since 0.0.1\n */\nexport type AgeSignalsPermissionState = PermissionState;\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AgeSignalsPlugin } from './definitions';
2
+ declare const AgeSignals: AgeSignalsPlugin;
3
+ export * from './definitions';
4
+ export { AgeSignals };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const AgeSignals = registerPlugin('AgeSignals', {
3
+ web: () => import('./web').then(m => new m.AgeSignalsWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { AgeSignals };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { AgeSignalsPlugin } from './definitions';\n\nconst AgeSignals = registerPlugin<AgeSignalsPlugin>('AgeSignals', {\n web: () => import('./web').then(m => new m.AgeSignalsWeb()),\n});\n\nexport * from './definitions';\nexport { AgeSignals };\n"]}
@@ -0,0 +1,5 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { AgeSignalsPlugin, CheckAgeSignalsResult } from './definitions';
3
+ export declare class AgeSignalsWeb extends WebPlugin implements AgeSignalsPlugin {
4
+ checkAgeSignals(): Promise<CheckAgeSignalsResult>;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class AgeSignalsWeb extends WebPlugin {
3
+ async checkAgeSignals() {
4
+ throw this.unimplemented('checkAgeSignals is only available on Android.');
5
+ }
6
+ }
7
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,CAAC,aAAa,CAAC,+CAA+C,CAAC,CAAC;IAC5E,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { AgeSignalsPlugin, CheckAgeSignalsResult } from './definitions';\n\nexport class AgeSignalsWeb extends WebPlugin implements AgeSignalsPlugin {\n async checkAgeSignals(): Promise<CheckAgeSignalsResult> {\n throw this.unimplemented('checkAgeSignals is only available on Android.');\n }\n}\n"]}