@ogcio/analytics-sdk 0.0.1-beta.2 → 0.0.1-beta.3

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 (50) hide show
  1. package/dist/base/base-client.d.ts +2 -7
  2. package/dist/base/base-client.d.ts.map +1 -1
  3. package/dist/base/base-client.js +3 -15
  4. package/dist/base/base-client.js.map +1 -0
  5. package/{types.d.ts → dist/browser-types.d.ts} +1 -1
  6. package/dist/index.d.ts +397 -1138
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +311 -254
  9. package/dist/index.js.map +1 -0
  10. package/dist/matomo/helpers.d.ts +8 -1
  11. package/dist/matomo/helpers.d.ts.map +1 -1
  12. package/dist/matomo/helpers.js +2 -1
  13. package/dist/matomo/helpers.js.map +1 -0
  14. package/dist/matomo/types.d.ts +2 -1
  15. package/dist/matomo/types.d.ts.map +1 -1
  16. package/dist/matomo/types.js +1 -0
  17. package/dist/matomo/types.js.map +1 -0
  18. package/dist/schema.d.ts +84 -444
  19. package/dist/schema.d.ts.map +1 -1
  20. package/dist/schema.js +1 -0
  21. package/dist/schema.js.map +1 -0
  22. package/dist/support-files/auth/index.js +1 -0
  23. package/dist/support-files/auth/index.js.map +1 -0
  24. package/dist/support-files/auth/types.d.ts +1 -1
  25. package/dist/support-files/auth/types.d.ts.map +1 -1
  26. package/dist/support-files/auth/types.js +1 -0
  27. package/dist/support-files/auth/types.js.map +1 -0
  28. package/dist/support-files/building-blocks-sdk.d.ts +1 -1
  29. package/dist/support-files/building-blocks-sdk.d.ts.map +1 -1
  30. package/dist/support-files/building-blocks-sdk.js +1 -0
  31. package/dist/support-files/building-blocks-sdk.js.map +1 -0
  32. package/dist/utils/index.js +1 -0
  33. package/dist/utils/index.js.map +1 -0
  34. package/package.json +19 -11
  35. package/examples/environment.d.ts +0 -11
  36. package/examples/index.ts +0 -201
  37. package/examples/tsconfig.json +0 -15
  38. package/src/base/base-client.ts +0 -172
  39. package/src/index.test.ts +0 -92
  40. package/src/index.ts +0 -543
  41. package/src/matomo/helpers.ts +0 -115
  42. package/src/matomo/types.ts +0 -64
  43. package/src/schema.ts +0 -1491
  44. package/src/support-files/auth/index.ts +0 -116
  45. package/src/support-files/auth/types.ts +0 -38
  46. package/src/support-files/building-blocks-sdk.ts +0 -32
  47. package/src/utils/index.test.ts +0 -46
  48. package/src/utils/index.ts +0 -20
  49. package/test-report.xml +0 -181
  50. package/tsconfig.json +0 -18
package/dist/schema.d.ts CHANGED
@@ -69,30 +69,6 @@ export interface paths {
69
69
  };
70
70
  };
71
71
  };
72
- /** @description Default Response */
73
- 500: {
74
- headers: {
75
- [name: string]: unknown;
76
- };
77
- content: {
78
- "application/json": {
79
- /** @description Code used to categorize the error */
80
- code: string;
81
- /** @description Description of the error */
82
- detail: string;
83
- /** @description Unique request id. This one will be used to troubleshoot the problems */
84
- requestId: string;
85
- /** @description Name of the error type */
86
- name: string;
87
- /** @description List of the validation errors */
88
- validation?: {
89
- fieldName: string;
90
- message: string;
91
- }[];
92
- validationContext?: string;
93
- };
94
- };
95
- };
96
72
  };
97
73
  };
98
74
  put?: never;
@@ -193,78 +169,6 @@ export interface paths {
193
169
  };
194
170
  };
195
171
  };
196
- /** @description Default Response */
197
- 400: {
198
- headers: {
199
- [name: string]: unknown;
200
- };
201
- content: {
202
- "application/json": {
203
- /** @description Code used to categorize the error */
204
- code: string;
205
- /** @description Description of the error */
206
- detail: string;
207
- /** @description Unique request id. This one will be used to troubleshoot the problems */
208
- requestId: string;
209
- /** @description Name of the error type */
210
- name: string;
211
- /** @description List of the validation errors */
212
- validation?: {
213
- fieldName: string;
214
- message: string;
215
- }[];
216
- validationContext?: string;
217
- };
218
- };
219
- };
220
- /** @description Default Response */
221
- 422: {
222
- headers: {
223
- [name: string]: unknown;
224
- };
225
- content: {
226
- "application/json": {
227
- /** @description Code used to categorize the error */
228
- code: string;
229
- /** @description Description of the error */
230
- detail: string;
231
- /** @description Unique request id. This one will be used to troubleshoot the problems */
232
- requestId: string;
233
- /** @description Name of the error type */
234
- name: string;
235
- /** @description List of the validation errors */
236
- validation?: {
237
- fieldName: string;
238
- message: string;
239
- }[];
240
- validationContext?: string;
241
- };
242
- };
243
- };
244
- /** @description Default Response */
245
- 500: {
246
- headers: {
247
- [name: string]: unknown;
248
- };
249
- content: {
250
- "application/json": {
251
- /** @description Code used to categorize the error */
252
- code: string;
253
- /** @description Description of the error */
254
- detail: string;
255
- /** @description Unique request id. This one will be used to troubleshoot the problems */
256
- requestId: string;
257
- /** @description Name of the error type */
258
- name: string;
259
- /** @description List of the validation errors */
260
- validation?: {
261
- fieldName: string;
262
- message: string;
263
- }[];
264
- validationContext?: string;
265
- };
266
- };
267
- };
268
172
  };
269
173
  };
270
174
  delete?: never;
@@ -345,54 +249,6 @@ export interface paths {
345
249
  };
346
250
  };
347
251
  };
348
- /** @description Default Response */
349
- 404: {
350
- headers: {
351
- [name: string]: unknown;
352
- };
353
- content: {
354
- "application/json": {
355
- /** @description Code used to categorize the error */
356
- code: string;
357
- /** @description Description of the error */
358
- detail: string;
359
- /** @description Unique request id. This one will be used to troubleshoot the problems */
360
- requestId: string;
361
- /** @description Name of the error type */
362
- name: string;
363
- /** @description List of the validation errors */
364
- validation?: {
365
- fieldName: string;
366
- message: string;
367
- }[];
368
- validationContext?: string;
369
- };
370
- };
371
- };
372
- /** @description Default Response */
373
- 500: {
374
- headers: {
375
- [name: string]: unknown;
376
- };
377
- content: {
378
- "application/json": {
379
- /** @description Code used to categorize the error */
380
- code: string;
381
- /** @description Description of the error */
382
- detail: string;
383
- /** @description Unique request id. This one will be used to troubleshoot the problems */
384
- requestId: string;
385
- /** @description Name of the error type */
386
- name: string;
387
- /** @description List of the validation errors */
388
- validation?: {
389
- fieldName: string;
390
- message: string;
391
- }[];
392
- validationContext?: string;
393
- };
394
- };
395
- };
396
252
  };
397
253
  };
398
254
  put?: never;
@@ -500,54 +356,6 @@ export interface paths {
500
356
  };
501
357
  };
502
358
  };
503
- /** @description Default Response */
504
- 404: {
505
- headers: {
506
- [name: string]: unknown;
507
- };
508
- content: {
509
- "application/json": {
510
- /** @description Code used to categorize the error */
511
- code: string;
512
- /** @description Description of the error */
513
- detail: string;
514
- /** @description Unique request id. This one will be used to troubleshoot the problems */
515
- requestId: string;
516
- /** @description Name of the error type */
517
- name: string;
518
- /** @description List of the validation errors */
519
- validation?: {
520
- fieldName: string;
521
- message: string;
522
- }[];
523
- validationContext?: string;
524
- };
525
- };
526
- };
527
- /** @description Default Response */
528
- 500: {
529
- headers: {
530
- [name: string]: unknown;
531
- };
532
- content: {
533
- "application/json": {
534
- /** @description Code used to categorize the error */
535
- code: string;
536
- /** @description Description of the error */
537
- detail: string;
538
- /** @description Unique request id. This one will be used to troubleshoot the problems */
539
- requestId: string;
540
- /** @description Name of the error type */
541
- name: string;
542
- /** @description List of the validation errors */
543
- validation?: {
544
- fieldName: string;
545
- message: string;
546
- }[];
547
- validationContext?: string;
548
- };
549
- };
550
- };
551
359
  };
552
360
  };
553
361
  trace?: never;
@@ -605,54 +413,6 @@ export interface paths {
605
413
  };
606
414
  };
607
415
  };
608
- /** @description Default Response */
609
- 404: {
610
- headers: {
611
- [name: string]: unknown;
612
- };
613
- content: {
614
- "application/json": {
615
- /** @description Code used to categorize the error */
616
- code: string;
617
- /** @description Description of the error */
618
- detail: string;
619
- /** @description Unique request id. This one will be used to troubleshoot the problems */
620
- requestId: string;
621
- /** @description Name of the error type */
622
- name: string;
623
- /** @description List of the validation errors */
624
- validation?: {
625
- fieldName: string;
626
- message: string;
627
- }[];
628
- validationContext?: string;
629
- };
630
- };
631
- };
632
- /** @description Default Response */
633
- 500: {
634
- headers: {
635
- [name: string]: unknown;
636
- };
637
- content: {
638
- "application/json": {
639
- /** @description Code used to categorize the error */
640
- code: string;
641
- /** @description Description of the error */
642
- detail: string;
643
- /** @description Unique request id. This one will be used to troubleshoot the problems */
644
- requestId: string;
645
- /** @description Name of the error type */
646
- name: string;
647
- /** @description List of the validation errors */
648
- validation?: {
649
- fieldName: string;
650
- message: string;
651
- }[];
652
- validationContext?: string;
653
- };
654
- };
655
- };
656
416
  };
657
417
  };
658
418
  put?: never;
@@ -689,8 +449,6 @@ export interface paths {
689
449
  requestBody: {
690
450
  content: {
691
451
  "application/json": {
692
- /** @description Array of site IDs */
693
- site_ids?: number[];
694
452
  event: {
695
453
  /**
696
454
  * @description The event category.
@@ -724,9 +482,23 @@ export interface paths {
724
482
  language?: string;
725
483
  /** @description The resolution of the device */
726
484
  screenResolution?: string;
485
+ };
486
+ contextOverride?: {
727
487
  /** @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). */
728
488
  userId?: string;
489
+ /**
490
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
491
+ * @example {
492
+ * "dimension1": "value1",
493
+ * "dimension2": "value2"
494
+ * }
495
+ */
496
+ customDimensions?: {
497
+ [key: string]: string;
498
+ };
729
499
  };
500
+ /** @description Array of site IDs, if not provided, the tracking will be applied to all the website's site_ids */
501
+ site_ids?: number[];
730
502
  };
731
503
  };
732
504
  };
@@ -742,30 +514,6 @@ export interface paths {
742
514
  };
743
515
  };
744
516
  };
745
- /** @description Default Response */
746
- 500: {
747
- headers: {
748
- [name: string]: unknown;
749
- };
750
- content: {
751
- "application/json": {
752
- /** @description Code used to categorize the error */
753
- code: string;
754
- /** @description Description of the error */
755
- detail: string;
756
- /** @description Unique request id. This one will be used to troubleshoot the problems */
757
- requestId: string;
758
- /** @description Name of the error type */
759
- name: string;
760
- /** @description List of the validation errors */
761
- validation?: {
762
- fieldName: string;
763
- message: string;
764
- }[];
765
- validationContext?: string;
766
- };
767
- };
768
- };
769
517
  };
770
518
  };
771
519
  delete?: never;
@@ -800,8 +548,6 @@ export interface paths {
800
548
  requestBody: {
801
549
  content: {
802
550
  "application/json": {
803
- /** @description Array of site IDs */
804
- site_ids?: number[];
805
551
  event: {
806
552
  /** @description Custom title for the page view, overrides the default title of the page. */
807
553
  action_name: string;
@@ -817,9 +563,23 @@ export interface paths {
817
563
  language?: string;
818
564
  /** @description The resolution of the device */
819
565
  screenResolution?: string;
566
+ };
567
+ contextOverride?: {
820
568
  /** @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). */
821
569
  userId?: string;
570
+ /**
571
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
572
+ * @example {
573
+ * "dimension1": "value1",
574
+ * "dimension2": "value2"
575
+ * }
576
+ */
577
+ customDimensions?: {
578
+ [key: string]: string;
579
+ };
822
580
  };
581
+ /** @description Array of site IDs, if not provided, the tracking will be applied to all the website's site_ids */
582
+ site_ids?: number[];
823
583
  };
824
584
  };
825
585
  };
@@ -835,30 +595,6 @@ export interface paths {
835
595
  };
836
596
  };
837
597
  };
838
- /** @description Default Response */
839
- 500: {
840
- headers: {
841
- [name: string]: unknown;
842
- };
843
- content: {
844
- "application/json": {
845
- /** @description Code used to categorize the error */
846
- code: string;
847
- /** @description Description of the error */
848
- detail: string;
849
- /** @description Unique request id. This one will be used to troubleshoot the problems */
850
- requestId: string;
851
- /** @description Name of the error type */
852
- name: string;
853
- /** @description List of the validation errors */
854
- validation?: {
855
- fieldName: string;
856
- message: string;
857
- }[];
858
- validationContext?: string;
859
- };
860
- };
861
- };
862
598
  };
863
599
  };
864
600
  delete?: never;
@@ -893,8 +629,6 @@ export interface paths {
893
629
  requestBody: {
894
630
  content: {
895
631
  "application/json": {
896
- /** @description Array of site IDs */
897
- site_ids?: number[];
898
632
  event: {
899
633
  /** @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. */
900
634
  search_keyword: string;
@@ -914,9 +648,23 @@ export interface paths {
914
648
  language?: string;
915
649
  /** @description The resolution of the device */
916
650
  screenResolution?: string;
651
+ };
652
+ contextOverride?: {
917
653
  /** @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). */
918
654
  userId?: string;
655
+ /**
656
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
657
+ * @example {
658
+ * "dimension1": "value1",
659
+ * "dimension2": "value2"
660
+ * }
661
+ */
662
+ customDimensions?: {
663
+ [key: string]: string;
664
+ };
919
665
  };
666
+ /** @description Array of site IDs, if not provided, the tracking will be applied to all the website's site_ids */
667
+ site_ids?: number[];
920
668
  };
921
669
  };
922
670
  };
@@ -932,30 +680,6 @@ export interface paths {
932
680
  };
933
681
  };
934
682
  };
935
- /** @description Default Response */
936
- 500: {
937
- headers: {
938
- [name: string]: unknown;
939
- };
940
- content: {
941
- "application/json": {
942
- /** @description Code used to categorize the error */
943
- code: string;
944
- /** @description Description of the error */
945
- detail: string;
946
- /** @description Unique request id. This one will be used to troubleshoot the problems */
947
- requestId: string;
948
- /** @description Name of the error type */
949
- name: string;
950
- /** @description List of the validation errors */
951
- validation?: {
952
- fieldName: string;
953
- message: string;
954
- }[];
955
- validationContext?: string;
956
- };
957
- };
958
- };
959
683
  };
960
684
  };
961
685
  delete?: never;
@@ -990,8 +714,6 @@ export interface paths {
990
714
  requestBody: {
991
715
  content: {
992
716
  "application/json": {
993
- /** @description Array of site IDs */
994
- site_ids?: number[];
995
717
  event: {
996
718
  /** @description The type of the link - either 'link' for outgoing links or 'download' for downloads */
997
719
  linkType: "link" | "download";
@@ -1009,9 +731,23 @@ export interface paths {
1009
731
  language?: string;
1010
732
  /** @description The resolution of the device */
1011
733
  screenResolution?: string;
734
+ };
735
+ contextOverride?: {
1012
736
  /** @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). */
1013
737
  userId?: string;
738
+ /**
739
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
740
+ * @example {
741
+ * "dimension1": "value1",
742
+ * "dimension2": "value2"
743
+ * }
744
+ */
745
+ customDimensions?: {
746
+ [key: string]: string;
747
+ };
1014
748
  };
749
+ /** @description Array of site IDs, if not provided, the tracking will be applied to all the website's site_ids */
750
+ site_ids?: number[];
1015
751
  };
1016
752
  };
1017
753
  };
@@ -1027,30 +763,6 @@ export interface paths {
1027
763
  };
1028
764
  };
1029
765
  };
1030
- /** @description Default Response */
1031
- 500: {
1032
- headers: {
1033
- [name: string]: unknown;
1034
- };
1035
- content: {
1036
- "application/json": {
1037
- /** @description Code used to categorize the error */
1038
- code: string;
1039
- /** @description Description of the error */
1040
- detail: string;
1041
- /** @description Unique request id. This one will be used to troubleshoot the problems */
1042
- requestId: string;
1043
- /** @description Name of the error type */
1044
- name: string;
1045
- /** @description List of the validation errors */
1046
- validation?: {
1047
- fieldName: string;
1048
- message: string;
1049
- }[];
1050
- validationContext?: string;
1051
- };
1052
- };
1053
- };
1054
766
  };
1055
767
  };
1056
768
  delete?: never;
@@ -1085,8 +797,6 @@ export interface paths {
1085
797
  requestBody: {
1086
798
  content: {
1087
799
  "application/json": {
1088
- /** @description Array of site IDs */
1089
- site_ids?: number[];
1090
800
  event: {
1091
801
  /** @description The name of the content block */
1092
802
  content_name: string;
@@ -1106,9 +816,23 @@ export interface paths {
1106
816
  language?: string;
1107
817
  /** @description The resolution of the device */
1108
818
  screenResolution?: string;
819
+ };
820
+ contextOverride?: {
1109
821
  /** @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). */
1110
822
  userId?: string;
823
+ /**
824
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
825
+ * @example {
826
+ * "dimension1": "value1",
827
+ * "dimension2": "value2"
828
+ * }
829
+ */
830
+ customDimensions?: {
831
+ [key: string]: string;
832
+ };
1111
833
  };
834
+ /** @description Array of site IDs, if not provided, the tracking will be applied to all the website's site_ids */
835
+ site_ids?: number[];
1112
836
  };
1113
837
  };
1114
838
  };
@@ -1124,30 +848,6 @@ export interface paths {
1124
848
  };
1125
849
  };
1126
850
  };
1127
- /** @description Default Response */
1128
- 500: {
1129
- headers: {
1130
- [name: string]: unknown;
1131
- };
1132
- content: {
1133
- "application/json": {
1134
- /** @description Code used to categorize the error */
1135
- code: string;
1136
- /** @description Description of the error */
1137
- detail: string;
1138
- /** @description Unique request id. This one will be used to troubleshoot the problems */
1139
- requestId: string;
1140
- /** @description Name of the error type */
1141
- name: string;
1142
- /** @description List of the validation errors */
1143
- validation?: {
1144
- fieldName: string;
1145
- message: string;
1146
- }[];
1147
- validationContext?: string;
1148
- };
1149
- };
1150
- };
1151
851
  };
1152
852
  };
1153
853
  delete?: never;
@@ -1182,8 +882,6 @@ export interface paths {
1182
882
  requestBody: {
1183
883
  content: {
1184
884
  "application/json": {
1185
- /** @description Array of site IDs */
1186
- site_ids?: number[];
1187
885
  event: {
1188
886
  /** @description The name of the content block */
1189
887
  content_name: string;
@@ -1205,9 +903,23 @@ export interface paths {
1205
903
  language?: string;
1206
904
  /** @description The resolution of the device */
1207
905
  screenResolution?: string;
906
+ };
907
+ contextOverride?: {
1208
908
  /** @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). */
1209
909
  userId?: string;
910
+ /**
911
+ * @description Custom dimensions example: { 'dimension1': 'value1', 'dimension2': 'value2' }
912
+ * @example {
913
+ * "dimension1": "value1",
914
+ * "dimension2": "value2"
915
+ * }
916
+ */
917
+ customDimensions?: {
918
+ [key: string]: string;
919
+ };
1210
920
  };
921
+ /** @description Array of site IDs, if not provided, the tracking will be applied to all the website's site_ids */
922
+ site_ids?: number[];
1211
923
  };
1212
924
  };
1213
925
  };
@@ -1223,30 +935,6 @@ export interface paths {
1223
935
  };
1224
936
  };
1225
937
  };
1226
- /** @description Default Response */
1227
- 500: {
1228
- headers: {
1229
- [name: string]: unknown;
1230
- };
1231
- content: {
1232
- "application/json": {
1233
- /** @description Code used to categorize the error */
1234
- code: string;
1235
- /** @description Description of the error */
1236
- detail: string;
1237
- /** @description Unique request id. This one will be used to troubleshoot the problems */
1238
- requestId: string;
1239
- /** @description Name of the error type */
1240
- name: string;
1241
- /** @description List of the validation errors */
1242
- validation?: {
1243
- fieldName: string;
1244
- message: string;
1245
- }[];
1246
- validationContext?: string;
1247
- };
1248
- };
1249
- };
1250
938
  };
1251
939
  };
1252
940
  delete?: never;
@@ -1387,54 +1075,6 @@ export interface paths {
1387
1075
  };
1388
1076
  };
1389
1077
  };
1390
- /** @description Default Response */
1391
- 400: {
1392
- headers: {
1393
- [name: string]: unknown;
1394
- };
1395
- content: {
1396
- "application/json": {
1397
- /** @description Code used to categorize the error */
1398
- code: string;
1399
- /** @description Description of the error */
1400
- detail: string;
1401
- /** @description Unique request id. This one will be used to troubleshoot the problems */
1402
- requestId: string;
1403
- /** @description Name of the error type */
1404
- name: string;
1405
- /** @description List of the validation errors */
1406
- validation?: {
1407
- fieldName: string;
1408
- message: string;
1409
- }[];
1410
- validationContext?: string;
1411
- };
1412
- };
1413
- };
1414
- /** @description Default Response */
1415
- 500: {
1416
- headers: {
1417
- [name: string]: unknown;
1418
- };
1419
- content: {
1420
- "application/json": {
1421
- /** @description Code used to categorize the error */
1422
- code: string;
1423
- /** @description Description of the error */
1424
- detail: string;
1425
- /** @description Unique request id. This one will be used to troubleshoot the problems */
1426
- requestId: string;
1427
- /** @description Name of the error type */
1428
- name: string;
1429
- /** @description List of the validation errors */
1430
- validation?: {
1431
- fieldName: string;
1432
- message: string;
1433
- }[];
1434
- validationContext?: string;
1435
- };
1436
- };
1437
- };
1438
1078
  };
1439
1079
  };
1440
1080
  delete?: never;