@choochmeque/tauri-plugin-iap-api 0.5.1 → 0.6.0
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/README.md +4 -8
- package/dist-js/index.cjs +2 -9
- package/dist-js/index.d.ts +2 -9
- package/dist-js/index.js +2 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,6 @@ A Tauri plugin for In-App Purchases (IAP) with support for subscriptions on iOS
|
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- Initialize billing/store connection
|
|
14
13
|
- Query products and subscriptions with detailed pricing
|
|
15
14
|
- Purchase subscriptions with platform-specific features
|
|
16
15
|
- Restore previous purchases
|
|
@@ -74,7 +73,6 @@ fn main() {
|
|
|
74
73
|
|
|
75
74
|
An example application is available in the [`examples/iap-demo`](examples/iap-demo) directory. The example demonstrates all core IAP functionality with a UI:
|
|
76
75
|
|
|
77
|
-
- Initialize IAP connection
|
|
78
76
|
- Fetch and display products with pricing
|
|
79
77
|
- Purchase products and subscriptions
|
|
80
78
|
- Restore previous purchases
|
|
@@ -109,7 +107,6 @@ The example app provides a fully functional demo with inline documentation for e
|
|
|
109
107
|
|
|
110
108
|
```typescript
|
|
111
109
|
import {
|
|
112
|
-
initialize,
|
|
113
110
|
getProducts,
|
|
114
111
|
purchase,
|
|
115
112
|
restorePurchases,
|
|
@@ -119,9 +116,6 @@ import {
|
|
|
119
116
|
PurchaseState
|
|
120
117
|
} from '@choochmeque/tauri-plugin-iap-api';
|
|
121
118
|
|
|
122
|
-
// Initialize the billing client
|
|
123
|
-
await initialize();
|
|
124
|
-
|
|
125
119
|
// Get available products
|
|
126
120
|
const products = await getProducts(['subscription_id_1', 'subscription_id_2'], 'subs');
|
|
127
121
|
|
|
@@ -229,8 +223,10 @@ await listener.unregister();
|
|
|
229
223
|
|
|
230
224
|
## API Reference
|
|
231
225
|
|
|
232
|
-
### `initialize()`
|
|
233
|
-
|
|
226
|
+
### `initialize()` *(Deprecated)*
|
|
227
|
+
> **Deprecated**: This function is no longer needed and will be removed in a future major release. The billing client is now initialized automatically when the plugin loads.
|
|
228
|
+
|
|
229
|
+
Returns `{ success: true }` for backward compatibility.
|
|
234
230
|
|
|
235
231
|
### `getProducts(productIds: string[], productType: 'subs' | 'inapp')`
|
|
236
232
|
Fetches product details from the store.
|
package/dist-js/index.cjs
CHANGED
|
@@ -13,16 +13,9 @@ exports.PurchaseState = void 0;
|
|
|
13
13
|
})(exports.PurchaseState || (exports.PurchaseState = {}));
|
|
14
14
|
/**
|
|
15
15
|
* Initialize the IAP plugin.
|
|
16
|
-
* Must be called before any other IAP operations.
|
|
17
16
|
*
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
20
|
-
* ```typescript
|
|
21
|
-
* const result = await initialize();
|
|
22
|
-
* if (result.success) {
|
|
23
|
-
* console.log('IAP initialized successfully');
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
17
|
+
* @deprecated This function is no longer needed. The billing client is now initialized automatically when the plugin loads. This function will be removed in the next major release.
|
|
18
|
+
* @returns Promise resolving to `{ success: true }` for backward compatibility
|
|
26
19
|
*/
|
|
27
20
|
async function initialize() {
|
|
28
21
|
return await core.invoke("plugin:iap|initialize");
|
package/dist-js/index.d.ts
CHANGED
|
@@ -144,16 +144,9 @@ export interface PurchaseOptions {
|
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
146
|
* Initialize the IAP plugin.
|
|
147
|
-
* Must be called before any other IAP operations.
|
|
148
147
|
*
|
|
149
|
-
* @
|
|
150
|
-
* @
|
|
151
|
-
* ```typescript
|
|
152
|
-
* const result = await initialize();
|
|
153
|
-
* if (result.success) {
|
|
154
|
-
* console.log('IAP initialized successfully');
|
|
155
|
-
* }
|
|
156
|
-
* ```
|
|
148
|
+
* @deprecated This function is no longer needed. The billing client is now initialized automatically when the plugin loads. This function will be removed in the next major release.
|
|
149
|
+
* @returns Promise resolving to `{ success: true }` for backward compatibility
|
|
157
150
|
*/
|
|
158
151
|
export declare function initialize(): Promise<InitializeResponse>;
|
|
159
152
|
/**
|
package/dist-js/index.js
CHANGED
|
@@ -11,16 +11,9 @@ var PurchaseState;
|
|
|
11
11
|
})(PurchaseState || (PurchaseState = {}));
|
|
12
12
|
/**
|
|
13
13
|
* Initialize the IAP plugin.
|
|
14
|
-
* Must be called before any other IAP operations.
|
|
15
14
|
*
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const result = await initialize();
|
|
20
|
-
* if (result.success) {
|
|
21
|
-
* console.log('IAP initialized successfully');
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
15
|
+
* @deprecated This function is no longer needed. The billing client is now initialized automatically when the plugin loads. This function will be removed in the next major release.
|
|
16
|
+
* @returns Promise resolving to `{ success: true }` for backward compatibility
|
|
24
17
|
*/
|
|
25
18
|
async function initialize() {
|
|
26
19
|
return await invoke("plugin:iap|initialize");
|