@ogcio/analytics-sdk 0.0.1-beta.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.
Files changed (78) hide show
  1. package/dist/base/base-client.d.ts +36 -0
  2. package/dist/base/base-client.d.ts.map +1 -0
  3. package/dist/base/base-client.js +96 -0
  4. package/dist/index.d.ts +651 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +321 -0
  7. package/dist/matomo/helpers.d.ts +9 -0
  8. package/dist/matomo/helpers.d.ts.map +1 -0
  9. package/dist/matomo/helpers.js +10 -0
  10. package/dist/matomo/types.d.ts +33 -0
  11. package/dist/matomo/types.d.ts.map +1 -0
  12. package/dist/matomo/types.js +1 -0
  13. package/dist/ogcio-analytics-sdk-0.0.1.tgz +0 -0
  14. package/dist/package/dist/base/base-client.d.ts +36 -0
  15. package/dist/package/dist/base/base-client.d.ts.map +1 -0
  16. package/dist/package/dist/base/base-client.js +96 -0
  17. package/dist/package/dist/index.d.ts +651 -0
  18. package/dist/package/dist/index.d.ts.map +1 -0
  19. package/dist/package/dist/index.js +321 -0
  20. package/dist/package/dist/matomo/helpers.d.ts +9 -0
  21. package/dist/package/dist/matomo/helpers.d.ts.map +1 -0
  22. package/dist/package/dist/matomo/helpers.js +10 -0
  23. package/dist/package/dist/matomo/types.d.ts +33 -0
  24. package/dist/package/dist/matomo/types.d.ts.map +1 -0
  25. package/dist/package/dist/matomo/types.js +1 -0
  26. package/dist/package/dist/schema.d.ts +1295 -0
  27. package/dist/package/dist/schema.d.ts.map +1 -0
  28. package/dist/package/dist/schema.js +5 -0
  29. package/dist/package/dist/support-files/auth/index.d.ts +3 -0
  30. package/dist/package/dist/support-files/auth/index.d.ts.map +1 -0
  31. package/dist/package/dist/support-files/auth/index.js +76 -0
  32. package/dist/package/dist/support-files/auth/types.d.ts +31 -0
  33. package/dist/package/dist/support-files/auth/types.d.ts.map +1 -0
  34. package/dist/package/dist/support-files/auth/types.js +1 -0
  35. package/dist/package/dist/support-files/building-blocks-sdk.d.ts +17 -0
  36. package/dist/package/dist/support-files/building-blocks-sdk.d.ts.map +1 -0
  37. package/dist/package/dist/support-files/building-blocks-sdk.js +11 -0
  38. package/dist/package/dist/utils/index.d.ts +7 -0
  39. package/dist/package/dist/utils/index.d.ts.map +1 -0
  40. package/dist/package/dist/utils/index.js +19 -0
  41. package/dist/package/examples/environment.d.ts +11 -0
  42. package/dist/package/examples/index.ts +201 -0
  43. package/dist/package/examples/tsconfig.json +15 -0
  44. package/dist/package/package.json +56 -0
  45. package/dist/package/tsconfig.json +18 -0
  46. package/dist/package/types.d.ts +19 -0
  47. package/dist/schema.d.ts +1295 -0
  48. package/dist/schema.d.ts.map +1 -0
  49. package/dist/schema.js +5 -0
  50. package/dist/support-files/auth/index.d.ts +3 -0
  51. package/dist/support-files/auth/index.d.ts.map +1 -0
  52. package/dist/support-files/auth/index.js +76 -0
  53. package/dist/support-files/auth/types.d.ts +31 -0
  54. package/dist/support-files/auth/types.d.ts.map +1 -0
  55. package/dist/support-files/auth/types.js +1 -0
  56. package/dist/support-files/building-blocks-sdk.d.ts +17 -0
  57. package/dist/support-files/building-blocks-sdk.d.ts.map +1 -0
  58. package/dist/support-files/building-blocks-sdk.js +11 -0
  59. package/dist/utils/index.d.ts +7 -0
  60. package/dist/utils/index.d.ts.map +1 -0
  61. package/dist/utils/index.js +19 -0
  62. package/examples/environment.d.ts +11 -0
  63. package/examples/index.ts +201 -0
  64. package/examples/tsconfig.json +15 -0
  65. package/package.json +56 -0
  66. package/src/base/base-client.ts +172 -0
  67. package/src/index.test.ts +92 -0
  68. package/src/index.ts +449 -0
  69. package/src/matomo/helpers.ts +14 -0
  70. package/src/matomo/types.ts +48 -0
  71. package/src/schema.ts +1295 -0
  72. package/src/support-files/auth/index.ts +116 -0
  73. package/src/support-files/auth/types.ts +38 -0
  74. package/src/support-files/building-blocks-sdk.ts +32 -0
  75. package/src/utils/index.test.ts +46 -0
  76. package/src/utils/index.ts +20 -0
  77. package/tsconfig.json +18 -0
  78. package/types.d.ts +19 -0
package/src/schema.ts ADDED
@@ -0,0 +1,1295 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/api/v1/websites/": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /** @description Get all websites configurations */
15
+ get: {
16
+ parameters: {
17
+ query?: never;
18
+ header?: never;
19
+ path?: never;
20
+ cookie?: never;
21
+ };
22
+ requestBody?: never;
23
+ responses: {
24
+ /** @description Default Response */
25
+ 200: {
26
+ headers: {
27
+ [name: string]: unknown;
28
+ };
29
+ content: {
30
+ "application/json": {
31
+ data: {
32
+ /** @description The tracker url of the website */
33
+ tracker_url: string;
34
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
35
+ cookieless: boolean;
36
+ /** @description Bypass adblockers using custom tracker url */
37
+ bypass_adblockers: boolean;
38
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
39
+ track_page_view: boolean;
40
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
41
+ link_tracking: boolean;
42
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
43
+ heart_beat_timer: number;
44
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
45
+ browser_feature_detection: boolean;
46
+ /** @description Whether to track bots and spiders. Default is false. */
47
+ track_bots: boolean;
48
+ custom_dimensions: {
49
+ [key: string]: string;
50
+ } & {
51
+ [key: string]: string;
52
+ };
53
+ /**
54
+ * Format: uuid
55
+ * @description The UUID of the website config
56
+ */
57
+ id: string;
58
+ /** @description The name of the website config */
59
+ name: string;
60
+ /** @description The domain of the website config */
61
+ domain: string;
62
+ site_ids: number[];
63
+ /** @description The organization ID of the website config, used for multi-tenant support adopting the org-id of logto */
64
+ organization_id: string;
65
+ /** @description The creation date of the website config */
66
+ created_at: string;
67
+ /** @description The update date of the website config */
68
+ updated_at: string;
69
+ }[];
70
+ };
71
+ };
72
+ };
73
+ /** @description Default Response */
74
+ 500: {
75
+ headers: {
76
+ [name: string]: unknown;
77
+ };
78
+ content: {
79
+ "application/json": {
80
+ /** @description Code used to categorize the error */
81
+ code: string;
82
+ /** @description Description of the error */
83
+ detail: string;
84
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
85
+ requestId: string;
86
+ /** @description Name of the error type */
87
+ name: string;
88
+ /** @description List of the validation errors */
89
+ validation?: {
90
+ fieldName: string;
91
+ message: string;
92
+ }[];
93
+ validationContext?: string;
94
+ };
95
+ };
96
+ };
97
+ };
98
+ };
99
+ put?: never;
100
+ /** @description Create a new website configuration */
101
+ post: {
102
+ parameters: {
103
+ query?: never;
104
+ header?: {
105
+ "x-matomo-token"?: string;
106
+ };
107
+ path?: never;
108
+ cookie?: never;
109
+ };
110
+ requestBody: {
111
+ content: {
112
+ "application/json": {
113
+ /** @description The tracker url of the website */
114
+ tracker_url: string;
115
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
116
+ cookieless: boolean;
117
+ /** @description Bypass adblockers using custom tracker url */
118
+ bypass_adblockers: boolean;
119
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
120
+ track_page_view: boolean;
121
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
122
+ link_tracking: boolean;
123
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
124
+ heart_beat_timer: number;
125
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
126
+ browser_feature_detection: boolean;
127
+ /** @description Whether to track bots and spiders. Default is false. */
128
+ track_bots: boolean;
129
+ custom_dimensions: {
130
+ [key: string]: string;
131
+ } & {
132
+ [key: string]: string;
133
+ };
134
+ /** @description The name of the website config */
135
+ name: string;
136
+ /** @description The domain of the website config */
137
+ domain: string;
138
+ site_ids: number[];
139
+ /**
140
+ * Format: uuid
141
+ * @description Optional UUID for the website config. If not provided, a new UUID7 will be generated.
142
+ */
143
+ id?: string;
144
+ };
145
+ };
146
+ };
147
+ responses: {
148
+ /** @description Default Response */
149
+ 201: {
150
+ headers: {
151
+ [name: string]: unknown;
152
+ };
153
+ content: {
154
+ "application/json": {
155
+ data: {
156
+ /** @description The tracker url of the website */
157
+ tracker_url: string;
158
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
159
+ cookieless: boolean;
160
+ /** @description Bypass adblockers using custom tracker url */
161
+ bypass_adblockers: boolean;
162
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
163
+ track_page_view: boolean;
164
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
165
+ link_tracking: boolean;
166
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
167
+ heart_beat_timer: number;
168
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
169
+ browser_feature_detection: boolean;
170
+ /** @description Whether to track bots and spiders. Default is false. */
171
+ track_bots: boolean;
172
+ custom_dimensions: {
173
+ [key: string]: string;
174
+ } & {
175
+ [key: string]: string;
176
+ };
177
+ /**
178
+ * Format: uuid
179
+ * @description The UUID of the website config
180
+ */
181
+ id: string;
182
+ /** @description The name of the website config */
183
+ name: string;
184
+ /** @description The domain of the website config */
185
+ domain: string;
186
+ site_ids: number[];
187
+ /** @description The organization ID of the website config, used for multi-tenant support adopting the org-id of logto */
188
+ organization_id: string;
189
+ /** @description The creation date of the website config */
190
+ created_at: string;
191
+ /** @description The update date of the website config */
192
+ updated_at: string;
193
+ };
194
+ };
195
+ };
196
+ };
197
+ /** @description Default Response */
198
+ 400: {
199
+ headers: {
200
+ [name: string]: unknown;
201
+ };
202
+ content: {
203
+ "application/json": {
204
+ /** @description Code used to categorize the error */
205
+ code: string;
206
+ /** @description Description of the error */
207
+ detail: string;
208
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
209
+ requestId: string;
210
+ /** @description Name of the error type */
211
+ name: string;
212
+ /** @description List of the validation errors */
213
+ validation?: {
214
+ fieldName: string;
215
+ message: string;
216
+ }[];
217
+ validationContext?: string;
218
+ };
219
+ };
220
+ };
221
+ /** @description Default Response */
222
+ 422: {
223
+ headers: {
224
+ [name: string]: unknown;
225
+ };
226
+ content: {
227
+ "application/json": {
228
+ /** @description Code used to categorize the error */
229
+ code: string;
230
+ /** @description Description of the error */
231
+ detail: string;
232
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
233
+ requestId: string;
234
+ /** @description Name of the error type */
235
+ name: string;
236
+ /** @description List of the validation errors */
237
+ validation?: {
238
+ fieldName: string;
239
+ message: string;
240
+ }[];
241
+ validationContext?: string;
242
+ };
243
+ };
244
+ };
245
+ /** @description Default Response */
246
+ 500: {
247
+ headers: {
248
+ [name: string]: unknown;
249
+ };
250
+ content: {
251
+ "application/json": {
252
+ /** @description Code used to categorize the error */
253
+ code: string;
254
+ /** @description Description of the error */
255
+ detail: string;
256
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
257
+ requestId: string;
258
+ /** @description Name of the error type */
259
+ name: string;
260
+ /** @description List of the validation errors */
261
+ validation?: {
262
+ fieldName: string;
263
+ message: string;
264
+ }[];
265
+ validationContext?: string;
266
+ };
267
+ };
268
+ };
269
+ };
270
+ };
271
+ delete?: never;
272
+ options?: never;
273
+ head?: never;
274
+ patch?: never;
275
+ trace?: never;
276
+ };
277
+ "/api/v1/websites/{id}": {
278
+ parameters: {
279
+ query?: never;
280
+ header?: never;
281
+ path?: never;
282
+ cookie?: never;
283
+ };
284
+ /** @description Get a website configuration by ID */
285
+ get: {
286
+ parameters: {
287
+ query?: {
288
+ /** @description Organization ID is only required when the user is not logged in, otherwise the organization ID is retrieved from the user data. */
289
+ org_id?: string;
290
+ };
291
+ header?: never;
292
+ path: {
293
+ /** @description Website UUID */
294
+ id: string;
295
+ };
296
+ cookie?: never;
297
+ };
298
+ requestBody?: never;
299
+ responses: {
300
+ /** @description Default Response */
301
+ 200: {
302
+ headers: {
303
+ [name: string]: unknown;
304
+ };
305
+ content: {
306
+ "application/json": {
307
+ data: {
308
+ /** @description The tracker url of the website */
309
+ tracker_url: string;
310
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
311
+ cookieless: boolean;
312
+ /** @description Bypass adblockers using custom tracker url */
313
+ bypass_adblockers: boolean;
314
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
315
+ track_page_view: boolean;
316
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
317
+ link_tracking: boolean;
318
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
319
+ heart_beat_timer: number;
320
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
321
+ browser_feature_detection: boolean;
322
+ /** @description Whether to track bots and spiders. Default is false. */
323
+ track_bots: boolean;
324
+ custom_dimensions: {
325
+ [key: string]: string;
326
+ } & {
327
+ [key: string]: string;
328
+ };
329
+ /**
330
+ * Format: uuid
331
+ * @description The UUID of the website config
332
+ */
333
+ id: string;
334
+ /** @description The name of the website config */
335
+ name: string;
336
+ /** @description The domain of the website config */
337
+ domain: string;
338
+ site_ids: number[];
339
+ /** @description The organization ID of the website config, used for multi-tenant support adopting the org-id of logto */
340
+ organization_id: string;
341
+ /** @description The creation date of the website config */
342
+ created_at: string;
343
+ /** @description The update date of the website config */
344
+ updated_at: string;
345
+ };
346
+ };
347
+ };
348
+ };
349
+ /** @description Default Response */
350
+ 404: {
351
+ headers: {
352
+ [name: string]: unknown;
353
+ };
354
+ content: {
355
+ "application/json": {
356
+ /** @description Code used to categorize the error */
357
+ code: string;
358
+ /** @description Description of the error */
359
+ detail: string;
360
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
361
+ requestId: string;
362
+ /** @description Name of the error type */
363
+ name: string;
364
+ /** @description List of the validation errors */
365
+ validation?: {
366
+ fieldName: string;
367
+ message: string;
368
+ }[];
369
+ validationContext?: string;
370
+ };
371
+ };
372
+ };
373
+ /** @description Default Response */
374
+ 500: {
375
+ headers: {
376
+ [name: string]: unknown;
377
+ };
378
+ content: {
379
+ "application/json": {
380
+ /** @description Code used to categorize the error */
381
+ code: string;
382
+ /** @description Description of the error */
383
+ detail: string;
384
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
385
+ requestId: string;
386
+ /** @description Name of the error type */
387
+ name: string;
388
+ /** @description List of the validation errors */
389
+ validation?: {
390
+ fieldName: string;
391
+ message: string;
392
+ }[];
393
+ validationContext?: string;
394
+ };
395
+ };
396
+ };
397
+ };
398
+ };
399
+ put?: never;
400
+ post?: never;
401
+ delete?: never;
402
+ options?: never;
403
+ head?: never;
404
+ /** @description Update a website configuration by ID */
405
+ patch: {
406
+ parameters: {
407
+ query?: never;
408
+ header?: {
409
+ "x-matomo-token"?: string;
410
+ };
411
+ path: {
412
+ /** @description Website UUID */
413
+ id: string;
414
+ };
415
+ cookie?: never;
416
+ };
417
+ requestBody?: {
418
+ content: {
419
+ "application/json": {
420
+ /** @description The tracker url of the website */
421
+ tracker_url?: string;
422
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
423
+ cookieless?: boolean;
424
+ /** @description Bypass adblockers using custom tracker url */
425
+ bypass_adblockers?: boolean;
426
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
427
+ track_page_view?: boolean;
428
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
429
+ link_tracking?: boolean;
430
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
431
+ heart_beat_timer?: number;
432
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
433
+ browser_feature_detection?: boolean;
434
+ /** @description Whether to track bots and spiders. Default is false. */
435
+ track_bots?: boolean;
436
+ custom_dimensions?: {
437
+ [key: string]: string;
438
+ } & {
439
+ [key: string]: string;
440
+ };
441
+ /** @description The name of the website config */
442
+ name?: string;
443
+ /** @description The domain of the website config */
444
+ domain?: string;
445
+ site_ids?: number[];
446
+ };
447
+ };
448
+ };
449
+ responses: {
450
+ /** @description Default Response */
451
+ 200: {
452
+ headers: {
453
+ [name: string]: unknown;
454
+ };
455
+ content: {
456
+ "application/json": {
457
+ data: {
458
+ /** @description The tracker url of the website */
459
+ tracker_url: string;
460
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
461
+ cookieless: boolean;
462
+ /** @description Bypass adblockers using custom tracker url */
463
+ bypass_adblockers: boolean;
464
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
465
+ track_page_view: boolean;
466
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
467
+ link_tracking: boolean;
468
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
469
+ heart_beat_timer: number;
470
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
471
+ browser_feature_detection: boolean;
472
+ /** @description Whether to track bots and spiders. Default is false. */
473
+ track_bots: boolean;
474
+ /**
475
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
476
+ * @example {
477
+ * "dimension1": "value1",
478
+ * "dimension2": "value2"
479
+ * }
480
+ */
481
+ custom_dimensions?: {
482
+ [key: string]: string;
483
+ };
484
+ /**
485
+ * Format: uuid
486
+ * @description The UUID of the website config
487
+ */
488
+ id: string;
489
+ /** @description The name of the website config */
490
+ name: string;
491
+ /** @description The domain of the website config */
492
+ domain: string;
493
+ site_ids: number[];
494
+ /** @description The organization ID of the website config, used for multi-tenant support adopting the org-id of logto */
495
+ organization_id: string;
496
+ /** @description The creation date of the website config */
497
+ created_at: string;
498
+ /** @description The update date of the website config */
499
+ updated_at: string;
500
+ };
501
+ };
502
+ };
503
+ };
504
+ /** @description Default Response */
505
+ 404: {
506
+ headers: {
507
+ [name: string]: unknown;
508
+ };
509
+ content: {
510
+ "application/json": {
511
+ /** @description Code used to categorize the error */
512
+ code: string;
513
+ /** @description Description of the error */
514
+ detail: string;
515
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
516
+ requestId: string;
517
+ /** @description Name of the error type */
518
+ name: string;
519
+ /** @description List of the validation errors */
520
+ validation?: {
521
+ fieldName: string;
522
+ message: string;
523
+ }[];
524
+ validationContext?: string;
525
+ };
526
+ };
527
+ };
528
+ /** @description Default Response */
529
+ 500: {
530
+ headers: {
531
+ [name: string]: unknown;
532
+ };
533
+ content: {
534
+ "application/json": {
535
+ /** @description Code used to categorize the error */
536
+ code: string;
537
+ /** @description Description of the error */
538
+ detail: string;
539
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
540
+ requestId: string;
541
+ /** @description Name of the error type */
542
+ name: string;
543
+ /** @description List of the validation errors */
544
+ validation?: {
545
+ fieldName: string;
546
+ message: string;
547
+ }[];
548
+ validationContext?: string;
549
+ };
550
+ };
551
+ };
552
+ };
553
+ };
554
+ trace?: never;
555
+ };
556
+ "/api/v1/websites/{id}/tracking-code": {
557
+ parameters: {
558
+ query?: never;
559
+ header?: never;
560
+ path?: never;
561
+ cookie?: never;
562
+ };
563
+ /** @description Get tracking code for a website */
564
+ get: {
565
+ parameters: {
566
+ query?: {
567
+ site_ids?: number[];
568
+ /** @description The tracker url of the website */
569
+ tracker_url?: string;
570
+ /** @description Set cookieless if you want to track without cookies (GDPR compliance) */
571
+ cookieless?: boolean;
572
+ /** @description Bypass adblockers using custom tracker url */
573
+ bypass_adblockers?: boolean;
574
+ /** @description Whether to track page views automatically when the JavaScript tracking code loads */
575
+ track_page_view?: boolean;
576
+ /** @description Whether to enable automatic tracking of outlinks and downloads */
577
+ link_tracking?: boolean;
578
+ /** @description Set the heart beat timer (in seconds) to track how much time users spend on pages */
579
+ heart_beat_timer?: number;
580
+ /** @description Whether to detect browser features like cookies, Java, Flash for visitor segmentation */
581
+ browser_feature_detection?: boolean;
582
+ /** @description Whether to track bots and spiders. Default is false. */
583
+ track_bots?: boolean;
584
+ /** @description The custom user ID to track */
585
+ user_id?: string;
586
+ };
587
+ header?: never;
588
+ path: {
589
+ /** @description Website UUID */
590
+ id: string;
591
+ };
592
+ cookie?: never;
593
+ };
594
+ requestBody?: never;
595
+ responses: {
596
+ /** @description Default Response */
597
+ 200: {
598
+ headers: {
599
+ [name: string]: unknown;
600
+ };
601
+ content: {
602
+ "application/json": {
603
+ data: {
604
+ script: string;
605
+ };
606
+ };
607
+ };
608
+ };
609
+ /** @description Default Response */
610
+ 404: {
611
+ headers: {
612
+ [name: string]: unknown;
613
+ };
614
+ content: {
615
+ "application/json": {
616
+ /** @description Code used to categorize the error */
617
+ code: string;
618
+ /** @description Description of the error */
619
+ detail: string;
620
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
621
+ requestId: string;
622
+ /** @description Name of the error type */
623
+ name: string;
624
+ /** @description List of the validation errors */
625
+ validation?: {
626
+ fieldName: string;
627
+ message: string;
628
+ }[];
629
+ validationContext?: string;
630
+ };
631
+ };
632
+ };
633
+ /** @description Default Response */
634
+ 500: {
635
+ headers: {
636
+ [name: string]: unknown;
637
+ };
638
+ content: {
639
+ "application/json": {
640
+ /** @description Code used to categorize the error */
641
+ code: string;
642
+ /** @description Description of the error */
643
+ detail: string;
644
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
645
+ requestId: string;
646
+ /** @description Name of the error type */
647
+ name: string;
648
+ /** @description List of the validation errors */
649
+ validation?: {
650
+ fieldName: string;
651
+ message: string;
652
+ }[];
653
+ validationContext?: string;
654
+ };
655
+ };
656
+ };
657
+ };
658
+ };
659
+ put?: never;
660
+ post?: never;
661
+ delete?: never;
662
+ options?: never;
663
+ head?: never;
664
+ patch?: never;
665
+ trace?: never;
666
+ };
667
+ "/api/v1/websites/{id}/track-event": {
668
+ parameters: {
669
+ query?: never;
670
+ header?: never;
671
+ path?: never;
672
+ cookie?: never;
673
+ };
674
+ get?: never;
675
+ put?: never;
676
+ /** @description Track event for a website */
677
+ post: {
678
+ parameters: {
679
+ query?: {
680
+ /** @description If true, use code-based tracking */
681
+ code?: boolean;
682
+ };
683
+ header?: never;
684
+ path: {
685
+ /** @description Website UUID */
686
+ id: string;
687
+ };
688
+ cookie?: never;
689
+ };
690
+ requestBody: {
691
+ content: {
692
+ "application/json": {
693
+ /** @description Array of site IDs */
694
+ site_ids?: number[];
695
+ event: {
696
+ /**
697
+ * @description The event category.
698
+ * @example Category 1
699
+ */
700
+ category: string;
701
+ /**
702
+ * @description The event action.
703
+ * @example Action 1
704
+ */
705
+ action: string;
706
+ /**
707
+ * @description The event name.
708
+ * @example Event 1
709
+ */
710
+ name?: string;
711
+ /**
712
+ * @description The event value. Must be a float or integer value (numeric), not a string.
713
+ * @example 1
714
+ */
715
+ value?: number;
716
+ };
717
+ metadata?: {
718
+ /** @description The user agent of the user */
719
+ userAgent?: string;
720
+ /** @description The referrer of the user */
721
+ referrer?: string;
722
+ /** @description The language of the user */
723
+ language?: string;
724
+ /** @description The resolution of the device */
725
+ screenResolution?: string;
726
+ /** @description The user ID of the user, User ID is any non-empty unique string identifying the user (such as an email address or a username). */
727
+ userId?: string;
728
+ };
729
+ };
730
+ };
731
+ };
732
+ responses: {
733
+ /** @description Default Response */
734
+ 200: {
735
+ headers: {
736
+ [name: string]: unknown;
737
+ };
738
+ content: {
739
+ "application/json": {
740
+ data: unknown;
741
+ };
742
+ };
743
+ };
744
+ /** @description Default Response */
745
+ 500: {
746
+ headers: {
747
+ [name: string]: unknown;
748
+ };
749
+ content: {
750
+ "application/json": {
751
+ /** @description Code used to categorize the error */
752
+ code: string;
753
+ /** @description Description of the error */
754
+ detail: string;
755
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
756
+ requestId: string;
757
+ /** @description Name of the error type */
758
+ name: string;
759
+ /** @description List of the validation errors */
760
+ validation?: {
761
+ fieldName: string;
762
+ message: string;
763
+ }[];
764
+ validationContext?: string;
765
+ };
766
+ };
767
+ };
768
+ };
769
+ };
770
+ delete?: never;
771
+ options?: never;
772
+ head?: never;
773
+ patch?: never;
774
+ trace?: never;
775
+ };
776
+ "/api/v1/websites/{id}/track-page-view": {
777
+ parameters: {
778
+ query?: never;
779
+ header?: never;
780
+ path?: never;
781
+ cookie?: never;
782
+ };
783
+ get?: never;
784
+ put?: never;
785
+ /** @description Track page view for a website */
786
+ post: {
787
+ parameters: {
788
+ query?: {
789
+ /** @description If true, use code-based tracking */
790
+ code?: boolean;
791
+ };
792
+ header?: never;
793
+ path: {
794
+ /** @description Website UUID */
795
+ id: string;
796
+ };
797
+ cookie?: never;
798
+ };
799
+ requestBody: {
800
+ content: {
801
+ "application/json": {
802
+ /** @description Array of site IDs */
803
+ site_ids?: number[];
804
+ event: {
805
+ /** @description Custom title for the page view, overrides the default title of the page. */
806
+ action_name: string;
807
+ };
808
+ metadata?: {
809
+ /** @description The user agent of the user */
810
+ userAgent?: string;
811
+ /** @description The referrer of the user */
812
+ referrer?: string;
813
+ /** @description The language of the user */
814
+ language?: string;
815
+ /** @description The resolution of the device */
816
+ screenResolution?: string;
817
+ /** @description The user ID of the user, User ID is any non-empty unique string identifying the user (such as an email address or a username). */
818
+ userId?: string;
819
+ };
820
+ };
821
+ };
822
+ };
823
+ responses: {
824
+ /** @description Default Response */
825
+ 200: {
826
+ headers: {
827
+ [name: string]: unknown;
828
+ };
829
+ content: {
830
+ "application/json": {
831
+ data: unknown;
832
+ };
833
+ };
834
+ };
835
+ /** @description Default Response */
836
+ 500: {
837
+ headers: {
838
+ [name: string]: unknown;
839
+ };
840
+ content: {
841
+ "application/json": {
842
+ /** @description Code used to categorize the error */
843
+ code: string;
844
+ /** @description Description of the error */
845
+ detail: string;
846
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
847
+ requestId: string;
848
+ /** @description Name of the error type */
849
+ name: string;
850
+ /** @description List of the validation errors */
851
+ validation?: {
852
+ fieldName: string;
853
+ message: string;
854
+ }[];
855
+ validationContext?: string;
856
+ };
857
+ };
858
+ };
859
+ };
860
+ };
861
+ delete?: never;
862
+ options?: never;
863
+ head?: never;
864
+ patch?: never;
865
+ trace?: never;
866
+ };
867
+ "/api/v1/websites/{id}/track-search": {
868
+ parameters: {
869
+ query?: never;
870
+ header?: never;
871
+ path?: never;
872
+ cookie?: never;
873
+ };
874
+ get?: never;
875
+ put?: never;
876
+ /** @description Track search for a website */
877
+ post: {
878
+ parameters: {
879
+ query?: {
880
+ /** @description If true, use code-based tracking */
881
+ code?: boolean;
882
+ };
883
+ header?: never;
884
+ path: {
885
+ /** @description Website UUID */
886
+ id: string;
887
+ };
888
+ cookie?: never;
889
+ };
890
+ requestBody: {
891
+ content: {
892
+ "application/json": {
893
+ /** @description Array of site IDs */
894
+ site_ids?: number[];
895
+ event: {
896
+ /** @description The search keyword,When specified, the request will not be tracked as a normal pageview but will instead be tracked as a Site Search request. */
897
+ search_keyword: string;
898
+ /** @description when search is specified, you can optionally specify a search category with this parameter. */
899
+ search_category?: string;
900
+ /** @description when search is specified, we also recommend setting the search_count to the number of search results displayed on the results page. When keywords are tracked with &search_count=0 they will appear in the 'No Result Search Keyword' report. */
901
+ search_count?: number;
902
+ };
903
+ metadata?: {
904
+ /** @description The user agent of the user */
905
+ userAgent?: string;
906
+ /** @description The referrer of the user */
907
+ referrer?: string;
908
+ /** @description The language of the user */
909
+ language?: string;
910
+ /** @description The resolution of the device */
911
+ screenResolution?: string;
912
+ /** @description The user ID of the user, User ID is any non-empty unique string identifying the user (such as an email address or a username). */
913
+ userId?: string;
914
+ };
915
+ };
916
+ };
917
+ };
918
+ responses: {
919
+ /** @description Default Response */
920
+ 200: {
921
+ headers: {
922
+ [name: string]: unknown;
923
+ };
924
+ content: {
925
+ "application/json": {
926
+ data: unknown;
927
+ };
928
+ };
929
+ };
930
+ /** @description Default Response */
931
+ 500: {
932
+ headers: {
933
+ [name: string]: unknown;
934
+ };
935
+ content: {
936
+ "application/json": {
937
+ /** @description Code used to categorize the error */
938
+ code: string;
939
+ /** @description Description of the error */
940
+ detail: string;
941
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
942
+ requestId: string;
943
+ /** @description Name of the error type */
944
+ name: string;
945
+ /** @description List of the validation errors */
946
+ validation?: {
947
+ fieldName: string;
948
+ message: string;
949
+ }[];
950
+ validationContext?: string;
951
+ };
952
+ };
953
+ };
954
+ };
955
+ };
956
+ delete?: never;
957
+ options?: never;
958
+ head?: never;
959
+ patch?: never;
960
+ trace?: never;
961
+ };
962
+ "/api/v1/websites/{id}/track-out-link": {
963
+ parameters: {
964
+ query?: never;
965
+ header?: never;
966
+ path?: never;
967
+ cookie?: never;
968
+ };
969
+ get?: never;
970
+ put?: never;
971
+ /** @description Track outgoing link */
972
+ post: {
973
+ parameters: {
974
+ query?: {
975
+ /** @description If true, use code-based tracking */
976
+ code?: boolean;
977
+ };
978
+ header?: never;
979
+ path: {
980
+ /** @description Website UUID */
981
+ id: string;
982
+ };
983
+ cookie?: never;
984
+ };
985
+ requestBody: {
986
+ content: {
987
+ "application/json": {
988
+ /** @description Array of site IDs */
989
+ site_ids?: number[];
990
+ event: {
991
+ /** @description An external URL the user has opened. Used for tracking outlink clicks. */
992
+ link: string;
993
+ /**
994
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
995
+ * @example {
996
+ * "dimension1": "value1",
997
+ * "dimension2": "value2"
998
+ * }
999
+ */
1000
+ dimensions?: {
1001
+ [key: string]: string;
1002
+ };
1003
+ };
1004
+ metadata?: {
1005
+ /** @description The user agent of the user */
1006
+ userAgent?: string;
1007
+ /** @description The referrer of the user */
1008
+ referrer?: string;
1009
+ /** @description The language of the user */
1010
+ language?: string;
1011
+ /** @description The resolution of the device */
1012
+ screenResolution?: string;
1013
+ /** @description The user ID of the user, User ID is any non-empty unique string identifying the user (such as an email address or a username). */
1014
+ userId?: string;
1015
+ };
1016
+ };
1017
+ };
1018
+ };
1019
+ responses: {
1020
+ /** @description Default Response */
1021
+ 200: {
1022
+ headers: {
1023
+ [name: string]: unknown;
1024
+ };
1025
+ content: {
1026
+ "application/json": {
1027
+ data: unknown;
1028
+ };
1029
+ };
1030
+ };
1031
+ /** @description Default Response */
1032
+ 500: {
1033
+ headers: {
1034
+ [name: string]: unknown;
1035
+ };
1036
+ content: {
1037
+ "application/json": {
1038
+ /** @description Code used to categorize the error */
1039
+ code: string;
1040
+ /** @description Description of the error */
1041
+ detail: string;
1042
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
1043
+ requestId: string;
1044
+ /** @description Name of the error type */
1045
+ name: string;
1046
+ /** @description List of the validation errors */
1047
+ validation?: {
1048
+ fieldName: string;
1049
+ message: string;
1050
+ }[];
1051
+ validationContext?: string;
1052
+ };
1053
+ };
1054
+ };
1055
+ };
1056
+ };
1057
+ delete?: never;
1058
+ options?: never;
1059
+ head?: never;
1060
+ patch?: never;
1061
+ trace?: never;
1062
+ };
1063
+ "/api/health/": {
1064
+ parameters: {
1065
+ query?: never;
1066
+ header?: never;
1067
+ path?: never;
1068
+ cookie?: never;
1069
+ };
1070
+ /** @description Check the health of the API */
1071
+ get: {
1072
+ parameters: {
1073
+ query?: never;
1074
+ header?: never;
1075
+ path?: never;
1076
+ cookie?: never;
1077
+ };
1078
+ requestBody?: never;
1079
+ responses: {
1080
+ /** @description Default Response */
1081
+ 200: {
1082
+ headers: {
1083
+ [name: string]: unknown;
1084
+ };
1085
+ content: {
1086
+ "application/json": {
1087
+ data: {
1088
+ status: string;
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ };
1094
+ };
1095
+ put?: never;
1096
+ post?: never;
1097
+ delete?: never;
1098
+ options?: never;
1099
+ head?: never;
1100
+ patch?: never;
1101
+ trace?: never;
1102
+ };
1103
+ "/api/health/db": {
1104
+ parameters: {
1105
+ query?: never;
1106
+ header?: never;
1107
+ path?: never;
1108
+ cookie?: never;
1109
+ };
1110
+ /** @description Check the database connection */
1111
+ get: {
1112
+ parameters: {
1113
+ query?: never;
1114
+ header?: never;
1115
+ path?: never;
1116
+ cookie?: never;
1117
+ };
1118
+ requestBody?: never;
1119
+ responses: {
1120
+ /** @description Default Response */
1121
+ 200: {
1122
+ headers: {
1123
+ [name: string]: unknown;
1124
+ };
1125
+ content: {
1126
+ "application/json": {
1127
+ data: {
1128
+ status: string;
1129
+ };
1130
+ };
1131
+ };
1132
+ };
1133
+ };
1134
+ };
1135
+ put?: never;
1136
+ post?: never;
1137
+ delete?: never;
1138
+ options?: never;
1139
+ head?: never;
1140
+ patch?: never;
1141
+ trace?: never;
1142
+ };
1143
+ "/api/v1/auth/token": {
1144
+ parameters: {
1145
+ query?: never;
1146
+ header?: never;
1147
+ path?: never;
1148
+ cookie?: never;
1149
+ };
1150
+ get?: never;
1151
+ put?: never;
1152
+ /** @description Generate an access token using oauth2 client credentials flow */
1153
+ post: {
1154
+ parameters: {
1155
+ query?: never;
1156
+ header?: never;
1157
+ path?: never;
1158
+ cookie?: never;
1159
+ };
1160
+ requestBody: {
1161
+ content: {
1162
+ "application/json": {
1163
+ /** @description The organization ID */
1164
+ organizationId: string;
1165
+ /** @description The application ID */
1166
+ applicationId: string;
1167
+ /** @description The application secret */
1168
+ applicationSecret: string;
1169
+ /**
1170
+ * @description The scopes to generate the token for
1171
+ * @example [
1172
+ * "analytics:website:read",
1173
+ * "analytics:website:write",
1174
+ * "analytics:website:tracking"
1175
+ * ]
1176
+ */
1177
+ scopes: string[];
1178
+ /** @description The Logto OIDC endpoint */
1179
+ logtoOidcEndpoint: string;
1180
+ };
1181
+ };
1182
+ };
1183
+ responses: {
1184
+ /** @description Default Response */
1185
+ 200: {
1186
+ headers: {
1187
+ [name: string]: unknown;
1188
+ };
1189
+ content: {
1190
+ "application/json": {
1191
+ accessToken: string;
1192
+ };
1193
+ };
1194
+ };
1195
+ /** @description Default Response */
1196
+ 400: {
1197
+ headers: {
1198
+ [name: string]: unknown;
1199
+ };
1200
+ content: {
1201
+ "application/json": {
1202
+ /** @description Code used to categorize the error */
1203
+ code: string;
1204
+ /** @description Description of the error */
1205
+ detail: string;
1206
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
1207
+ requestId: string;
1208
+ /** @description Name of the error type */
1209
+ name: string;
1210
+ /** @description List of the validation errors */
1211
+ validation?: {
1212
+ fieldName: string;
1213
+ message: string;
1214
+ }[];
1215
+ validationContext?: string;
1216
+ };
1217
+ };
1218
+ };
1219
+ /** @description Default Response */
1220
+ 500: {
1221
+ headers: {
1222
+ [name: string]: unknown;
1223
+ };
1224
+ content: {
1225
+ "application/json": {
1226
+ /** @description Code used to categorize the error */
1227
+ code: string;
1228
+ /** @description Description of the error */
1229
+ detail: string;
1230
+ /** @description Unique request id. This one will be used to troubleshoot the problems */
1231
+ requestId: string;
1232
+ /** @description Name of the error type */
1233
+ name: string;
1234
+ /** @description List of the validation errors */
1235
+ validation?: {
1236
+ fieldName: string;
1237
+ message: string;
1238
+ }[];
1239
+ validationContext?: string;
1240
+ };
1241
+ };
1242
+ };
1243
+ };
1244
+ };
1245
+ delete?: never;
1246
+ options?: never;
1247
+ head?: never;
1248
+ patch?: never;
1249
+ trace?: never;
1250
+ };
1251
+ "/openapi.json": {
1252
+ parameters: {
1253
+ query?: never;
1254
+ header?: never;
1255
+ path?: never;
1256
+ cookie?: never;
1257
+ };
1258
+ get: {
1259
+ parameters: {
1260
+ query?: never;
1261
+ header?: never;
1262
+ path?: never;
1263
+ cookie?: never;
1264
+ };
1265
+ requestBody?: never;
1266
+ responses: {
1267
+ /** @description Default Response */
1268
+ 200: {
1269
+ headers: {
1270
+ [name: string]: unknown;
1271
+ };
1272
+ content?: never;
1273
+ };
1274
+ };
1275
+ };
1276
+ put?: never;
1277
+ post?: never;
1278
+ delete?: never;
1279
+ options?: never;
1280
+ head?: never;
1281
+ patch?: never;
1282
+ trace?: never;
1283
+ };
1284
+ }
1285
+ export type webhooks = Record<string, never>;
1286
+ export interface components {
1287
+ schemas: never;
1288
+ responses: never;
1289
+ parameters: never;
1290
+ requestBodies: never;
1291
+ headers: never;
1292
+ pathItems: never;
1293
+ }
1294
+ export type $defs = Record<string, never>;
1295
+ export type operations = Record<string, never>;