capacitor-native-purchases 0.1.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.
package/dist/docs.json ADDED
@@ -0,0 +1,701 @@
1
+ {
2
+ "api": {
3
+ "name": "PurchasesPlugin",
4
+ "slug": "purchasesplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "echo",
10
+ "signature": "(options: { value: string; }) => Promise<{ value: string; }>",
11
+ "parameters": [
12
+ {
13
+ "name": "options",
14
+ "docs": "",
15
+ "type": "{ value: string; }"
16
+ }
17
+ ],
18
+ "returns": "Promise<{ value: string; }>",
19
+ "tags": [],
20
+ "docs": "A test method which just returns what is passed in",
21
+ "complexTypes": [],
22
+ "slug": "echo"
23
+ },
24
+ {
25
+ "name": "getProductDetails",
26
+ "signature": "(options: { productIdentifier: string; }) => Promise<ProductDetailsResponse>",
27
+ "parameters": [
28
+ {
29
+ "name": "options",
30
+ "docs": "",
31
+ "type": "{ productIdentifier: string; }"
32
+ }
33
+ ],
34
+ "returns": "Promise<ProductDetailsResponse>",
35
+ "tags": [
36
+ {
37
+ "name": "param",
38
+ "text": "options.productId The product ID to lookup"
39
+ }
40
+ ],
41
+ "docs": "Receives a product ID and returns the product details",
42
+ "complexTypes": [
43
+ "ProductDetailsResponse"
44
+ ],
45
+ "slug": "getproductdetails"
46
+ },
47
+ {
48
+ "name": "purchaseProduct",
49
+ "signature": "(options: { productIdentifier: string; userId?: string; }) => Promise<PurchaseProductResponse>",
50
+ "parameters": [
51
+ {
52
+ "name": "options",
53
+ "docs": "",
54
+ "type": "{ productIdentifier: string; userId?: string | undefined; }"
55
+ }
56
+ ],
57
+ "returns": "Promise<PurchaseProductResponse>",
58
+ "tags": [
59
+ {
60
+ "name": "param",
61
+ "text": "options.productId contains the productIdentifier"
62
+ },
63
+ {
64
+ "name": "param",
65
+ "text": "options.userId contains userId linked to your system, must by UUID."
66
+ }
67
+ ],
68
+ "docs": "Receives the product ID which the user wants to purchase and returns the transaction ID",
69
+ "complexTypes": [
70
+ "PurchaseProductResponse"
71
+ ],
72
+ "slug": "purchaseproduct"
73
+ },
74
+ {
75
+ "name": "getCurrentEntitlements",
76
+ "signature": "() => Promise<CurrentEntitlementsResponse>",
77
+ "parameters": [],
78
+ "returns": "Promise<CurrentEntitlementsResponse>",
79
+ "tags": [],
80
+ "docs": "",
81
+ "complexTypes": [
82
+ "CurrentEntitlementsResponse"
83
+ ],
84
+ "slug": "getcurrententitlements"
85
+ },
86
+ {
87
+ "name": "getLatestTransaction",
88
+ "signature": "(options: { productIdentifier: string; }) => Promise<LatestTransactionResponse>",
89
+ "parameters": [
90
+ {
91
+ "name": "options",
92
+ "docs": "",
93
+ "type": "{ productIdentifier: string; }"
94
+ }
95
+ ],
96
+ "returns": "Promise<LatestTransactionResponse>",
97
+ "tags": [],
98
+ "docs": "",
99
+ "complexTypes": [
100
+ "LatestTransactionResponse"
101
+ ],
102
+ "slug": "getlatesttransaction"
103
+ },
104
+ {
105
+ "name": "manageSubscriptions",
106
+ "signature": "() => any",
107
+ "parameters": [],
108
+ "returns": "any",
109
+ "tags": [],
110
+ "docs": "",
111
+ "complexTypes": [],
112
+ "slug": "managesubscriptions"
113
+ },
114
+ {
115
+ "name": "setGoogleVerificationDetails",
116
+ "signature": "(options: { googleVerifyEndpoint: string; bid: string; }) => void",
117
+ "parameters": [
118
+ {
119
+ "name": "options",
120
+ "docs": "",
121
+ "type": "{ googleVerifyEndpoint: string; bid: string; }"
122
+ }
123
+ ],
124
+ "returns": "void",
125
+ "tags": [],
126
+ "docs": "",
127
+ "complexTypes": [],
128
+ "slug": "setgoogleverificationdetails"
129
+ },
130
+ {
131
+ "name": "addListener",
132
+ "signature": "(eventName: 'ANDROID-PURCHASE-RESPONSE', listenerFunc: (response: AndroidPurchasedTrigger) => void) => Promise<PluginListenerHandle>",
133
+ "parameters": [
134
+ {
135
+ "name": "eventName",
136
+ "docs": "",
137
+ "type": "'ANDROID-PURCHASE-RESPONSE'"
138
+ },
139
+ {
140
+ "name": "listenerFunc",
141
+ "docs": "",
142
+ "type": "(response: AndroidPurchasedTrigger) => void"
143
+ }
144
+ ],
145
+ "returns": "Promise<PluginListenerHandle>",
146
+ "tags": [],
147
+ "docs": "",
148
+ "complexTypes": [
149
+ "PluginListenerHandle",
150
+ "AndroidPurchasedTrigger"
151
+ ],
152
+ "slug": "addlistenerandroid-purchase-response-"
153
+ },
154
+ {
155
+ "name": "restorePurchases",
156
+ "signature": "() => Promise<RestorePurchasesResponse>",
157
+ "parameters": [],
158
+ "returns": "Promise<RestorePurchasesResponse>",
159
+ "tags": [],
160
+ "docs": "",
161
+ "complexTypes": [
162
+ "RestorePurchasesResponse"
163
+ ],
164
+ "slug": "restorepurchases"
165
+ }
166
+ ],
167
+ "properties": []
168
+ },
169
+ "interfaces": [
170
+ {
171
+ "name": "ProductDetailsResponse",
172
+ "slug": "productdetailsresponse",
173
+ "docs": "",
174
+ "tags": [],
175
+ "methods": [],
176
+ "properties": [
177
+ {
178
+ "name": "responseCode",
179
+ "tags": [],
180
+ "docs": "",
181
+ "complexTypes": [
182
+ "ProductDetailsResponseCode"
183
+ ],
184
+ "type": "ProductDetailsResponseCode"
185
+ },
186
+ {
187
+ "name": "responseMessage",
188
+ "tags": [],
189
+ "docs": "",
190
+ "complexTypes": [
191
+ "ProductDetailsResponseMessage"
192
+ ],
193
+ "type": "ProductDetailsResponseMessage"
194
+ },
195
+ {
196
+ "name": "data",
197
+ "tags": [],
198
+ "docs": "",
199
+ "complexTypes": [
200
+ "Product"
201
+ ],
202
+ "type": "Product"
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "name": "Product",
208
+ "slug": "product",
209
+ "docs": "",
210
+ "tags": [],
211
+ "methods": [],
212
+ "properties": [
213
+ {
214
+ "name": "productIdentifier",
215
+ "tags": [],
216
+ "docs": "",
217
+ "complexTypes": [],
218
+ "type": "string"
219
+ },
220
+ {
221
+ "name": "price",
222
+ "tags": [],
223
+ "docs": "",
224
+ "complexTypes": [],
225
+ "type": "string"
226
+ },
227
+ {
228
+ "name": "displayName",
229
+ "tags": [],
230
+ "docs": "",
231
+ "complexTypes": [],
232
+ "type": "string"
233
+ },
234
+ {
235
+ "name": "description",
236
+ "tags": [],
237
+ "docs": "",
238
+ "complexTypes": [],
239
+ "type": "string"
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "name": "PurchaseProductResponse",
245
+ "slug": "purchaseproductresponse",
246
+ "docs": "",
247
+ "tags": [],
248
+ "methods": [],
249
+ "properties": [
250
+ {
251
+ "name": "responseCode",
252
+ "tags": [],
253
+ "docs": "",
254
+ "complexTypes": [
255
+ "PurchaseProductIOSResponseCode",
256
+ "PurchaseProductAndroidResponseCode"
257
+ ],
258
+ "type": "0 | 1 | 2 | 5 | 4 | 3 | -1"
259
+ },
260
+ {
261
+ "name": "responseMessage",
262
+ "tags": [],
263
+ "docs": "",
264
+ "complexTypes": [
265
+ "PurchaseProductIOSResponseMessage",
266
+ "PurchaseProductAndroidResponseMessage"
267
+ ],
268
+ "type": "'Incompatible with web' | 'Could not find a product matching the given productIdentifier' | 'Successfully purchased product' | 'Product seems to have been purchased but the transaction failed verification' | 'User closed the native popover before purchasing' | 'Product request made but is currently pending - likely due to parental restrictions' | 'An unknown error occurred whilst in the purchasing process' | 'Successfully opened native popover' | 'Failed to open native popover'"
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ "name": "CurrentEntitlementsResponse",
274
+ "slug": "currententitlementsresponse",
275
+ "docs": "",
276
+ "tags": [],
277
+ "methods": [],
278
+ "properties": [
279
+ {
280
+ "name": "responseCode",
281
+ "tags": [],
282
+ "docs": "",
283
+ "complexTypes": [
284
+ "CurrentEntitlementsResponseCode"
285
+ ],
286
+ "type": "CurrentEntitlementsResponseCode"
287
+ },
288
+ {
289
+ "name": "responseMessage",
290
+ "tags": [],
291
+ "docs": "",
292
+ "complexTypes": [
293
+ "CurrentEntitlementsResponseMessage"
294
+ ],
295
+ "type": "CurrentEntitlementsResponseMessage"
296
+ },
297
+ {
298
+ "name": "data",
299
+ "tags": [],
300
+ "docs": "",
301
+ "complexTypes": [
302
+ "Transaction"
303
+ ],
304
+ "type": "Transaction[] | undefined"
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "name": "Transaction",
310
+ "slug": "transaction",
311
+ "docs": "",
312
+ "tags": [],
313
+ "methods": [],
314
+ "properties": [
315
+ {
316
+ "name": "productIdentifier",
317
+ "tags": [],
318
+ "docs": "",
319
+ "complexTypes": [],
320
+ "type": "string"
321
+ },
322
+ {
323
+ "name": "expiryDate",
324
+ "tags": [],
325
+ "docs": "",
326
+ "complexTypes": [],
327
+ "type": "string"
328
+ },
329
+ {
330
+ "name": "originalId",
331
+ "tags": [],
332
+ "docs": "",
333
+ "complexTypes": [],
334
+ "type": "string"
335
+ },
336
+ {
337
+ "name": "transactionId",
338
+ "tags": [],
339
+ "docs": "",
340
+ "complexTypes": [],
341
+ "type": "string"
342
+ },
343
+ {
344
+ "name": "originalStartDate",
345
+ "tags": [],
346
+ "docs": "",
347
+ "complexTypes": [],
348
+ "type": "string"
349
+ },
350
+ {
351
+ "name": "isTrial",
352
+ "tags": [],
353
+ "docs": "",
354
+ "complexTypes": [],
355
+ "type": "boolean | undefined"
356
+ },
357
+ {
358
+ "name": "purchaseToken",
359
+ "tags": [],
360
+ "docs": "",
361
+ "complexTypes": [],
362
+ "type": "string | undefined"
363
+ }
364
+ ]
365
+ },
366
+ {
367
+ "name": "LatestTransactionResponse",
368
+ "slug": "latesttransactionresponse",
369
+ "docs": "",
370
+ "tags": [],
371
+ "methods": [],
372
+ "properties": [
373
+ {
374
+ "name": "responseCode",
375
+ "tags": [],
376
+ "docs": "",
377
+ "complexTypes": [
378
+ "LatestTransactionResponseCode"
379
+ ],
380
+ "type": "LatestTransactionResponseCode"
381
+ },
382
+ {
383
+ "name": "responseMessage",
384
+ "tags": [],
385
+ "docs": "",
386
+ "complexTypes": [
387
+ "LatestTransactionResponseMessage"
388
+ ],
389
+ "type": "LatestTransactionResponseMessage"
390
+ },
391
+ {
392
+ "name": "data",
393
+ "tags": [],
394
+ "docs": "",
395
+ "complexTypes": [
396
+ "Transaction"
397
+ ],
398
+ "type": "Transaction"
399
+ }
400
+ ]
401
+ },
402
+ {
403
+ "name": "PluginListenerHandle",
404
+ "slug": "pluginlistenerhandle",
405
+ "docs": "",
406
+ "tags": [],
407
+ "methods": [],
408
+ "properties": [
409
+ {
410
+ "name": "remove",
411
+ "tags": [],
412
+ "docs": "",
413
+ "complexTypes": [],
414
+ "type": "() => Promise<void>"
415
+ }
416
+ ]
417
+ },
418
+ {
419
+ "name": "AndroidPurchasedTrigger",
420
+ "slug": "androidpurchasedtrigger",
421
+ "docs": "",
422
+ "tags": [],
423
+ "methods": [],
424
+ "properties": [
425
+ {
426
+ "name": "fired",
427
+ "tags": [],
428
+ "docs": "",
429
+ "complexTypes": [],
430
+ "type": "boolean"
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "name": "RestorePurchasesResponse",
436
+ "slug": "restorepurchasesresponse",
437
+ "docs": "",
438
+ "tags": [],
439
+ "methods": [],
440
+ "properties": [
441
+ {
442
+ "name": "completed",
443
+ "tags": [],
444
+ "docs": "",
445
+ "complexTypes": [],
446
+ "type": "boolean"
447
+ }
448
+ ]
449
+ }
450
+ ],
451
+ "enums": [],
452
+ "typeAliases": [
453
+ {
454
+ "name": "ProductDetailsResponseCode",
455
+ "slug": "productdetailsresponsecode",
456
+ "docs": "",
457
+ "types": [
458
+ {
459
+ "text": "-1",
460
+ "complexTypes": []
461
+ },
462
+ {
463
+ "text": "0",
464
+ "complexTypes": []
465
+ },
466
+ {
467
+ "text": "1",
468
+ "complexTypes": []
469
+ }
470
+ ]
471
+ },
472
+ {
473
+ "name": "ProductDetailsResponseMessage",
474
+ "slug": "productdetailsresponsemessage",
475
+ "docs": "",
476
+ "types": [
477
+ {
478
+ "text": "'Incompatible with web'",
479
+ "complexTypes": []
480
+ },
481
+ {
482
+ "text": "'Successfully found the product details for given productIdentifier'",
483
+ "complexTypes": []
484
+ },
485
+ {
486
+ "text": "'Could not find a product matching the given productIdentifier'",
487
+ "complexTypes": []
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ "name": "PurchaseProductIOSResponseCode",
493
+ "slug": "purchaseproductiosresponsecode",
494
+ "docs": "",
495
+ "types": [
496
+ {
497
+ "text": "-1",
498
+ "complexTypes": []
499
+ },
500
+ {
501
+ "text": "0",
502
+ "complexTypes": []
503
+ },
504
+ {
505
+ "text": "1",
506
+ "complexTypes": []
507
+ },
508
+ {
509
+ "text": "2",
510
+ "complexTypes": []
511
+ },
512
+ {
513
+ "text": "3",
514
+ "complexTypes": []
515
+ },
516
+ {
517
+ "text": "4",
518
+ "complexTypes": []
519
+ },
520
+ {
521
+ "text": "5",
522
+ "complexTypes": []
523
+ }
524
+ ]
525
+ },
526
+ {
527
+ "name": "PurchaseProductAndroidResponseCode",
528
+ "slug": "purchaseproductandroidresponsecode",
529
+ "docs": "",
530
+ "types": [
531
+ {
532
+ "text": "-1",
533
+ "complexTypes": []
534
+ },
535
+ {
536
+ "text": "0",
537
+ "complexTypes": []
538
+ },
539
+ {
540
+ "text": "1",
541
+ "complexTypes": []
542
+ }
543
+ ]
544
+ },
545
+ {
546
+ "name": "PurchaseProductIOSResponseMessage",
547
+ "slug": "purchaseproductiosresponsemessage",
548
+ "docs": "",
549
+ "types": [
550
+ {
551
+ "text": "'Incompatible with web'",
552
+ "complexTypes": []
553
+ },
554
+ {
555
+ "text": "'Successfully purchased product'",
556
+ "complexTypes": []
557
+ },
558
+ {
559
+ "text": "'Could not find a product matching the given productIdentifier'",
560
+ "complexTypes": []
561
+ },
562
+ {
563
+ "text": "'Product seems to have been purchased but the transaction failed verification'",
564
+ "complexTypes": []
565
+ },
566
+ {
567
+ "text": "'User closed the native popover before purchasing'",
568
+ "complexTypes": []
569
+ },
570
+ {
571
+ "text": "'Product request made but is currently pending - likely due to parental restrictions'",
572
+ "complexTypes": []
573
+ },
574
+ {
575
+ "text": "'An unknown error occurred whilst in the purchasing process'",
576
+ "complexTypes": []
577
+ }
578
+ ]
579
+ },
580
+ {
581
+ "name": "PurchaseProductAndroidResponseMessage",
582
+ "slug": "purchaseproductandroidresponsemessage",
583
+ "docs": "",
584
+ "types": [
585
+ {
586
+ "text": "'Incompatible with web'",
587
+ "complexTypes": []
588
+ },
589
+ {
590
+ "text": "'Successfully opened native popover'",
591
+ "complexTypes": []
592
+ },
593
+ {
594
+ "text": "'Failed to open native popover'",
595
+ "complexTypes": []
596
+ }
597
+ ]
598
+ },
599
+ {
600
+ "name": "CurrentEntitlementsResponseCode",
601
+ "slug": "currententitlementsresponsecode",
602
+ "docs": "",
603
+ "types": [
604
+ {
605
+ "text": "-1",
606
+ "complexTypes": []
607
+ },
608
+ {
609
+ "text": "0",
610
+ "complexTypes": []
611
+ },
612
+ {
613
+ "text": "1",
614
+ "complexTypes": []
615
+ },
616
+ {
617
+ "text": "2",
618
+ "complexTypes": []
619
+ }
620
+ ]
621
+ },
622
+ {
623
+ "name": "CurrentEntitlementsResponseMessage",
624
+ "slug": "currententitlementsresponsemessage",
625
+ "docs": "",
626
+ "types": [
627
+ {
628
+ "text": "'Incompatible with web'",
629
+ "complexTypes": []
630
+ },
631
+ {
632
+ "text": "'Successfully found all entitlements across all product types'",
633
+ "complexTypes": []
634
+ },
635
+ {
636
+ "text": "'No entitlements were found'",
637
+ "complexTypes": []
638
+ },
639
+ {
640
+ "text": "'Unknown problem trying to retrieve entitlements'",
641
+ "complexTypes": []
642
+ }
643
+ ]
644
+ },
645
+ {
646
+ "name": "LatestTransactionResponseCode",
647
+ "slug": "latesttransactionresponsecode",
648
+ "docs": "",
649
+ "types": [
650
+ {
651
+ "text": "-1",
652
+ "complexTypes": []
653
+ },
654
+ {
655
+ "text": "0",
656
+ "complexTypes": []
657
+ },
658
+ {
659
+ "text": "1",
660
+ "complexTypes": []
661
+ },
662
+ {
663
+ "text": "2",
664
+ "complexTypes": []
665
+ },
666
+ {
667
+ "text": "3",
668
+ "complexTypes": []
669
+ }
670
+ ]
671
+ },
672
+ {
673
+ "name": "LatestTransactionResponseMessage",
674
+ "slug": "latesttransactionresponsemessage",
675
+ "docs": "",
676
+ "types": [
677
+ {
678
+ "text": "'Incompatible with web'",
679
+ "complexTypes": []
680
+ },
681
+ {
682
+ "text": "'Successfully found the latest transaction matching given productIdentifier'",
683
+ "complexTypes": []
684
+ },
685
+ {
686
+ "text": "'Could not find a product matching the given productIdentifier'",
687
+ "complexTypes": []
688
+ },
689
+ {
690
+ "text": "'No transaction for given productIdentifier, or it could not be verified'",
691
+ "complexTypes": []
692
+ },
693
+ {
694
+ "text": "'Unknown problem trying to retrieve latest transaction'",
695
+ "complexTypes": []
696
+ }
697
+ ]
698
+ }
699
+ ],
700
+ "pluginConfigs": []
701
+ }