@screeb/sdk-vue 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/docs/README.md ADDED
@@ -0,0 +1,452 @@
1
+ @screeb/sdk-vue
2
+
3
+ # @screeb/sdk-vue
4
+
5
+ ## Table of contents
6
+
7
+ ### Type Aliases
8
+
9
+ - [CloseFunction](README.md#closefunction)
10
+ - [DebugFunction](README.md#debugfunction)
11
+ - [EventTrackFunction](README.md#eventtrackfunction)
12
+ - [IdentityFunction](README.md#identityfunction)
13
+ - [IdentityGetFunction](README.md#identitygetfunction)
14
+ - [IdentityGroupAssignFunction](README.md#identitygroupassignfunction)
15
+ - [IdentityGroupUnassignFunction](README.md#identitygroupunassignfunction)
16
+ - [IdentityPropertiesFunction](README.md#identitypropertiesfunction)
17
+ - [IdentityResetFunction](README.md#identityresetfunction)
18
+ - [InitFunction](README.md#initfunction)
19
+ - [LoadFunction](README.md#loadfunction)
20
+ - [MessageCloseFunction](README.md#messageclosefunction)
21
+ - [MessageStartFunction](README.md#messagestartfunction)
22
+ - [ScreebConfig](README.md#screebconfig)
23
+ - [ScreebContextValues](README.md#screebcontextvalues)
24
+ - [SessionReplayStartFunction](README.md#sessionreplaystartfunction)
25
+ - [SessionReplayStopFunction](README.md#sessionreplaystopfunction)
26
+ - [SurveyCloseFunction](README.md#surveyclosefunction)
27
+ - [SurveyStartFunction](README.md#surveystartfunction)
28
+ - [TargetingCheckFunction](README.md#targetingcheckfunction)
29
+ - [TargetingDebugFunction](README.md#targetingdebugfunction)
30
+
31
+ ### Variables
32
+
33
+ - [SCREEB\_PLUGIN\_KEY](README.md#screeb_plugin_key)
34
+ - [ScreebPlugin](README.md#screebplugin)
35
+
36
+ ### Functions
37
+
38
+ - [useScreeb](README.md#usescreeb)
39
+
40
+ ## Type Aliases
41
+
42
+ ### CloseFunction
43
+
44
+ Ƭ **CloseFunction**: () => `Promise`\<`void`\>
45
+
46
+ #### Type declaration
47
+
48
+ ▸ (): `Promise`\<`void`\>
49
+
50
+ ##### Returns
51
+
52
+ `Promise`\<`void`\>
53
+
54
+ ___
55
+
56
+ ### DebugFunction
57
+
58
+ Ƭ **DebugFunction**: () => `Promise`\<`unknown`\>
59
+
60
+ #### Type declaration
61
+
62
+ ▸ (): `Promise`\<`unknown`\>
63
+
64
+ ##### Returns
65
+
66
+ `Promise`\<`unknown`\>
67
+
68
+ ___
69
+
70
+ ### EventTrackFunction
71
+
72
+ Ƭ **EventTrackFunction**: (`eventName`: `string`, `eventProperties?`: `PropertyRecord`) => `Promise`\<`unknown`\>
73
+
74
+ #### Type declaration
75
+
76
+ ▸ (`eventName`, `eventProperties?`): `Promise`\<`unknown`\>
77
+
78
+ ##### Parameters
79
+
80
+ | Name | Type |
81
+ | :------ | :------ |
82
+ | `eventName` | `string` |
83
+ | `eventProperties?` | `PropertyRecord` |
84
+
85
+ ##### Returns
86
+
87
+ `Promise`\<`unknown`\>
88
+
89
+ ___
90
+
91
+ ### IdentityFunction
92
+
93
+ Ƭ **IdentityFunction**: (`userId`: `string`, `userProperties?`: `PropertyRecord`) => `Promise`\<`unknown`\>
94
+
95
+ #### Type declaration
96
+
97
+ ▸ (`userId`, `userProperties?`): `Promise`\<`unknown`\>
98
+
99
+ ##### Parameters
100
+
101
+ | Name | Type |
102
+ | :------ | :------ |
103
+ | `userId` | `string` |
104
+ | `userProperties?` | `PropertyRecord` |
105
+
106
+ ##### Returns
107
+
108
+ `Promise`\<`unknown`\>
109
+
110
+ ___
111
+
112
+ ### IdentityGetFunction
113
+
114
+ Ƭ **IdentityGetFunction**: () => `Promise`\<`ScreebIdentityGetReturn`\>
115
+
116
+ #### Type declaration
117
+
118
+ ▸ (): `Promise`\<`ScreebIdentityGetReturn`\>
119
+
120
+ ##### Returns
121
+
122
+ `Promise`\<`ScreebIdentityGetReturn`\>
123
+
124
+ ___
125
+
126
+ ### IdentityGroupAssignFunction
127
+
128
+ Ƭ **IdentityGroupAssignFunction**: (`groupName`: `string`, `groupType?`: `string`, `groupProperties?`: `PropertyRecord`) => `Promise`\<`unknown`\>
129
+
130
+ #### Type declaration
131
+
132
+ ▸ (`groupName`, `groupType?`, `groupProperties?`): `Promise`\<`unknown`\>
133
+
134
+ ##### Parameters
135
+
136
+ | Name | Type |
137
+ | :------ | :------ |
138
+ | `groupName` | `string` |
139
+ | `groupType?` | `string` |
140
+ | `groupProperties?` | `PropertyRecord` |
141
+
142
+ ##### Returns
143
+
144
+ `Promise`\<`unknown`\>
145
+
146
+ ___
147
+
148
+ ### IdentityGroupUnassignFunction
149
+
150
+ Ƭ **IdentityGroupUnassignFunction**: (`groupName`: `string`, `groupType?`: `string`) => `Promise`\<`unknown`\>
151
+
152
+ #### Type declaration
153
+
154
+ ▸ (`groupName`, `groupType?`): `Promise`\<`unknown`\>
155
+
156
+ ##### Parameters
157
+
158
+ | Name | Type |
159
+ | :------ | :------ |
160
+ | `groupName` | `string` |
161
+ | `groupType?` | `string` |
162
+
163
+ ##### Returns
164
+
165
+ `Promise`\<`unknown`\>
166
+
167
+ ___
168
+
169
+ ### IdentityPropertiesFunction
170
+
171
+ Ƭ **IdentityPropertiesFunction**: (`userProperties`: `PropertyRecord`) => `Promise`\<`unknown`\>
172
+
173
+ #### Type declaration
174
+
175
+ ▸ (`userProperties`): `Promise`\<`unknown`\>
176
+
177
+ ##### Parameters
178
+
179
+ | Name | Type |
180
+ | :------ | :------ |
181
+ | `userProperties` | `PropertyRecord` |
182
+
183
+ ##### Returns
184
+
185
+ `Promise`\<`unknown`\>
186
+
187
+ ___
188
+
189
+ ### IdentityResetFunction
190
+
191
+ Ƭ **IdentityResetFunction**: () => `Promise`\<`unknown`\>
192
+
193
+ #### Type declaration
194
+
195
+ ▸ (): `Promise`\<`unknown`\>
196
+
197
+ ##### Returns
198
+
199
+ `Promise`\<`unknown`\>
200
+
201
+ ___
202
+
203
+ ### InitFunction
204
+
205
+ Ƭ **InitFunction**: (`websiteId`: `string`, `userId?`: `string`, `userProperties?`: `PropertyRecord`, `hooks?`: `HooksInit`, `language?`: `string`) => `Promise`\<`void`\>
206
+
207
+ #### Type declaration
208
+
209
+ ▸ (`websiteId`, `userId?`, `userProperties?`, `hooks?`, `language?`): `Promise`\<`void`\>
210
+
211
+ ##### Parameters
212
+
213
+ | Name | Type |
214
+ | :------ | :------ |
215
+ | `websiteId` | `string` |
216
+ | `userId?` | `string` |
217
+ | `userProperties?` | `PropertyRecord` |
218
+ | `hooks?` | `HooksInit` |
219
+ | `language?` | `string` |
220
+
221
+ ##### Returns
222
+
223
+ `Promise`\<`void`\>
224
+
225
+ ___
226
+
227
+ ### LoadFunction
228
+
229
+ Ƭ **LoadFunction**: (`options?`: `ScreebOptions`) => `Promise`\<`void`\>
230
+
231
+ #### Type declaration
232
+
233
+ ▸ (`options?`): `Promise`\<`void`\>
234
+
235
+ ##### Parameters
236
+
237
+ | Name | Type |
238
+ | :------ | :------ |
239
+ | `options?` | `ScreebOptions` |
240
+
241
+ ##### Returns
242
+
243
+ `Promise`\<`void`\>
244
+
245
+ ___
246
+
247
+ ### MessageCloseFunction
248
+
249
+ Ƭ **MessageCloseFunction**: () => `Promise`\<`unknown`\>
250
+
251
+ #### Type declaration
252
+
253
+ ▸ (): `Promise`\<`unknown`\>
254
+
255
+ ##### Returns
256
+
257
+ `Promise`\<`unknown`\>
258
+
259
+ ___
260
+
261
+ ### MessageStartFunction
262
+
263
+ Ƭ **MessageStartFunction**: (`messageId`: `string`, `allowMultipleResponses?`: `boolean`, `hiddenFields?`: `PropertyRecord`, `hooks?`: `HooksMessageStart`, `language?`: `string`) => `Promise`\<`unknown`\>
264
+
265
+ #### Type declaration
266
+
267
+ ▸ (`messageId`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`): `Promise`\<`unknown`\>
268
+
269
+ ##### Parameters
270
+
271
+ | Name | Type |
272
+ | :------ | :------ |
273
+ | `messageId` | `string` |
274
+ | `allowMultipleResponses?` | `boolean` |
275
+ | `hiddenFields?` | `PropertyRecord` |
276
+ | `hooks?` | `HooksMessageStart` |
277
+ | `language?` | `string` |
278
+
279
+ ##### Returns
280
+
281
+ `Promise`\<`unknown`\>
282
+
283
+ ___
284
+
285
+ ### ScreebConfig
286
+
287
+ Ƭ **ScreebConfig**: `Object`
288
+
289
+ Configuration for the ScreebPlugin
290
+
291
+ #### Type declaration
292
+
293
+ | Name | Type | Description |
294
+ | :------ | :------ | :------ |
295
+ | `autoInit?` | `boolean` | Indicates if Screeb should be automatically initialized. When true, `init` is called automatically with `websiteId` and `userId`. **`Default`** ```ts false ``` |
296
+ | `hooks?` | `HooksInit` | Hooks to define callback for various Screeb events |
297
+ | `language?` | `string` | Force a specific language (e.g. 'en'). Default: browser language. |
298
+ | `options?` | `ScreebOptions` | Screeb tag initialization options — handle with care. |
299
+ | `shouldLoad?` | `boolean` | Indicates if Screeb should be automatically loaded. Set to false to prevent the SDK from loading (e.g. in CI). **`Default`** ```ts true ``` |
300
+ | `userId?` | `string` | The unique identifier of your user. |
301
+ | `userProperties?` | `PropertyRecord` | The properties of your user. |
302
+ | `websiteId` | `string` | Your website/channel id. |
303
+
304
+ ___
305
+
306
+ ### ScreebContextValues
307
+
308
+ Ƭ **ScreebContextValues**: `Object`
309
+
310
+ All Screeb methods provided via `useScreeb()`
311
+
312
+ #### Type declaration
313
+
314
+ | Name | Type |
315
+ | :------ | :------ |
316
+ | `close` | [`CloseFunction`](README.md#closefunction) |
317
+ | `debug` | [`DebugFunction`](README.md#debugfunction) |
318
+ | `eventTrack` | [`EventTrackFunction`](README.md#eventtrackfunction) |
319
+ | `identity` | [`IdentityFunction`](README.md#identityfunction) |
320
+ | `identityGet` | [`IdentityGetFunction`](README.md#identitygetfunction) |
321
+ | `identityGroupAssign` | [`IdentityGroupAssignFunction`](README.md#identitygroupassignfunction) |
322
+ | `identityGroupUnassign` | [`IdentityGroupUnassignFunction`](README.md#identitygroupunassignfunction) |
323
+ | `identityProperties` | [`IdentityPropertiesFunction`](README.md#identitypropertiesfunction) |
324
+ | `identityReset` | [`IdentityResetFunction`](README.md#identityresetfunction) |
325
+ | `init` | [`InitFunction`](README.md#initfunction) |
326
+ | `load` | [`LoadFunction`](README.md#loadfunction) |
327
+ | `messageClose` | [`MessageCloseFunction`](README.md#messageclosefunction) |
328
+ | `messageStart` | [`MessageStartFunction`](README.md#messagestartfunction) |
329
+ | `sessionReplayStart` | [`SessionReplayStartFunction`](README.md#sessionreplaystartfunction) |
330
+ | `sessionReplayStop` | [`SessionReplayStopFunction`](README.md#sessionreplaystopfunction) |
331
+ | `surveyClose` | [`SurveyCloseFunction`](README.md#surveyclosefunction) |
332
+ | `surveyStart` | [`SurveyStartFunction`](README.md#surveystartfunction) |
333
+ | `targetingCheck` | [`TargetingCheckFunction`](README.md#targetingcheckfunction) |
334
+ | `targetingDebug` | [`TargetingDebugFunction`](README.md#targetingdebugfunction) |
335
+
336
+ ___
337
+
338
+ ### SessionReplayStartFunction
339
+
340
+ Ƭ **SessionReplayStartFunction**: () => `Promise`\<`unknown`\>
341
+
342
+ #### Type declaration
343
+
344
+ ▸ (): `Promise`\<`unknown`\>
345
+
346
+ ##### Returns
347
+
348
+ `Promise`\<`unknown`\>
349
+
350
+ ___
351
+
352
+ ### SessionReplayStopFunction
353
+
354
+ Ƭ **SessionReplayStopFunction**: () => `Promise`\<`unknown`\>
355
+
356
+ #### Type declaration
357
+
358
+ ▸ (): `Promise`\<`unknown`\>
359
+
360
+ ##### Returns
361
+
362
+ `Promise`\<`unknown`\>
363
+
364
+ ___
365
+
366
+ ### SurveyCloseFunction
367
+
368
+ Ƭ **SurveyCloseFunction**: () => `Promise`\<`unknown`\>
369
+
370
+ #### Type declaration
371
+
372
+ ▸ (): `Promise`\<`unknown`\>
373
+
374
+ ##### Returns
375
+
376
+ `Promise`\<`unknown`\>
377
+
378
+ ___
379
+
380
+ ### SurveyStartFunction
381
+
382
+ Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `distributionId?`: `string`, `allowMultipleResponses?`: `boolean`, `hiddenFields?`: `PropertyRecord`, `hooks?`: `HooksSurveyStart`, `language?`: `string`, `selectors?`: `string` \| `string`[]) => `Promise`\<`unknown`\>
383
+
384
+ #### Type declaration
385
+
386
+ ▸ (`surveyId`, `distributionId?`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`, `selectors?`): `Promise`\<`unknown`\>
387
+
388
+ ##### Parameters
389
+
390
+ | Name | Type |
391
+ | :------ | :------ |
392
+ | `surveyId` | `string` |
393
+ | `distributionId?` | `string` |
394
+ | `allowMultipleResponses?` | `boolean` |
395
+ | `hiddenFields?` | `PropertyRecord` |
396
+ | `hooks?` | `HooksSurveyStart` |
397
+ | `language?` | `string` |
398
+ | `selectors?` | `string` \| `string`[] |
399
+
400
+ ##### Returns
401
+
402
+ `Promise`\<`unknown`\>
403
+
404
+ ___
405
+
406
+ ### TargetingCheckFunction
407
+
408
+ Ƭ **TargetingCheckFunction**: () => `Promise`\<`unknown`\>
409
+
410
+ #### Type declaration
411
+
412
+ ▸ (): `Promise`\<`unknown`\>
413
+
414
+ ##### Returns
415
+
416
+ `Promise`\<`unknown`\>
417
+
418
+ ___
419
+
420
+ ### TargetingDebugFunction
421
+
422
+ Ƭ **TargetingDebugFunction**: () => `Promise`\<`unknown`\>
423
+
424
+ #### Type declaration
425
+
426
+ ▸ (): `Promise`\<`unknown`\>
427
+
428
+ ##### Returns
429
+
430
+ `Promise`\<`unknown`\>
431
+
432
+ ## Variables
433
+
434
+ ### SCREEB\_PLUGIN\_KEY
435
+
436
+ • `Const` **SCREEB\_PLUGIN\_KEY**: `InjectionKey`\<[`ScreebContextValues`](README.md#screebcontextvalues)\>
437
+
438
+ ___
439
+
440
+ ### ScreebPlugin
441
+
442
+ • `Const` **ScreebPlugin**: `Plugin`
443
+
444
+ ## Functions
445
+
446
+ ### useScreeb
447
+
448
+ ▸ **useScreeb**(): [`ScreebContextValues`](README.md#screebcontextvalues)
449
+
450
+ #### Returns
451
+
452
+ [`ScreebContextValues`](README.md#screebcontextvalues)
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@screeb/sdk-vue",
3
+ "version": "0.1.1",
4
+ "description": "Screeb's browser SDK, optimized for Vue 3.",
5
+ "keywords": [
6
+ "product discovery",
7
+ "product management",
8
+ "survey",
9
+ "analytics",
10
+ "user feedback",
11
+ "user research",
12
+ "vue"
13
+ ],
14
+ "homepage": "https://screeb.app",
15
+ "bugs": {
16
+ "url": "https://github.com/ScreebApp/sdk-js/issues",
17
+ "email": "support@screeb.app"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/ScreebApp/sdk-js.git",
22
+ "directory": "packages/sdk-vue"
23
+ },
24
+ "license": "MIT",
25
+ "author": "Screeb's frontend team",
26
+ "sideEffects": false,
27
+ "type": "module",
28
+ "module": "dist/es/index.mjs",
29
+ "main": "dist/cjs/index.cjs",
30
+ "types": "dist/es/index.d.ts",
31
+ "files": [
32
+ "dist",
33
+ "docs",
34
+ "README.md"
35
+ ],
36
+ "scripts": {
37
+ "build": "rollup -c ../../node_modules/@screeb/typescript-config/src/rollup.config.js",
38
+ "build:doc": "typedoc src/index.ts",
39
+ "clean": "rm -Rf dist",
40
+ "lint": "eslint .",
41
+ "test": "echo '@TODO'"
42
+ },
43
+ "dependencies": {
44
+ "@screeb/sdk-browser": "^0.5.0"
45
+ },
46
+ "devDependencies": {
47
+ "@screeb/eslint-config": "^0.1.6",
48
+ "@screeb/typescript-config": "^0.1.10",
49
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
50
+ "eslint": "^8.51.0",
51
+ "eslint-plugin-import": "^2.28.1",
52
+ "eslint-plugin-prettier": "^5.0.1",
53
+ "rollup": "^4.0.2",
54
+ "typedoc": "^0.25.2",
55
+ "typedoc-plugin-markdown": "^3.16.0",
56
+ "typescript": "^5.2.2",
57
+ "vue": ">=3.0.0"
58
+ },
59
+ "peerDependencies": {
60
+ "vue": ">=3.0.0"
61
+ },
62
+ "publishConfig": {
63
+ "access": "public"
64
+ }
65
+ }