dub 0.22.3 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.speakeasy/gen.lock +36 -6
  2. package/.speakeasy/gen.yaml +2 -1
  3. package/.speakeasy/workflow.lock +21 -0
  4. package/.speakeasy/workflow.yaml +1 -0
  5. package/README.md +18 -7
  6. package/docs/sdks/analytics/README.md +10 -10
  7. package/docs/sdks/domains/README.md +331 -0
  8. package/docs/sdks/links/README.md +17 -13
  9. package/docs/sdks/metatags/README.md +1 -1
  10. package/docs/sdks/qrcodes/README.md +1 -1
  11. package/docs/sdks/tags/README.md +2 -2
  12. package/docs/sdks/workspaces/README.md +3 -3
  13. package/lib/config.d.ts +3 -3
  14. package/lib/config.js +3 -3
  15. package/models/components/workspaceschema.d.ts +4 -4
  16. package/models/components/workspaceschema.d.ts.map +1 -1
  17. package/models/components/workspaceschema.js +2 -2
  18. package/models/components/workspaceschema.js.map +1 -1
  19. package/models/operations/adddomain.d.ts +149 -0
  20. package/models/operations/adddomain.d.ts.map +1 -0
  21. package/models/operations/adddomain.js +145 -0
  22. package/models/operations/adddomain.js.map +1 -0
  23. package/models/operations/bulkcreatelinks.d.ts +1 -751
  24. package/models/operations/bulkcreatelinks.d.ts.map +1 -1
  25. package/models/operations/bulkcreatelinks.js.map +1 -1
  26. package/models/operations/createlink.d.ts +1 -751
  27. package/models/operations/createlink.d.ts.map +1 -1
  28. package/models/operations/createlink.js.map +1 -1
  29. package/models/operations/deletedomain.d.ts +39 -0
  30. package/models/operations/deletedomain.d.ts.map +1 -0
  31. package/models/operations/deletedomain.js +75 -0
  32. package/models/operations/deletedomain.js.map +1 -0
  33. package/models/operations/editdomain.d.ts +169 -0
  34. package/models/operations/editdomain.d.ts.map +1 -0
  35. package/models/operations/editdomain.js +171 -0
  36. package/models/operations/editdomain.js.map +1 -0
  37. package/models/operations/editlink.d.ts +1 -751
  38. package/models/operations/editlink.d.ts.map +1 -1
  39. package/models/operations/editlink.js.map +1 -1
  40. package/models/operations/getmetatags.d.ts +9 -9
  41. package/models/operations/getmetatags.d.ts.map +1 -1
  42. package/models/operations/getmetatags.js +12 -12
  43. package/models/operations/getmetatags.js.map +1 -1
  44. package/models/operations/index.d.ts +6 -0
  45. package/models/operations/index.d.ts.map +1 -1
  46. package/models/operations/index.js +6 -0
  47. package/models/operations/index.js.map +1 -1
  48. package/models/operations/listdomains.d.ts +91 -0
  49. package/models/operations/listdomains.d.ts.map +1 -0
  50. package/models/operations/listdomains.js +100 -0
  51. package/models/operations/listdomains.js.map +1 -0
  52. package/models/operations/setprimarydomain.d.ts +103 -0
  53. package/models/operations/setprimarydomain.d.ts.map +1 -0
  54. package/models/operations/setprimarydomain.js +116 -0
  55. package/models/operations/setprimarydomain.js.map +1 -0
  56. package/models/operations/transferdomain.d.ts +123 -0
  57. package/models/operations/transferdomain.d.ts.map +1 -0
  58. package/models/operations/transferdomain.js +142 -0
  59. package/models/operations/transferdomain.js.map +1 -0
  60. package/package.json +2 -3
  61. package/sdk/domains.d.ts +50 -0
  62. package/sdk/domains.d.ts.map +1 -0
  63. package/sdk/domains.js +1130 -0
  64. package/sdk/domains.js.map +1 -0
  65. package/sdk/sdk.d.ts +3 -0
  66. package/sdk/sdk.d.ts.map +1 -1
  67. package/sdk/sdk.js +5 -0
  68. package/sdk/sdk.js.map +1 -1
  69. package/src/lib/config.ts +3 -3
  70. package/src/models/components/workspaceschema.ts +6 -6
  71. package/src/models/operations/adddomain.ts +244 -0
  72. package/src/models/operations/bulkcreatelinks.ts +1 -751
  73. package/src/models/operations/createlink.ts +1 -751
  74. package/src/models/operations/deletedomain.ts +84 -0
  75. package/src/models/operations/editdomain.ts +290 -0
  76. package/src/models/operations/editlink.ts +1 -751
  77. package/src/models/operations/getmetatags.ts +21 -21
  78. package/src/models/operations/index.ts +6 -0
  79. package/src/models/operations/listdomains.ts +153 -0
  80. package/src/models/operations/setprimarydomain.ts +179 -0
  81. package/src/models/operations/transferdomain.ts +224 -0
  82. package/src/sdk/domains.ts +1387 -0
  83. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,84 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type DeleteDomainRequest = {
8
+ /**
9
+ * The domain name.
10
+ */
11
+ slug: string;
12
+ };
13
+
14
+ /**
15
+ * The domain was deleted.
16
+ */
17
+ export type DeleteDomainResponseBody = {
18
+ /**
19
+ * The domain name.
20
+ */
21
+ slug: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export namespace DeleteDomainRequest$ {
26
+ export type Inbound = {
27
+ slug: string;
28
+ };
29
+
30
+ export const inboundSchema: z.ZodType<DeleteDomainRequest, z.ZodTypeDef, Inbound> = z
31
+ .object({
32
+ slug: z.string(),
33
+ })
34
+ .transform((v) => {
35
+ return {
36
+ slug: v.slug,
37
+ };
38
+ });
39
+
40
+ export type Outbound = {
41
+ slug: string;
42
+ };
43
+
44
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainRequest> = z
45
+ .object({
46
+ slug: z.string(),
47
+ })
48
+ .transform((v) => {
49
+ return {
50
+ slug: v.slug,
51
+ };
52
+ });
53
+ }
54
+
55
+ /** @internal */
56
+ export namespace DeleteDomainResponseBody$ {
57
+ export type Inbound = {
58
+ slug: string;
59
+ };
60
+
61
+ export const inboundSchema: z.ZodType<DeleteDomainResponseBody, z.ZodTypeDef, Inbound> = z
62
+ .object({
63
+ slug: z.string(),
64
+ })
65
+ .transform((v) => {
66
+ return {
67
+ slug: v.slug,
68
+ };
69
+ });
70
+
71
+ export type Outbound = {
72
+ slug: string;
73
+ };
74
+
75
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainResponseBody> = z
76
+ .object({
77
+ slug: z.string(),
78
+ })
79
+ .transform((v) => {
80
+ return {
81
+ slug: v.slug,
82
+ };
83
+ });
84
+ }
@@ -0,0 +1,290 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ /**
8
+ * The type of redirect to use for this domain.
9
+ */
10
+ export const EditDomainType = {
11
+ Redirect: "redirect",
12
+ Rewrite: "rewrite",
13
+ } as const;
14
+ /**
15
+ * The type of redirect to use for this domain.
16
+ */
17
+ export type EditDomainType = (typeof EditDomainType)[keyof typeof EditDomainType];
18
+
19
+ export type EditDomainRequestBody = {
20
+ /**
21
+ * Name of the domain.
22
+ */
23
+ slug?: string | undefined;
24
+ /**
25
+ * The type of redirect to use for this domain.
26
+ */
27
+ type?: EditDomainType | undefined;
28
+ /**
29
+ * The page your users will get redirected to when they visit your domain.
30
+ */
31
+ target?: string | null | undefined;
32
+ /**
33
+ * Redirect users to a specific URL when any link under this domain has expired.
34
+ */
35
+ expiredUrl?: string | null | undefined;
36
+ /**
37
+ * Whether to archive this domain. `false` will unarchive a previously archived domain.
38
+ */
39
+ archived?: boolean | undefined;
40
+ /**
41
+ * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
42
+ */
43
+ placeholder?: string | null | undefined;
44
+ };
45
+
46
+ export type EditDomainRequest = {
47
+ /**
48
+ * The domain name.
49
+ */
50
+ slug: string;
51
+ requestBody?: EditDomainRequestBody | undefined;
52
+ };
53
+
54
+ /**
55
+ * The type of redirect to use for this domain.
56
+ */
57
+ export const EditDomainDomainsType = {
58
+ Redirect: "redirect",
59
+ Rewrite: "rewrite",
60
+ } as const;
61
+ /**
62
+ * The type of redirect to use for this domain.
63
+ */
64
+ export type EditDomainDomainsType =
65
+ (typeof EditDomainDomainsType)[keyof typeof EditDomainDomainsType];
66
+
67
+ /**
68
+ * The domain was updated.
69
+ */
70
+ export type EditDomainResponseBody = {
71
+ /**
72
+ * The domain name.
73
+ */
74
+ slug: string;
75
+ /**
76
+ * Whether the domain is verified.
77
+ */
78
+ verified?: boolean | undefined;
79
+ /**
80
+ * Whether the domain is the primary domain for the workspace.
81
+ */
82
+ primary?: boolean | undefined;
83
+ /**
84
+ * Whether the domain is archived.
85
+ */
86
+ archived?: boolean | undefined;
87
+ /**
88
+ * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
89
+ */
90
+ placeholder?: string | undefined;
91
+ /**
92
+ * The URL to redirect to when a link under this domain has expired.
93
+ */
94
+ expiredUrl: string | null;
95
+ /**
96
+ * The page your users will get redirected to when they visit your domain.
97
+ */
98
+ target: string | null;
99
+ /**
100
+ * The type of redirect to use for this domain.
101
+ */
102
+ type: EditDomainDomainsType;
103
+ /**
104
+ * The number of clicks on the domain.
105
+ */
106
+ clicks?: number | undefined;
107
+ };
108
+
109
+ /** @internal */
110
+ export const EditDomainType$ = z.nativeEnum(EditDomainType);
111
+
112
+ /** @internal */
113
+ export namespace EditDomainRequestBody$ {
114
+ export type Inbound = {
115
+ slug?: string | undefined;
116
+ type?: EditDomainType | undefined;
117
+ target?: string | null | undefined;
118
+ expiredUrl?: string | null | undefined;
119
+ archived?: boolean | undefined;
120
+ placeholder?: string | null | undefined;
121
+ };
122
+
123
+ export const inboundSchema: z.ZodType<EditDomainRequestBody, z.ZodTypeDef, Inbound> = z
124
+ .object({
125
+ slug: z.string().optional(),
126
+ type: EditDomainType$.default("redirect"),
127
+ target: z.nullable(z.string()).optional(),
128
+ expiredUrl: z.nullable(z.string()).optional(),
129
+ archived: z.boolean().default(false),
130
+ placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
131
+ })
132
+ .transform((v) => {
133
+ return {
134
+ ...(v.slug === undefined ? null : { slug: v.slug }),
135
+ type: v.type,
136
+ ...(v.target === undefined ? null : { target: v.target }),
137
+ ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
138
+ archived: v.archived,
139
+ placeholder: v.placeholder,
140
+ };
141
+ });
142
+
143
+ export type Outbound = {
144
+ slug?: string | undefined;
145
+ type: EditDomainType;
146
+ target?: string | null | undefined;
147
+ expiredUrl?: string | null | undefined;
148
+ archived: boolean;
149
+ placeholder: string | null;
150
+ };
151
+
152
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditDomainRequestBody> = z
153
+ .object({
154
+ slug: z.string().optional(),
155
+ type: EditDomainType$.default("redirect"),
156
+ target: z.nullable(z.string()).optional(),
157
+ expiredUrl: z.nullable(z.string()).optional(),
158
+ archived: z.boolean().default(false),
159
+ placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
160
+ })
161
+ .transform((v) => {
162
+ return {
163
+ ...(v.slug === undefined ? null : { slug: v.slug }),
164
+ type: v.type,
165
+ ...(v.target === undefined ? null : { target: v.target }),
166
+ ...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
167
+ archived: v.archived,
168
+ placeholder: v.placeholder,
169
+ };
170
+ });
171
+ }
172
+
173
+ /** @internal */
174
+ export namespace EditDomainRequest$ {
175
+ export type Inbound = {
176
+ slug: string;
177
+ RequestBody?: EditDomainRequestBody$.Inbound | undefined;
178
+ };
179
+
180
+ export const inboundSchema: z.ZodType<EditDomainRequest, z.ZodTypeDef, Inbound> = z
181
+ .object({
182
+ slug: z.string(),
183
+ RequestBody: z.lazy(() => EditDomainRequestBody$.inboundSchema).optional(),
184
+ })
185
+ .transform((v) => {
186
+ return {
187
+ slug: v.slug,
188
+ ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
189
+ };
190
+ });
191
+
192
+ export type Outbound = {
193
+ slug: string;
194
+ RequestBody?: EditDomainRequestBody$.Outbound | undefined;
195
+ };
196
+
197
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditDomainRequest> = z
198
+ .object({
199
+ slug: z.string(),
200
+ requestBody: z.lazy(() => EditDomainRequestBody$.outboundSchema).optional(),
201
+ })
202
+ .transform((v) => {
203
+ return {
204
+ slug: v.slug,
205
+ ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
206
+ };
207
+ });
208
+ }
209
+
210
+ /** @internal */
211
+ export const EditDomainDomainsType$ = z.nativeEnum(EditDomainDomainsType);
212
+
213
+ /** @internal */
214
+ export namespace EditDomainResponseBody$ {
215
+ export type Inbound = {
216
+ slug: string;
217
+ verified?: boolean | undefined;
218
+ primary?: boolean | undefined;
219
+ archived?: boolean | undefined;
220
+ placeholder?: string | undefined;
221
+ expiredUrl: string | null;
222
+ target: string | null;
223
+ type: EditDomainDomainsType;
224
+ clicks?: number | undefined;
225
+ };
226
+
227
+ export const inboundSchema: z.ZodType<EditDomainResponseBody, z.ZodTypeDef, Inbound> = z
228
+ .object({
229
+ slug: z.string(),
230
+ verified: z.boolean().default(false),
231
+ primary: z.boolean().default(false),
232
+ archived: z.boolean().default(false),
233
+ placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
234
+ expiredUrl: z.nullable(z.string()),
235
+ target: z.nullable(z.string()),
236
+ type: EditDomainDomainsType$,
237
+ clicks: z.number().default(0),
238
+ })
239
+ .transform((v) => {
240
+ return {
241
+ slug: v.slug,
242
+ verified: v.verified,
243
+ primary: v.primary,
244
+ archived: v.archived,
245
+ placeholder: v.placeholder,
246
+ expiredUrl: v.expiredUrl,
247
+ target: v.target,
248
+ type: v.type,
249
+ clicks: v.clicks,
250
+ };
251
+ });
252
+
253
+ export type Outbound = {
254
+ slug: string;
255
+ verified: boolean;
256
+ primary: boolean;
257
+ archived: boolean;
258
+ placeholder: string;
259
+ expiredUrl: string | null;
260
+ target: string | null;
261
+ type: EditDomainDomainsType;
262
+ clicks: number;
263
+ };
264
+
265
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditDomainResponseBody> = z
266
+ .object({
267
+ slug: z.string(),
268
+ verified: z.boolean().default(false),
269
+ primary: z.boolean().default(false),
270
+ archived: z.boolean().default(false),
271
+ placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
272
+ expiredUrl: z.nullable(z.string()),
273
+ target: z.nullable(z.string()),
274
+ type: EditDomainDomainsType$,
275
+ clicks: z.number().default(0),
276
+ })
277
+ .transform((v) => {
278
+ return {
279
+ slug: v.slug,
280
+ verified: v.verified,
281
+ primary: v.primary,
282
+ archived: v.archived,
283
+ placeholder: v.placeholder,
284
+ expiredUrl: v.expiredUrl,
285
+ target: v.target,
286
+ type: v.type,
287
+ clicks: v.clicks,
288
+ };
289
+ });
290
+ }