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.
- package/.speakeasy/gen.lock +36 -6
- package/.speakeasy/gen.yaml +2 -1
- package/.speakeasy/workflow.lock +21 -0
- package/.speakeasy/workflow.yaml +1 -0
- package/README.md +18 -7
- package/docs/sdks/analytics/README.md +10 -10
- package/docs/sdks/domains/README.md +331 -0
- package/docs/sdks/links/README.md +17 -13
- package/docs/sdks/metatags/README.md +1 -1
- package/docs/sdks/qrcodes/README.md +1 -1
- package/docs/sdks/tags/README.md +2 -2
- package/docs/sdks/workspaces/README.md +3 -3
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/workspaceschema.d.ts +4 -4
- package/models/components/workspaceschema.d.ts.map +1 -1
- package/models/components/workspaceschema.js +2 -2
- package/models/components/workspaceschema.js.map +1 -1
- package/models/operations/adddomain.d.ts +149 -0
- package/models/operations/adddomain.d.ts.map +1 -0
- package/models/operations/adddomain.js +145 -0
- package/models/operations/adddomain.js.map +1 -0
- package/models/operations/bulkcreatelinks.d.ts +1 -751
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/createlink.d.ts +1 -751
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/deletedomain.d.ts +39 -0
- package/models/operations/deletedomain.d.ts.map +1 -0
- package/models/operations/deletedomain.js +75 -0
- package/models/operations/deletedomain.js.map +1 -0
- package/models/operations/editdomain.d.ts +169 -0
- package/models/operations/editdomain.d.ts.map +1 -0
- package/models/operations/editdomain.js +171 -0
- package/models/operations/editdomain.js.map +1 -0
- package/models/operations/editlink.d.ts +1 -751
- package/models/operations/editlink.d.ts.map +1 -1
- package/models/operations/editlink.js.map +1 -1
- package/models/operations/getmetatags.d.ts +9 -9
- package/models/operations/getmetatags.d.ts.map +1 -1
- package/models/operations/getmetatags.js +12 -12
- package/models/operations/getmetatags.js.map +1 -1
- package/models/operations/index.d.ts +6 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +6 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdomains.d.ts +91 -0
- package/models/operations/listdomains.d.ts.map +1 -0
- package/models/operations/listdomains.js +100 -0
- package/models/operations/listdomains.js.map +1 -0
- package/models/operations/setprimarydomain.d.ts +103 -0
- package/models/operations/setprimarydomain.d.ts.map +1 -0
- package/models/operations/setprimarydomain.js +116 -0
- package/models/operations/setprimarydomain.js.map +1 -0
- package/models/operations/transferdomain.d.ts +123 -0
- package/models/operations/transferdomain.d.ts.map +1 -0
- package/models/operations/transferdomain.js +142 -0
- package/models/operations/transferdomain.js.map +1 -0
- package/package.json +2 -3
- package/sdk/domains.d.ts +50 -0
- package/sdk/domains.d.ts.map +1 -0
- package/sdk/domains.js +1130 -0
- package/sdk/domains.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/workspaceschema.ts +6 -6
- package/src/models/operations/adddomain.ts +244 -0
- package/src/models/operations/bulkcreatelinks.ts +1 -751
- package/src/models/operations/createlink.ts +1 -751
- package/src/models/operations/deletedomain.ts +84 -0
- package/src/models/operations/editdomain.ts +290 -0
- package/src/models/operations/editlink.ts +1 -751
- package/src/models/operations/getmetatags.ts +21 -21
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/listdomains.ts +153 -0
- package/src/models/operations/setprimarydomain.ts +179 -0
- package/src/models/operations/transferdomain.ts +224 -0
- package/src/sdk/domains.ts +1387 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -15,15 +15,15 @@ export type GetMetatagsResponseBody = {
|
|
|
15
15
|
/**
|
|
16
16
|
* The meta title tag for the URL
|
|
17
17
|
*/
|
|
18
|
-
title
|
|
18
|
+
title: string;
|
|
19
19
|
/**
|
|
20
20
|
* The meta description tag for the URL
|
|
21
21
|
*/
|
|
22
|
-
description
|
|
22
|
+
description: string;
|
|
23
23
|
/**
|
|
24
24
|
* The OpenGraph image for the URL
|
|
25
25
|
*/
|
|
26
|
-
image
|
|
26
|
+
image: string;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/** @internal */
|
|
@@ -60,42 +60,42 @@ export namespace GetMetatagsRequest$ {
|
|
|
60
60
|
/** @internal */
|
|
61
61
|
export namespace GetMetatagsResponseBody$ {
|
|
62
62
|
export type Inbound = {
|
|
63
|
-
title
|
|
64
|
-
description
|
|
65
|
-
image
|
|
63
|
+
title: string;
|
|
64
|
+
description: string;
|
|
65
|
+
image: string;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
export const inboundSchema: z.ZodType<GetMetatagsResponseBody, z.ZodTypeDef, Inbound> = z
|
|
69
69
|
.object({
|
|
70
|
-
title: z.string()
|
|
71
|
-
description: z.string()
|
|
72
|
-
image: z.string()
|
|
70
|
+
title: z.string(),
|
|
71
|
+
description: z.string(),
|
|
72
|
+
image: z.string(),
|
|
73
73
|
})
|
|
74
74
|
.transform((v) => {
|
|
75
75
|
return {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
title: v.title,
|
|
77
|
+
description: v.description,
|
|
78
|
+
image: v.image,
|
|
79
79
|
};
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
export type Outbound = {
|
|
83
|
-
title
|
|
84
|
-
description
|
|
85
|
-
image
|
|
83
|
+
title: string;
|
|
84
|
+
description: string;
|
|
85
|
+
image: string;
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetatagsResponseBody> = z
|
|
89
89
|
.object({
|
|
90
|
-
title: z.string()
|
|
91
|
-
description: z.string()
|
|
92
|
-
image: z.string()
|
|
90
|
+
title: z.string(),
|
|
91
|
+
description: z.string(),
|
|
92
|
+
image: z.string(),
|
|
93
93
|
})
|
|
94
94
|
.transform((v) => {
|
|
95
95
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
title: v.title,
|
|
97
|
+
description: v.description,
|
|
98
|
+
image: v.image,
|
|
99
99
|
};
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./adddomain";
|
|
5
6
|
export * from "./bulkcreatelinks";
|
|
6
7
|
export * from "./createlink";
|
|
7
8
|
export * from "./createtag";
|
|
8
9
|
export * from "./createworkspace";
|
|
10
|
+
export * from "./deletedomain";
|
|
9
11
|
export * from "./deletelink";
|
|
12
|
+
export * from "./editdomain";
|
|
10
13
|
export * from "./editlink";
|
|
11
14
|
export * from "./getbrowseranalytics";
|
|
12
15
|
export * from "./getcityanalytics";
|
|
@@ -25,3 +28,6 @@ export * from "./gettimeseriesanalytics";
|
|
|
25
28
|
export * from "./gettoplinks";
|
|
26
29
|
export * from "./gettopurls";
|
|
27
30
|
export * from "./getworkspace";
|
|
31
|
+
export * from "./listdomains";
|
|
32
|
+
export * from "./setprimarydomain";
|
|
33
|
+
export * from "./transferdomain";
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type ListDomainsRequest = {};
|
|
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
|
+
/** @internal */
|
|
61
|
+
export namespace ListDomainsRequest$ {
|
|
62
|
+
export type Inbound = {};
|
|
63
|
+
|
|
64
|
+
export const inboundSchema: z.ZodType<ListDomainsRequest, z.ZodTypeDef, Inbound> = z.object({});
|
|
65
|
+
|
|
66
|
+
export type Outbound = {};
|
|
67
|
+
|
|
68
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListDomainsRequest> = z.object(
|
|
69
|
+
{}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const ListDomainsType$ = z.nativeEnum(ListDomainsType);
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export namespace ListDomainsResponseBody$ {
|
|
78
|
+
export type Inbound = {
|
|
79
|
+
slug: string;
|
|
80
|
+
verified?: boolean | undefined;
|
|
81
|
+
primary?: boolean | undefined;
|
|
82
|
+
archived?: boolean | undefined;
|
|
83
|
+
placeholder?: string | undefined;
|
|
84
|
+
expiredUrl: string | null;
|
|
85
|
+
target: string | null;
|
|
86
|
+
type: ListDomainsType;
|
|
87
|
+
clicks?: number | undefined;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const inboundSchema: z.ZodType<ListDomainsResponseBody, z.ZodTypeDef, Inbound> = z
|
|
91
|
+
.object({
|
|
92
|
+
slug: z.string(),
|
|
93
|
+
verified: z.boolean().default(false),
|
|
94
|
+
primary: z.boolean().default(false),
|
|
95
|
+
archived: z.boolean().default(false),
|
|
96
|
+
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
97
|
+
expiredUrl: z.nullable(z.string()),
|
|
98
|
+
target: z.nullable(z.string()),
|
|
99
|
+
type: ListDomainsType$,
|
|
100
|
+
clicks: z.number().default(0),
|
|
101
|
+
})
|
|
102
|
+
.transform((v) => {
|
|
103
|
+
return {
|
|
104
|
+
slug: v.slug,
|
|
105
|
+
verified: v.verified,
|
|
106
|
+
primary: v.primary,
|
|
107
|
+
archived: v.archived,
|
|
108
|
+
placeholder: v.placeholder,
|
|
109
|
+
expiredUrl: v.expiredUrl,
|
|
110
|
+
target: v.target,
|
|
111
|
+
type: v.type,
|
|
112
|
+
clicks: v.clicks,
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export type Outbound = {
|
|
117
|
+
slug: string;
|
|
118
|
+
verified: boolean;
|
|
119
|
+
primary: boolean;
|
|
120
|
+
archived: boolean;
|
|
121
|
+
placeholder: string;
|
|
122
|
+
expiredUrl: string | null;
|
|
123
|
+
target: string | null;
|
|
124
|
+
type: ListDomainsType;
|
|
125
|
+
clicks: number;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListDomainsResponseBody> = z
|
|
129
|
+
.object({
|
|
130
|
+
slug: z.string(),
|
|
131
|
+
verified: z.boolean().default(false),
|
|
132
|
+
primary: z.boolean().default(false),
|
|
133
|
+
archived: z.boolean().default(false),
|
|
134
|
+
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
135
|
+
expiredUrl: z.nullable(z.string()),
|
|
136
|
+
target: z.nullable(z.string()),
|
|
137
|
+
type: ListDomainsType$,
|
|
138
|
+
clicks: z.number().default(0),
|
|
139
|
+
})
|
|
140
|
+
.transform((v) => {
|
|
141
|
+
return {
|
|
142
|
+
slug: v.slug,
|
|
143
|
+
verified: v.verified,
|
|
144
|
+
primary: v.primary,
|
|
145
|
+
archived: v.archived,
|
|
146
|
+
placeholder: v.placeholder,
|
|
147
|
+
expiredUrl: v.expiredUrl,
|
|
148
|
+
target: v.target,
|
|
149
|
+
type: v.type,
|
|
150
|
+
clicks: v.clicks,
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type SetPrimaryDomainRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The domain name.
|
|
10
|
+
*/
|
|
11
|
+
slug: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The type of redirect to use for this domain.
|
|
16
|
+
*/
|
|
17
|
+
export const SetPrimaryDomainType = {
|
|
18
|
+
Redirect: "redirect",
|
|
19
|
+
Rewrite: "rewrite",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* The type of redirect to use for this domain.
|
|
23
|
+
*/
|
|
24
|
+
export type SetPrimaryDomainType = (typeof SetPrimaryDomainType)[keyof typeof SetPrimaryDomainType];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The domain was set as primary
|
|
28
|
+
*/
|
|
29
|
+
export type SetPrimaryDomainResponseBody = {
|
|
30
|
+
/**
|
|
31
|
+
* The domain name.
|
|
32
|
+
*/
|
|
33
|
+
slug: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the domain is verified.
|
|
36
|
+
*/
|
|
37
|
+
verified?: boolean | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the domain is the primary domain for the workspace.
|
|
40
|
+
*/
|
|
41
|
+
primary?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the domain is archived.
|
|
44
|
+
*/
|
|
45
|
+
archived?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
|
|
48
|
+
*/
|
|
49
|
+
placeholder?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The URL to redirect to when a link under this domain has expired.
|
|
52
|
+
*/
|
|
53
|
+
expiredUrl: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* The page your users will get redirected to when they visit your domain.
|
|
56
|
+
*/
|
|
57
|
+
target: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* The type of redirect to use for this domain.
|
|
60
|
+
*/
|
|
61
|
+
type: SetPrimaryDomainType;
|
|
62
|
+
/**
|
|
63
|
+
* The number of clicks on the domain.
|
|
64
|
+
*/
|
|
65
|
+
clicks?: number | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export namespace SetPrimaryDomainRequest$ {
|
|
70
|
+
export type Inbound = {
|
|
71
|
+
slug: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const inboundSchema: z.ZodType<SetPrimaryDomainRequest, z.ZodTypeDef, Inbound> = z
|
|
75
|
+
.object({
|
|
76
|
+
slug: z.string(),
|
|
77
|
+
})
|
|
78
|
+
.transform((v) => {
|
|
79
|
+
return {
|
|
80
|
+
slug: v.slug,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export type Outbound = {
|
|
85
|
+
slug: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainRequest> = z
|
|
89
|
+
.object({
|
|
90
|
+
slug: z.string(),
|
|
91
|
+
})
|
|
92
|
+
.transform((v) => {
|
|
93
|
+
return {
|
|
94
|
+
slug: v.slug,
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const SetPrimaryDomainType$ = z.nativeEnum(SetPrimaryDomainType);
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export namespace SetPrimaryDomainResponseBody$ {
|
|
104
|
+
export type Inbound = {
|
|
105
|
+
slug: string;
|
|
106
|
+
verified?: boolean | undefined;
|
|
107
|
+
primary?: boolean | undefined;
|
|
108
|
+
archived?: boolean | undefined;
|
|
109
|
+
placeholder?: string | undefined;
|
|
110
|
+
expiredUrl: string | null;
|
|
111
|
+
target: string | null;
|
|
112
|
+
type: SetPrimaryDomainType;
|
|
113
|
+
clicks?: number | undefined;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const inboundSchema: z.ZodType<SetPrimaryDomainResponseBody, z.ZodTypeDef, Inbound> = z
|
|
117
|
+
.object({
|
|
118
|
+
slug: z.string(),
|
|
119
|
+
verified: z.boolean().default(false),
|
|
120
|
+
primary: z.boolean().default(false),
|
|
121
|
+
archived: z.boolean().default(false),
|
|
122
|
+
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
123
|
+
expiredUrl: z.nullable(z.string()),
|
|
124
|
+
target: z.nullable(z.string()),
|
|
125
|
+
type: SetPrimaryDomainType$,
|
|
126
|
+
clicks: z.number().default(0),
|
|
127
|
+
})
|
|
128
|
+
.transform((v) => {
|
|
129
|
+
return {
|
|
130
|
+
slug: v.slug,
|
|
131
|
+
verified: v.verified,
|
|
132
|
+
primary: v.primary,
|
|
133
|
+
archived: v.archived,
|
|
134
|
+
placeholder: v.placeholder,
|
|
135
|
+
expiredUrl: v.expiredUrl,
|
|
136
|
+
target: v.target,
|
|
137
|
+
type: v.type,
|
|
138
|
+
clicks: v.clicks,
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export type Outbound = {
|
|
143
|
+
slug: string;
|
|
144
|
+
verified: boolean;
|
|
145
|
+
primary: boolean;
|
|
146
|
+
archived: boolean;
|
|
147
|
+
placeholder: string;
|
|
148
|
+
expiredUrl: string | null;
|
|
149
|
+
target: string | null;
|
|
150
|
+
type: SetPrimaryDomainType;
|
|
151
|
+
clicks: number;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainResponseBody> = z
|
|
155
|
+
.object({
|
|
156
|
+
slug: z.string(),
|
|
157
|
+
verified: z.boolean().default(false),
|
|
158
|
+
primary: z.boolean().default(false),
|
|
159
|
+
archived: z.boolean().default(false),
|
|
160
|
+
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
161
|
+
expiredUrl: z.nullable(z.string()),
|
|
162
|
+
target: z.nullable(z.string()),
|
|
163
|
+
type: SetPrimaryDomainType$,
|
|
164
|
+
clicks: z.number().default(0),
|
|
165
|
+
})
|
|
166
|
+
.transform((v) => {
|
|
167
|
+
return {
|
|
168
|
+
slug: v.slug,
|
|
169
|
+
verified: v.verified,
|
|
170
|
+
primary: v.primary,
|
|
171
|
+
archived: v.archived,
|
|
172
|
+
placeholder: v.placeholder,
|
|
173
|
+
expiredUrl: v.expiredUrl,
|
|
174
|
+
target: v.target,
|
|
175
|
+
type: v.type,
|
|
176
|
+
clicks: v.clicks,
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type TransferDomainRequestBody = {
|
|
8
|
+
/**
|
|
9
|
+
* The ID of the new workspace to transfer the domain to.
|
|
10
|
+
*/
|
|
11
|
+
newWorkspaceId: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type TransferDomainRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* The domain name.
|
|
17
|
+
*/
|
|
18
|
+
slug: string;
|
|
19
|
+
requestBody?: TransferDomainRequestBody | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The type of redirect to use for this domain.
|
|
24
|
+
*/
|
|
25
|
+
export const TransferDomainType = {
|
|
26
|
+
Redirect: "redirect",
|
|
27
|
+
Rewrite: "rewrite",
|
|
28
|
+
} as const;
|
|
29
|
+
/**
|
|
30
|
+
* The type of redirect to use for this domain.
|
|
31
|
+
*/
|
|
32
|
+
export type TransferDomainType = (typeof TransferDomainType)[keyof typeof TransferDomainType];
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The domain transfer initiated
|
|
36
|
+
*/
|
|
37
|
+
export type TransferDomainResponseBody = {
|
|
38
|
+
/**
|
|
39
|
+
* The domain name.
|
|
40
|
+
*/
|
|
41
|
+
slug: string;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the domain is verified.
|
|
44
|
+
*/
|
|
45
|
+
verified?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the domain is the primary domain for the workspace.
|
|
48
|
+
*/
|
|
49
|
+
primary?: boolean | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the domain is archived.
|
|
52
|
+
*/
|
|
53
|
+
archived?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
|
|
56
|
+
*/
|
|
57
|
+
placeholder?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The URL to redirect to when a link under this domain has expired.
|
|
60
|
+
*/
|
|
61
|
+
expiredUrl: string | null;
|
|
62
|
+
/**
|
|
63
|
+
* The page your users will get redirected to when they visit your domain.
|
|
64
|
+
*/
|
|
65
|
+
target: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* The type of redirect to use for this domain.
|
|
68
|
+
*/
|
|
69
|
+
type: TransferDomainType;
|
|
70
|
+
/**
|
|
71
|
+
* The number of clicks on the domain.
|
|
72
|
+
*/
|
|
73
|
+
clicks?: number | undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export namespace TransferDomainRequestBody$ {
|
|
78
|
+
export type Inbound = {
|
|
79
|
+
newWorkspaceId: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const inboundSchema: z.ZodType<TransferDomainRequestBody, z.ZodTypeDef, Inbound> = z
|
|
83
|
+
.object({
|
|
84
|
+
newWorkspaceId: z.string(),
|
|
85
|
+
})
|
|
86
|
+
.transform((v) => {
|
|
87
|
+
return {
|
|
88
|
+
newWorkspaceId: v.newWorkspaceId,
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export type Outbound = {
|
|
93
|
+
newWorkspaceId: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainRequestBody> = z
|
|
97
|
+
.object({
|
|
98
|
+
newWorkspaceId: z.string(),
|
|
99
|
+
})
|
|
100
|
+
.transform((v) => {
|
|
101
|
+
return {
|
|
102
|
+
newWorkspaceId: v.newWorkspaceId,
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export namespace TransferDomainRequest$ {
|
|
109
|
+
export type Inbound = {
|
|
110
|
+
slug: string;
|
|
111
|
+
RequestBody?: TransferDomainRequestBody$.Inbound | undefined;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const inboundSchema: z.ZodType<TransferDomainRequest, z.ZodTypeDef, Inbound> = z
|
|
115
|
+
.object({
|
|
116
|
+
slug: z.string(),
|
|
117
|
+
RequestBody: z.lazy(() => TransferDomainRequestBody$.inboundSchema).optional(),
|
|
118
|
+
})
|
|
119
|
+
.transform((v) => {
|
|
120
|
+
return {
|
|
121
|
+
slug: v.slug,
|
|
122
|
+
...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export type Outbound = {
|
|
127
|
+
slug: string;
|
|
128
|
+
RequestBody?: TransferDomainRequestBody$.Outbound | undefined;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainRequest> = z
|
|
132
|
+
.object({
|
|
133
|
+
slug: z.string(),
|
|
134
|
+
requestBody: z.lazy(() => TransferDomainRequestBody$.outboundSchema).optional(),
|
|
135
|
+
})
|
|
136
|
+
.transform((v) => {
|
|
137
|
+
return {
|
|
138
|
+
slug: v.slug,
|
|
139
|
+
...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const TransferDomainType$ = z.nativeEnum(TransferDomainType);
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export namespace TransferDomainResponseBody$ {
|
|
149
|
+
export type Inbound = {
|
|
150
|
+
slug: string;
|
|
151
|
+
verified?: boolean | undefined;
|
|
152
|
+
primary?: boolean | undefined;
|
|
153
|
+
archived?: boolean | undefined;
|
|
154
|
+
placeholder?: string | undefined;
|
|
155
|
+
expiredUrl: string | null;
|
|
156
|
+
target: string | null;
|
|
157
|
+
type: TransferDomainType;
|
|
158
|
+
clicks?: number | undefined;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const inboundSchema: z.ZodType<TransferDomainResponseBody, z.ZodTypeDef, Inbound> = z
|
|
162
|
+
.object({
|
|
163
|
+
slug: z.string(),
|
|
164
|
+
verified: z.boolean().default(false),
|
|
165
|
+
primary: z.boolean().default(false),
|
|
166
|
+
archived: z.boolean().default(false),
|
|
167
|
+
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
168
|
+
expiredUrl: z.nullable(z.string()),
|
|
169
|
+
target: z.nullable(z.string()),
|
|
170
|
+
type: TransferDomainType$,
|
|
171
|
+
clicks: z.number().default(0),
|
|
172
|
+
})
|
|
173
|
+
.transform((v) => {
|
|
174
|
+
return {
|
|
175
|
+
slug: v.slug,
|
|
176
|
+
verified: v.verified,
|
|
177
|
+
primary: v.primary,
|
|
178
|
+
archived: v.archived,
|
|
179
|
+
placeholder: v.placeholder,
|
|
180
|
+
expiredUrl: v.expiredUrl,
|
|
181
|
+
target: v.target,
|
|
182
|
+
type: v.type,
|
|
183
|
+
clicks: v.clicks,
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
export type Outbound = {
|
|
188
|
+
slug: string;
|
|
189
|
+
verified: boolean;
|
|
190
|
+
primary: boolean;
|
|
191
|
+
archived: boolean;
|
|
192
|
+
placeholder: string;
|
|
193
|
+
expiredUrl: string | null;
|
|
194
|
+
target: string | null;
|
|
195
|
+
type: TransferDomainType;
|
|
196
|
+
clicks: number;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainResponseBody> = z
|
|
200
|
+
.object({
|
|
201
|
+
slug: z.string(),
|
|
202
|
+
verified: z.boolean().default(false),
|
|
203
|
+
primary: z.boolean().default(false),
|
|
204
|
+
archived: z.boolean().default(false),
|
|
205
|
+
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
|
|
206
|
+
expiredUrl: z.nullable(z.string()),
|
|
207
|
+
target: z.nullable(z.string()),
|
|
208
|
+
type: TransferDomainType$,
|
|
209
|
+
clicks: z.number().default(0),
|
|
210
|
+
})
|
|
211
|
+
.transform((v) => {
|
|
212
|
+
return {
|
|
213
|
+
slug: v.slug,
|
|
214
|
+
verified: v.verified,
|
|
215
|
+
primary: v.primary,
|
|
216
|
+
archived: v.archived,
|
|
217
|
+
placeholder: v.placeholder,
|
|
218
|
+
expiredUrl: v.expiredUrl,
|
|
219
|
+
target: v.target,
|
|
220
|
+
type: v.type,
|
|
221
|
+
clicks: v.clicks,
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
}
|