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
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type CreateLinkSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The unique IDs of the tags assigned to the short link.
9
13
  */
@@ -94,6 +98,37 @@ export type CreateLinkRequestBody = {
94
98
  comments?: string | null | undefined;
95
99
  };
96
100
 
101
+ /** @internal */
102
+ export namespace CreateLinkSecurity$ {
103
+ export type Inbound = {
104
+ token?: string | undefined;
105
+ };
106
+
107
+ export const inboundSchema: z.ZodType<CreateLinkSecurity, z.ZodTypeDef, Inbound> = z
108
+ .object({
109
+ token: z.string().optional(),
110
+ })
111
+ .transform((v) => {
112
+ return {
113
+ ...(v.token === undefined ? null : { token: v.token }),
114
+ };
115
+ });
116
+
117
+ export type Outbound = {
118
+ token?: string | undefined;
119
+ };
120
+
121
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkSecurity> = z
122
+ .object({
123
+ token: z.string().optional(),
124
+ })
125
+ .transform((v) => {
126
+ return {
127
+ ...(v.token === undefined ? null : { token: v.token }),
128
+ };
129
+ });
130
+ }
131
+
97
132
  /** @internal */
98
133
  export namespace TagIds$ {
99
134
  export type Inbound = string | Array<string>;
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type CreateTagSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.
9
13
  */
@@ -28,6 +32,37 @@ export type CreateTagRequestBody = {
28
32
  color?: Color | undefined;
29
33
  };
30
34
 
35
+ /** @internal */
36
+ export namespace CreateTagSecurity$ {
37
+ export type Inbound = {
38
+ token?: string | undefined;
39
+ };
40
+
41
+ export const inboundSchema: z.ZodType<CreateTagSecurity, z.ZodTypeDef, Inbound> = z
42
+ .object({
43
+ token: z.string().optional(),
44
+ })
45
+ .transform((v) => {
46
+ return {
47
+ ...(v.token === undefined ? null : { token: v.token }),
48
+ };
49
+ });
50
+
51
+ export type Outbound = {
52
+ token?: string | undefined;
53
+ };
54
+
55
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagSecurity> = z
56
+ .object({
57
+ token: z.string().optional(),
58
+ })
59
+ .transform((v) => {
60
+ return {
61
+ ...(v.token === undefined ? null : { token: v.token }),
62
+ };
63
+ });
64
+ }
65
+
31
66
  /** @internal */
32
67
  export const Color$ = z.nativeEnum(Color);
33
68
 
@@ -4,12 +4,47 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type CreateWorkspaceSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  export type CreateWorkspaceRequestBody = {
8
12
  name: string;
9
13
  slug: string;
10
14
  domain?: string | undefined;
11
15
  };
12
16
 
17
+ /** @internal */
18
+ export namespace CreateWorkspaceSecurity$ {
19
+ export type Inbound = {
20
+ token?: string | undefined;
21
+ };
22
+
23
+ export const inboundSchema: z.ZodType<CreateWorkspaceSecurity, z.ZodTypeDef, Inbound> = z
24
+ .object({
25
+ token: z.string().optional(),
26
+ })
27
+ .transform((v) => {
28
+ return {
29
+ ...(v.token === undefined ? null : { token: v.token }),
30
+ };
31
+ });
32
+
33
+ export type Outbound = {
34
+ token?: string | undefined;
35
+ };
36
+
37
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateWorkspaceSecurity> = z
38
+ .object({
39
+ token: z.string().optional(),
40
+ })
41
+ .transform((v) => {
42
+ return {
43
+ ...(v.token === undefined ? null : { token: v.token }),
44
+ };
45
+ });
46
+ }
47
+
13
48
  /** @internal */
14
49
  export namespace CreateWorkspaceRequestBody$ {
15
50
  export type Inbound = {
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type DeleteLinkSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  export type DeleteLinkRequest = {
8
12
  /**
9
13
  * The id of the link to delete. You can get this via the `getLinkInfo` endpoint.
@@ -21,6 +25,37 @@ export type DeleteLinkResponseBody = {
21
25
  id: string;
22
26
  };
23
27
 
28
+ /** @internal */
29
+ export namespace DeleteLinkSecurity$ {
30
+ export type Inbound = {
31
+ token?: string | undefined;
32
+ };
33
+
34
+ export const inboundSchema: z.ZodType<DeleteLinkSecurity, z.ZodTypeDef, Inbound> = z
35
+ .object({
36
+ token: z.string().optional(),
37
+ })
38
+ .transform((v) => {
39
+ return {
40
+ ...(v.token === undefined ? null : { token: v.token }),
41
+ };
42
+ });
43
+
44
+ export type Outbound = {
45
+ token?: string | undefined;
46
+ };
47
+
48
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkSecurity> = z
49
+ .object({
50
+ token: z.string().optional(),
51
+ })
52
+ .transform((v) => {
53
+ return {
54
+ ...(v.token === undefined ? null : { token: v.token }),
55
+ };
56
+ });
57
+ }
58
+
24
59
  /** @internal */
25
60
  export namespace DeleteLinkRequest$ {
26
61
  export type Inbound = {
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type EditLinkSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The unique IDs of the tags assigned to the short link.
9
13
  */
@@ -102,6 +106,37 @@ export type EditLinkRequest = {
102
106
  requestBody?: EditLinkRequestBody | undefined;
103
107
  };
104
108
 
109
+ /** @internal */
110
+ export namespace EditLinkSecurity$ {
111
+ export type Inbound = {
112
+ token?: string | undefined;
113
+ };
114
+
115
+ export const inboundSchema: z.ZodType<EditLinkSecurity, z.ZodTypeDef, Inbound> = z
116
+ .object({
117
+ token: z.string().optional(),
118
+ })
119
+ .transform((v) => {
120
+ return {
121
+ ...(v.token === undefined ? null : { token: v.token }),
122
+ };
123
+ });
124
+
125
+ export type Outbound = {
126
+ token?: string | undefined;
127
+ };
128
+
129
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkSecurity> = z
130
+ .object({
131
+ token: z.string().optional(),
132
+ })
133
+ .transform((v) => {
134
+ return {
135
+ ...(v.token === undefined ? null : { token: v.token }),
136
+ };
137
+ });
138
+ }
139
+
105
140
  /** @internal */
106
141
  export namespace EditLinkTagIds$ {
107
142
  export type Inbound = string | Array<string>;
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetBrowserAnalyticsSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The interval to retrieve analytics for.
9
13
  */
@@ -334,6 +338,37 @@ export type GetBrowserAnalyticsResponseBody = {
334
338
  clicks: number;
335
339
  };
336
340
 
341
+ /** @internal */
342
+ export namespace GetBrowserAnalyticsSecurity$ {
343
+ export type Inbound = {
344
+ token?: string | undefined;
345
+ };
346
+
347
+ export const inboundSchema: z.ZodType<GetBrowserAnalyticsSecurity, z.ZodTypeDef, Inbound> = z
348
+ .object({
349
+ token: z.string().optional(),
350
+ })
351
+ .transform((v) => {
352
+ return {
353
+ ...(v.token === undefined ? null : { token: v.token }),
354
+ };
355
+ });
356
+
357
+ export type Outbound = {
358
+ token?: string | undefined;
359
+ };
360
+
361
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetBrowserAnalyticsSecurity> = z
362
+ .object({
363
+ token: z.string().optional(),
364
+ })
365
+ .transform((v) => {
366
+ return {
367
+ ...(v.token === undefined ? null : { token: v.token }),
368
+ };
369
+ });
370
+ }
371
+
337
372
  /** @internal */
338
373
  export const GetBrowserAnalyticsQueryParamInterval$ = z.nativeEnum(
339
374
  GetBrowserAnalyticsQueryParamInterval
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetCityAnalyticsSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The interval to retrieve analytics for.
9
13
  */
@@ -594,6 +598,37 @@ export type GetCityAnalyticsResponseBody = {
594
598
  clicks: number;
595
599
  };
596
600
 
601
+ /** @internal */
602
+ export namespace GetCityAnalyticsSecurity$ {
603
+ export type Inbound = {
604
+ token?: string | undefined;
605
+ };
606
+
607
+ export const inboundSchema: z.ZodType<GetCityAnalyticsSecurity, z.ZodTypeDef, Inbound> = z
608
+ .object({
609
+ token: z.string().optional(),
610
+ })
611
+ .transform((v) => {
612
+ return {
613
+ ...(v.token === undefined ? null : { token: v.token }),
614
+ };
615
+ });
616
+
617
+ export type Outbound = {
618
+ token?: string | undefined;
619
+ };
620
+
621
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCityAnalyticsSecurity> = z
622
+ .object({
623
+ token: z.string().optional(),
624
+ })
625
+ .transform((v) => {
626
+ return {
627
+ ...(v.token === undefined ? null : { token: v.token }),
628
+ };
629
+ });
630
+ }
631
+
597
632
  /** @internal */
598
633
  export const GetCityAnalyticsQueryParamInterval$ = z.nativeEnum(GetCityAnalyticsQueryParamInterval);
599
634
 
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetClicksAnalyticsSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The interval to retrieve analytics for.
9
13
  */
@@ -323,6 +327,37 @@ export type GetClicksAnalyticsRequest = {
323
327
  tagId?: string | undefined;
324
328
  };
325
329
 
330
+ /** @internal */
331
+ export namespace GetClicksAnalyticsSecurity$ {
332
+ export type Inbound = {
333
+ token?: string | undefined;
334
+ };
335
+
336
+ export const inboundSchema: z.ZodType<GetClicksAnalyticsSecurity, z.ZodTypeDef, Inbound> = z
337
+ .object({
338
+ token: z.string().optional(),
339
+ })
340
+ .transform((v) => {
341
+ return {
342
+ ...(v.token === undefined ? null : { token: v.token }),
343
+ };
344
+ });
345
+
346
+ export type Outbound = {
347
+ token?: string | undefined;
348
+ };
349
+
350
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetClicksAnalyticsSecurity> = z
351
+ .object({
352
+ token: z.string().optional(),
353
+ })
354
+ .transform((v) => {
355
+ return {
356
+ ...(v.token === undefined ? null : { token: v.token }),
357
+ };
358
+ });
359
+ }
360
+
326
361
  /** @internal */
327
362
  export const Interval$ = z.nativeEnum(Interval);
328
363
 
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetCountryAnalyticsSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The interval to retrieve analytics for.
9
13
  */
@@ -590,6 +594,37 @@ export type GetCountryAnalyticsResponseBody = {
590
594
  clicks: number;
591
595
  };
592
596
 
597
+ /** @internal */
598
+ export namespace GetCountryAnalyticsSecurity$ {
599
+ export type Inbound = {
600
+ token?: string | undefined;
601
+ };
602
+
603
+ export const inboundSchema: z.ZodType<GetCountryAnalyticsSecurity, z.ZodTypeDef, Inbound> = z
604
+ .object({
605
+ token: z.string().optional(),
606
+ })
607
+ .transform((v) => {
608
+ return {
609
+ ...(v.token === undefined ? null : { token: v.token }),
610
+ };
611
+ });
612
+
613
+ export type Outbound = {
614
+ token?: string | undefined;
615
+ };
616
+
617
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCountryAnalyticsSecurity> = z
618
+ .object({
619
+ token: z.string().optional(),
620
+ })
621
+ .transform((v) => {
622
+ return {
623
+ ...(v.token === undefined ? null : { token: v.token }),
624
+ };
625
+ });
626
+ }
627
+
593
628
  /** @internal */
594
629
  export const GetCountryAnalyticsQueryParamInterval$ = z.nativeEnum(
595
630
  GetCountryAnalyticsQueryParamInterval
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetDeviceAnalyticsSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The interval to retrieve analytics for.
9
13
  */
@@ -334,6 +338,37 @@ export type GetDeviceAnalyticsResponseBody = {
334
338
  clicks: number;
335
339
  };
336
340
 
341
+ /** @internal */
342
+ export namespace GetDeviceAnalyticsSecurity$ {
343
+ export type Inbound = {
344
+ token?: string | undefined;
345
+ };
346
+
347
+ export const inboundSchema: z.ZodType<GetDeviceAnalyticsSecurity, z.ZodTypeDef, Inbound> = z
348
+ .object({
349
+ token: z.string().optional(),
350
+ })
351
+ .transform((v) => {
352
+ return {
353
+ ...(v.token === undefined ? null : { token: v.token }),
354
+ };
355
+ });
356
+
357
+ export type Outbound = {
358
+ token?: string | undefined;
359
+ };
360
+
361
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetDeviceAnalyticsSecurity> = z
362
+ .object({
363
+ token: z.string().optional(),
364
+ })
365
+ .transform((v) => {
366
+ return {
367
+ ...(v.token === undefined ? null : { token: v.token }),
368
+ };
369
+ });
370
+ }
371
+
337
372
  /** @internal */
338
373
  export const GetDeviceAnalyticsQueryParamInterval$ = z.nativeEnum(
339
374
  GetDeviceAnalyticsQueryParamInterval
@@ -4,10 +4,11 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetLinkInfoSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  export type GetLinkInfoRequest = {
8
- /**
9
- * The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`.
10
- */
11
12
  domain: string;
12
13
  /**
13
14
  * The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`.
@@ -15,6 +16,37 @@ export type GetLinkInfoRequest = {
15
16
  key: string;
16
17
  };
17
18
 
19
+ /** @internal */
20
+ export namespace GetLinkInfoSecurity$ {
21
+ export type Inbound = {
22
+ token?: string | undefined;
23
+ };
24
+
25
+ export const inboundSchema: z.ZodType<GetLinkInfoSecurity, z.ZodTypeDef, Inbound> = z
26
+ .object({
27
+ token: z.string().optional(),
28
+ })
29
+ .transform((v) => {
30
+ return {
31
+ ...(v.token === undefined ? null : { token: v.token }),
32
+ };
33
+ });
34
+
35
+ export type Outbound = {
36
+ token?: string | undefined;
37
+ };
38
+
39
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoSecurity> = z
40
+ .object({
41
+ token: z.string().optional(),
42
+ })
43
+ .transform((v) => {
44
+ return {
45
+ ...(v.token === undefined ? null : { token: v.token }),
46
+ };
47
+ });
48
+ }
49
+
18
50
  /** @internal */
19
51
  export namespace GetLinkInfoRequest$ {
20
52
  export type Inbound = {
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetLinksSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The tag IDs to filter the links by.
9
13
  */
@@ -57,6 +61,37 @@ export type GetLinksRequest = {
57
61
  page?: number | undefined;
58
62
  };
59
63
 
64
+ /** @internal */
65
+ export namespace GetLinksSecurity$ {
66
+ export type Inbound = {
67
+ token?: string | undefined;
68
+ };
69
+
70
+ export const inboundSchema: z.ZodType<GetLinksSecurity, z.ZodTypeDef, Inbound> = z
71
+ .object({
72
+ token: z.string().optional(),
73
+ })
74
+ .transform((v) => {
75
+ return {
76
+ ...(v.token === undefined ? null : { token: v.token }),
77
+ };
78
+ });
79
+
80
+ export type Outbound = {
81
+ token?: string | undefined;
82
+ };
83
+
84
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksSecurity> = z
85
+ .object({
86
+ token: z.string().optional(),
87
+ })
88
+ .transform((v) => {
89
+ return {
90
+ ...(v.token === undefined ? null : { token: v.token }),
91
+ };
92
+ });
93
+ }
94
+
60
95
  /** @internal */
61
96
  export namespace QueryParamTagIds$ {
62
97
  export type Inbound = string | Array<string>;
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetLinksCountSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The tag IDs to filter the links by.
9
13
  */
@@ -57,6 +61,37 @@ export type GetLinksCountRequest = {
57
61
  groupBy?: One | Two | undefined;
58
62
  };
59
63
 
64
+ /** @internal */
65
+ export namespace GetLinksCountSecurity$ {
66
+ export type Inbound = {
67
+ token?: string | undefined;
68
+ };
69
+
70
+ export const inboundSchema: z.ZodType<GetLinksCountSecurity, z.ZodTypeDef, Inbound> = z
71
+ .object({
72
+ token: z.string().optional(),
73
+ })
74
+ .transform((v) => {
75
+ return {
76
+ ...(v.token === undefined ? null : { token: v.token }),
77
+ };
78
+ });
79
+
80
+ export type Outbound = {
81
+ token?: string | undefined;
82
+ };
83
+
84
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountSecurity> = z
85
+ .object({
86
+ token: z.string().optional(),
87
+ })
88
+ .transform((v) => {
89
+ return {
90
+ ...(v.token === undefined ? null : { token: v.token }),
91
+ };
92
+ });
93
+ }
94
+
60
95
  /** @internal */
61
96
  export namespace GetLinksCountQueryParamTagIds$ {
62
97
  export type Inbound = string | Array<string>;
@@ -4,6 +4,10 @@
4
4
 
5
5
  import * as z from "zod";
6
6
 
7
+ export type GetOSAnalyticsSecurity = {
8
+ token?: string | undefined;
9
+ };
10
+
7
11
  /**
8
12
  * The interval to retrieve analytics for.
9
13
  */
@@ -334,6 +338,37 @@ export type GetOSAnalyticsResponseBody = {
334
338
  clicks: number;
335
339
  };
336
340
 
341
+ /** @internal */
342
+ export namespace GetOSAnalyticsSecurity$ {
343
+ export type Inbound = {
344
+ token?: string | undefined;
345
+ };
346
+
347
+ export const inboundSchema: z.ZodType<GetOSAnalyticsSecurity, z.ZodTypeDef, Inbound> = z
348
+ .object({
349
+ token: z.string().optional(),
350
+ })
351
+ .transform((v) => {
352
+ return {
353
+ ...(v.token === undefined ? null : { token: v.token }),
354
+ };
355
+ });
356
+
357
+ export type Outbound = {
358
+ token?: string | undefined;
359
+ };
360
+
361
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetOSAnalyticsSecurity> = z
362
+ .object({
363
+ token: z.string().optional(),
364
+ })
365
+ .transform((v) => {
366
+ return {
367
+ ...(v.token === undefined ? null : { token: v.token }),
368
+ };
369
+ });
370
+ }
371
+
337
372
  /** @internal */
338
373
  export const GetOSAnalyticsQueryParamInterval$ = z.nativeEnum(GetOSAnalyticsQueryParamInterval);
339
374