@capawesome/capacitor-age-signals 0.3.0 → 0.3.2

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/dist/docs.json CHANGED
@@ -33,6 +33,92 @@
33
33
  "CheckAgeSignalsOptions"
34
34
  ],
35
35
  "slug": "checkagesignals"
36
+ },
37
+ {
38
+ "name": "checkEligibility",
39
+ "signature": "() => Promise<CheckEligibilityResult>",
40
+ "parameters": [],
41
+ "returns": "Promise<CheckEligibilityResult>",
42
+ "tags": [
43
+ {
44
+ "name": "since",
45
+ "text": "0.3.1"
46
+ }
47
+ ],
48
+ "docs": "Check if the user is eligible for age-gated features.\n\nOnly available on iOS.",
49
+ "complexTypes": [
50
+ "CheckEligibilityResult"
51
+ ],
52
+ "slug": "checkeligibility"
53
+ },
54
+ {
55
+ "name": "setUseFakeManager",
56
+ "signature": "(options: SetUseFakeManagerOptions) => Promise<void>",
57
+ "parameters": [
58
+ {
59
+ "name": "options",
60
+ "docs": "",
61
+ "type": "SetUseFakeManagerOptions"
62
+ }
63
+ ],
64
+ "returns": "Promise<void>",
65
+ "tags": [
66
+ {
67
+ "name": "since",
68
+ "text": "0.3.1"
69
+ }
70
+ ],
71
+ "docs": "Enable or disable the fake age signals manager for testing.\n\nOnly available on Android.",
72
+ "complexTypes": [
73
+ "SetUseFakeManagerOptions"
74
+ ],
75
+ "slug": "setusefakemanager"
76
+ },
77
+ {
78
+ "name": "setNextAgeSignalsResult",
79
+ "signature": "(options: SetNextAgeSignalsResultOptions) => Promise<void>",
80
+ "parameters": [
81
+ {
82
+ "name": "options",
83
+ "docs": "",
84
+ "type": "SetNextAgeSignalsResultOptions"
85
+ }
86
+ ],
87
+ "returns": "Promise<void>",
88
+ "tags": [
89
+ {
90
+ "name": "since",
91
+ "text": "0.3.1"
92
+ }
93
+ ],
94
+ "docs": "Set the next age signals result to be returned by the fake manager.\n\nOnly available on Android.",
95
+ "complexTypes": [
96
+ "SetNextAgeSignalsResultOptions"
97
+ ],
98
+ "slug": "setnextagesignalsresult"
99
+ },
100
+ {
101
+ "name": "setNextAgeSignalsException",
102
+ "signature": "(options: SetNextAgeSignalsExceptionOptions) => Promise<void>",
103
+ "parameters": [
104
+ {
105
+ "name": "options",
106
+ "docs": "",
107
+ "type": "SetNextAgeSignalsExceptionOptions"
108
+ }
109
+ ],
110
+ "returns": "Promise<void>",
111
+ "tags": [
112
+ {
113
+ "name": "since",
114
+ "text": "0.3.1"
115
+ }
116
+ ],
117
+ "docs": "Set the next exception to be thrown by the fake manager.\n\nOnly available on Android.",
118
+ "complexTypes": [
119
+ "SetNextAgeSignalsExceptionOptions"
120
+ ],
121
+ "slug": "setnextagesignalsexception"
36
122
  }
37
123
  ],
38
124
  "properties": []
@@ -159,6 +245,190 @@
159
245
  "type": "number[] | undefined"
160
246
  }
161
247
  ]
248
+ },
249
+ {
250
+ "name": "CheckEligibilityResult",
251
+ "slug": "checkeligibilityresult",
252
+ "docs": "",
253
+ "tags": [
254
+ {
255
+ "text": "0.3.1",
256
+ "name": "since"
257
+ }
258
+ ],
259
+ "methods": [],
260
+ "properties": [
261
+ {
262
+ "name": "isEligible",
263
+ "tags": [
264
+ {
265
+ "text": "0.3.1",
266
+ "name": "since"
267
+ },
268
+ {
269
+ "text": "true",
270
+ "name": "example"
271
+ }
272
+ ],
273
+ "docs": "Whether the user is eligible for age-gated features.\n\nReturns `true` if the user is in an applicable region that requires\nadditional age-related obligations. Always returns `false` on macOS.",
274
+ "complexTypes": [],
275
+ "type": "boolean"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "name": "SetUseFakeManagerOptions",
281
+ "slug": "setusefakemanageroptions",
282
+ "docs": "",
283
+ "tags": [
284
+ {
285
+ "text": "0.3.1",
286
+ "name": "since"
287
+ }
288
+ ],
289
+ "methods": [],
290
+ "properties": [
291
+ {
292
+ "name": "useFake",
293
+ "tags": [
294
+ {
295
+ "text": "0.3.1",
296
+ "name": "since"
297
+ },
298
+ {
299
+ "text": "false",
300
+ "name": "default"
301
+ },
302
+ {
303
+ "text": "true",
304
+ "name": "example"
305
+ }
306
+ ],
307
+ "docs": "Whether to use the fake age signals manager for testing.",
308
+ "complexTypes": [],
309
+ "type": "boolean"
310
+ }
311
+ ]
312
+ },
313
+ {
314
+ "name": "SetNextAgeSignalsResultOptions",
315
+ "slug": "setnextagesignalsresultoptions",
316
+ "docs": "",
317
+ "tags": [
318
+ {
319
+ "text": "0.3.1",
320
+ "name": "since"
321
+ }
322
+ ],
323
+ "methods": [],
324
+ "properties": [
325
+ {
326
+ "name": "userStatus",
327
+ "tags": [
328
+ {
329
+ "text": "0.3.1",
330
+ "name": "since"
331
+ }
332
+ ],
333
+ "docs": "The user's verification status.",
334
+ "complexTypes": [
335
+ "UserStatus"
336
+ ],
337
+ "type": "UserStatus"
338
+ },
339
+ {
340
+ "name": "ageLower",
341
+ "tags": [
342
+ {
343
+ "text": "0.3.1",
344
+ "name": "since"
345
+ },
346
+ {
347
+ "text": "13",
348
+ "name": "example"
349
+ }
350
+ ],
351
+ "docs": "The (inclusive) lower bound of a supervised user's age range.\n\nOnly available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.",
352
+ "complexTypes": [],
353
+ "type": "number | undefined"
354
+ },
355
+ {
356
+ "name": "ageUpper",
357
+ "tags": [
358
+ {
359
+ "text": "0.3.1",
360
+ "name": "since"
361
+ },
362
+ {
363
+ "text": "15",
364
+ "name": "example"
365
+ }
366
+ ],
367
+ "docs": "The (inclusive) upper bound of a supervised user's age range.\n\nOnly available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED` and the user's age is under 18.",
368
+ "complexTypes": [],
369
+ "type": "number | undefined"
370
+ },
371
+ {
372
+ "name": "mostRecentApprovalDate",
373
+ "tags": [
374
+ {
375
+ "text": "0.3.1",
376
+ "name": "since"
377
+ },
378
+ {
379
+ "text": "\"2024-01-15\"",
380
+ "name": "example"
381
+ }
382
+ ],
383
+ "docs": "The effective from date of the most recent significant change that was approved.\nWhen an app is installed, the date of the most recent significant change prior to install is used.\n\nOnly available when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.",
384
+ "complexTypes": [],
385
+ "type": "string | undefined"
386
+ },
387
+ {
388
+ "name": "installId",
389
+ "tags": [
390
+ {
391
+ "text": "0.3.1",
392
+ "name": "since"
393
+ },
394
+ {
395
+ "text": "\"fake_install_id\"",
396
+ "name": "example"
397
+ }
398
+ ],
399
+ "docs": "An ID assigned to supervised user installs by Google Play, used for the purposes of notifying you of revoked app approval.\n\nOnly available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.",
400
+ "complexTypes": [],
401
+ "type": "string | undefined"
402
+ }
403
+ ]
404
+ },
405
+ {
406
+ "name": "SetNextAgeSignalsExceptionOptions",
407
+ "slug": "setnextagesignalsexceptionoptions",
408
+ "docs": "",
409
+ "tags": [
410
+ {
411
+ "text": "0.3.1",
412
+ "name": "since"
413
+ }
414
+ ],
415
+ "methods": [],
416
+ "properties": [
417
+ {
418
+ "name": "errorCode",
419
+ "tags": [
420
+ {
421
+ "text": "0.3.1",
422
+ "name": "since"
423
+ }
424
+ ],
425
+ "docs": "The error code to be thrown by the fake manager.",
426
+ "complexTypes": [
427
+ "ErrorCode"
428
+ ],
429
+ "type": "ErrorCode"
430
+ }
431
+ ]
162
432
  }
163
433
  ],
164
434
  "enums": [
@@ -233,6 +503,122 @@
233
503
  "docs": "All other users return this value."
234
504
  }
235
505
  ]
506
+ },
507
+ {
508
+ "name": "ErrorCode",
509
+ "slug": "errorcode",
510
+ "members": [
511
+ {
512
+ "name": "ApiNotAvailable",
513
+ "value": "'API_NOT_AVAILABLE'",
514
+ "tags": [
515
+ {
516
+ "text": "0.0.1",
517
+ "name": "since"
518
+ }
519
+ ],
520
+ "docs": "The Play Age Signals API is not available. The Play Store app version installed on the device might be old."
521
+ },
522
+ {
523
+ "name": "PlayStoreNotFound",
524
+ "value": "'PLAY_STORE_NOT_FOUND'",
525
+ "tags": [
526
+ {
527
+ "text": "0.0.1",
528
+ "name": "since"
529
+ }
530
+ ],
531
+ "docs": "No Play Store app is found on the device."
532
+ },
533
+ {
534
+ "name": "NetworkError",
535
+ "value": "'NETWORK_ERROR'",
536
+ "tags": [
537
+ {
538
+ "text": "0.0.1",
539
+ "name": "since"
540
+ }
541
+ ],
542
+ "docs": "No available network is found."
543
+ },
544
+ {
545
+ "name": "PlayServicesNotFound",
546
+ "value": "'PLAY_SERVICES_NOT_FOUND'",
547
+ "tags": [
548
+ {
549
+ "text": "0.0.1",
550
+ "name": "since"
551
+ }
552
+ ],
553
+ "docs": "Play Services is not available or its version is too old."
554
+ },
555
+ {
556
+ "name": "CannotBindToService",
557
+ "value": "'CANNOT_BIND_TO_SERVICE'",
558
+ "tags": [
559
+ {
560
+ "text": "0.0.1",
561
+ "name": "since"
562
+ }
563
+ ],
564
+ "docs": "Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device or device memory is overloaded."
565
+ },
566
+ {
567
+ "name": "PlayStoreVersionOutdated",
568
+ "value": "'PLAY_STORE_VERSION_OUTDATED'",
569
+ "tags": [
570
+ {
571
+ "text": "0.0.1",
572
+ "name": "since"
573
+ }
574
+ ],
575
+ "docs": "The Play Store app needs to be updated."
576
+ },
577
+ {
578
+ "name": "PlayServicesVersionOutdated",
579
+ "value": "'PLAY_SERVICES_VERSION_OUTDATED'",
580
+ "tags": [
581
+ {
582
+ "text": "0.0.1",
583
+ "name": "since"
584
+ }
585
+ ],
586
+ "docs": "Play Services needs to be updated."
587
+ },
588
+ {
589
+ "name": "ClientTransientError",
590
+ "value": "'CLIENT_TRANSIENT_ERROR'",
591
+ "tags": [
592
+ {
593
+ "text": "0.0.1",
594
+ "name": "since"
595
+ }
596
+ ],
597
+ "docs": "There was a transient error in the client device."
598
+ },
599
+ {
600
+ "name": "AppNotOwned",
601
+ "value": "'APP_NOT_OWNED'",
602
+ "tags": [
603
+ {
604
+ "text": "0.0.1",
605
+ "name": "since"
606
+ }
607
+ ],
608
+ "docs": "The app was not installed by Google Play."
609
+ },
610
+ {
611
+ "name": "InternalError",
612
+ "value": "'INTERNAL_ERROR'",
613
+ "tags": [
614
+ {
615
+ "text": "0.0.1",
616
+ "name": "since"
617
+ }
618
+ ],
619
+ "docs": "Unknown internal error."
620
+ }
621
+ ]
236
622
  }
237
623
  ],
238
624
  "typeAliases": [],
@@ -8,6 +8,38 @@ export interface AgeSignalsPlugin {
8
8
  * @since 0.0.1
9
9
  */
10
10
  checkAgeSignals(options?: CheckAgeSignalsOptions): Promise<CheckAgeSignalsResult>;
11
+ /**
12
+ * Check if the user is eligible for age-gated features.
13
+ *
14
+ * Only available on iOS.
15
+ *
16
+ * @since 0.3.1
17
+ */
18
+ checkEligibility(): Promise<CheckEligibilityResult>;
19
+ /**
20
+ * Enable or disable the fake age signals manager for testing.
21
+ *
22
+ * Only available on Android.
23
+ *
24
+ * @since 0.3.1
25
+ */
26
+ setUseFakeManager(options: SetUseFakeManagerOptions): Promise<void>;
27
+ /**
28
+ * Set the next age signals result to be returned by the fake manager.
29
+ *
30
+ * Only available on Android.
31
+ *
32
+ * @since 0.3.1
33
+ */
34
+ setNextAgeSignalsResult(options: SetNextAgeSignalsResultOptions): Promise<void>;
35
+ /**
36
+ * Set the next exception to be thrown by the fake manager.
37
+ *
38
+ * Only available on Android.
39
+ *
40
+ * @since 0.3.1
41
+ */
42
+ setNextAgeSignalsException(options: SetNextAgeSignalsExceptionOptions): Promise<void>;
11
43
  }
12
44
  /**
13
45
  * @since 0.0.2
@@ -76,6 +108,21 @@ export interface CheckAgeSignalsResult {
76
108
  */
77
109
  installId?: string;
78
110
  }
111
+ /**
112
+ * @since 0.3.1
113
+ */
114
+ export interface CheckEligibilityResult {
115
+ /**
116
+ * Whether the user is eligible for age-gated features.
117
+ *
118
+ * Returns `true` if the user is in an applicable region that requires
119
+ * additional age-related obligations. Always returns `false` on macOS.
120
+ *
121
+ * @since 0.3.1
122
+ * @example true
123
+ */
124
+ isEligible: boolean;
125
+ }
79
126
  /**
80
127
  * @since 0.0.1
81
128
  */
@@ -188,3 +235,75 @@ export declare enum ErrorCode {
188
235
  */
189
236
  InternalError = "INTERNAL_ERROR"
190
237
  }
238
+ /**
239
+ * @since 0.3.1
240
+ */
241
+ export interface SetUseFakeManagerOptions {
242
+ /**
243
+ * Whether to use the fake age signals manager for testing.
244
+ *
245
+ * @since 0.3.1
246
+ * @default false
247
+ * @example true
248
+ */
249
+ useFake: boolean;
250
+ }
251
+ /**
252
+ * @since 0.3.1
253
+ */
254
+ export interface SetNextAgeSignalsResultOptions {
255
+ /**
256
+ * The user's verification status.
257
+ *
258
+ * @since 0.3.1
259
+ */
260
+ userStatus: UserStatus;
261
+ /**
262
+ * The (inclusive) lower bound of a supervised user's age range.
263
+ *
264
+ * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.
265
+ *
266
+ * @since 0.3.1
267
+ * @example 13
268
+ */
269
+ ageLower?: number;
270
+ /**
271
+ * The (inclusive) upper bound of a supervised user's age range.
272
+ *
273
+ * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED` and the user's age is under 18.
274
+ *
275
+ * @since 0.3.1
276
+ * @example 15
277
+ */
278
+ ageUpper?: number;
279
+ /**
280
+ * The effective from date of the most recent significant change that was approved.
281
+ * When an app is installed, the date of the most recent significant change prior to install is used.
282
+ *
283
+ * Only available when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.
284
+ *
285
+ * @since 0.3.1
286
+ * @example "2024-01-15"
287
+ */
288
+ mostRecentApprovalDate?: string;
289
+ /**
290
+ * An ID assigned to supervised user installs by Google Play, used for the purposes of notifying you of revoked app approval.
291
+ *
292
+ * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.
293
+ *
294
+ * @since 0.3.1
295
+ * @example "fake_install_id"
296
+ */
297
+ installId?: string;
298
+ }
299
+ /**
300
+ * @since 0.3.1
301
+ */
302
+ export interface SetNextAgeSignalsExceptionOptions {
303
+ /**
304
+ * The error code to be thrown by the fake manager.
305
+ *
306
+ * @since 0.3.1
307
+ */
308
+ errorCode: ErrorCode;
309
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAmFA;;GAEG;AACH,MAAM,CAAN,IAAY,UA2CX;AA3CD,WAAY,UAAU;IACpB;;;;OAIG;IACH,mCAAqB,CAAA;IACrB;;;;;OAKG;IACH,uCAAyB,CAAA;IACzB;;;;;;OAMG;IACH,uEAAyD,CAAA;IACzD;;;;;;OAMG;IACH,qEAAuD,CAAA;IACvD;;;;;OAKG;IACH,iCAAmB,CAAA;IACnB;;;;OAIG;IACH,6BAAe,CAAA;AACjB,CAAC,EA3CW,UAAU,KAAV,UAAU,QA2CrB;AAED;;GAEG;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":["/**\n * @since 0.0.1\n */\nexport interface AgeSignalsPlugin {\n /**\n * Request the user's age signals.\n *\n * @since 0.0.1\n */\n checkAgeSignals(\n options?: CheckAgeSignalsOptions,\n ): Promise<CheckAgeSignalsResult>;\n}\n\n/**\n * @since 0.0.2\n */\nexport interface CheckAgeSignalsOptions {\n /**\n * The age ranges that the user falls into.\n * The provided array must contain at least 2 and at most 3 ages.\n *\n * Only available on iOS.\n *\n * @since 0.0.2\n * @default [13, 15, 18]\n */\n ageGates?: number[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface CheckAgeSignalsResult {\n /**\n * The user's verification status.\n *\n * @since 0.0.1\n */\n userStatus: UserStatus;\n /**\n * The (inclusive) lower bound of a supervised user's age range.\n *\n * Only available 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 * The (inclusive) upper bound of a supervised user's age range.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED` and the user's age is under 18.\n *\n * @since 0.0.1\n * @example 15\n */\n ageUpper?: number;\n /**\n * The effective from date of the most recent significant change that was approved.\n * When an app is installed, the date of the most recent significant change prior to install is used.\n *\n * Only available when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n * @example \"2024-01-15\"\n */\n mostRecentApprovalDate?: string;\n /**\n * An ID assigned to supervised user installs by Google Play, used for the purposes of notifying you of revoked app approval.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n * @example \"abc123xyz\"\n */\n installId?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport enum UserStatus {\n /**\n * The user is over 18. Google verified the user's age using a commercially reasonable method such as a government-issued ID, credit card, or facial age estimation.\n *\n * @since 0.0.1\n */\n Verified = 'VERIFIED',\n /**\n * The user has a supervised Google Account managed by a parent who sets their age.\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 user has a supervised Google Account, and their supervising parent has not yet approved one or more pending significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n SupervisedApprovalPending = 'SUPERVISED_APPROVAL_PENDING',\n /**\n * The user has a supervised Google Account, and their supervising parent denied approval for one or more significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n SupervisedApprovalDenied = 'SUPERVISED_APPROVAL_DENIED',\n /**\n * The user is not verified or supervised in applicable jurisdictions and regions. These users could be over or under 18.\n * To obtain an age signal from Google Play, ask the user to visit the Play Store to resolve their status.\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 * @since 0.0.1\n */\nexport enum ErrorCode {\n /**\n * The Play Age Signals API is not available. The Play Store app version installed on the device might be old.\n *\n * @since 0.0.1\n */\n ApiNotAvailable = 'API_NOT_AVAILABLE',\n /**\n * No Play Store app is found on the device.\n *\n * @since 0.0.1\n */\n PlayStoreNotFound = 'PLAY_STORE_NOT_FOUND',\n /**\n * No available network is found.\n *\n * @since 0.0.1\n */\n NetworkError = 'NETWORK_ERROR',\n /**\n * Play Services is not available or its version is too old.\n *\n * @since 0.0.1\n */\n PlayServicesNotFound = 'PLAY_SERVICES_NOT_FOUND',\n /**\n * Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device or device memory is overloaded.\n *\n * @since 0.0.1\n */\n CannotBindToService = 'CANNOT_BIND_TO_SERVICE',\n /**\n * The Play Store app needs to be updated.\n *\n * @since 0.0.1\n */\n PlayStoreVersionOutdated = 'PLAY_STORE_VERSION_OUTDATED',\n /**\n * Play Services needs to be updated.\n *\n * @since 0.0.1\n */\n PlayServicesVersionOutdated = 'PLAY_SERVICES_VERSION_OUTDATED',\n /**\n * There was a transient error in the client device.\n *\n * @since 0.0.1\n */\n ClientTransientError = 'CLIENT_TRANSIENT_ERROR',\n /**\n * The app was not installed by Google Play.\n *\n * @since 0.0.1\n */\n AppNotOwned = 'APP_NOT_OWNED',\n /**\n * Unknown internal error.\n *\n * @since 0.0.1\n */\n InternalError = 'INTERNAL_ERROR',\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAuIA;;GAEG;AACH,MAAM,CAAN,IAAY,UA2CX;AA3CD,WAAY,UAAU;IACpB;;;;OAIG;IACH,mCAAqB,CAAA;IACrB;;;;;OAKG;IACH,uCAAyB,CAAA;IACzB;;;;;;OAMG;IACH,uEAAyD,CAAA;IACzD;;;;;;OAMG;IACH,qEAAuD,CAAA;IACvD;;;;;OAKG;IACH,iCAAmB,CAAA;IACnB;;;;OAIG;IACH,6BAAe,CAAA;AACjB,CAAC,EA3CW,UAAU,KAAV,UAAU,QA2CrB;AAED;;GAEG;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":["/**\n * @since 0.0.1\n */\nexport interface AgeSignalsPlugin {\n /**\n * Request the user's age signals.\n *\n * @since 0.0.1\n */\n checkAgeSignals(\n options?: CheckAgeSignalsOptions,\n ): Promise<CheckAgeSignalsResult>;\n /**\n * Check if the user is eligible for age-gated features.\n *\n * Only available on iOS.\n *\n * @since 0.3.1\n */\n checkEligibility(): Promise<CheckEligibilityResult>;\n /**\n * Enable or disable the fake age signals manager for testing.\n *\n * Only available on Android.\n *\n * @since 0.3.1\n */\n setUseFakeManager(options: SetUseFakeManagerOptions): Promise<void>;\n /**\n * Set the next age signals result to be returned by the fake manager.\n *\n * Only available on Android.\n *\n * @since 0.3.1\n */\n setNextAgeSignalsResult(\n options: SetNextAgeSignalsResultOptions,\n ): Promise<void>;\n /**\n * Set the next exception to be thrown by the fake manager.\n *\n * Only available on Android.\n *\n * @since 0.3.1\n */\n setNextAgeSignalsException(\n options: SetNextAgeSignalsExceptionOptions,\n ): Promise<void>;\n}\n\n/**\n * @since 0.0.2\n */\nexport interface CheckAgeSignalsOptions {\n /**\n * The age ranges that the user falls into.\n * The provided array must contain at least 2 and at most 3 ages.\n *\n * Only available on iOS.\n *\n * @since 0.0.2\n * @default [13, 15, 18]\n */\n ageGates?: number[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface CheckAgeSignalsResult {\n /**\n * The user's verification status.\n *\n * @since 0.0.1\n */\n userStatus: UserStatus;\n /**\n * The (inclusive) lower bound of a supervised user's age range.\n *\n * Only available 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 * The (inclusive) upper bound of a supervised user's age range.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED` and the user's age is under 18.\n *\n * @since 0.0.1\n * @example 15\n */\n ageUpper?: number;\n /**\n * The effective from date of the most recent significant change that was approved.\n * When an app is installed, the date of the most recent significant change prior to install is used.\n *\n * Only available when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n * @example \"2024-01-15\"\n */\n mostRecentApprovalDate?: string;\n /**\n * An ID assigned to supervised user installs by Google Play, used for the purposes of notifying you of revoked app approval.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n * @example \"abc123xyz\"\n */\n installId?: string;\n}\n\n/**\n * @since 0.3.1\n */\nexport interface CheckEligibilityResult {\n /**\n * Whether the user is eligible for age-gated features.\n *\n * Returns `true` if the user is in an applicable region that requires\n * additional age-related obligations. Always returns `false` on macOS.\n *\n * @since 0.3.1\n * @example true\n */\n isEligible: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport enum UserStatus {\n /**\n * The user is over 18. Google verified the user's age using a commercially reasonable method such as a government-issued ID, credit card, or facial age estimation.\n *\n * @since 0.0.1\n */\n Verified = 'VERIFIED',\n /**\n * The user has a supervised Google Account managed by a parent who sets their age.\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 user has a supervised Google Account, and their supervising parent has not yet approved one or more pending significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n SupervisedApprovalPending = 'SUPERVISED_APPROVAL_PENDING',\n /**\n * The user has a supervised Google Account, and their supervising parent denied approval for one or more significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n SupervisedApprovalDenied = 'SUPERVISED_APPROVAL_DENIED',\n /**\n * The user is not verified or supervised in applicable jurisdictions and regions. These users could be over or under 18.\n * To obtain an age signal from Google Play, ask the user to visit the Play Store to resolve their status.\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 * @since 0.0.1\n */\nexport enum ErrorCode {\n /**\n * The Play Age Signals API is not available. The Play Store app version installed on the device might be old.\n *\n * @since 0.0.1\n */\n ApiNotAvailable = 'API_NOT_AVAILABLE',\n /**\n * No Play Store app is found on the device.\n *\n * @since 0.0.1\n */\n PlayStoreNotFound = 'PLAY_STORE_NOT_FOUND',\n /**\n * No available network is found.\n *\n * @since 0.0.1\n */\n NetworkError = 'NETWORK_ERROR',\n /**\n * Play Services is not available or its version is too old.\n *\n * @since 0.0.1\n */\n PlayServicesNotFound = 'PLAY_SERVICES_NOT_FOUND',\n /**\n * Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device or device memory is overloaded.\n *\n * @since 0.0.1\n */\n CannotBindToService = 'CANNOT_BIND_TO_SERVICE',\n /**\n * The Play Store app needs to be updated.\n *\n * @since 0.0.1\n */\n PlayStoreVersionOutdated = 'PLAY_STORE_VERSION_OUTDATED',\n /**\n * Play Services needs to be updated.\n *\n * @since 0.0.1\n */\n PlayServicesVersionOutdated = 'PLAY_SERVICES_VERSION_OUTDATED',\n /**\n * There was a transient error in the client device.\n *\n * @since 0.0.1\n */\n ClientTransientError = 'CLIENT_TRANSIENT_ERROR',\n /**\n * The app was not installed by Google Play.\n *\n * @since 0.0.1\n */\n AppNotOwned = 'APP_NOT_OWNED',\n /**\n * Unknown internal error.\n *\n * @since 0.0.1\n */\n InternalError = 'INTERNAL_ERROR',\n}\n\n/**\n * @since 0.3.1\n */\nexport interface SetUseFakeManagerOptions {\n /**\n * Whether to use the fake age signals manager for testing.\n *\n * @since 0.3.1\n * @default false\n * @example true\n */\n useFake: boolean;\n}\n\n/**\n * @since 0.3.1\n */\nexport interface SetNextAgeSignalsResultOptions {\n /**\n * The user's verification status.\n *\n * @since 0.3.1\n */\n userStatus: UserStatus;\n /**\n * The (inclusive) lower bound of a supervised user's age range.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.\n *\n * @since 0.3.1\n * @example 13\n */\n ageLower?: number;\n /**\n * The (inclusive) upper bound of a supervised user's age range.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED` and the user's age is under 18.\n *\n * @since 0.3.1\n * @example 15\n */\n ageUpper?: number;\n /**\n * The effective from date of the most recent significant change that was approved.\n * When an app is installed, the date of the most recent significant change prior to install is used.\n *\n * Only available when `userStatus` is `SUPERVISED_APPROVAL_PENDING` or `SUPERVISED_APPROVAL_DENIED`.\n *\n * @since 0.3.1\n * @example \"2024-01-15\"\n */\n mostRecentApprovalDate?: string;\n /**\n * An ID assigned to supervised user installs by Google Play, used for the purposes of notifying you of revoked app approval.\n *\n * Only available when `userStatus` is `SUPERVISED`, `SUPERVISED_APPROVAL_PENDING`, or `SUPERVISED_APPROVAL_DENIED`.\n *\n * @since 0.3.1\n * @example \"fake_install_id\"\n */\n installId?: string;\n}\n\n/**\n * @since 0.3.1\n */\nexport interface SetNextAgeSignalsExceptionOptions {\n /**\n * The error code to be thrown by the fake manager.\n *\n * @since 0.3.1\n */\n errorCode: ErrorCode;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { AgeSignalsPlugin, CheckAgeSignalsOptions, CheckAgeSignalsResult } from './definitions';
2
+ import type { AgeSignalsPlugin, CheckAgeSignalsOptions, CheckAgeSignalsResult, CheckEligibilityResult, SetNextAgeSignalsExceptionOptions, SetNextAgeSignalsResultOptions, SetUseFakeManagerOptions } from './definitions';
3
3
  export declare class AgeSignalsWeb extends WebPlugin implements AgeSignalsPlugin {
4
4
  checkAgeSignals(_options: CheckAgeSignalsOptions): Promise<CheckAgeSignalsResult>;
5
+ checkEligibility(): Promise<CheckEligibilityResult>;
6
+ setUseFakeManager(_options: SetUseFakeManagerOptions): Promise<void>;
7
+ setNextAgeSignalsResult(_options: SetNextAgeSignalsResultOptions): Promise<void>;
8
+ setNextAgeSignalsException(_options: SetNextAgeSignalsExceptionOptions): Promise<void>;
5
9
  }
package/dist/esm/web.js CHANGED
@@ -3,5 +3,17 @@ export class AgeSignalsWeb extends WebPlugin {
3
3
  async checkAgeSignals(_options) {
4
4
  throw this.unimplemented('Not implemented on web.');
5
5
  }
6
+ async checkEligibility() {
7
+ throw this.unimplemented('Not implemented on web.');
8
+ }
9
+ async setUseFakeManager(_options) {
10
+ throw this.unimplemented('Not implemented on web.');
11
+ }
12
+ async setNextAgeSignalsResult(_options) {
13
+ throw this.unimplemented('Not implemented on web.');
14
+ }
15
+ async setNextAgeSignalsException(_options) {
16
+ throw this.unimplemented('Not implemented on web.');
17
+ }
6
18
  }
7
19
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,eAAe,CACnB,QAAgC;QAEhC,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n AgeSignalsPlugin,\n CheckAgeSignalsOptions,\n CheckAgeSignalsResult,\n} from './definitions';\n\nexport class AgeSignalsWeb extends WebPlugin implements AgeSignalsPlugin {\n async checkAgeSignals(\n _options: CheckAgeSignalsOptions,\n ): Promise<CheckAgeSignalsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAY5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,eAAe,CACnB,QAAgC;QAEhC,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAAkC;QACxD,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,QAAwC;QAExC,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,QAA2C;QAE3C,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n AgeSignalsPlugin,\n CheckAgeSignalsOptions,\n CheckAgeSignalsResult,\n CheckEligibilityResult,\n SetNextAgeSignalsExceptionOptions,\n SetNextAgeSignalsResultOptions,\n SetUseFakeManagerOptions,\n} from './definitions';\n\nexport class AgeSignalsWeb extends WebPlugin implements AgeSignalsPlugin {\n async checkAgeSignals(\n _options: CheckAgeSignalsOptions,\n ): Promise<CheckAgeSignalsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async checkEligibility(): Promise<CheckEligibilityResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setUseFakeManager(_options: SetUseFakeManagerOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setNextAgeSignalsResult(\n _options: SetNextAgeSignalsResultOptions,\n ): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async setNextAgeSignalsException(\n _options: SetNextAgeSignalsExceptionOptions,\n ): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
@@ -125,6 +125,18 @@ class AgeSignalsWeb extends core.WebPlugin {
125
125
  async checkAgeSignals(_options) {
126
126
  throw this.unimplemented('Not implemented on web.');
127
127
  }
128
+ async checkEligibility() {
129
+ throw this.unimplemented('Not implemented on web.');
130
+ }
131
+ async setUseFakeManager(_options) {
132
+ throw this.unimplemented('Not implemented on web.');
133
+ }
134
+ async setNextAgeSignalsResult(_options) {
135
+ throw this.unimplemented('Not implemented on web.');
136
+ }
137
+ async setNextAgeSignalsException(_options) {
138
+ throw this.unimplemented('Not implemented on web.');
139
+ }
128
140
  }
129
141
 
130
142
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var UserStatus;\n(function (UserStatus) {\n /**\n * The user is over 18. Google verified the user's age using a commercially reasonable method such as a government-issued ID, credit card, or facial age estimation.\n *\n * @since 0.0.1\n */\n UserStatus[\"Verified\"] = \"VERIFIED\";\n /**\n * The user has a supervised Google Account managed by a parent who sets their age.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n *\n * @since 0.0.1\n */\n UserStatus[\"Supervised\"] = \"SUPERVISED\";\n /**\n * The user has a supervised Google Account, and their supervising parent has not yet approved one or more pending significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n UserStatus[\"SupervisedApprovalPending\"] = \"SUPERVISED_APPROVAL_PENDING\";\n /**\n * The user has a supervised Google Account, and their supervising parent denied approval for one or more significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n UserStatus[\"SupervisedApprovalDenied\"] = \"SUPERVISED_APPROVAL_DENIED\";\n /**\n * The user is not verified or supervised in applicable jurisdictions and regions. These users could be over or under 18.\n * To obtain an age signal from Google Play, ask the user to visit the Play Store to resolve their status.\n *\n * @since 0.0.1\n */\n UserStatus[\"Unknown\"] = \"UNKNOWN\";\n /**\n * All other users return this value.\n *\n * @since 0.0.1\n */\n UserStatus[\"Empty\"] = \"EMPTY\";\n})(UserStatus || (UserStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The Play Age Signals API is not available. The Play Store app version installed on the device might be old.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ApiNotAvailable\"] = \"API_NOT_AVAILABLE\";\n /**\n * No Play Store app is found on the device.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayStoreNotFound\"] = \"PLAY_STORE_NOT_FOUND\";\n /**\n * No available network is found.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NetworkError\"] = \"NETWORK_ERROR\";\n /**\n * Play Services is not available or its version is too old.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayServicesNotFound\"] = \"PLAY_SERVICES_NOT_FOUND\";\n /**\n * Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device or device memory is overloaded.\n *\n * @since 0.0.1\n */\n ErrorCode[\"CannotBindToService\"] = \"CANNOT_BIND_TO_SERVICE\";\n /**\n * The Play Store app needs to be updated.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayStoreVersionOutdated\"] = \"PLAY_STORE_VERSION_OUTDATED\";\n /**\n * Play Services needs to be updated.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayServicesVersionOutdated\"] = \"PLAY_SERVICES_VERSION_OUTDATED\";\n /**\n * There was a transient error in the client device.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ClientTransientError\"] = \"CLIENT_TRANSIENT_ERROR\";\n /**\n * The app was not installed by Google Play.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AppNotOwned\"] = \"APP_NOT_OWNED\";\n /**\n * Unknown internal error.\n *\n * @since 0.0.1\n */\n ErrorCode[\"InternalError\"] = \"INTERNAL_ERROR\";\n})(ErrorCode || (ErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst AgeSignals = registerPlugin('AgeSignals', {\n web: () => import('./web').then(m => new m.AgeSignalsWeb()),\n});\nexport * from './definitions';\nexport { AgeSignals };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AgeSignalsWeb extends WebPlugin {\n async checkAgeSignals(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["UserStatus","ErrorCode","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACWA;AACX,CAAC,UAAU,UAAU,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,YAAY,CAAC,GAAG,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,2BAA2B,CAAC,GAAG,6BAA6B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,0BAA0B,CAAC,GAAG,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO;AACjC,CAAC,EAAEA,kBAAU,KAAKA,kBAAU,GAAG,EAAE,CAAC,CAAC;AACnC;AACA;AACA;AACWC;AACX,CAAC,UAAU,SAAS,EAAE;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,iBAAiB,CAAC,GAAG,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,mBAAmB,CAAC,GAAG,sBAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,cAAc,CAAC,GAAG,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,sBAAsB,CAAC,GAAG,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,qBAAqB,CAAC,GAAG,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,0BAA0B,CAAC,GAAG,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,6BAA6B,CAAC,GAAG,gCAAgC;AAC/E;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,sBAAsB,CAAC,GAAG,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,aAAa,CAAC,GAAG,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,eAAe,CAAC,GAAG,gBAAgB;AACjD,CAAC,EAAEA,iBAAS,KAAKA,iBAAS,GAAG,EAAE,CAAC,CAAC;;AChH5B,MAAC,UAAU,GAAGC,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var UserStatus;\n(function (UserStatus) {\n /**\n * The user is over 18. Google verified the user's age using a commercially reasonable method such as a government-issued ID, credit card, or facial age estimation.\n *\n * @since 0.0.1\n */\n UserStatus[\"Verified\"] = \"VERIFIED\";\n /**\n * The user has a supervised Google Account managed by a parent who sets their age.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n *\n * @since 0.0.1\n */\n UserStatus[\"Supervised\"] = \"SUPERVISED\";\n /**\n * The user has a supervised Google Account, and their supervising parent has not yet approved one or more pending significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n UserStatus[\"SupervisedApprovalPending\"] = \"SUPERVISED_APPROVAL_PENDING\";\n /**\n * The user has a supervised Google Account, and their supervising parent denied approval for one or more significant changes.\n * Use `ageLower` and `ageUpper` to determine the user's age range.\n * Use `mostRecentApprovalDate` to determine the last significant change that was approved.\n *\n * @since 0.0.1\n */\n UserStatus[\"SupervisedApprovalDenied\"] = \"SUPERVISED_APPROVAL_DENIED\";\n /**\n * The user is not verified or supervised in applicable jurisdictions and regions. These users could be over or under 18.\n * To obtain an age signal from Google Play, ask the user to visit the Play Store to resolve their status.\n *\n * @since 0.0.1\n */\n UserStatus[\"Unknown\"] = \"UNKNOWN\";\n /**\n * All other users return this value.\n *\n * @since 0.0.1\n */\n UserStatus[\"Empty\"] = \"EMPTY\";\n})(UserStatus || (UserStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The Play Age Signals API is not available. The Play Store app version installed on the device might be old.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ApiNotAvailable\"] = \"API_NOT_AVAILABLE\";\n /**\n * No Play Store app is found on the device.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayStoreNotFound\"] = \"PLAY_STORE_NOT_FOUND\";\n /**\n * No available network is found.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NetworkError\"] = \"NETWORK_ERROR\";\n /**\n * Play Services is not available or its version is too old.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayServicesNotFound\"] = \"PLAY_SERVICES_NOT_FOUND\";\n /**\n * Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device or device memory is overloaded.\n *\n * @since 0.0.1\n */\n ErrorCode[\"CannotBindToService\"] = \"CANNOT_BIND_TO_SERVICE\";\n /**\n * The Play Store app needs to be updated.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayStoreVersionOutdated\"] = \"PLAY_STORE_VERSION_OUTDATED\";\n /**\n * Play Services needs to be updated.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PlayServicesVersionOutdated\"] = \"PLAY_SERVICES_VERSION_OUTDATED\";\n /**\n * There was a transient error in the client device.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ClientTransientError\"] = \"CLIENT_TRANSIENT_ERROR\";\n /**\n * The app was not installed by Google Play.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AppNotOwned\"] = \"APP_NOT_OWNED\";\n /**\n * Unknown internal error.\n *\n * @since 0.0.1\n */\n ErrorCode[\"InternalError\"] = \"INTERNAL_ERROR\";\n})(ErrorCode || (ErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst AgeSignals = registerPlugin('AgeSignals', {\n web: () => import('./web').then(m => new m.AgeSignalsWeb()),\n});\nexport * from './definitions';\nexport { AgeSignals };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AgeSignalsWeb extends WebPlugin {\n async checkAgeSignals(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkEligibility() {\n throw this.unimplemented('Not implemented on web.');\n }\n async setUseFakeManager(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async setNextAgeSignalsResult(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async setNextAgeSignalsException(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["UserStatus","ErrorCode","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACWA;AACX,CAAC,UAAU,UAAU,EAAE;AACvB;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,YAAY,CAAC,GAAG,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,2BAA2B,CAAC,GAAG,6BAA6B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,0BAA0B,CAAC,GAAG,4BAA4B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO;AACjC,CAAC,EAAEA,kBAAU,KAAKA,kBAAU,GAAG,EAAE,CAAC,CAAC;AACnC;AACA;AACA;AACWC;AACX,CAAC,UAAU,SAAS,EAAE;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,iBAAiB,CAAC,GAAG,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,mBAAmB,CAAC,GAAG,sBAAsB;AAC3D;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,cAAc,CAAC,GAAG,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,sBAAsB,CAAC,GAAG,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,qBAAqB,CAAC,GAAG,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,0BAA0B,CAAC,GAAG,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,6BAA6B,CAAC,GAAG,gCAAgC;AAC/E;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,sBAAsB,CAAC,GAAG,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,aAAa,CAAC,GAAG,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA,IAAI,SAAS,CAAC,eAAe,CAAC,GAAG,gBAAgB;AACjD,CAAC,EAAEA,iBAAS,KAAKA,iBAAS,GAAG,EAAE,CAAC,CAAC;;AChH5B,MAAC,UAAU,GAAGC,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;AACtC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,uBAAuB,CAAC,QAAQ,EAAE;AAC5C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,0BAA0B,CAAC,QAAQ,EAAE;AAC/C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}