dub 0.24.1 → 0.24.2
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.
- package/README.md +5 -0
- package/docs/sdks/domains/README.md +5 -5
- package/docs/sdks/links/README.md +9 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/domainschema.d.ts +80 -0
- package/models/components/domainschema.d.ts.map +1 -0
- package/models/components/domainschema.js +94 -0
- package/models/components/domainschema.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/adddomain.d.ts +0 -81
- package/models/operations/adddomain.d.ts.map +1 -1
- package/models/operations/adddomain.js +1 -64
- package/models/operations/adddomain.js.map +1 -1
- package/models/operations/bulkcreatelinks.d.ts +17 -0
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js +11 -1
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/createlink.d.ts +17 -0
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js +17 -1
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/editdomain.d.ts +0 -81
- package/models/operations/editdomain.d.ts.map +1 -1
- package/models/operations/editdomain.js +1 -64
- package/models/operations/editdomain.js.map +1 -1
- package/models/operations/editlink.d.ts +17 -0
- package/models/operations/editlink.d.ts.map +1 -1
- package/models/operations/editlink.js +17 -1
- package/models/operations/editlink.js.map +1 -1
- package/models/operations/getlinks.d.ts +17 -0
- package/models/operations/getlinks.d.ts.map +1 -1
- package/models/operations/getlinks.js +17 -1
- package/models/operations/getlinks.js.map +1 -1
- package/models/operations/getlinkscount.d.ts +17 -0
- package/models/operations/getlinkscount.d.ts.map +1 -1
- package/models/operations/getlinkscount.js +11 -1
- package/models/operations/getlinkscount.js.map +1 -1
- package/models/operations/listdomains.d.ts +0 -78
- package/models/operations/listdomains.d.ts.map +1 -1
- package/models/operations/listdomains.js +1 -64
- package/models/operations/listdomains.js.map +1 -1
- package/models/operations/setprimarydomain.d.ts +0 -81
- package/models/operations/setprimarydomain.d.ts.map +1 -1
- package/models/operations/setprimarydomain.js +1 -64
- package/models/operations/setprimarydomain.js.map +1 -1
- package/models/operations/transferdomain.d.ts +0 -81
- package/models/operations/transferdomain.d.ts.map +1 -1
- package/models/operations/transferdomain.js +1 -64
- package/models/operations/transferdomain.js.map +1 -1
- package/package.json +1 -1
- package/sdk/domains.d.ts +6 -5
- package/sdk/domains.d.ts.map +1 -1
- package/sdk/domains.js +6 -5
- package/sdk/domains.js.map +1 -1
- package/sdk/links.d.ts.map +1 -1
- package/sdk/links.js +8 -0
- package/sdk/links.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/domainschema.ts +138 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/adddomain.ts +0 -136
- package/src/models/operations/bulkcreatelinks.ts +27 -0
- package/src/models/operations/createlink.ts +30 -0
- package/src/models/operations/editdomain.ts +0 -138
- package/src/models/operations/editlink.ts +30 -0
- package/src/models/operations/getlinks.ts +30 -0
- package/src/models/operations/getlinkscount.ts +29 -0
- package/src/models/operations/listdomains.ts +0 -134
- package/src/models/operations/setprimarydomain.ts +0 -137
- package/src/models/operations/transferdomain.ts +0 -137
- package/src/sdk/domains.ts +11 -10
- package/src/sdk/links.ts +8 -0
|
@@ -9,6 +9,11 @@ import * as z from "zod";
|
|
|
9
9
|
*/
|
|
10
10
|
export type TagIds = string | Array<string>;
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
14
|
+
*/
|
|
15
|
+
export type TagNames = string | Array<string>;
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
|
|
14
19
|
*/
|
|
@@ -300,6 +305,10 @@ export type CreateLinkRequestBody = {
|
|
|
300
305
|
* The unique IDs of the tags assigned to the short link.
|
|
301
306
|
*/
|
|
302
307
|
tagIds?: string | Array<string> | undefined;
|
|
308
|
+
/**
|
|
309
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
310
|
+
*/
|
|
311
|
+
tagNames?: string | Array<string> | undefined;
|
|
303
312
|
/**
|
|
304
313
|
* The comments for the short link.
|
|
305
314
|
*/
|
|
@@ -365,6 +374,21 @@ export namespace TagIds$ {
|
|
|
365
374
|
]);
|
|
366
375
|
}
|
|
367
376
|
|
|
377
|
+
/** @internal */
|
|
378
|
+
export namespace TagNames$ {
|
|
379
|
+
export type Inbound = string | Array<string>;
|
|
380
|
+
|
|
381
|
+
export type Outbound = string | Array<string>;
|
|
382
|
+
export const inboundSchema: z.ZodType<TagNames, z.ZodTypeDef, Inbound> = z.union([
|
|
383
|
+
z.string(),
|
|
384
|
+
z.array(z.string()),
|
|
385
|
+
]);
|
|
386
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TagNames> = z.union([
|
|
387
|
+
z.string(),
|
|
388
|
+
z.array(z.string()),
|
|
389
|
+
]);
|
|
390
|
+
}
|
|
391
|
+
|
|
368
392
|
/** @internal */
|
|
369
393
|
export namespace Geo$ {
|
|
370
394
|
export type Inbound = {
|
|
@@ -1901,6 +1925,7 @@ export namespace CreateLinkRequestBody$ {
|
|
|
1901
1925
|
publicStats?: boolean | undefined;
|
|
1902
1926
|
tagId?: string | null | undefined;
|
|
1903
1927
|
tagIds?: string | Array<string> | undefined;
|
|
1928
|
+
tagNames?: string | Array<string> | undefined;
|
|
1904
1929
|
comments?: string | null | undefined;
|
|
1905
1930
|
expiresAt?: string | null | undefined;
|
|
1906
1931
|
expiredUrl?: string | null | undefined;
|
|
@@ -1925,6 +1950,7 @@ export namespace CreateLinkRequestBody$ {
|
|
|
1925
1950
|
publicStats: z.boolean().default(false),
|
|
1926
1951
|
tagId: z.nullable(z.string()).optional(),
|
|
1927
1952
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1953
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1928
1954
|
comments: z.nullable(z.string()).optional(),
|
|
1929
1955
|
expiresAt: z.nullable(z.string()).optional(),
|
|
1930
1956
|
expiredUrl: z.nullable(z.string()).optional(),
|
|
@@ -1948,6 +1974,7 @@ export namespace CreateLinkRequestBody$ {
|
|
|
1948
1974
|
publicStats: v.publicStats,
|
|
1949
1975
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
1950
1976
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
1977
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
1951
1978
|
...(v.comments === undefined ? null : { comments: v.comments }),
|
|
1952
1979
|
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
|
|
1953
1980
|
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
|
|
@@ -1972,6 +1999,7 @@ export namespace CreateLinkRequestBody$ {
|
|
|
1972
1999
|
publicStats: boolean;
|
|
1973
2000
|
tagId?: string | null | undefined;
|
|
1974
2001
|
tagIds?: string | Array<string> | undefined;
|
|
2002
|
+
tagNames?: string | Array<string> | undefined;
|
|
1975
2003
|
comments?: string | null | undefined;
|
|
1976
2004
|
expiresAt?: string | null | undefined;
|
|
1977
2005
|
expiredUrl?: string | null | undefined;
|
|
@@ -1996,6 +2024,7 @@ export namespace CreateLinkRequestBody$ {
|
|
|
1996
2024
|
publicStats: z.boolean().default(false),
|
|
1997
2025
|
tagId: z.nullable(z.string()).optional(),
|
|
1998
2026
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
2027
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1999
2028
|
comments: z.nullable(z.string()).optional(),
|
|
2000
2029
|
expiresAt: z.nullable(z.string()).optional(),
|
|
2001
2030
|
expiredUrl: z.nullable(z.string()).optional(),
|
|
@@ -2019,6 +2048,7 @@ export namespace CreateLinkRequestBody$ {
|
|
|
2019
2048
|
publicStats: v.publicStats,
|
|
2020
2049
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
2021
2050
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
2051
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
2022
2052
|
...(v.comments === undefined ? null : { comments: v.comments }),
|
|
2023
2053
|
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
|
|
2024
2054
|
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
|
|
@@ -51,61 +51,6 @@ export type EditDomainRequest = {
|
|
|
51
51
|
requestBody?: EditDomainRequestBody | undefined;
|
|
52
52
|
};
|
|
53
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
54
|
/** @internal */
|
|
110
55
|
export const EditDomainType$: z.ZodNativeEnum<typeof EditDomainType> = z.nativeEnum(EditDomainType);
|
|
111
56
|
|
|
@@ -206,86 +151,3 @@ export namespace EditDomainRequest$ {
|
|
|
206
151
|
};
|
|
207
152
|
});
|
|
208
153
|
}
|
|
209
|
-
|
|
210
|
-
/** @internal */
|
|
211
|
-
export const EditDomainDomainsType$: z.ZodNativeEnum<typeof EditDomainDomainsType> =
|
|
212
|
-
z.nativeEnum(EditDomainDomainsType);
|
|
213
|
-
|
|
214
|
-
/** @internal */
|
|
215
|
-
export namespace EditDomainResponseBody$ {
|
|
216
|
-
export type Inbound = {
|
|
217
|
-
slug: string;
|
|
218
|
-
verified?: boolean | undefined;
|
|
219
|
-
primary?: boolean | undefined;
|
|
220
|
-
archived?: boolean | undefined;
|
|
221
|
-
placeholder?: string | undefined;
|
|
222
|
-
expiredUrl: string | null;
|
|
223
|
-
target: string | null;
|
|
224
|
-
type: EditDomainDomainsType;
|
|
225
|
-
clicks?: number | undefined;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
export const inboundSchema: z.ZodType<EditDomainResponseBody, z.ZodTypeDef, Inbound> = z
|
|
229
|
-
.object({
|
|
230
|
-
slug: z.string(),
|
|
231
|
-
verified: z.boolean().default(false),
|
|
232
|
-
primary: z.boolean().default(false),
|
|
233
|
-
archived: z.boolean().default(false),
|
|
234
|
-
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
235
|
-
expiredUrl: z.nullable(z.string()),
|
|
236
|
-
target: z.nullable(z.string()),
|
|
237
|
-
type: EditDomainDomainsType$,
|
|
238
|
-
clicks: z.number().default(0),
|
|
239
|
-
})
|
|
240
|
-
.transform((v) => {
|
|
241
|
-
return {
|
|
242
|
-
slug: v.slug,
|
|
243
|
-
verified: v.verified,
|
|
244
|
-
primary: v.primary,
|
|
245
|
-
archived: v.archived,
|
|
246
|
-
placeholder: v.placeholder,
|
|
247
|
-
expiredUrl: v.expiredUrl,
|
|
248
|
-
target: v.target,
|
|
249
|
-
type: v.type,
|
|
250
|
-
clicks: v.clicks,
|
|
251
|
-
};
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
export type Outbound = {
|
|
255
|
-
slug: string;
|
|
256
|
-
verified: boolean;
|
|
257
|
-
primary: boolean;
|
|
258
|
-
archived: boolean;
|
|
259
|
-
placeholder: string;
|
|
260
|
-
expiredUrl: string | null;
|
|
261
|
-
target: string | null;
|
|
262
|
-
type: EditDomainDomainsType;
|
|
263
|
-
clicks: number;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditDomainResponseBody> = z
|
|
267
|
-
.object({
|
|
268
|
-
slug: z.string(),
|
|
269
|
-
verified: z.boolean().default(false),
|
|
270
|
-
primary: z.boolean().default(false),
|
|
271
|
-
archived: z.boolean().default(false),
|
|
272
|
-
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
273
|
-
expiredUrl: z.nullable(z.string()),
|
|
274
|
-
target: z.nullable(z.string()),
|
|
275
|
-
type: EditDomainDomainsType$,
|
|
276
|
-
clicks: z.number().default(0),
|
|
277
|
-
})
|
|
278
|
-
.transform((v) => {
|
|
279
|
-
return {
|
|
280
|
-
slug: v.slug,
|
|
281
|
-
verified: v.verified,
|
|
282
|
-
primary: v.primary,
|
|
283
|
-
archived: v.archived,
|
|
284
|
-
placeholder: v.placeholder,
|
|
285
|
-
expiredUrl: v.expiredUrl,
|
|
286
|
-
target: v.target,
|
|
287
|
-
type: v.type,
|
|
288
|
-
clicks: v.clicks,
|
|
289
|
-
};
|
|
290
|
-
});
|
|
291
|
-
}
|
|
@@ -9,6 +9,11 @@ import * as z from "zod";
|
|
|
9
9
|
*/
|
|
10
10
|
export type EditLinkTagIds = string | Array<string>;
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
14
|
+
*/
|
|
15
|
+
export type EditLinkTagNames = string | Array<string>;
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
|
|
14
19
|
*/
|
|
@@ -300,6 +305,10 @@ export type EditLinkRequestBody = {
|
|
|
300
305
|
* The unique IDs of the tags assigned to the short link.
|
|
301
306
|
*/
|
|
302
307
|
tagIds?: string | Array<string> | undefined;
|
|
308
|
+
/**
|
|
309
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
310
|
+
*/
|
|
311
|
+
tagNames?: string | Array<string> | undefined;
|
|
303
312
|
/**
|
|
304
313
|
* The comments for the short link.
|
|
305
314
|
*/
|
|
@@ -373,6 +382,21 @@ export namespace EditLinkTagIds$ {
|
|
|
373
382
|
]);
|
|
374
383
|
}
|
|
375
384
|
|
|
385
|
+
/** @internal */
|
|
386
|
+
export namespace EditLinkTagNames$ {
|
|
387
|
+
export type Inbound = string | Array<string>;
|
|
388
|
+
|
|
389
|
+
export type Outbound = string | Array<string>;
|
|
390
|
+
export const inboundSchema: z.ZodType<EditLinkTagNames, z.ZodTypeDef, Inbound> = z.union([
|
|
391
|
+
z.string(),
|
|
392
|
+
z.array(z.string()),
|
|
393
|
+
]);
|
|
394
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkTagNames> = z.union([
|
|
395
|
+
z.string(),
|
|
396
|
+
z.array(z.string()),
|
|
397
|
+
]);
|
|
398
|
+
}
|
|
399
|
+
|
|
376
400
|
/** @internal */
|
|
377
401
|
export namespace EditLinkGeo$ {
|
|
378
402
|
export type Inbound = {
|
|
@@ -1909,6 +1933,7 @@ export namespace EditLinkRequestBody$ {
|
|
|
1909
1933
|
publicStats?: boolean | undefined;
|
|
1910
1934
|
tagId?: string | null | undefined;
|
|
1911
1935
|
tagIds?: string | Array<string> | undefined;
|
|
1936
|
+
tagNames?: string | Array<string> | undefined;
|
|
1912
1937
|
comments?: string | null | undefined;
|
|
1913
1938
|
expiresAt?: string | null | undefined;
|
|
1914
1939
|
expiredUrl?: string | null | undefined;
|
|
@@ -1933,6 +1958,7 @@ export namespace EditLinkRequestBody$ {
|
|
|
1933
1958
|
publicStats: z.boolean().default(false),
|
|
1934
1959
|
tagId: z.nullable(z.string()).optional(),
|
|
1935
1960
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1961
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1936
1962
|
comments: z.nullable(z.string()).optional(),
|
|
1937
1963
|
expiresAt: z.nullable(z.string()).optional(),
|
|
1938
1964
|
expiredUrl: z.nullable(z.string()).optional(),
|
|
@@ -1956,6 +1982,7 @@ export namespace EditLinkRequestBody$ {
|
|
|
1956
1982
|
publicStats: v.publicStats,
|
|
1957
1983
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
1958
1984
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
1985
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
1959
1986
|
...(v.comments === undefined ? null : { comments: v.comments }),
|
|
1960
1987
|
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
|
|
1961
1988
|
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
|
|
@@ -1980,6 +2007,7 @@ export namespace EditLinkRequestBody$ {
|
|
|
1980
2007
|
publicStats: boolean;
|
|
1981
2008
|
tagId?: string | null | undefined;
|
|
1982
2009
|
tagIds?: string | Array<string> | undefined;
|
|
2010
|
+
tagNames?: string | Array<string> | undefined;
|
|
1983
2011
|
comments?: string | null | undefined;
|
|
1984
2012
|
expiresAt?: string | null | undefined;
|
|
1985
2013
|
expiredUrl?: string | null | undefined;
|
|
@@ -2004,6 +2032,7 @@ export namespace EditLinkRequestBody$ {
|
|
|
2004
2032
|
publicStats: z.boolean().default(false),
|
|
2005
2033
|
tagId: z.nullable(z.string()).optional(),
|
|
2006
2034
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
2035
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
2007
2036
|
comments: z.nullable(z.string()).optional(),
|
|
2008
2037
|
expiresAt: z.nullable(z.string()).optional(),
|
|
2009
2038
|
expiredUrl: z.nullable(z.string()).optional(),
|
|
@@ -2027,6 +2056,7 @@ export namespace EditLinkRequestBody$ {
|
|
|
2027
2056
|
publicStats: v.publicStats,
|
|
2028
2057
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
2029
2058
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
2059
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
2030
2060
|
...(v.comments === undefined ? null : { comments: v.comments }),
|
|
2031
2061
|
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
|
|
2032
2062
|
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
|
|
@@ -9,6 +9,11 @@ import * as z from "zod";
|
|
|
9
9
|
*/
|
|
10
10
|
export type QueryParamTagIds = string | Array<string>;
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
14
|
+
*/
|
|
15
|
+
export type QueryParamTagNames = string | Array<string>;
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* The field to sort the links by. The default is `createdAt`, and sort order is always descending.
|
|
14
19
|
*/
|
|
@@ -35,6 +40,10 @@ export type GetLinksRequest = {
|
|
|
35
40
|
* The tag IDs to filter the links by.
|
|
36
41
|
*/
|
|
37
42
|
tagIds?: string | Array<string> | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
45
|
+
*/
|
|
46
|
+
tagNames?: string | Array<string> | undefined;
|
|
38
47
|
/**
|
|
39
48
|
* The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
|
|
40
49
|
*/
|
|
@@ -76,6 +85,21 @@ export namespace QueryParamTagIds$ {
|
|
|
76
85
|
]);
|
|
77
86
|
}
|
|
78
87
|
|
|
88
|
+
/** @internal */
|
|
89
|
+
export namespace QueryParamTagNames$ {
|
|
90
|
+
export type Inbound = string | Array<string>;
|
|
91
|
+
|
|
92
|
+
export type Outbound = string | Array<string>;
|
|
93
|
+
export const inboundSchema: z.ZodType<QueryParamTagNames, z.ZodTypeDef, Inbound> = z.union([
|
|
94
|
+
z.string(),
|
|
95
|
+
z.array(z.string()),
|
|
96
|
+
]);
|
|
97
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, QueryParamTagNames> = z.union([
|
|
98
|
+
z.string(),
|
|
99
|
+
z.array(z.string()),
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
|
|
79
103
|
/** @internal */
|
|
80
104
|
export const Sort$: z.ZodNativeEnum<typeof Sort> = z.nativeEnum(Sort);
|
|
81
105
|
|
|
@@ -85,6 +109,7 @@ export namespace GetLinksRequest$ {
|
|
|
85
109
|
domain?: string | undefined;
|
|
86
110
|
tagId?: string | undefined;
|
|
87
111
|
tagIds?: string | Array<string> | undefined;
|
|
112
|
+
tagNames?: string | Array<string> | undefined;
|
|
88
113
|
search?: string | undefined;
|
|
89
114
|
userId?: string | undefined;
|
|
90
115
|
showArchived?: boolean | undefined;
|
|
@@ -98,6 +123,7 @@ export namespace GetLinksRequest$ {
|
|
|
98
123
|
domain: z.string().optional(),
|
|
99
124
|
tagId: z.string().optional(),
|
|
100
125
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
126
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
101
127
|
search: z.string().optional(),
|
|
102
128
|
userId: z.string().optional(),
|
|
103
129
|
showArchived: z.boolean().default(false),
|
|
@@ -110,6 +136,7 @@ export namespace GetLinksRequest$ {
|
|
|
110
136
|
...(v.domain === undefined ? null : { domain: v.domain }),
|
|
111
137
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
112
138
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
139
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
113
140
|
...(v.search === undefined ? null : { search: v.search }),
|
|
114
141
|
...(v.userId === undefined ? null : { userId: v.userId }),
|
|
115
142
|
showArchived: v.showArchived,
|
|
@@ -123,6 +150,7 @@ export namespace GetLinksRequest$ {
|
|
|
123
150
|
domain?: string | undefined;
|
|
124
151
|
tagId?: string | undefined;
|
|
125
152
|
tagIds?: string | Array<string> | undefined;
|
|
153
|
+
tagNames?: string | Array<string> | undefined;
|
|
126
154
|
search?: string | undefined;
|
|
127
155
|
userId?: string | undefined;
|
|
128
156
|
showArchived: boolean;
|
|
@@ -136,6 +164,7 @@ export namespace GetLinksRequest$ {
|
|
|
136
164
|
domain: z.string().optional(),
|
|
137
165
|
tagId: z.string().optional(),
|
|
138
166
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
167
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
139
168
|
search: z.string().optional(),
|
|
140
169
|
userId: z.string().optional(),
|
|
141
170
|
showArchived: z.boolean().default(false),
|
|
@@ -148,6 +177,7 @@ export namespace GetLinksRequest$ {
|
|
|
148
177
|
...(v.domain === undefined ? null : { domain: v.domain }),
|
|
149
178
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
150
179
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
180
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
151
181
|
...(v.search === undefined ? null : { search: v.search }),
|
|
152
182
|
...(v.userId === undefined ? null : { userId: v.userId }),
|
|
153
183
|
showArchived: v.showArchived,
|
|
@@ -9,6 +9,11 @@ import * as z from "zod";
|
|
|
9
9
|
*/
|
|
10
10
|
export type GetLinksCountQueryParamTagIds = string | Array<string>;
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
14
|
+
*/
|
|
15
|
+
export type GetLinksCountQueryParamTagNames = string | Array<string>;
|
|
16
|
+
|
|
12
17
|
export const Two = {
|
|
13
18
|
TagId: "tagId",
|
|
14
19
|
} as const;
|
|
@@ -37,6 +42,10 @@ export type GetLinksCountRequest = {
|
|
|
37
42
|
* The tag IDs to filter the links by.
|
|
38
43
|
*/
|
|
39
44
|
tagIds?: string | Array<string> | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The unique name of the tags assigned to the short link (case insensitive).
|
|
47
|
+
*/
|
|
48
|
+
tagNames?: string | Array<string> | undefined;
|
|
40
49
|
/**
|
|
41
50
|
* The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
|
|
42
51
|
*/
|
|
@@ -70,6 +79,20 @@ export namespace GetLinksCountQueryParamTagIds$ {
|
|
|
70
79
|
z.union([z.string(), z.array(z.string())]);
|
|
71
80
|
}
|
|
72
81
|
|
|
82
|
+
/** @internal */
|
|
83
|
+
export namespace GetLinksCountQueryParamTagNames$ {
|
|
84
|
+
export type Inbound = string | Array<string>;
|
|
85
|
+
|
|
86
|
+
export type Outbound = string | Array<string>;
|
|
87
|
+
export const inboundSchema: z.ZodType<GetLinksCountQueryParamTagNames, z.ZodTypeDef, Inbound> =
|
|
88
|
+
z.union([z.string(), z.array(z.string())]);
|
|
89
|
+
export const outboundSchema: z.ZodType<
|
|
90
|
+
Outbound,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
GetLinksCountQueryParamTagNames
|
|
93
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
94
|
+
}
|
|
95
|
+
|
|
73
96
|
/** @internal */
|
|
74
97
|
export const Two$: z.ZodNativeEnum<typeof Two> = z.nativeEnum(Two);
|
|
75
98
|
|
|
@@ -91,6 +114,7 @@ export namespace GetLinksCountRequest$ {
|
|
|
91
114
|
domain?: string | undefined;
|
|
92
115
|
tagId?: string | undefined;
|
|
93
116
|
tagIds?: string | Array<string> | undefined;
|
|
117
|
+
tagNames?: string | Array<string> | undefined;
|
|
94
118
|
search?: string | undefined;
|
|
95
119
|
userId?: string | undefined;
|
|
96
120
|
showArchived?: boolean | undefined;
|
|
@@ -103,6 +127,7 @@ export namespace GetLinksCountRequest$ {
|
|
|
103
127
|
domain: z.string().optional(),
|
|
104
128
|
tagId: z.string().optional(),
|
|
105
129
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
130
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
106
131
|
search: z.string().optional(),
|
|
107
132
|
userId: z.string().optional(),
|
|
108
133
|
showArchived: z.boolean().default(false),
|
|
@@ -114,6 +139,7 @@ export namespace GetLinksCountRequest$ {
|
|
|
114
139
|
...(v.domain === undefined ? null : { domain: v.domain }),
|
|
115
140
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
116
141
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
142
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
117
143
|
...(v.search === undefined ? null : { search: v.search }),
|
|
118
144
|
...(v.userId === undefined ? null : { userId: v.userId }),
|
|
119
145
|
showArchived: v.showArchived,
|
|
@@ -126,6 +152,7 @@ export namespace GetLinksCountRequest$ {
|
|
|
126
152
|
domain?: string | undefined;
|
|
127
153
|
tagId?: string | undefined;
|
|
128
154
|
tagIds?: string | Array<string> | undefined;
|
|
155
|
+
tagNames?: string | Array<string> | undefined;
|
|
129
156
|
search?: string | undefined;
|
|
130
157
|
userId?: string | undefined;
|
|
131
158
|
showArchived: boolean;
|
|
@@ -138,6 +165,7 @@ export namespace GetLinksCountRequest$ {
|
|
|
138
165
|
domain: z.string().optional(),
|
|
139
166
|
tagId: z.string().optional(),
|
|
140
167
|
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
168
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
141
169
|
search: z.string().optional(),
|
|
142
170
|
userId: z.string().optional(),
|
|
143
171
|
showArchived: z.boolean().default(false),
|
|
@@ -149,6 +177,7 @@ export namespace GetLinksCountRequest$ {
|
|
|
149
177
|
...(v.domain === undefined ? null : { domain: v.domain }),
|
|
150
178
|
...(v.tagId === undefined ? null : { tagId: v.tagId }),
|
|
151
179
|
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
|
|
180
|
+
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
|
|
152
181
|
...(v.search === undefined ? null : { search: v.search }),
|
|
153
182
|
...(v.userId === undefined ? null : { userId: v.userId }),
|
|
154
183
|
showArchived: v.showArchived,
|
|
@@ -6,57 +6,6 @@ import * as z from "zod";
|
|
|
6
6
|
|
|
7
7
|
export type ListDomainsRequest = {};
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* The type of redirect to use for this domain.
|
|
11
|
-
*/
|
|
12
|
-
export const ListDomainsType = {
|
|
13
|
-
Redirect: "redirect",
|
|
14
|
-
Rewrite: "rewrite",
|
|
15
|
-
} as const;
|
|
16
|
-
/**
|
|
17
|
-
* The type of redirect to use for this domain.
|
|
18
|
-
*/
|
|
19
|
-
export type ListDomainsType = (typeof ListDomainsType)[keyof typeof ListDomainsType];
|
|
20
|
-
|
|
21
|
-
export type ListDomainsResponseBody = {
|
|
22
|
-
/**
|
|
23
|
-
* The domain name.
|
|
24
|
-
*/
|
|
25
|
-
slug: string;
|
|
26
|
-
/**
|
|
27
|
-
* Whether the domain is verified.
|
|
28
|
-
*/
|
|
29
|
-
verified?: boolean | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Whether the domain is the primary domain for the workspace.
|
|
32
|
-
*/
|
|
33
|
-
primary?: boolean | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the domain is archived.
|
|
36
|
-
*/
|
|
37
|
-
archived?: boolean | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
|
|
40
|
-
*/
|
|
41
|
-
placeholder?: string | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* The URL to redirect to when a link under this domain has expired.
|
|
44
|
-
*/
|
|
45
|
-
expiredUrl: string | null;
|
|
46
|
-
/**
|
|
47
|
-
* The page your users will get redirected to when they visit your domain.
|
|
48
|
-
*/
|
|
49
|
-
target: string | null;
|
|
50
|
-
/**
|
|
51
|
-
* The type of redirect to use for this domain.
|
|
52
|
-
*/
|
|
53
|
-
type: ListDomainsType;
|
|
54
|
-
/**
|
|
55
|
-
* The number of clicks on the domain.
|
|
56
|
-
*/
|
|
57
|
-
clicks?: number | undefined;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
9
|
/** @internal */
|
|
61
10
|
export namespace ListDomainsRequest$ {
|
|
62
11
|
export type Inbound = {};
|
|
@@ -69,86 +18,3 @@ export namespace ListDomainsRequest$ {
|
|
|
69
18
|
{}
|
|
70
19
|
);
|
|
71
20
|
}
|
|
72
|
-
|
|
73
|
-
/** @internal */
|
|
74
|
-
export const ListDomainsType$: z.ZodNativeEnum<typeof ListDomainsType> =
|
|
75
|
-
z.nativeEnum(ListDomainsType);
|
|
76
|
-
|
|
77
|
-
/** @internal */
|
|
78
|
-
export namespace ListDomainsResponseBody$ {
|
|
79
|
-
export type Inbound = {
|
|
80
|
-
slug: string;
|
|
81
|
-
verified?: boolean | undefined;
|
|
82
|
-
primary?: boolean | undefined;
|
|
83
|
-
archived?: boolean | undefined;
|
|
84
|
-
placeholder?: string | undefined;
|
|
85
|
-
expiredUrl: string | null;
|
|
86
|
-
target: string | null;
|
|
87
|
-
type: ListDomainsType;
|
|
88
|
-
clicks?: number | undefined;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export const inboundSchema: z.ZodType<ListDomainsResponseBody, z.ZodTypeDef, Inbound> = z
|
|
92
|
-
.object({
|
|
93
|
-
slug: z.string(),
|
|
94
|
-
verified: z.boolean().default(false),
|
|
95
|
-
primary: z.boolean().default(false),
|
|
96
|
-
archived: z.boolean().default(false),
|
|
97
|
-
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
98
|
-
expiredUrl: z.nullable(z.string()),
|
|
99
|
-
target: z.nullable(z.string()),
|
|
100
|
-
type: ListDomainsType$,
|
|
101
|
-
clicks: z.number().default(0),
|
|
102
|
-
})
|
|
103
|
-
.transform((v) => {
|
|
104
|
-
return {
|
|
105
|
-
slug: v.slug,
|
|
106
|
-
verified: v.verified,
|
|
107
|
-
primary: v.primary,
|
|
108
|
-
archived: v.archived,
|
|
109
|
-
placeholder: v.placeholder,
|
|
110
|
-
expiredUrl: v.expiredUrl,
|
|
111
|
-
target: v.target,
|
|
112
|
-
type: v.type,
|
|
113
|
-
clicks: v.clicks,
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
export type Outbound = {
|
|
118
|
-
slug: string;
|
|
119
|
-
verified: boolean;
|
|
120
|
-
primary: boolean;
|
|
121
|
-
archived: boolean;
|
|
122
|
-
placeholder: string;
|
|
123
|
-
expiredUrl: string | null;
|
|
124
|
-
target: string | null;
|
|
125
|
-
type: ListDomainsType;
|
|
126
|
-
clicks: number;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListDomainsResponseBody> = z
|
|
130
|
-
.object({
|
|
131
|
-
slug: z.string(),
|
|
132
|
-
verified: z.boolean().default(false),
|
|
133
|
-
primary: z.boolean().default(false),
|
|
134
|
-
archived: z.boolean().default(false),
|
|
135
|
-
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
136
|
-
expiredUrl: z.nullable(z.string()),
|
|
137
|
-
target: z.nullable(z.string()),
|
|
138
|
-
type: ListDomainsType$,
|
|
139
|
-
clicks: z.number().default(0),
|
|
140
|
-
})
|
|
141
|
-
.transform((v) => {
|
|
142
|
-
return {
|
|
143
|
-
slug: v.slug,
|
|
144
|
-
verified: v.verified,
|
|
145
|
-
primary: v.primary,
|
|
146
|
-
archived: v.archived,
|
|
147
|
-
placeholder: v.placeholder,
|
|
148
|
-
expiredUrl: v.expiredUrl,
|
|
149
|
-
target: v.target,
|
|
150
|
-
type: v.type,
|
|
151
|
-
clicks: v.clicks,
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
}
|