turbolink-ai 1.1.1 → 1.1.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.
Files changed (2) hide show
  1. package/package.json +1 -2
  2. package/index.d.ts +0 -169
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "turbolink-ai",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
7
7
  "type": "module",
8
- "types": "index.d.ts",
9
8
  "scripts": {
10
9
  "test": "echo \"Error: no test specified\" && exit 1",
11
10
  "build": "vite build"
package/index.d.ts DELETED
@@ -1,169 +0,0 @@
1
- // SDK initialization parameter type
2
- export declare interface InitParam {
3
- appKey: string //appKey
4
- appSecret: string //appSecret
5
- projectId: string //projectId
6
- uid?: string | number //userId
7
- jump?: boolean //Whether the report will jump automatically if successful
8
- lang?: string //Set language
9
- lv?: string //Set user level
10
- loginUrl?: string //Login page address
11
- }
12
-
13
- //Set user parameter types
14
- export declare interface SetIdentityParam {
15
- uid?: string | number //userId
16
- lv?: string //Set user level
17
- }
18
-
19
- //Custom event request parameter type
20
- export declare interface CustomEventParam {
21
- event: string //Event name
22
- customData?: CustomDataModel[] //Custom parameters
23
- backCamp?: boolean //Back to the gameplay page (automatic)
24
- }
25
-
26
- //Custom parameter type
27
- export declare interface CustomDataModel {
28
- key: string
29
- value: string
30
- }
31
-
32
-
33
- //Login event request parameter type
34
- export declare interface LoginEventParam {
35
- uId: string | number //userId
36
- lv?: string //Set user level
37
- }
38
-
39
- //Register event request parameter type
40
- export declare interface RegisterEventParam {
41
- uId: string | number //userId
42
- lv?: string //Set user level
43
- }
44
-
45
- //LoadUrl event request parameter type
46
- export declare interface LoadUrlEventParam {
47
- url: string //Url
48
- newWindow?: boolean //Whether to open a new window, default to false
49
- }
50
-
51
-
52
- //webLoadUrl event request parameter type
53
- export declare interface WebLoadUrlEventParam {
54
- url: string // Url
55
- width?: number | string // View width, default: 300px
56
- height?: number | string // View height, default: 650px
57
- radius?: number // View rounded corner, default: 12px
58
- backgroundImage?: string // Background image url
59
- backgroundHeight?: number | string // Background height, default: 738px
60
- backgroundWidth?: number | string // Background height, default: auto
61
- maskColor?: string // Mask Color, default: rgba(0, 0, 0, 0.8)
62
- bgLinkage?: boolean // Background linkage amplification
63
- bodyHidden?: boolean // Do you prohibit page scrolling when the window is opened, default: true
64
- jumpNewWindow?: boolean // Does the page jump within the gameplay allow for a new window to open
65
- clickEventCallback?: (res: WebClickCallParam) => void // Click on the event callback within the activity
66
- }
67
-
68
-
69
- //Click on the event callback within the activity
70
- export declare interface WebClickCallParam {
71
- type: "turbolinkLogin" | "turbolinkTask" | "turbolinkRedirect", //Method Type
72
- params?: string //Parameter: JSON string
73
- }
74
-
75
-
76
- //The type of parameter returned by the callback method
77
- export declare interface CallbackResultModel {
78
- code: Number //Status
79
- message: string //Message
80
- data?: any //Success data
81
- campUrl?: string //Gameplay page address
82
- }
83
-
84
- //Callback method type
85
- export declare type CallbackModel = (result: CallbackResultModel) => void
86
-
87
- /**
88
- * SDK initialization (this method needs to be called before event reporting)
89
- * @param param Initialization parameter type
90
- * @param callback
91
- */
92
- export declare function init<T>(param: InitParam, callback?: CallbackModel): Promise<CallbackResultModel>
93
-
94
-
95
- /**
96
- * Set up user
97
- * @param param
98
- * @param callback
99
- */
100
- export declare function setIdentity<T>(param: string | number | SetIdentityParam, callback?: CallbackModel): Promise<CallbackResultModel>
101
-
102
- /**
103
- * Installation event reporting
104
- * @param callback
105
- */
106
- export declare function install<T>(callback?: CallbackModel): Promise<CallbackResultModel>
107
-
108
- /**
109
- * Register event reporting
110
- * @param param Login event request parameters
111
- * @param callback
112
- */
113
- export declare function register<T>(param: RegisterEventParam, callback?: CallbackModel): Promise<CallbackResultModel>
114
-
115
-
116
- /**
117
- * Open incident reporting
118
- * @param callback
119
- */
120
- export declare function open<T>(callback?: CallbackModel): Promise<CallbackResultModel>
121
-
122
-
123
- /**
124
- * Logout incident reporting
125
- * @param callback
126
- */
127
- export declare function logout<T>(callback?: CallbackModel): Promise<CallbackResultModel>
128
-
129
- /**
130
- * Login event reporting
131
- * @param param Login event request parameters
132
- * @param callback
133
- */
134
- export declare function login<T>(param: LoginEventParam, callback?: CallbackModel): Promise<CallbackResultModel>
135
-
136
- /**
137
- * LoadUrl event reporting
138
- * @param param LoadUrl event request parameters
139
- * @param callback
140
- */
141
- export declare function loadUrl<T>(param: LoadUrlEventParam, callback?: CallbackModel): Promise<CallbackResultModel>
142
-
143
-
144
- /**
145
- * WebLoadUrl event reporting
146
- * @param param
147
- * @param callback
148
- */
149
- export declare function webLoadUrl<T>(param: WebLoadUrlEventParam, callback?: CallbackModel): Promise<CallbackResultModel>
150
-
151
-
152
- /**
153
- * Get initialization status
154
- */
155
- export declare function getInitState(): boolean
156
-
157
-
158
- /**
159
- * Get login status
160
- */
161
- export declare function getLoginState(): boolean
162
-
163
-
164
- /**
165
- * Custom event reporting
166
- * @param param Custom event request parameters
167
- * @param callback
168
- */
169
- export declare function customEvent<T>(param: CustomEventParam, callback?: CallbackModel): Promise<CallbackResultModel>