dub 0.30.1 → 0.30.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.
Files changed (44) hide show
  1. package/lib/config.d.ts +3 -3
  2. package/lib/config.js +3 -3
  3. package/models/components/domainschema.d.ts +6 -33
  4. package/models/components/domainschema.d.ts.map +1 -1
  5. package/models/components/domainschema.js +5 -22
  6. package/models/components/domainschema.js.map +1 -1
  7. package/models/components/linkschema.d.ts +5 -0
  8. package/models/components/linkschema.d.ts.map +1 -1
  9. package/models/components/linkschema.js +2 -0
  10. package/models/components/linkschema.js.map +1 -1
  11. package/models/operations/bulkcreatelinks.d.ts +5 -0
  12. package/models/operations/bulkcreatelinks.d.ts.map +1 -1
  13. package/models/operations/bulkcreatelinks.js +2 -0
  14. package/models/operations/bulkcreatelinks.js.map +1 -1
  15. package/models/operations/createdomain.d.ts +0 -32
  16. package/models/operations/createdomain.d.ts.map +1 -1
  17. package/models/operations/createdomain.js +1 -20
  18. package/models/operations/createdomain.js.map +1 -1
  19. package/models/operations/createlink.d.ts +5 -0
  20. package/models/operations/createlink.d.ts.map +1 -1
  21. package/models/operations/createlink.js +2 -0
  22. package/models/operations/createlink.js.map +1 -1
  23. package/models/operations/updatedomain.d.ts +0 -32
  24. package/models/operations/updatedomain.d.ts.map +1 -1
  25. package/models/operations/updatedomain.js +1 -20
  26. package/models/operations/updatedomain.js.map +1 -1
  27. package/models/operations/updatelink.d.ts +5 -0
  28. package/models/operations/updatelink.d.ts.map +1 -1
  29. package/models/operations/updatelink.js +2 -0
  30. package/models/operations/updatelink.js.map +1 -1
  31. package/models/operations/upsertlink.d.ts +5 -0
  32. package/models/operations/upsertlink.d.ts.map +1 -1
  33. package/models/operations/upsertlink.js +2 -0
  34. package/models/operations/upsertlink.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/lib/config.ts +3 -3
  37. package/src/models/components/domainschema.ts +10 -43
  38. package/src/models/components/linkschema.ts +7 -0
  39. package/src/models/operations/bulkcreatelinks.ts +7 -0
  40. package/src/models/operations/createdomain.ts +0 -40
  41. package/src/models/operations/createlink.ts +7 -0
  42. package/src/models/operations/updatedomain.ts +0 -41
  43. package/src/models/operations/updatelink.ts +7 -0
  44. package/src/models/operations/upsertlink.ts +7 -0
@@ -2,21 +2,8 @@
2
2
  * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { ClosedEnum } from "../../types/enums.js";
6
5
  import * as z from "zod";
7
6
 
8
- /**
9
- * The type of redirect to use for this domain.
10
- */
11
- export const Type = {
12
- Redirect: "redirect",
13
- Rewrite: "rewrite",
14
- } as const;
15
- /**
16
- * The type of redirect to use for this domain.
17
- */
18
- export type Type = ClosedEnum<typeof Type>;
19
-
20
7
  export type DomainSchema = {
21
8
  /**
22
9
  * The unique identifier of the domain.
@@ -38,10 +25,6 @@ export type DomainSchema = {
38
25
  * Whether the domain is archived.
39
26
  */
40
27
  archived?: boolean | undefined;
41
- /**
42
- * Prevent search engines from indexing the domain.
43
- */
44
- noindex?: boolean | undefined;
45
28
  /**
46
29
  * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
47
30
  */
@@ -51,25 +34,15 @@ export type DomainSchema = {
51
34
  */
52
35
  expiredUrl: string | null;
53
36
  /**
54
- * The page your users will get redirected to when they visit your domain.
37
+ * The date the domain was created.
55
38
  */
56
- target: string | null;
39
+ createdAt: string;
57
40
  /**
58
- * The type of redirect to use for this domain.
41
+ * The date the domain was last updated.
59
42
  */
60
- type: Type;
61
- /**
62
- * The number of clicks on the domain.
63
- */
64
- clicks?: number | undefined;
43
+ updatedAt: string;
65
44
  };
66
45
 
67
- /** @internal */
68
- export namespace Type$ {
69
- export const inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(Type);
70
- export const outboundSchema: z.ZodNativeEnum<typeof Type> = inboundSchema;
71
- }
72
-
73
46
  /** @internal */
74
47
  export namespace DomainSchema$ {
75
48
  export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, unknown> = z.object({
@@ -78,12 +51,10 @@ export namespace DomainSchema$ {
78
51
  verified: z.boolean().default(false),
79
52
  primary: z.boolean().default(false),
80
53
  archived: z.boolean().default(false),
81
- noindex: z.boolean().default(false),
82
54
  placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
83
55
  expiredUrl: z.nullable(z.string()),
84
- target: z.nullable(z.string()),
85
- type: Type$.inboundSchema,
86
- clicks: z.number().default(0),
56
+ createdAt: z.string(),
57
+ updatedAt: z.string(),
87
58
  });
88
59
 
89
60
  export type Outbound = {
@@ -92,12 +63,10 @@ export namespace DomainSchema$ {
92
63
  verified: boolean;
93
64
  primary: boolean;
94
65
  archived: boolean;
95
- noindex: boolean;
96
66
  placeholder: string;
97
67
  expiredUrl: string | null;
98
- target: string | null;
99
- type: string;
100
- clicks: number;
68
+ createdAt: string;
69
+ updatedAt: string;
101
70
  };
102
71
 
103
72
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DomainSchema> = z.object({
@@ -106,11 +75,9 @@ export namespace DomainSchema$ {
106
75
  verified: z.boolean().default(false),
107
76
  primary: z.boolean().default(false),
108
77
  archived: z.boolean().default(false),
109
- noindex: z.boolean().default(false),
110
78
  placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
111
79
  expiredUrl: z.nullable(z.string()),
112
- target: z.nullable(z.string()),
113
- type: Type$.outboundSchema,
114
- clicks: z.number().default(0),
80
+ createdAt: z.string(),
81
+ updatedAt: z.string(),
115
82
  });
116
83
  }
@@ -323,6 +323,10 @@ export type LinkSchema = {
323
323
  * Whether the short link uses link cloaking.
324
324
  */
325
325
  rewrite?: boolean | undefined;
326
+ /**
327
+ * Whether to allow search engines to index the short link.
328
+ */
329
+ doIndex?: boolean | undefined;
326
330
  /**
327
331
  * The iOS destination URL for the short link for iOS device targeting.
328
332
  */
@@ -1712,6 +1716,7 @@ export namespace LinkSchema$ {
1712
1716
  description: z.nullable(z.string()),
1713
1717
  image: z.nullable(z.string()),
1714
1718
  rewrite: z.boolean().default(false),
1719
+ doIndex: z.boolean().default(false),
1715
1720
  ios: z.nullable(z.string()),
1716
1721
  android: z.nullable(z.string()),
1717
1722
  geo: z.nullable(z.lazy(() => Geo$.inboundSchema)),
@@ -1762,6 +1767,7 @@ export namespace LinkSchema$ {
1762
1767
  description: string | null;
1763
1768
  image: string | null;
1764
1769
  rewrite: boolean;
1770
+ doIndex: boolean;
1765
1771
  ios: string | null;
1766
1772
  android: string | null;
1767
1773
  geo: Geo$.Outbound | null;
@@ -1804,6 +1810,7 @@ export namespace LinkSchema$ {
1804
1810
  description: z.nullable(z.string()),
1805
1811
  image: z.nullable(z.string()),
1806
1812
  rewrite: z.boolean().default(false),
1813
+ doIndex: z.boolean().default(false),
1807
1814
  ios: z.nullable(z.string()),
1808
1815
  android: z.nullable(z.string()),
1809
1816
  geo: z.nullable(z.lazy(() => Geo$.outboundSchema)),
@@ -118,6 +118,10 @@ export type RequestBody = {
118
118
  * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
119
119
  */
120
120
  geo?: components.LinkGeoTargeting | null | undefined;
121
+ /**
122
+ * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
123
+ */
124
+ doIndex?: boolean | undefined;
121
125
  };
122
126
 
123
127
  /** @internal */
@@ -191,6 +195,7 @@ export namespace RequestBody$ {
191
195
  ios: z.nullable(z.string()).optional(),
192
196
  android: z.nullable(z.string()).optional(),
193
197
  geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
198
+ doIndex: z.boolean().default(false),
194
199
  });
195
200
 
196
201
  export type Outbound = {
@@ -217,6 +222,7 @@ export namespace RequestBody$ {
217
222
  ios?: string | null | undefined;
218
223
  android?: string | null | undefined;
219
224
  geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
225
+ doIndex: boolean;
220
226
  };
221
227
 
222
228
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RequestBody> = z.object({
@@ -243,5 +249,6 @@ export namespace RequestBody$ {
243
249
  ios: z.nullable(z.string()).optional(),
244
250
  android: z.nullable(z.string()).optional(),
245
251
  geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
252
+ doIndex: z.boolean().default(false),
246
253
  });
247
254
  }
@@ -2,7 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { ClosedEnum } from "../../types/enums.js";
6
5
  import * as z from "zod";
7
6
 
8
7
  export type CreateDomainGlobals = {
@@ -13,31 +12,11 @@ export type CreateDomainGlobals = {
13
12
  projectSlug?: string | undefined;
14
13
  };
15
14
 
16
- /**
17
- * The type of redirect to use for this domain.
18
- */
19
- export const Type = {
20
- Redirect: "redirect",
21
- Rewrite: "rewrite",
22
- } as const;
23
- /**
24
- * The type of redirect to use for this domain.
25
- */
26
- export type Type = ClosedEnum<typeof Type>;
27
-
28
15
  export type CreateDomainRequestBody = {
29
16
  /**
30
17
  * Name of the domain.
31
18
  */
32
19
  slug: string;
33
- /**
34
- * The type of redirect to use for this domain.
35
- */
36
- type?: Type | undefined;
37
- /**
38
- * The page your users will get redirected to when they visit your domain.
39
- */
40
- target?: string | null | undefined;
41
20
  /**
42
21
  * Redirect users to a specific URL when any link under this domain has expired.
43
22
  */
@@ -46,10 +25,6 @@ export type CreateDomainRequestBody = {
46
25
  * Whether to archive this domain. `false` will unarchive a previously archived domain.
47
26
  */
48
27
  archived?: boolean | undefined;
49
- /**
50
- * Prevent search engines from indexing the domain. Defaults to `false`.
51
- */
52
- noindex?: boolean | undefined;
53
28
  /**
54
29
  * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
55
30
  */
@@ -74,43 +49,28 @@ export namespace CreateDomainGlobals$ {
74
49
  });
75
50
  }
76
51
 
77
- /** @internal */
78
- export namespace Type$ {
79
- export const inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(Type);
80
- export const outboundSchema: z.ZodNativeEnum<typeof Type> = inboundSchema;
81
- }
82
-
83
52
  /** @internal */
84
53
  export namespace CreateDomainRequestBody$ {
85
54
  export const inboundSchema: z.ZodType<CreateDomainRequestBody, z.ZodTypeDef, unknown> =
86
55
  z.object({
87
56
  slug: z.string(),
88
- type: Type$.inboundSchema.default("redirect"),
89
- target: z.nullable(z.string()).optional(),
90
57
  expiredUrl: z.nullable(z.string()).optional(),
91
58
  archived: z.boolean().default(false),
92
- noindex: z.boolean().optional(),
93
59
  placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
94
60
  });
95
61
 
96
62
  export type Outbound = {
97
63
  slug: string;
98
- type: string;
99
- target?: string | null | undefined;
100
64
  expiredUrl?: string | null | undefined;
101
65
  archived: boolean;
102
- noindex?: boolean | undefined;
103
66
  placeholder: string | null;
104
67
  };
105
68
 
106
69
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateDomainRequestBody> =
107
70
  z.object({
108
71
  slug: z.string(),
109
- type: Type$.outboundSchema.default("redirect"),
110
- target: z.nullable(z.string()).optional(),
111
72
  expiredUrl: z.nullable(z.string()).optional(),
112
73
  archived: z.boolean().default(false),
113
- noindex: z.boolean().optional(),
114
74
  placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
115
75
  });
116
76
  }
@@ -118,6 +118,10 @@ export type CreateLinkRequestBody = {
118
118
  * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
119
119
  */
120
120
  geo?: components.LinkGeoTargeting | null | undefined;
121
+ /**
122
+ * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
123
+ */
124
+ doIndex?: boolean | undefined;
121
125
  };
122
126
 
123
127
  /** @internal */
@@ -192,6 +196,7 @@ export namespace CreateLinkRequestBody$ {
192
196
  ios: z.nullable(z.string()).optional(),
193
197
  android: z.nullable(z.string()).optional(),
194
198
  geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
199
+ doIndex: z.boolean().default(false),
195
200
  });
196
201
 
197
202
  export type Outbound = {
@@ -218,6 +223,7 @@ export namespace CreateLinkRequestBody$ {
218
223
  ios?: string | null | undefined;
219
224
  android?: string | null | undefined;
220
225
  geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
226
+ doIndex: boolean;
221
227
  };
222
228
 
223
229
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequestBody> =
@@ -245,5 +251,6 @@ export namespace CreateLinkRequestBody$ {
245
251
  ios: z.nullable(z.string()).optional(),
246
252
  android: z.nullable(z.string()).optional(),
247
253
  geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
254
+ doIndex: z.boolean().default(false),
248
255
  });
249
256
  }
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  import { remap as remap$ } from "../../lib/primitives.js";
6
- import { ClosedEnum } from "../../types/enums.js";
7
6
  import * as z from "zod";
8
7
 
9
8
  export type UpdateDomainGlobals = {
@@ -14,31 +13,11 @@ export type UpdateDomainGlobals = {
14
13
  projectSlug?: string | undefined;
15
14
  };
16
15
 
17
- /**
18
- * The type of redirect to use for this domain.
19
- */
20
- export const UpdateDomainType = {
21
- Redirect: "redirect",
22
- Rewrite: "rewrite",
23
- } as const;
24
- /**
25
- * The type of redirect to use for this domain.
26
- */
27
- export type UpdateDomainType = ClosedEnum<typeof UpdateDomainType>;
28
-
29
16
  export type UpdateDomainRequestBody = {
30
17
  /**
31
18
  * Name of the domain.
32
19
  */
33
20
  slug?: string | undefined;
34
- /**
35
- * The type of redirect to use for this domain.
36
- */
37
- type?: UpdateDomainType | undefined;
38
- /**
39
- * The page your users will get redirected to when they visit your domain.
40
- */
41
- target?: string | null | undefined;
42
21
  /**
43
22
  * Redirect users to a specific URL when any link under this domain has expired.
44
23
  */
@@ -47,10 +26,6 @@ export type UpdateDomainRequestBody = {
47
26
  * Whether to archive this domain. `false` will unarchive a previously archived domain.
48
27
  */
49
28
  archived?: boolean | undefined;
50
- /**
51
- * Prevent search engines from indexing the domain. Defaults to `false`.
52
- */
53
- noindex?: boolean | undefined;
54
29
  /**
55
30
  * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
56
31
  */
@@ -83,44 +58,28 @@ export namespace UpdateDomainGlobals$ {
83
58
  });
84
59
  }
85
60
 
86
- /** @internal */
87
- export namespace UpdateDomainType$ {
88
- export const inboundSchema: z.ZodNativeEnum<typeof UpdateDomainType> =
89
- z.nativeEnum(UpdateDomainType);
90
- export const outboundSchema: z.ZodNativeEnum<typeof UpdateDomainType> = inboundSchema;
91
- }
92
-
93
61
  /** @internal */
94
62
  export namespace UpdateDomainRequestBody$ {
95
63
  export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, unknown> =
96
64
  z.object({
97
65
  slug: z.string().optional(),
98
- type: UpdateDomainType$.inboundSchema.default("redirect"),
99
- target: z.nullable(z.string()).optional(),
100
66
  expiredUrl: z.nullable(z.string()).optional(),
101
67
  archived: z.boolean().default(false),
102
- noindex: z.boolean().optional(),
103
68
  placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
104
69
  });
105
70
 
106
71
  export type Outbound = {
107
72
  slug?: string | undefined;
108
- type: string;
109
- target?: string | null | undefined;
110
73
  expiredUrl?: string | null | undefined;
111
74
  archived: boolean;
112
- noindex?: boolean | undefined;
113
75
  placeholder: string | null;
114
76
  };
115
77
 
116
78
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> =
117
79
  z.object({
118
80
  slug: z.string().optional(),
119
- type: UpdateDomainType$.outboundSchema.default("redirect"),
120
- target: z.nullable(z.string()).optional(),
121
81
  expiredUrl: z.nullable(z.string()).optional(),
122
82
  archived: z.boolean().default(false),
123
- noindex: z.boolean().optional(),
124
83
  placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
125
84
  });
126
85
  }
@@ -119,6 +119,10 @@ export type UpdateLinkRequestBody = {
119
119
  * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
120
120
  */
121
121
  geo?: components.LinkGeoTargeting | null | undefined;
122
+ /**
123
+ * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
124
+ */
125
+ doIndex?: boolean | undefined;
122
126
  };
123
127
 
124
128
  export type UpdateLinkRequest = {
@@ -201,6 +205,7 @@ export namespace UpdateLinkRequestBody$ {
201
205
  ios: z.nullable(z.string()).optional(),
202
206
  android: z.nullable(z.string()).optional(),
203
207
  geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
208
+ doIndex: z.boolean().default(false),
204
209
  });
205
210
 
206
211
  export type Outbound = {
@@ -227,6 +232,7 @@ export namespace UpdateLinkRequestBody$ {
227
232
  ios?: string | null | undefined;
228
233
  android?: string | null | undefined;
229
234
  geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
235
+ doIndex: boolean;
230
236
  };
231
237
 
232
238
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> =
@@ -254,6 +260,7 @@ export namespace UpdateLinkRequestBody$ {
254
260
  ios: z.nullable(z.string()).optional(),
255
261
  android: z.nullable(z.string()).optional(),
256
262
  geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
263
+ doIndex: z.boolean().default(false),
257
264
  });
258
265
  }
259
266
 
@@ -118,6 +118,10 @@ export type UpsertLinkRequestBody = {
118
118
  * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
119
119
  */
120
120
  geo?: components.LinkGeoTargeting | null | undefined;
121
+ /**
122
+ * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
123
+ */
124
+ doIndex?: boolean | undefined;
121
125
  };
122
126
 
123
127
  /** @internal */
@@ -192,6 +196,7 @@ export namespace UpsertLinkRequestBody$ {
192
196
  ios: z.nullable(z.string()).optional(),
193
197
  android: z.nullable(z.string()).optional(),
194
198
  geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
199
+ doIndex: z.boolean().default(false),
195
200
  });
196
201
 
197
202
  export type Outbound = {
@@ -218,6 +223,7 @@ export namespace UpsertLinkRequestBody$ {
218
223
  ios?: string | null | undefined;
219
224
  android?: string | null | undefined;
220
225
  geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
226
+ doIndex: boolean;
221
227
  };
222
228
 
223
229
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkRequestBody> =
@@ -245,5 +251,6 @@ export namespace UpsertLinkRequestBody$ {
245
251
  ios: z.nullable(z.string()).optional(),
246
252
  android: z.nullable(z.string()).optional(),
247
253
  geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
254
+ doIndex: z.boolean().default(false),
248
255
  });
249
256
  }