dub 0.20.2 → 0.21.0

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 (176) hide show
  1. package/.speakeasy/gen.lock +30 -5
  2. package/.speakeasy/gen.yaml +2 -1
  3. package/README.md +45 -20
  4. package/docs/sdks/analytics/README.md +40 -20
  5. package/docs/sdks/links/README.md +26 -14
  6. package/docs/sdks/qrcodes/README.md +4 -2
  7. package/docs/sdks/tags/README.md +8 -4
  8. package/docs/sdks/workspaces/README.md +12 -6
  9. package/hooks/auth.d.ts +3 -0
  10. package/hooks/auth.d.ts.map +1 -0
  11. package/hooks/auth.js +22 -0
  12. package/hooks/auth.js.map +1 -0
  13. package/hooks/base-url.d.ts +3 -0
  14. package/hooks/base-url.d.ts.map +1 -0
  15. package/hooks/base-url.js +24 -0
  16. package/hooks/base-url.js.map +1 -0
  17. package/hooks/hooks.d.ts.map +1 -1
  18. package/hooks/hooks.js +2 -0
  19. package/hooks/hooks.js.map +1 -1
  20. package/hooks/registration.d.ts +3 -0
  21. package/hooks/registration.d.ts.map +1 -0
  22. package/hooks/registration.js +19 -0
  23. package/hooks/registration.js.map +1 -0
  24. package/lib/config.d.ts +3 -3
  25. package/lib/config.js +3 -3
  26. package/models/operations/bulkcreatelinks.d.ts +14 -0
  27. package/models/operations/bulkcreatelinks.d.ts.map +1 -1
  28. package/models/operations/bulkcreatelinks.js +23 -1
  29. package/models/operations/bulkcreatelinks.js.map +1 -1
  30. package/models/operations/createlink.d.ts +14 -0
  31. package/models/operations/createlink.d.ts.map +1 -1
  32. package/models/operations/createlink.js +23 -1
  33. package/models/operations/createlink.js.map +1 -1
  34. package/models/operations/createtag.d.ts +14 -0
  35. package/models/operations/createtag.d.ts.map +1 -1
  36. package/models/operations/createtag.js +23 -1
  37. package/models/operations/createtag.js.map +1 -1
  38. package/models/operations/createworkspace.d.ts +14 -0
  39. package/models/operations/createworkspace.d.ts.map +1 -1
  40. package/models/operations/createworkspace.js +23 -1
  41. package/models/operations/createworkspace.js.map +1 -1
  42. package/models/operations/deletelink.d.ts +14 -0
  43. package/models/operations/deletelink.d.ts.map +1 -1
  44. package/models/operations/deletelink.js +23 -1
  45. package/models/operations/deletelink.js.map +1 -1
  46. package/models/operations/editlink.d.ts +14 -0
  47. package/models/operations/editlink.d.ts.map +1 -1
  48. package/models/operations/editlink.js +23 -1
  49. package/models/operations/editlink.js.map +1 -1
  50. package/models/operations/getbrowseranalytics.d.ts +14 -0
  51. package/models/operations/getbrowseranalytics.d.ts.map +1 -1
  52. package/models/operations/getbrowseranalytics.js +23 -1
  53. package/models/operations/getbrowseranalytics.js.map +1 -1
  54. package/models/operations/getcityanalytics.d.ts +14 -0
  55. package/models/operations/getcityanalytics.d.ts.map +1 -1
  56. package/models/operations/getcityanalytics.js +23 -1
  57. package/models/operations/getcityanalytics.js.map +1 -1
  58. package/models/operations/getclicksanalytics.d.ts +14 -0
  59. package/models/operations/getclicksanalytics.d.ts.map +1 -1
  60. package/models/operations/getclicksanalytics.js +23 -1
  61. package/models/operations/getclicksanalytics.js.map +1 -1
  62. package/models/operations/getcountryanalytics.d.ts +14 -0
  63. package/models/operations/getcountryanalytics.d.ts.map +1 -1
  64. package/models/operations/getcountryanalytics.js +23 -1
  65. package/models/operations/getcountryanalytics.js.map +1 -1
  66. package/models/operations/getdeviceanalytics.d.ts +14 -0
  67. package/models/operations/getdeviceanalytics.d.ts.map +1 -1
  68. package/models/operations/getdeviceanalytics.js +23 -1
  69. package/models/operations/getdeviceanalytics.js.map +1 -1
  70. package/models/operations/getlinkinfo.d.ts +14 -3
  71. package/models/operations/getlinkinfo.d.ts.map +1 -1
  72. package/models/operations/getlinkinfo.js +23 -1
  73. package/models/operations/getlinkinfo.js.map +1 -1
  74. package/models/operations/getlinks.d.ts +14 -0
  75. package/models/operations/getlinks.d.ts.map +1 -1
  76. package/models/operations/getlinks.js +23 -1
  77. package/models/operations/getlinks.js.map +1 -1
  78. package/models/operations/getlinkscount.d.ts +14 -0
  79. package/models/operations/getlinkscount.d.ts.map +1 -1
  80. package/models/operations/getlinkscount.js +23 -1
  81. package/models/operations/getlinkscount.js.map +1 -1
  82. package/models/operations/getosanalytics.d.ts +14 -0
  83. package/models/operations/getosanalytics.d.ts.map +1 -1
  84. package/models/operations/getosanalytics.js +23 -1
  85. package/models/operations/getosanalytics.js.map +1 -1
  86. package/models/operations/getqrcode.d.ts +14 -0
  87. package/models/operations/getqrcode.d.ts.map +1 -1
  88. package/models/operations/getqrcode.js +23 -1
  89. package/models/operations/getqrcode.js.map +1 -1
  90. package/models/operations/getrefereranalytics.d.ts +14 -0
  91. package/models/operations/getrefereranalytics.d.ts.map +1 -1
  92. package/models/operations/getrefereranalytics.js +23 -1
  93. package/models/operations/getrefereranalytics.js.map +1 -1
  94. package/models/operations/gettags.d.ts +14 -0
  95. package/models/operations/gettags.d.ts.map +1 -1
  96. package/models/operations/gettags.js +23 -1
  97. package/models/operations/gettags.js.map +1 -1
  98. package/models/operations/gettimeseriesanalytics.d.ts +14 -0
  99. package/models/operations/gettimeseriesanalytics.d.ts.map +1 -1
  100. package/models/operations/gettimeseriesanalytics.js +23 -1
  101. package/models/operations/gettimeseriesanalytics.js.map +1 -1
  102. package/models/operations/gettoplinks.d.ts +14 -0
  103. package/models/operations/gettoplinks.d.ts.map +1 -1
  104. package/models/operations/gettoplinks.js +23 -1
  105. package/models/operations/gettoplinks.js.map +1 -1
  106. package/models/operations/gettopurls.d.ts +14 -0
  107. package/models/operations/gettopurls.d.ts.map +1 -1
  108. package/models/operations/gettopurls.js +23 -1
  109. package/models/operations/gettopurls.js.map +1 -1
  110. package/models/operations/getworkspace.d.ts +14 -0
  111. package/models/operations/getworkspace.d.ts.map +1 -1
  112. package/models/operations/getworkspace.js +23 -1
  113. package/models/operations/getworkspace.js.map +1 -1
  114. package/models/operations/getworkspaces.d.ts +16 -0
  115. package/models/operations/getworkspaces.d.ts.map +1 -0
  116. package/models/operations/getworkspaces.js +53 -0
  117. package/models/operations/getworkspaces.js.map +1 -0
  118. package/models/operations/index.d.ts +1 -0
  119. package/models/operations/index.d.ts.map +1 -1
  120. package/models/operations/index.js +1 -0
  121. package/models/operations/index.js.map +1 -1
  122. package/package.json +2 -1
  123. package/sdk/analytics.d.ts +10 -10
  124. package/sdk/analytics.d.ts.map +1 -1
  125. package/sdk/analytics.js +160 -138
  126. package/sdk/analytics.js.map +1 -1
  127. package/sdk/links.d.ts +7 -7
  128. package/sdk/links.d.ts.map +1 -1
  129. package/sdk/links.js +112 -111
  130. package/sdk/links.js.map +1 -1
  131. package/sdk/qrcodes.d.ts +1 -1
  132. package/sdk/qrcodes.d.ts.map +1 -1
  133. package/sdk/qrcodes.js +12 -17
  134. package/sdk/qrcodes.js.map +1 -1
  135. package/sdk/tags.d.ts +2 -2
  136. package/sdk/tags.d.ts.map +1 -1
  137. package/sdk/tags.js +32 -34
  138. package/sdk/tags.js.map +1 -1
  139. package/sdk/workspaces.d.ts +3 -3
  140. package/sdk/workspaces.d.ts.map +1 -1
  141. package/sdk/workspaces.js +36 -39
  142. package/sdk/workspaces.js.map +1 -1
  143. package/src/hooks/auth.ts +23 -0
  144. package/src/hooks/base-url.ts +24 -0
  145. package/src/hooks/hooks.ts +5 -1
  146. package/src/hooks/registration.ts +18 -0
  147. package/src/lib/config.ts +3 -3
  148. package/src/models/operations/bulkcreatelinks.ts +35 -0
  149. package/src/models/operations/createlink.ts +35 -0
  150. package/src/models/operations/createtag.ts +35 -0
  151. package/src/models/operations/createworkspace.ts +35 -0
  152. package/src/models/operations/deletelink.ts +35 -0
  153. package/src/models/operations/editlink.ts +35 -0
  154. package/src/models/operations/getbrowseranalytics.ts +35 -0
  155. package/src/models/operations/getcityanalytics.ts +35 -0
  156. package/src/models/operations/getclicksanalytics.ts +35 -0
  157. package/src/models/operations/getcountryanalytics.ts +35 -0
  158. package/src/models/operations/getdeviceanalytics.ts +35 -0
  159. package/src/models/operations/getlinkinfo.ts +35 -3
  160. package/src/models/operations/getlinks.ts +35 -0
  161. package/src/models/operations/getlinkscount.ts +35 -0
  162. package/src/models/operations/getosanalytics.ts +35 -0
  163. package/src/models/operations/getqrcode.ts +35 -0
  164. package/src/models/operations/getrefereranalytics.ts +35 -0
  165. package/src/models/operations/gettags.ts +35 -0
  166. package/src/models/operations/gettimeseriesanalytics.ts +36 -0
  167. package/src/models/operations/gettoplinks.ts +35 -0
  168. package/src/models/operations/gettopurls.ts +35 -0
  169. package/src/models/operations/getworkspace.ts +35 -0
  170. package/src/models/operations/getworkspaces.ts +40 -0
  171. package/src/models/operations/index.ts +1 -0
  172. package/src/sdk/analytics.ts +161 -108
  173. package/src/sdk/links.ts +117 -91
  174. package/src/sdk/qrcodes.ts +13 -14
  175. package/src/sdk/tags.ts +33 -28
  176. package/src/sdk/workspaces.ts +40 -31
package/sdk/analytics.js CHANGED
@@ -63,7 +63,7 @@ class Analytics extends sdks_1.ClientSDK {
63
63
  * @remarks
64
64
  * Retrieve the number of clicks for a link, a domain, or the authenticated workspace.
65
65
  */
66
- async clicks(input, options) {
66
+ async clicks(input, security, options) {
67
67
  const headers$ = new Headers();
68
68
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
69
69
  headers$.set("Accept", "application/json");
@@ -92,6 +92,10 @@ class Analytics extends sdks_1.ClientSDK {
92
92
  }),
93
93
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
94
94
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
95
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
96
+ explode: true,
97
+ charEncoding: "percent",
98
+ }),
95
99
  enc$.encodeForm("referer", payload$.referer, {
96
100
  explode: true,
97
101
  charEncoding: "percent",
@@ -105,22 +109,21 @@ class Analytics extends sdks_1.ClientSDK {
105
109
  ]
106
110
  .filter(Boolean)
107
111
  .join("&");
108
- let security$;
109
- if (typeof this.options$.token === "function") {
110
- security$ = { token: await this.options$.token() };
111
- }
112
- else if (this.options$.token) {
113
- security$ = { token: this.options$.token };
114
- }
115
- else {
116
- security$ = {};
117
- }
112
+ const security$ = [
113
+ [
114
+ {
115
+ fieldName: "Authorization",
116
+ type: "http:bearer",
117
+ value: security === null || security === void 0 ? void 0 : security.token,
118
+ },
119
+ ],
120
+ ];
121
+ const securitySettings$ = this.resolveSecurity(...security$);
118
122
  const context = {
119
123
  operationID: "getClicksAnalytics",
120
124
  oAuth2Scopes: [],
121
- securitySource: this.options$.token,
125
+ securitySource: security$,
122
126
  };
123
- const securitySettings$ = this.resolveGlobalSecurity(security$);
124
127
  const doOptions = {
125
128
  context,
126
129
  errorCodes: [
@@ -260,7 +263,7 @@ class Analytics extends sdks_1.ClientSDK {
260
263
  * @remarks
261
264
  * Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.
262
265
  */
263
- async timeseries(input, options) {
266
+ async timeseries(input, security, options) {
264
267
  const headers$ = new Headers();
265
268
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
266
269
  headers$.set("Accept", "application/json");
@@ -289,6 +292,10 @@ class Analytics extends sdks_1.ClientSDK {
289
292
  }),
290
293
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
291
294
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
295
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
296
+ explode: true,
297
+ charEncoding: "percent",
298
+ }),
292
299
  enc$.encodeForm("referer", payload$.referer, {
293
300
  explode: true,
294
301
  charEncoding: "percent",
@@ -302,22 +309,21 @@ class Analytics extends sdks_1.ClientSDK {
302
309
  ]
303
310
  .filter(Boolean)
304
311
  .join("&");
305
- let security$;
306
- if (typeof this.options$.token === "function") {
307
- security$ = { token: await this.options$.token() };
308
- }
309
- else if (this.options$.token) {
310
- security$ = { token: this.options$.token };
311
- }
312
- else {
313
- security$ = {};
314
- }
312
+ const security$ = [
313
+ [
314
+ {
315
+ fieldName: "Authorization",
316
+ type: "http:bearer",
317
+ value: security === null || security === void 0 ? void 0 : security.token,
318
+ },
319
+ ],
320
+ ];
321
+ const securitySettings$ = this.resolveSecurity(...security$);
315
322
  const context = {
316
323
  operationID: "getTimeseriesAnalytics",
317
324
  oAuth2Scopes: [],
318
- securitySource: this.options$.token,
325
+ securitySource: security$,
319
326
  };
320
- const securitySettings$ = this.resolveGlobalSecurity(security$);
321
327
  const doOptions = {
322
328
  context,
323
329
  errorCodes: [
@@ -457,7 +463,7 @@ class Analytics extends sdks_1.ClientSDK {
457
463
  * @remarks
458
464
  * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
459
465
  */
460
- async countries(input, options) {
466
+ async countries(input, security, options) {
461
467
  const headers$ = new Headers();
462
468
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
463
469
  headers$.set("Accept", "application/json");
@@ -486,6 +492,10 @@ class Analytics extends sdks_1.ClientSDK {
486
492
  }),
487
493
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
488
494
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
495
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
496
+ explode: true,
497
+ charEncoding: "percent",
498
+ }),
489
499
  enc$.encodeForm("referer", payload$.referer, {
490
500
  explode: true,
491
501
  charEncoding: "percent",
@@ -499,22 +509,21 @@ class Analytics extends sdks_1.ClientSDK {
499
509
  ]
500
510
  .filter(Boolean)
501
511
  .join("&");
502
- let security$;
503
- if (typeof this.options$.token === "function") {
504
- security$ = { token: await this.options$.token() };
505
- }
506
- else if (this.options$.token) {
507
- security$ = { token: this.options$.token };
508
- }
509
- else {
510
- security$ = {};
511
- }
512
+ const security$ = [
513
+ [
514
+ {
515
+ fieldName: "Authorization",
516
+ type: "http:bearer",
517
+ value: security === null || security === void 0 ? void 0 : security.token,
518
+ },
519
+ ],
520
+ ];
521
+ const securitySettings$ = this.resolveSecurity(...security$);
512
522
  const context = {
513
523
  operationID: "getCountryAnalytics",
514
524
  oAuth2Scopes: [],
515
- securitySource: this.options$.token,
525
+ securitySource: security$,
516
526
  };
517
- const securitySettings$ = this.resolveGlobalSecurity(security$);
518
527
  const doOptions = {
519
528
  context,
520
529
  errorCodes: [
@@ -656,7 +665,7 @@ class Analytics extends sdks_1.ClientSDK {
656
665
  * @remarks
657
666
  * Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.
658
667
  */
659
- async cities(input, options) {
668
+ async cities(input, security, options) {
660
669
  const headers$ = new Headers();
661
670
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
662
671
  headers$.set("Accept", "application/json");
@@ -685,6 +694,10 @@ class Analytics extends sdks_1.ClientSDK {
685
694
  }),
686
695
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
687
696
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
697
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
698
+ explode: true,
699
+ charEncoding: "percent",
700
+ }),
688
701
  enc$.encodeForm("referer", payload$.referer, {
689
702
  explode: true,
690
703
  charEncoding: "percent",
@@ -698,22 +711,21 @@ class Analytics extends sdks_1.ClientSDK {
698
711
  ]
699
712
  .filter(Boolean)
700
713
  .join("&");
701
- let security$;
702
- if (typeof this.options$.token === "function") {
703
- security$ = { token: await this.options$.token() };
704
- }
705
- else if (this.options$.token) {
706
- security$ = { token: this.options$.token };
707
- }
708
- else {
709
- security$ = {};
710
- }
714
+ const security$ = [
715
+ [
716
+ {
717
+ fieldName: "Authorization",
718
+ type: "http:bearer",
719
+ value: security === null || security === void 0 ? void 0 : security.token,
720
+ },
721
+ ],
722
+ ];
723
+ const securitySettings$ = this.resolveSecurity(...security$);
711
724
  const context = {
712
725
  operationID: "getCityAnalytics",
713
726
  oAuth2Scopes: [],
714
- securitySource: this.options$.token,
727
+ securitySource: security$,
715
728
  };
716
- const securitySettings$ = this.resolveGlobalSecurity(security$);
717
729
  const doOptions = {
718
730
  context,
719
731
  errorCodes: [
@@ -855,7 +867,7 @@ class Analytics extends sdks_1.ClientSDK {
855
867
  * @remarks
856
868
  * Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.
857
869
  */
858
- async devices(input, options) {
870
+ async devices(input, security, options) {
859
871
  const headers$ = new Headers();
860
872
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
861
873
  headers$.set("Accept", "application/json");
@@ -884,6 +896,10 @@ class Analytics extends sdks_1.ClientSDK {
884
896
  }),
885
897
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
886
898
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
899
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
900
+ explode: true,
901
+ charEncoding: "percent",
902
+ }),
887
903
  enc$.encodeForm("referer", payload$.referer, {
888
904
  explode: true,
889
905
  charEncoding: "percent",
@@ -897,22 +913,21 @@ class Analytics extends sdks_1.ClientSDK {
897
913
  ]
898
914
  .filter(Boolean)
899
915
  .join("&");
900
- let security$;
901
- if (typeof this.options$.token === "function") {
902
- security$ = { token: await this.options$.token() };
903
- }
904
- else if (this.options$.token) {
905
- security$ = { token: this.options$.token };
906
- }
907
- else {
908
- security$ = {};
909
- }
916
+ const security$ = [
917
+ [
918
+ {
919
+ fieldName: "Authorization",
920
+ type: "http:bearer",
921
+ value: security === null || security === void 0 ? void 0 : security.token,
922
+ },
923
+ ],
924
+ ];
925
+ const securitySettings$ = this.resolveSecurity(...security$);
910
926
  const context = {
911
927
  operationID: "getDeviceAnalytics",
912
928
  oAuth2Scopes: [],
913
- securitySource: this.options$.token,
929
+ securitySource: security$,
914
930
  };
915
- const securitySettings$ = this.resolveGlobalSecurity(security$);
916
931
  const doOptions = {
917
932
  context,
918
933
  errorCodes: [
@@ -1054,7 +1069,7 @@ class Analytics extends sdks_1.ClientSDK {
1054
1069
  * @remarks
1055
1070
  * Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.
1056
1071
  */
1057
- async browsers(input, options) {
1072
+ async browsers(input, security, options) {
1058
1073
  const headers$ = new Headers();
1059
1074
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
1060
1075
  headers$.set("Accept", "application/json");
@@ -1083,6 +1098,10 @@ class Analytics extends sdks_1.ClientSDK {
1083
1098
  }),
1084
1099
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1085
1100
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1101
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1102
+ explode: true,
1103
+ charEncoding: "percent",
1104
+ }),
1086
1105
  enc$.encodeForm("referer", payload$.referer, {
1087
1106
  explode: true,
1088
1107
  charEncoding: "percent",
@@ -1096,22 +1115,21 @@ class Analytics extends sdks_1.ClientSDK {
1096
1115
  ]
1097
1116
  .filter(Boolean)
1098
1117
  .join("&");
1099
- let security$;
1100
- if (typeof this.options$.token === "function") {
1101
- security$ = { token: await this.options$.token() };
1102
- }
1103
- else if (this.options$.token) {
1104
- security$ = { token: this.options$.token };
1105
- }
1106
- else {
1107
- security$ = {};
1108
- }
1118
+ const security$ = [
1119
+ [
1120
+ {
1121
+ fieldName: "Authorization",
1122
+ type: "http:bearer",
1123
+ value: security === null || security === void 0 ? void 0 : security.token,
1124
+ },
1125
+ ],
1126
+ ];
1127
+ const securitySettings$ = this.resolveSecurity(...security$);
1109
1128
  const context = {
1110
1129
  operationID: "getBrowserAnalytics",
1111
1130
  oAuth2Scopes: [],
1112
- securitySource: this.options$.token,
1131
+ securitySource: security$,
1113
1132
  };
1114
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1115
1133
  const doOptions = {
1116
1134
  context,
1117
1135
  errorCodes: [
@@ -1253,7 +1271,7 @@ class Analytics extends sdks_1.ClientSDK {
1253
1271
  * @remarks
1254
1272
  * Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.
1255
1273
  */
1256
- async os(input, options) {
1274
+ async os(input, security, options) {
1257
1275
  const headers$ = new Headers();
1258
1276
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
1259
1277
  headers$.set("Accept", "application/json");
@@ -1282,6 +1300,10 @@ class Analytics extends sdks_1.ClientSDK {
1282
1300
  }),
1283
1301
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1284
1302
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1303
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1304
+ explode: true,
1305
+ charEncoding: "percent",
1306
+ }),
1285
1307
  enc$.encodeForm("referer", payload$.referer, {
1286
1308
  explode: true,
1287
1309
  charEncoding: "percent",
@@ -1295,22 +1317,21 @@ class Analytics extends sdks_1.ClientSDK {
1295
1317
  ]
1296
1318
  .filter(Boolean)
1297
1319
  .join("&");
1298
- let security$;
1299
- if (typeof this.options$.token === "function") {
1300
- security$ = { token: await this.options$.token() };
1301
- }
1302
- else if (this.options$.token) {
1303
- security$ = { token: this.options$.token };
1304
- }
1305
- else {
1306
- security$ = {};
1307
- }
1320
+ const security$ = [
1321
+ [
1322
+ {
1323
+ fieldName: "Authorization",
1324
+ type: "http:bearer",
1325
+ value: security === null || security === void 0 ? void 0 : security.token,
1326
+ },
1327
+ ],
1328
+ ];
1329
+ const securitySettings$ = this.resolveSecurity(...security$);
1308
1330
  const context = {
1309
1331
  operationID: "getOSAnalytics",
1310
1332
  oAuth2Scopes: [],
1311
- securitySource: this.options$.token,
1333
+ securitySource: security$,
1312
1334
  };
1313
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1314
1335
  const doOptions = {
1315
1336
  context,
1316
1337
  errorCodes: [
@@ -1452,7 +1473,7 @@ class Analytics extends sdks_1.ClientSDK {
1452
1473
  * @remarks
1453
1474
  * Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.
1454
1475
  */
1455
- async referers(input, options) {
1476
+ async referers(input, security, options) {
1456
1477
  const headers$ = new Headers();
1457
1478
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
1458
1479
  headers$.set("Accept", "application/json");
@@ -1481,6 +1502,10 @@ class Analytics extends sdks_1.ClientSDK {
1481
1502
  }),
1482
1503
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1483
1504
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1505
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1506
+ explode: true,
1507
+ charEncoding: "percent",
1508
+ }),
1484
1509
  enc$.encodeForm("referer", payload$.referer, {
1485
1510
  explode: true,
1486
1511
  charEncoding: "percent",
@@ -1494,22 +1519,21 @@ class Analytics extends sdks_1.ClientSDK {
1494
1519
  ]
1495
1520
  .filter(Boolean)
1496
1521
  .join("&");
1497
- let security$;
1498
- if (typeof this.options$.token === "function") {
1499
- security$ = { token: await this.options$.token() };
1500
- }
1501
- else if (this.options$.token) {
1502
- security$ = { token: this.options$.token };
1503
- }
1504
- else {
1505
- security$ = {};
1506
- }
1522
+ const security$ = [
1523
+ [
1524
+ {
1525
+ fieldName: "Authorization",
1526
+ type: "http:bearer",
1527
+ value: security === null || security === void 0 ? void 0 : security.token,
1528
+ },
1529
+ ],
1530
+ ];
1531
+ const securitySettings$ = this.resolveSecurity(...security$);
1507
1532
  const context = {
1508
1533
  operationID: "getRefererAnalytics",
1509
1534
  oAuth2Scopes: [],
1510
- securitySource: this.options$.token,
1535
+ securitySource: security$,
1511
1536
  };
1512
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1513
1537
  const doOptions = {
1514
1538
  context,
1515
1539
  errorCodes: [
@@ -1651,7 +1675,7 @@ class Analytics extends sdks_1.ClientSDK {
1651
1675
  * @remarks
1652
1676
  * Retrieve the top links by number of clicks for a domain or the authenticated workspace.
1653
1677
  */
1654
- async topLinks(input, options) {
1678
+ async topLinks(input, security, options) {
1655
1679
  const headers$ = new Headers();
1656
1680
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
1657
1681
  headers$.set("Accept", "application/json");
@@ -1680,6 +1704,10 @@ class Analytics extends sdks_1.ClientSDK {
1680
1704
  }),
1681
1705
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1682
1706
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1707
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1708
+ explode: true,
1709
+ charEncoding: "percent",
1710
+ }),
1683
1711
  enc$.encodeForm("referer", payload$.referer, {
1684
1712
  explode: true,
1685
1713
  charEncoding: "percent",
@@ -1693,22 +1721,17 @@ class Analytics extends sdks_1.ClientSDK {
1693
1721
  ]
1694
1722
  .filter(Boolean)
1695
1723
  .join("&");
1696
- let security$;
1697
- if (typeof this.options$.token === "function") {
1698
- security$ = { token: await this.options$.token() };
1699
- }
1700
- else if (this.options$.token) {
1701
- security$ = { token: this.options$.token };
1702
- }
1703
- else {
1704
- security$ = {};
1705
- }
1706
- const context = {
1707
- operationID: "getTopLinks",
1708
- oAuth2Scopes: [],
1709
- securitySource: this.options$.token,
1710
- };
1711
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1724
+ const security$ = [
1725
+ [
1726
+ {
1727
+ fieldName: "Authorization",
1728
+ type: "http:bearer",
1729
+ value: security === null || security === void 0 ? void 0 : security.token,
1730
+ },
1731
+ ],
1732
+ ];
1733
+ const securitySettings$ = this.resolveSecurity(...security$);
1734
+ const context = { operationID: "getTopLinks", oAuth2Scopes: [], securitySource: security$ };
1712
1735
  const doOptions = {
1713
1736
  context,
1714
1737
  errorCodes: [
@@ -1848,7 +1871,7 @@ class Analytics extends sdks_1.ClientSDK {
1848
1871
  * @remarks
1849
1872
  * Retrieve the top URLs by number of clicks for a given short link.
1850
1873
  */
1851
- async topUrls(input, options) {
1874
+ async topUrls(input, security, options) {
1852
1875
  const headers$ = new Headers();
1853
1876
  headers$.set("user-agent", config_1.SDK_METADATA.userAgent);
1854
1877
  headers$.set("Accept", "application/json");
@@ -1877,6 +1900,10 @@ class Analytics extends sdks_1.ClientSDK {
1877
1900
  }),
1878
1901
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1879
1902
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1903
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1904
+ explode: true,
1905
+ charEncoding: "percent",
1906
+ }),
1880
1907
  enc$.encodeForm("referer", payload$.referer, {
1881
1908
  explode: true,
1882
1909
  charEncoding: "percent",
@@ -1890,22 +1917,17 @@ class Analytics extends sdks_1.ClientSDK {
1890
1917
  ]
1891
1918
  .filter(Boolean)
1892
1919
  .join("&");
1893
- let security$;
1894
- if (typeof this.options$.token === "function") {
1895
- security$ = { token: await this.options$.token() };
1896
- }
1897
- else if (this.options$.token) {
1898
- security$ = { token: this.options$.token };
1899
- }
1900
- else {
1901
- security$ = {};
1902
- }
1903
- const context = {
1904
- operationID: "getTopURLs",
1905
- oAuth2Scopes: [],
1906
- securitySource: this.options$.token,
1907
- };
1908
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1920
+ const security$ = [
1921
+ [
1922
+ {
1923
+ fieldName: "Authorization",
1924
+ type: "http:bearer",
1925
+ value: security === null || security === void 0 ? void 0 : security.token,
1926
+ },
1927
+ ],
1928
+ ];
1929
+ const securitySettings$ = this.resolveSecurity(...security$);
1930
+ const context = { operationID: "getTopURLs", oAuth2Scopes: [], securitySource: security$ };
1909
1931
  const doOptions = {
1910
1932
  context,
1911
1933
  errorCodes: [