@tiun/types 0.1.0 → 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/LICENSE +21 -0
- package/README.md +1 -1
- package/index.d.ts +18 -6
- package/package.json +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tiun
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* tiun SDK Type Definitions
|
|
3
3
|
*
|
|
4
4
|
* Install: npm install @tiun/types --save-dev
|
|
5
5
|
*
|
|
@@ -24,7 +24,7 @@ export type TiunEventType = 'ready' | 'paywallShow' | 'paywallHide' | 'error';
|
|
|
24
24
|
|
|
25
25
|
export interface TiunConfig {
|
|
26
26
|
/**
|
|
27
|
-
* Your unique
|
|
27
|
+
* Your unique tiun snippet ID.
|
|
28
28
|
* Required for NPM package usage.
|
|
29
29
|
* For legacy script tag usage, this is provided via the backend.
|
|
30
30
|
*/
|
|
@@ -192,16 +192,28 @@ export interface TiunSDK {
|
|
|
192
192
|
* Subscribe to an event. Returns unsubscribe function.
|
|
193
193
|
*/
|
|
194
194
|
on(event: 'ready', callback: () => void): () => void;
|
|
195
|
-
on(
|
|
196
|
-
|
|
195
|
+
on(
|
|
196
|
+
event: 'paywallShow',
|
|
197
|
+
callback: (data: PaywallShowEvent) => void
|
|
198
|
+
): () => void;
|
|
199
|
+
on(
|
|
200
|
+
event: 'paywallHide',
|
|
201
|
+
callback: (data: PaywallHideEvent) => void
|
|
202
|
+
): () => void;
|
|
197
203
|
on(event: 'error', callback: (error: TiunError) => void): () => void;
|
|
198
204
|
|
|
199
205
|
/**
|
|
200
206
|
* Subscribe to an event once (auto-unsubscribes after first fire).
|
|
201
207
|
*/
|
|
202
208
|
once(event: 'ready', callback: () => void): () => void;
|
|
203
|
-
once(
|
|
204
|
-
|
|
209
|
+
once(
|
|
210
|
+
event: 'paywallShow',
|
|
211
|
+
callback: (data: PaywallShowEvent) => void
|
|
212
|
+
): () => void;
|
|
213
|
+
once(
|
|
214
|
+
event: 'paywallHide',
|
|
215
|
+
callback: (data: PaywallHideEvent) => void
|
|
216
|
+
): () => void;
|
|
205
217
|
once(event: 'error', callback: (error: TiunError) => void): () => void;
|
|
206
218
|
|
|
207
219
|
/**
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiun/types",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "TypeScript type definitions for
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "TypeScript type definitions for tiun SDK (for script tag users)",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"index.d.ts",
|
|
8
|
-
"README.md"
|
|
8
|
+
"README.md",
|
|
9
|
+
"LICENSE"
|
|
9
10
|
],
|
|
10
11
|
"keywords": [
|
|
11
12
|
"tiun",
|