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
@@ -8,6 +8,7 @@ import * as enc$ from "../lib/encodings";
8
8
  import { HTTPClient } from "../lib/http";
9
9
  import * as schemas$ from "../lib/schemas";
10
10
  import { ClientSDK, RequestOptions } from "../lib/sdks";
11
+ import { SecurityInput } from "../lib/security";
11
12
  import * as errors from "../models/errors";
12
13
  import * as operations from "../models/operations";
13
14
  import * as z from "zod";
@@ -47,6 +48,7 @@ export class Analytics extends ClientSDK {
47
48
  */
48
49
  async clicks(
49
50
  input: operations.GetClicksAnalyticsRequest,
51
+ security: operations.GetClicksAnalyticsSecurity,
50
52
  options?: RequestOptions
51
53
  ): Promise<number> {
52
54
  const headers$ = new Headers();
@@ -84,6 +86,10 @@ export class Analytics extends ClientSDK {
84
86
  }),
85
87
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
86
88
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
89
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
90
+ explode: true,
91
+ charEncoding: "percent",
92
+ }),
87
93
  enc$.encodeForm("referer", payload$.referer, {
88
94
  explode: true,
89
95
  charEncoding: "percent",
@@ -98,20 +104,21 @@ export class Analytics extends ClientSDK {
98
104
  .filter(Boolean)
99
105
  .join("&");
100
106
 
101
- let security$;
102
- if (typeof this.options$.token === "function") {
103
- security$ = { token: await this.options$.token() };
104
- } else if (this.options$.token) {
105
- security$ = { token: this.options$.token };
106
- } else {
107
- security$ = {};
108
- }
107
+ const security$: SecurityInput[][] = [
108
+ [
109
+ {
110
+ fieldName: "Authorization",
111
+ type: "http:bearer",
112
+ value: security?.token,
113
+ },
114
+ ],
115
+ ];
116
+ const securitySettings$ = this.resolveSecurity(...security$);
109
117
  const context = {
110
118
  operationID: "getClicksAnalytics",
111
119
  oAuth2Scopes: [],
112
- securitySource: this.options$.token,
120
+ securitySource: security$,
113
121
  };
114
- const securitySettings$ = this.resolveGlobalSecurity(security$);
115
122
 
116
123
  const doOptions = {
117
124
  context,
@@ -291,6 +298,7 @@ export class Analytics extends ClientSDK {
291
298
  */
292
299
  async timeseries(
293
300
  input: operations.GetTimeseriesAnalyticsRequest,
301
+ security: operations.GetTimeseriesAnalyticsSecurity,
294
302
  options?: RequestOptions
295
303
  ): Promise<Array<operations.ResponseBody>> {
296
304
  const headers$ = new Headers();
@@ -328,6 +336,10 @@ export class Analytics extends ClientSDK {
328
336
  }),
329
337
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
330
338
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
339
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
340
+ explode: true,
341
+ charEncoding: "percent",
342
+ }),
331
343
  enc$.encodeForm("referer", payload$.referer, {
332
344
  explode: true,
333
345
  charEncoding: "percent",
@@ -342,20 +354,21 @@ export class Analytics extends ClientSDK {
342
354
  .filter(Boolean)
343
355
  .join("&");
344
356
 
345
- let security$;
346
- if (typeof this.options$.token === "function") {
347
- security$ = { token: await this.options$.token() };
348
- } else if (this.options$.token) {
349
- security$ = { token: this.options$.token };
350
- } else {
351
- security$ = {};
352
- }
357
+ const security$: SecurityInput[][] = [
358
+ [
359
+ {
360
+ fieldName: "Authorization",
361
+ type: "http:bearer",
362
+ value: security?.token,
363
+ },
364
+ ],
365
+ ];
366
+ const securitySettings$ = this.resolveSecurity(...security$);
353
367
  const context = {
354
368
  operationID: "getTimeseriesAnalytics",
355
369
  oAuth2Scopes: [],
356
- securitySource: this.options$.token,
370
+ securitySource: security$,
357
371
  };
358
- const securitySettings$ = this.resolveGlobalSecurity(security$);
359
372
 
360
373
  const doOptions = {
361
374
  context,
@@ -535,6 +548,7 @@ export class Analytics extends ClientSDK {
535
548
  */
536
549
  async countries(
537
550
  input: operations.GetCountryAnalyticsRequest,
551
+ security: operations.GetCountryAnalyticsSecurity,
538
552
  options?: RequestOptions
539
553
  ): Promise<Array<operations.GetCountryAnalyticsResponseBody>> {
540
554
  const headers$ = new Headers();
@@ -572,6 +586,10 @@ export class Analytics extends ClientSDK {
572
586
  }),
573
587
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
574
588
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
589
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
590
+ explode: true,
591
+ charEncoding: "percent",
592
+ }),
575
593
  enc$.encodeForm("referer", payload$.referer, {
576
594
  explode: true,
577
595
  charEncoding: "percent",
@@ -586,20 +604,21 @@ export class Analytics extends ClientSDK {
586
604
  .filter(Boolean)
587
605
  .join("&");
588
606
 
589
- let security$;
590
- if (typeof this.options$.token === "function") {
591
- security$ = { token: await this.options$.token() };
592
- } else if (this.options$.token) {
593
- security$ = { token: this.options$.token };
594
- } else {
595
- security$ = {};
596
- }
607
+ const security$: SecurityInput[][] = [
608
+ [
609
+ {
610
+ fieldName: "Authorization",
611
+ type: "http:bearer",
612
+ value: security?.token,
613
+ },
614
+ ],
615
+ ];
616
+ const securitySettings$ = this.resolveSecurity(...security$);
597
617
  const context = {
598
618
  operationID: "getCountryAnalytics",
599
619
  oAuth2Scopes: [],
600
- securitySource: this.options$.token,
620
+ securitySource: security$,
601
621
  };
602
- const securitySettings$ = this.resolveGlobalSecurity(security$);
603
622
 
604
623
  const doOptions = {
605
624
  context,
@@ -781,6 +800,7 @@ export class Analytics extends ClientSDK {
781
800
  */
782
801
  async cities(
783
802
  input: operations.GetCityAnalyticsRequest,
803
+ security: operations.GetCityAnalyticsSecurity,
784
804
  options?: RequestOptions
785
805
  ): Promise<Array<operations.GetCityAnalyticsResponseBody>> {
786
806
  const headers$ = new Headers();
@@ -818,6 +838,10 @@ export class Analytics extends ClientSDK {
818
838
  }),
819
839
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
820
840
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
841
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
842
+ explode: true,
843
+ charEncoding: "percent",
844
+ }),
821
845
  enc$.encodeForm("referer", payload$.referer, {
822
846
  explode: true,
823
847
  charEncoding: "percent",
@@ -832,20 +856,21 @@ export class Analytics extends ClientSDK {
832
856
  .filter(Boolean)
833
857
  .join("&");
834
858
 
835
- let security$;
836
- if (typeof this.options$.token === "function") {
837
- security$ = { token: await this.options$.token() };
838
- } else if (this.options$.token) {
839
- security$ = { token: this.options$.token };
840
- } else {
841
- security$ = {};
842
- }
859
+ const security$: SecurityInput[][] = [
860
+ [
861
+ {
862
+ fieldName: "Authorization",
863
+ type: "http:bearer",
864
+ value: security?.token,
865
+ },
866
+ ],
867
+ ];
868
+ const securitySettings$ = this.resolveSecurity(...security$);
843
869
  const context = {
844
870
  operationID: "getCityAnalytics",
845
871
  oAuth2Scopes: [],
846
- securitySource: this.options$.token,
872
+ securitySource: security$,
847
873
  };
848
- const securitySettings$ = this.resolveGlobalSecurity(security$);
849
874
 
850
875
  const doOptions = {
851
876
  context,
@@ -1027,6 +1052,7 @@ export class Analytics extends ClientSDK {
1027
1052
  */
1028
1053
  async devices(
1029
1054
  input: operations.GetDeviceAnalyticsRequest,
1055
+ security: operations.GetDeviceAnalyticsSecurity,
1030
1056
  options?: RequestOptions
1031
1057
  ): Promise<Array<operations.GetDeviceAnalyticsResponseBody>> {
1032
1058
  const headers$ = new Headers();
@@ -1064,6 +1090,10 @@ export class Analytics extends ClientSDK {
1064
1090
  }),
1065
1091
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1066
1092
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1093
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1094
+ explode: true,
1095
+ charEncoding: "percent",
1096
+ }),
1067
1097
  enc$.encodeForm("referer", payload$.referer, {
1068
1098
  explode: true,
1069
1099
  charEncoding: "percent",
@@ -1078,20 +1108,21 @@ export class Analytics extends ClientSDK {
1078
1108
  .filter(Boolean)
1079
1109
  .join("&");
1080
1110
 
1081
- let security$;
1082
- if (typeof this.options$.token === "function") {
1083
- security$ = { token: await this.options$.token() };
1084
- } else if (this.options$.token) {
1085
- security$ = { token: this.options$.token };
1086
- } else {
1087
- security$ = {};
1088
- }
1111
+ const security$: SecurityInput[][] = [
1112
+ [
1113
+ {
1114
+ fieldName: "Authorization",
1115
+ type: "http:bearer",
1116
+ value: security?.token,
1117
+ },
1118
+ ],
1119
+ ];
1120
+ const securitySettings$ = this.resolveSecurity(...security$);
1089
1121
  const context = {
1090
1122
  operationID: "getDeviceAnalytics",
1091
1123
  oAuth2Scopes: [],
1092
- securitySource: this.options$.token,
1124
+ securitySource: security$,
1093
1125
  };
1094
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1095
1126
 
1096
1127
  const doOptions = {
1097
1128
  context,
@@ -1273,6 +1304,7 @@ export class Analytics extends ClientSDK {
1273
1304
  */
1274
1305
  async browsers(
1275
1306
  input: operations.GetBrowserAnalyticsRequest,
1307
+ security: operations.GetBrowserAnalyticsSecurity,
1276
1308
  options?: RequestOptions
1277
1309
  ): Promise<Array<operations.GetBrowserAnalyticsResponseBody>> {
1278
1310
  const headers$ = new Headers();
@@ -1310,6 +1342,10 @@ export class Analytics extends ClientSDK {
1310
1342
  }),
1311
1343
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1312
1344
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1345
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1346
+ explode: true,
1347
+ charEncoding: "percent",
1348
+ }),
1313
1349
  enc$.encodeForm("referer", payload$.referer, {
1314
1350
  explode: true,
1315
1351
  charEncoding: "percent",
@@ -1324,20 +1360,21 @@ export class Analytics extends ClientSDK {
1324
1360
  .filter(Boolean)
1325
1361
  .join("&");
1326
1362
 
1327
- let security$;
1328
- if (typeof this.options$.token === "function") {
1329
- security$ = { token: await this.options$.token() };
1330
- } else if (this.options$.token) {
1331
- security$ = { token: this.options$.token };
1332
- } else {
1333
- security$ = {};
1334
- }
1363
+ const security$: SecurityInput[][] = [
1364
+ [
1365
+ {
1366
+ fieldName: "Authorization",
1367
+ type: "http:bearer",
1368
+ value: security?.token,
1369
+ },
1370
+ ],
1371
+ ];
1372
+ const securitySettings$ = this.resolveSecurity(...security$);
1335
1373
  const context = {
1336
1374
  operationID: "getBrowserAnalytics",
1337
1375
  oAuth2Scopes: [],
1338
- securitySource: this.options$.token,
1376
+ securitySource: security$,
1339
1377
  };
1340
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1341
1378
 
1342
1379
  const doOptions = {
1343
1380
  context,
@@ -1519,6 +1556,7 @@ export class Analytics extends ClientSDK {
1519
1556
  */
1520
1557
  async os(
1521
1558
  input: operations.GetOSAnalyticsRequest,
1559
+ security: operations.GetOSAnalyticsSecurity,
1522
1560
  options?: RequestOptions
1523
1561
  ): Promise<Array<operations.GetOSAnalyticsResponseBody>> {
1524
1562
  const headers$ = new Headers();
@@ -1556,6 +1594,10 @@ export class Analytics extends ClientSDK {
1556
1594
  }),
1557
1595
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1558
1596
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1597
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1598
+ explode: true,
1599
+ charEncoding: "percent",
1600
+ }),
1559
1601
  enc$.encodeForm("referer", payload$.referer, {
1560
1602
  explode: true,
1561
1603
  charEncoding: "percent",
@@ -1570,20 +1612,21 @@ export class Analytics extends ClientSDK {
1570
1612
  .filter(Boolean)
1571
1613
  .join("&");
1572
1614
 
1573
- let security$;
1574
- if (typeof this.options$.token === "function") {
1575
- security$ = { token: await this.options$.token() };
1576
- } else if (this.options$.token) {
1577
- security$ = { token: this.options$.token };
1578
- } else {
1579
- security$ = {};
1580
- }
1615
+ const security$: SecurityInput[][] = [
1616
+ [
1617
+ {
1618
+ fieldName: "Authorization",
1619
+ type: "http:bearer",
1620
+ value: security?.token,
1621
+ },
1622
+ ],
1623
+ ];
1624
+ const securitySettings$ = this.resolveSecurity(...security$);
1581
1625
  const context = {
1582
1626
  operationID: "getOSAnalytics",
1583
1627
  oAuth2Scopes: [],
1584
- securitySource: this.options$.token,
1628
+ securitySource: security$,
1585
1629
  };
1586
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1587
1630
 
1588
1631
  const doOptions = {
1589
1632
  context,
@@ -1765,6 +1808,7 @@ export class Analytics extends ClientSDK {
1765
1808
  */
1766
1809
  async referers(
1767
1810
  input: operations.GetRefererAnalyticsRequest,
1811
+ security: operations.GetRefererAnalyticsSecurity,
1768
1812
  options?: RequestOptions
1769
1813
  ): Promise<Array<operations.GetRefererAnalyticsResponseBody>> {
1770
1814
  const headers$ = new Headers();
@@ -1802,6 +1846,10 @@ export class Analytics extends ClientSDK {
1802
1846
  }),
1803
1847
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
1804
1848
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
1849
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
1850
+ explode: true,
1851
+ charEncoding: "percent",
1852
+ }),
1805
1853
  enc$.encodeForm("referer", payload$.referer, {
1806
1854
  explode: true,
1807
1855
  charEncoding: "percent",
@@ -1816,20 +1864,21 @@ export class Analytics extends ClientSDK {
1816
1864
  .filter(Boolean)
1817
1865
  .join("&");
1818
1866
 
1819
- let security$;
1820
- if (typeof this.options$.token === "function") {
1821
- security$ = { token: await this.options$.token() };
1822
- } else if (this.options$.token) {
1823
- security$ = { token: this.options$.token };
1824
- } else {
1825
- security$ = {};
1826
- }
1867
+ const security$: SecurityInput[][] = [
1868
+ [
1869
+ {
1870
+ fieldName: "Authorization",
1871
+ type: "http:bearer",
1872
+ value: security?.token,
1873
+ },
1874
+ ],
1875
+ ];
1876
+ const securitySettings$ = this.resolveSecurity(...security$);
1827
1877
  const context = {
1828
1878
  operationID: "getRefererAnalytics",
1829
1879
  oAuth2Scopes: [],
1830
- securitySource: this.options$.token,
1880
+ securitySource: security$,
1831
1881
  };
1832
- const securitySettings$ = this.resolveGlobalSecurity(security$);
1833
1882
 
1834
1883
  const doOptions = {
1835
1884
  context,
@@ -2011,6 +2060,7 @@ export class Analytics extends ClientSDK {
2011
2060
  */
2012
2061
  async topLinks(
2013
2062
  input: operations.GetTopLinksRequest,
2063
+ security: operations.GetTopLinksSecurity,
2014
2064
  options?: RequestOptions
2015
2065
  ): Promise<Array<operations.GetTopLinksResponseBody>> {
2016
2066
  const headers$ = new Headers();
@@ -2048,6 +2098,10 @@ export class Analytics extends ClientSDK {
2048
2098
  }),
2049
2099
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
2050
2100
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
2101
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
2102
+ explode: true,
2103
+ charEncoding: "percent",
2104
+ }),
2051
2105
  enc$.encodeForm("referer", payload$.referer, {
2052
2106
  explode: true,
2053
2107
  charEncoding: "percent",
@@ -2062,20 +2116,17 @@ export class Analytics extends ClientSDK {
2062
2116
  .filter(Boolean)
2063
2117
  .join("&");
2064
2118
 
2065
- let security$;
2066
- if (typeof this.options$.token === "function") {
2067
- security$ = { token: await this.options$.token() };
2068
- } else if (this.options$.token) {
2069
- security$ = { token: this.options$.token };
2070
- } else {
2071
- security$ = {};
2072
- }
2073
- const context = {
2074
- operationID: "getTopLinks",
2075
- oAuth2Scopes: [],
2076
- securitySource: this.options$.token,
2077
- };
2078
- const securitySettings$ = this.resolveGlobalSecurity(security$);
2119
+ const security$: SecurityInput[][] = [
2120
+ [
2121
+ {
2122
+ fieldName: "Authorization",
2123
+ type: "http:bearer",
2124
+ value: security?.token,
2125
+ },
2126
+ ],
2127
+ ];
2128
+ const securitySettings$ = this.resolveSecurity(...security$);
2129
+ const context = { operationID: "getTopLinks", oAuth2Scopes: [], securitySource: security$ };
2079
2130
 
2080
2131
  const doOptions = {
2081
2132
  context,
@@ -2255,6 +2306,7 @@ export class Analytics extends ClientSDK {
2255
2306
  */
2256
2307
  async topUrls(
2257
2308
  input: operations.GetTopURLsRequest,
2309
+ security: operations.GetTopURLsSecurity,
2258
2310
  options?: RequestOptions
2259
2311
  ): Promise<Array<operations.GetTopURLsResponseBody>> {
2260
2312
  const headers$ = new Headers();
@@ -2292,6 +2344,10 @@ export class Analytics extends ClientSDK {
2292
2344
  }),
2293
2345
  enc$.encodeForm("key", payload$.key, { explode: true, charEncoding: "percent" }),
2294
2346
  enc$.encodeForm("os", payload$.os, { explode: true, charEncoding: "percent" }),
2347
+ enc$.encodeForm("projectSlug", this.options$.projectSlug, {
2348
+ explode: true,
2349
+ charEncoding: "percent",
2350
+ }),
2295
2351
  enc$.encodeForm("referer", payload$.referer, {
2296
2352
  explode: true,
2297
2353
  charEncoding: "percent",
@@ -2306,20 +2362,17 @@ export class Analytics extends ClientSDK {
2306
2362
  .filter(Boolean)
2307
2363
  .join("&");
2308
2364
 
2309
- let security$;
2310
- if (typeof this.options$.token === "function") {
2311
- security$ = { token: await this.options$.token() };
2312
- } else if (this.options$.token) {
2313
- security$ = { token: this.options$.token };
2314
- } else {
2315
- security$ = {};
2316
- }
2317
- const context = {
2318
- operationID: "getTopURLs",
2319
- oAuth2Scopes: [],
2320
- securitySource: this.options$.token,
2321
- };
2322
- const securitySettings$ = this.resolveGlobalSecurity(security$);
2365
+ const security$: SecurityInput[][] = [
2366
+ [
2367
+ {
2368
+ fieldName: "Authorization",
2369
+ type: "http:bearer",
2370
+ value: security?.token,
2371
+ },
2372
+ ],
2373
+ ];
2374
+ const securitySettings$ = this.resolveSecurity(...security$);
2375
+ const context = { operationID: "getTopURLs", oAuth2Scopes: [], securitySource: security$ };
2323
2376
 
2324
2377
  const doOptions = {
2325
2378
  context,