dub 0.34.2 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -12
- package/docs/sdks/domains/README.md +6 -4
- package/docs/sdks/links/README.md +4 -3
- package/hooks/hooks.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/types.js +1 -1
- package/lib/base64.js +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +4 -4
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +50 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.js +1 -1
- package/lib/http.js +1 -1
- package/lib/is-plain-object.js +1 -1
- package/lib/primitives.js +1 -1
- package/lib/retries.js +1 -1
- package/lib/schemas.js +1 -1
- package/lib/sdks.js +1 -1
- package/lib/security.d.ts +1 -0
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +9 -2
- package/lib/security.js.map +1 -1
- package/lib/url.js +1 -1
- package/models/components/clicksbrowsers.js +1 -1
- package/models/components/clickscities.js +1 -1
- package/models/components/clickscount.js +1 -1
- package/models/components/clickscountries.d.ts +3 -3
- package/models/components/clickscountries.js +2 -2
- package/models/components/clicksdevices.js +1 -1
- package/models/components/clicksos.js +1 -1
- package/models/components/clicksreferers.js +1 -1
- package/models/components/clickstimeseries.js +1 -1
- package/models/components/clickstoplinks.js +1 -1
- package/models/components/clickstopurls.js +1 -1
- package/models/components/continentcode.d.ts +49 -0
- package/models/components/continentcode.d.ts.map +1 -0
- package/models/components/continentcode.js +58 -0
- package/models/components/continentcode.js.map +1 -0
- package/models/components/countrycode.js +1 -1
- package/models/components/domainschema.js +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -1
- package/models/components/index.js.map +1 -1
- package/models/components/leadsbrowsers.js +1 -1
- package/models/components/leadscities.js +1 -1
- package/models/components/leadscount.js +1 -1
- package/models/components/leadscountries.d.ts +3 -3
- package/models/components/leadscountries.js +2 -2
- package/models/components/leadsdevices.js +1 -1
- package/models/components/leadsos.js +1 -1
- package/models/components/leadsreferers.js +1 -1
- package/models/components/leadstimeseries.js +1 -1
- package/models/components/leadstoplinks.js +1 -1
- package/models/components/leadstopurls.js +1 -1
- package/models/components/linkgeotargeting.js +1 -1
- package/models/components/linkschema.js +1 -1
- package/models/components/salesbrowsers.js +1 -1
- package/models/components/salescities.js +1 -1
- package/models/components/salescount.js +1 -1
- package/models/components/salescountries.d.ts +3 -3
- package/models/components/salescountries.js +2 -2
- package/models/components/salesdevices.js +1 -1
- package/models/components/salesos.js +1 -1
- package/models/components/salesreferers.js +1 -1
- package/models/components/salestimeseries.js +1 -1
- package/models/components/salestoplinks.js +1 -1
- package/models/components/salestopurls.js +1 -1
- package/models/components/security.js +1 -1
- package/models/components/tagschema.js +1 -1
- package/models/components/workspaceschema.js +1 -1
- package/models/errors/badrequest.js +1 -1
- package/models/errors/conflict.js +1 -1
- package/models/errors/forbidden.js +1 -1
- package/models/errors/index.js +1 -1
- package/models/errors/internalservererror.js +1 -1
- package/models/errors/inviteexpired.js +1 -1
- package/models/errors/notfound.js +1 -1
- package/models/errors/ratelimitexceeded.js +1 -1
- package/models/errors/sdkerror.js +1 -1
- package/models/errors/sdkvalidationerror.js +1 -1
- package/models/errors/unauthorized.js +1 -1
- package/models/errors/unprocessableentity.js +1 -1
- package/models/operations/bulkcreatelinks.d.ts +25 -0
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js +34 -3
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/bulkupdatelinks.d.ts +25 -0
- package/models/operations/bulkupdatelinks.d.ts.map +1 -1
- package/models/operations/bulkupdatelinks.js +34 -3
- package/models/operations/bulkupdatelinks.js.map +1 -1
- package/models/operations/createdomain.js +1 -1
- package/models/operations/createlink.d.ts +25 -0
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js +34 -3
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/createtag.js +1 -1
- package/models/operations/deletedomain.js +1 -1
- package/models/operations/deletelink.js +1 -1
- package/models/operations/getlinkinfo.js +1 -1
- package/models/operations/getlinks.d.ts +31 -2
- package/models/operations/getlinks.d.ts.map +1 -1
- package/models/operations/getlinks.js +39 -4
- package/models/operations/getlinks.js.map +1 -1
- package/models/operations/getlinkscount.d.ts +26 -4
- package/models/operations/getlinkscount.d.ts.map +1 -1
- package/models/operations/getlinkscount.js +24 -4
- package/models/operations/getlinkscount.js.map +1 -1
- package/models/operations/getmetatags.js +1 -1
- package/models/operations/getqrcode.js +1 -1
- package/models/operations/getworkspace.js +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdomains.d.ts +67 -0
- package/models/operations/listdomains.d.ts.map +1 -0
- package/models/operations/listdomains.js +89 -0
- package/models/operations/listdomains.js.map +1 -0
- package/models/operations/retrieveanalytics.d.ts +8 -0
- package/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/models/operations/retrieveanalytics.js +4 -1
- package/models/operations/retrieveanalytics.js.map +1 -1
- package/models/operations/trackcustomer.js +1 -1
- package/models/operations/tracklead.js +1 -1
- package/models/operations/tracksale.js +1 -1
- package/models/operations/updatedomain.js +1 -1
- package/models/operations/updatelink.d.ts +25 -0
- package/models/operations/updatelink.d.ts.map +1 -1
- package/models/operations/updatelink.js +33 -3
- package/models/operations/updatelink.js.map +1 -1
- package/models/operations/updatetag.js +1 -1
- package/models/operations/updateworkspace.js +1 -1
- package/models/operations/upsertlink.d.ts +25 -0
- package/models/operations/upsertlink.d.ts.map +1 -1
- package/models/operations/upsertlink.js +34 -3
- package/models/operations/upsertlink.js.map +1 -1
- package/package.json +1 -1
- package/sdk/analytics.d.ts.map +1 -1
- package/sdk/analytics.js +5 -11
- package/sdk/analytics.js.map +1 -1
- package/sdk/domains.d.ts +2 -1
- package/sdk/domains.d.ts.map +1 -1
- package/sdk/domains.js +45 -47
- package/sdk/domains.js.map +1 -1
- package/sdk/index.js +1 -1
- package/sdk/links.d.ts +2 -1
- package/sdk/links.d.ts.map +1 -1
- package/sdk/links.js +45 -94
- package/sdk/links.js.map +1 -1
- package/sdk/metatags.d.ts.map +1 -1
- package/sdk/metatags.js +4 -11
- package/sdk/metatags.js.map +1 -1
- package/sdk/qrcodes.d.ts.map +1 -1
- package/sdk/qrcodes.js +4 -11
- package/sdk/qrcodes.js.map +1 -1
- package/sdk/sdk.js +1 -1
- package/sdk/tags.d.ts.map +1 -1
- package/sdk/tags.js +8 -31
- package/sdk/tags.js.map +1 -1
- package/sdk/track.d.ts.map +1 -1
- package/sdk/track.js +8 -31
- package/sdk/track.js.map +1 -1
- package/sdk/workspaces.d.ts.map +1 -1
- package/sdk/workspaces.js +6 -21
- package/sdk/workspaces.js.map +1 -1
- package/src/hooks/hooks.ts +1 -1
- package/src/hooks/index.ts +1 -1
- package/src/hooks/types.ts +1 -1
- package/src/lib/base64.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +1 -1
- package/src/lib/http.ts +1 -1
- package/src/lib/is-plain-object.ts +1 -1
- package/src/lib/primitives.ts +1 -1
- package/src/lib/retries.ts +1 -1
- package/src/lib/schemas.ts +1 -1
- package/src/lib/sdks.ts +1 -1
- package/src/lib/security.ts +11 -1
- package/src/lib/url.ts +1 -1
- package/src/models/components/clicksbrowsers.ts +1 -1
- package/src/models/components/clickscities.ts +1 -1
- package/src/models/components/clickscount.ts +1 -1
- package/src/models/components/clickscountries.ts +4 -4
- package/src/models/components/clicksdevices.ts +1 -1
- package/src/models/components/clicksos.ts +1 -1
- package/src/models/components/clicksreferers.ts +1 -1
- package/src/models/components/clickstimeseries.ts +1 -1
- package/src/models/components/clickstoplinks.ts +1 -1
- package/src/models/components/clickstopurls.ts +1 -1
- package/src/models/components/continentcode.ts +42 -0
- package/src/models/components/countrycode.ts +1 -1
- package/src/models/components/domainschema.ts +1 -1
- package/src/models/components/index.ts +2 -1
- package/src/models/components/leadsbrowsers.ts +1 -1
- package/src/models/components/leadscities.ts +1 -1
- package/src/models/components/leadscount.ts +1 -1
- package/src/models/components/leadscountries.ts +4 -4
- package/src/models/components/leadsdevices.ts +1 -1
- package/src/models/components/leadsos.ts +1 -1
- package/src/models/components/leadsreferers.ts +1 -1
- package/src/models/components/leadstimeseries.ts +1 -1
- package/src/models/components/leadstoplinks.ts +1 -1
- package/src/models/components/leadstopurls.ts +1 -1
- package/src/models/components/linkgeotargeting.ts +1 -1
- package/src/models/components/linkschema.ts +1 -1
- package/src/models/components/salesbrowsers.ts +1 -1
- package/src/models/components/salescities.ts +1 -1
- package/src/models/components/salescount.ts +1 -1
- package/src/models/components/salescountries.ts +4 -4
- package/src/models/components/salesdevices.ts +1 -1
- package/src/models/components/salesos.ts +1 -1
- package/src/models/components/salesreferers.ts +1 -1
- package/src/models/components/salestimeseries.ts +1 -1
- package/src/models/components/salestoplinks.ts +1 -1
- package/src/models/components/salestopurls.ts +1 -1
- package/src/models/components/security.ts +1 -1
- package/src/models/components/tagschema.ts +1 -1
- package/src/models/components/workspaceschema.ts +1 -1
- package/src/models/errors/badrequest.ts +1 -1
- package/src/models/errors/conflict.ts +1 -1
- package/src/models/errors/forbidden.ts +1 -1
- package/src/models/errors/index.ts +1 -1
- package/src/models/errors/internalservererror.ts +1 -1
- package/src/models/errors/inviteexpired.ts +1 -1
- package/src/models/errors/notfound.ts +1 -1
- package/src/models/errors/ratelimitexceeded.ts +1 -1
- package/src/models/errors/sdkerror.ts +1 -1
- package/src/models/errors/sdkvalidationerror.ts +1 -1
- package/src/models/errors/unauthorized.ts +1 -1
- package/src/models/errors/unprocessableentity.ts +1 -1
- package/src/models/operations/bulkcreatelinks.ts +111 -55
- package/src/models/operations/bulkupdatelinks.ts +103 -47
- package/src/models/operations/createdomain.ts +1 -1
- package/src/models/operations/createlink.ts +111 -55
- package/src/models/operations/createtag.ts +1 -1
- package/src/models/operations/deletedomain.ts +1 -1
- package/src/models/operations/deletelink.ts +1 -1
- package/src/models/operations/getlinkinfo.ts +1 -1
- package/src/models/operations/getlinks.ts +62 -5
- package/src/models/operations/getlinkscount.ts +31 -7
- package/src/models/operations/getmetatags.ts +1 -1
- package/src/models/operations/getqrcode.ts +1 -1
- package/src/models/operations/getworkspace.ts +1 -1
- package/src/models/operations/index.ts +2 -1
- package/src/models/operations/listdomains.ts +123 -0
- package/src/models/operations/retrieveanalytics.ts +9 -1
- package/src/models/operations/trackcustomer.ts +1 -1
- package/src/models/operations/tracklead.ts +1 -1
- package/src/models/operations/tracksale.ts +1 -1
- package/src/models/operations/updatedomain.ts +1 -1
- package/src/models/operations/updatelink.ts +110 -55
- package/src/models/operations/updatetag.ts +1 -1
- package/src/models/operations/updateworkspace.ts +1 -1
- package/src/models/operations/upsertlink.ts +111 -55
- package/src/sdk/analytics.ts +5 -9
- package/src/sdk/domains.ts +68 -40
- package/src/sdk/index.ts +1 -1
- package/src/sdk/links.ts +55 -77
- package/src/sdk/metatags.ts +4 -9
- package/src/sdk/qrcodes.ts +4 -9
- package/src/sdk/sdk.ts +1 -1
- package/src/sdk/tags.ts +8 -25
- package/src/sdk/track.ts +8 -25
- package/src/sdk/workspaces.ts +6 -17
- package/src/types/blobs.ts +1 -1
- package/src/types/enums.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/operations.ts +1 -1
- package/src/types/rfcdate.ts +1 -1
- package/types/blobs.js +1 -1
- package/types/enums.js +1 -1
- package/types/index.js +1 -1
- package/types/operations.js +1 -1
- package/types/rfcdate.js +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Code generated by Speakeasy (https://
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
5
6
|
import * as components from "../components/index.js";
|
|
6
7
|
import * as z from "zod";
|
|
7
8
|
|
|
@@ -118,6 +119,26 @@ export type RequestBody = {
|
|
|
118
119
|
* Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
|
|
119
120
|
*/
|
|
120
121
|
doIndex?: boolean | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.
|
|
124
|
+
*/
|
|
125
|
+
utmSource?: string | null | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.
|
|
128
|
+
*/
|
|
129
|
+
utmMedium?: string | null | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.
|
|
132
|
+
*/
|
|
133
|
+
utmCampaign?: string | null | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.
|
|
136
|
+
*/
|
|
137
|
+
utmTerm?: string | null | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.
|
|
140
|
+
*/
|
|
141
|
+
utmContent?: string | null | undefined;
|
|
121
142
|
};
|
|
122
143
|
|
|
123
144
|
/** @internal */
|
|
@@ -181,33 +202,48 @@ export namespace BulkCreateLinksTagNames$ {
|
|
|
181
202
|
}
|
|
182
203
|
|
|
183
204
|
/** @internal */
|
|
184
|
-
export const RequestBody$inboundSchema: z.ZodType<RequestBody, z.ZodTypeDef, unknown> = z
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
205
|
+
export const RequestBody$inboundSchema: z.ZodType<RequestBody, z.ZodTypeDef, unknown> = z
|
|
206
|
+
.object({
|
|
207
|
+
url: z.string(),
|
|
208
|
+
domain: z.string().optional(),
|
|
209
|
+
key: z.string().optional(),
|
|
210
|
+
externalId: z.nullable(z.string()).optional(),
|
|
211
|
+
prefix: z.string().optional(),
|
|
212
|
+
trackConversion: z.boolean().default(false),
|
|
213
|
+
archived: z.boolean().default(false),
|
|
214
|
+
publicStats: z.boolean().default(false),
|
|
215
|
+
tagId: z.nullable(z.string()).optional(),
|
|
216
|
+
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
217
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
218
|
+
comments: z.nullable(z.string()).optional(),
|
|
219
|
+
expiresAt: z.nullable(z.string()).optional(),
|
|
220
|
+
expiredUrl: z.nullable(z.string()).optional(),
|
|
221
|
+
password: z.nullable(z.string()).optional(),
|
|
222
|
+
proxy: z.boolean().default(false),
|
|
223
|
+
title: z.nullable(z.string()).optional(),
|
|
224
|
+
description: z.nullable(z.string()).optional(),
|
|
225
|
+
image: z.nullable(z.string()).optional(),
|
|
226
|
+
video: z.nullable(z.string()).optional(),
|
|
227
|
+
rewrite: z.boolean().default(false),
|
|
228
|
+
ios: z.nullable(z.string()).optional(),
|
|
229
|
+
android: z.nullable(z.string()).optional(),
|
|
230
|
+
geo: z.nullable(components.LinkGeoTargeting$inboundSchema).optional(),
|
|
231
|
+
doIndex: z.boolean().default(false),
|
|
232
|
+
utm_source: z.nullable(z.string()).optional(),
|
|
233
|
+
utm_medium: z.nullable(z.string()).optional(),
|
|
234
|
+
utm_campaign: z.nullable(z.string()).optional(),
|
|
235
|
+
utm_term: z.nullable(z.string()).optional(),
|
|
236
|
+
utm_content: z.nullable(z.string()).optional(),
|
|
237
|
+
})
|
|
238
|
+
.transform((v) => {
|
|
239
|
+
return remap$(v, {
|
|
240
|
+
utm_source: "utmSource",
|
|
241
|
+
utm_medium: "utmMedium",
|
|
242
|
+
utm_campaign: "utmCampaign",
|
|
243
|
+
utm_term: "utmTerm",
|
|
244
|
+
utm_content: "utmContent",
|
|
245
|
+
});
|
|
246
|
+
});
|
|
211
247
|
|
|
212
248
|
/** @internal */
|
|
213
249
|
export type RequestBody$Outbound = {
|
|
@@ -236,6 +272,11 @@ export type RequestBody$Outbound = {
|
|
|
236
272
|
android?: string | null | undefined;
|
|
237
273
|
geo?: components.LinkGeoTargeting$Outbound | null | undefined;
|
|
238
274
|
doIndex: boolean;
|
|
275
|
+
utm_source?: string | null | undefined;
|
|
276
|
+
utm_medium?: string | null | undefined;
|
|
277
|
+
utm_campaign?: string | null | undefined;
|
|
278
|
+
utm_term?: string | null | undefined;
|
|
279
|
+
utm_content?: string | null | undefined;
|
|
239
280
|
};
|
|
240
281
|
|
|
241
282
|
/** @internal */
|
|
@@ -243,33 +284,48 @@ export const RequestBody$outboundSchema: z.ZodType<
|
|
|
243
284
|
RequestBody$Outbound,
|
|
244
285
|
z.ZodTypeDef,
|
|
245
286
|
RequestBody
|
|
246
|
-
> = z
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
287
|
+
> = z
|
|
288
|
+
.object({
|
|
289
|
+
url: z.string(),
|
|
290
|
+
domain: z.string().optional(),
|
|
291
|
+
key: z.string().optional(),
|
|
292
|
+
externalId: z.nullable(z.string()).optional(),
|
|
293
|
+
prefix: z.string().optional(),
|
|
294
|
+
trackConversion: z.boolean().default(false),
|
|
295
|
+
archived: z.boolean().default(false),
|
|
296
|
+
publicStats: z.boolean().default(false),
|
|
297
|
+
tagId: z.nullable(z.string()).optional(),
|
|
298
|
+
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
299
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
300
|
+
comments: z.nullable(z.string()).optional(),
|
|
301
|
+
expiresAt: z.nullable(z.string()).optional(),
|
|
302
|
+
expiredUrl: z.nullable(z.string()).optional(),
|
|
303
|
+
password: z.nullable(z.string()).optional(),
|
|
304
|
+
proxy: z.boolean().default(false),
|
|
305
|
+
title: z.nullable(z.string()).optional(),
|
|
306
|
+
description: z.nullable(z.string()).optional(),
|
|
307
|
+
image: z.nullable(z.string()).optional(),
|
|
308
|
+
video: z.nullable(z.string()).optional(),
|
|
309
|
+
rewrite: z.boolean().default(false),
|
|
310
|
+
ios: z.nullable(z.string()).optional(),
|
|
311
|
+
android: z.nullable(z.string()).optional(),
|
|
312
|
+
geo: z.nullable(components.LinkGeoTargeting$outboundSchema).optional(),
|
|
313
|
+
doIndex: z.boolean().default(false),
|
|
314
|
+
utmSource: z.nullable(z.string()).optional(),
|
|
315
|
+
utmMedium: z.nullable(z.string()).optional(),
|
|
316
|
+
utmCampaign: z.nullable(z.string()).optional(),
|
|
317
|
+
utmTerm: z.nullable(z.string()).optional(),
|
|
318
|
+
utmContent: z.nullable(z.string()).optional(),
|
|
319
|
+
})
|
|
320
|
+
.transform((v) => {
|
|
321
|
+
return remap$(v, {
|
|
322
|
+
utmSource: "utm_source",
|
|
323
|
+
utmMedium: "utm_medium",
|
|
324
|
+
utmCampaign: "utm_campaign",
|
|
325
|
+
utmTerm: "utm_term",
|
|
326
|
+
utmContent: "utm_content",
|
|
327
|
+
});
|
|
328
|
+
});
|
|
273
329
|
|
|
274
330
|
/**
|
|
275
331
|
* @internal
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Code generated by Speakeasy (https://
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
5
6
|
import * as components from "../components/index.js";
|
|
6
7
|
import * as z from "zod";
|
|
7
8
|
|
|
@@ -102,6 +103,26 @@ export type Data = {
|
|
|
102
103
|
* Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
|
|
103
104
|
*/
|
|
104
105
|
doIndex?: boolean | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.
|
|
108
|
+
*/
|
|
109
|
+
utmSource?: string | null | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.
|
|
112
|
+
*/
|
|
113
|
+
utmMedium?: string | null | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.
|
|
116
|
+
*/
|
|
117
|
+
utmCampaign?: string | null | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.
|
|
120
|
+
*/
|
|
121
|
+
utmTerm?: string | null | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.
|
|
124
|
+
*/
|
|
125
|
+
utmContent?: string | null | undefined;
|
|
105
126
|
};
|
|
106
127
|
|
|
107
128
|
export type BulkUpdateLinksRequestBody = {
|
|
@@ -170,29 +191,44 @@ export namespace BulkUpdateLinksTagNames$ {
|
|
|
170
191
|
}
|
|
171
192
|
|
|
172
193
|
/** @internal */
|
|
173
|
-
export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
|
|
195
|
+
.object({
|
|
196
|
+
url: z.string().optional(),
|
|
197
|
+
trackConversion: z.boolean().default(false),
|
|
198
|
+
archived: z.boolean().default(false),
|
|
199
|
+
publicStats: z.boolean().default(false),
|
|
200
|
+
tagId: z.nullable(z.string()).optional(),
|
|
201
|
+
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
202
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
203
|
+
comments: z.nullable(z.string()).optional(),
|
|
204
|
+
expiresAt: z.nullable(z.string()).optional(),
|
|
205
|
+
expiredUrl: z.nullable(z.string()).optional(),
|
|
206
|
+
password: z.nullable(z.string()).optional(),
|
|
207
|
+
proxy: z.boolean().default(false),
|
|
208
|
+
title: z.nullable(z.string()).optional(),
|
|
209
|
+
description: z.nullable(z.string()).optional(),
|
|
210
|
+
image: z.nullable(z.string()).optional(),
|
|
211
|
+
video: z.nullable(z.string()).optional(),
|
|
212
|
+
rewrite: z.boolean().default(false),
|
|
213
|
+
ios: z.nullable(z.string()).optional(),
|
|
214
|
+
android: z.nullable(z.string()).optional(),
|
|
215
|
+
geo: z.nullable(components.LinkGeoTargeting$inboundSchema).optional(),
|
|
216
|
+
doIndex: z.boolean().default(false),
|
|
217
|
+
utm_source: z.nullable(z.string()).optional(),
|
|
218
|
+
utm_medium: z.nullable(z.string()).optional(),
|
|
219
|
+
utm_campaign: z.nullable(z.string()).optional(),
|
|
220
|
+
utm_term: z.nullable(z.string()).optional(),
|
|
221
|
+
utm_content: z.nullable(z.string()).optional(),
|
|
222
|
+
})
|
|
223
|
+
.transform((v) => {
|
|
224
|
+
return remap$(v, {
|
|
225
|
+
utm_source: "utmSource",
|
|
226
|
+
utm_medium: "utmMedium",
|
|
227
|
+
utm_campaign: "utmCampaign",
|
|
228
|
+
utm_term: "utmTerm",
|
|
229
|
+
utm_content: "utmContent",
|
|
230
|
+
});
|
|
231
|
+
});
|
|
196
232
|
|
|
197
233
|
/** @internal */
|
|
198
234
|
export type Data$Outbound = {
|
|
@@ -217,32 +253,52 @@ export type Data$Outbound = {
|
|
|
217
253
|
android?: string | null | undefined;
|
|
218
254
|
geo?: components.LinkGeoTargeting$Outbound | null | undefined;
|
|
219
255
|
doIndex: boolean;
|
|
256
|
+
utm_source?: string | null | undefined;
|
|
257
|
+
utm_medium?: string | null | undefined;
|
|
258
|
+
utm_campaign?: string | null | undefined;
|
|
259
|
+
utm_term?: string | null | undefined;
|
|
260
|
+
utm_content?: string | null | undefined;
|
|
220
261
|
};
|
|
221
262
|
|
|
222
263
|
/** @internal */
|
|
223
|
-
export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> = z
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
264
|
+
export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> = z
|
|
265
|
+
.object({
|
|
266
|
+
url: z.string().optional(),
|
|
267
|
+
trackConversion: z.boolean().default(false),
|
|
268
|
+
archived: z.boolean().default(false),
|
|
269
|
+
publicStats: z.boolean().default(false),
|
|
270
|
+
tagId: z.nullable(z.string()).optional(),
|
|
271
|
+
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
272
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
273
|
+
comments: z.nullable(z.string()).optional(),
|
|
274
|
+
expiresAt: z.nullable(z.string()).optional(),
|
|
275
|
+
expiredUrl: z.nullable(z.string()).optional(),
|
|
276
|
+
password: z.nullable(z.string()).optional(),
|
|
277
|
+
proxy: z.boolean().default(false),
|
|
278
|
+
title: z.nullable(z.string()).optional(),
|
|
279
|
+
description: z.nullable(z.string()).optional(),
|
|
280
|
+
image: z.nullable(z.string()).optional(),
|
|
281
|
+
video: z.nullable(z.string()).optional(),
|
|
282
|
+
rewrite: z.boolean().default(false),
|
|
283
|
+
ios: z.nullable(z.string()).optional(),
|
|
284
|
+
android: z.nullable(z.string()).optional(),
|
|
285
|
+
geo: z.nullable(components.LinkGeoTargeting$outboundSchema).optional(),
|
|
286
|
+
doIndex: z.boolean().default(false),
|
|
287
|
+
utmSource: z.nullable(z.string()).optional(),
|
|
288
|
+
utmMedium: z.nullable(z.string()).optional(),
|
|
289
|
+
utmCampaign: z.nullable(z.string()).optional(),
|
|
290
|
+
utmTerm: z.nullable(z.string()).optional(),
|
|
291
|
+
utmContent: z.nullable(z.string()).optional(),
|
|
292
|
+
})
|
|
293
|
+
.transform((v) => {
|
|
294
|
+
return remap$(v, {
|
|
295
|
+
utmSource: "utm_source",
|
|
296
|
+
utmMedium: "utm_medium",
|
|
297
|
+
utmCampaign: "utm_campaign",
|
|
298
|
+
utmTerm: "utm_term",
|
|
299
|
+
utmContent: "utm_content",
|
|
300
|
+
});
|
|
301
|
+
});
|
|
246
302
|
|
|
247
303
|
/**
|
|
248
304
|
* @internal
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Code generated by Speakeasy (https://
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
5
6
|
import * as components from "../components/index.js";
|
|
6
7
|
import * as z from "zod";
|
|
7
8
|
|
|
@@ -118,6 +119,26 @@ export type CreateLinkRequestBody = {
|
|
|
118
119
|
* Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
|
|
119
120
|
*/
|
|
120
121
|
doIndex?: boolean | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.
|
|
124
|
+
*/
|
|
125
|
+
utmSource?: string | null | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.
|
|
128
|
+
*/
|
|
129
|
+
utmMedium?: string | null | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.
|
|
132
|
+
*/
|
|
133
|
+
utmCampaign?: string | null | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.
|
|
136
|
+
*/
|
|
137
|
+
utmTerm?: string | null | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.
|
|
140
|
+
*/
|
|
141
|
+
utmContent?: string | null | undefined;
|
|
121
142
|
};
|
|
122
143
|
|
|
123
144
|
/** @internal */
|
|
@@ -179,33 +200,48 @@ export const CreateLinkRequestBody$inboundSchema: z.ZodType<
|
|
|
179
200
|
CreateLinkRequestBody,
|
|
180
201
|
z.ZodTypeDef,
|
|
181
202
|
unknown
|
|
182
|
-
> = z
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
> = z
|
|
204
|
+
.object({
|
|
205
|
+
url: z.string(),
|
|
206
|
+
domain: z.string().optional(),
|
|
207
|
+
key: z.string().optional(),
|
|
208
|
+
externalId: z.nullable(z.string()).optional(),
|
|
209
|
+
prefix: z.string().optional(),
|
|
210
|
+
trackConversion: z.boolean().default(false),
|
|
211
|
+
archived: z.boolean().default(false),
|
|
212
|
+
publicStats: z.boolean().default(false),
|
|
213
|
+
tagId: z.nullable(z.string()).optional(),
|
|
214
|
+
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
215
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
216
|
+
comments: z.nullable(z.string()).optional(),
|
|
217
|
+
expiresAt: z.nullable(z.string()).optional(),
|
|
218
|
+
expiredUrl: z.nullable(z.string()).optional(),
|
|
219
|
+
password: z.nullable(z.string()).optional(),
|
|
220
|
+
proxy: z.boolean().default(false),
|
|
221
|
+
title: z.nullable(z.string()).optional(),
|
|
222
|
+
description: z.nullable(z.string()).optional(),
|
|
223
|
+
image: z.nullable(z.string()).optional(),
|
|
224
|
+
video: z.nullable(z.string()).optional(),
|
|
225
|
+
rewrite: z.boolean().default(false),
|
|
226
|
+
ios: z.nullable(z.string()).optional(),
|
|
227
|
+
android: z.nullable(z.string()).optional(),
|
|
228
|
+
geo: z.nullable(components.LinkGeoTargeting$inboundSchema).optional(),
|
|
229
|
+
doIndex: z.boolean().default(false),
|
|
230
|
+
utm_source: z.nullable(z.string()).optional(),
|
|
231
|
+
utm_medium: z.nullable(z.string()).optional(),
|
|
232
|
+
utm_campaign: z.nullable(z.string()).optional(),
|
|
233
|
+
utm_term: z.nullable(z.string()).optional(),
|
|
234
|
+
utm_content: z.nullable(z.string()).optional(),
|
|
235
|
+
})
|
|
236
|
+
.transform((v) => {
|
|
237
|
+
return remap$(v, {
|
|
238
|
+
utm_source: "utmSource",
|
|
239
|
+
utm_medium: "utmMedium",
|
|
240
|
+
utm_campaign: "utmCampaign",
|
|
241
|
+
utm_term: "utmTerm",
|
|
242
|
+
utm_content: "utmContent",
|
|
243
|
+
});
|
|
244
|
+
});
|
|
209
245
|
|
|
210
246
|
/** @internal */
|
|
211
247
|
export type CreateLinkRequestBody$Outbound = {
|
|
@@ -234,6 +270,11 @@ export type CreateLinkRequestBody$Outbound = {
|
|
|
234
270
|
android?: string | null | undefined;
|
|
235
271
|
geo?: components.LinkGeoTargeting$Outbound | null | undefined;
|
|
236
272
|
doIndex: boolean;
|
|
273
|
+
utm_source?: string | null | undefined;
|
|
274
|
+
utm_medium?: string | null | undefined;
|
|
275
|
+
utm_campaign?: string | null | undefined;
|
|
276
|
+
utm_term?: string | null | undefined;
|
|
277
|
+
utm_content?: string | null | undefined;
|
|
237
278
|
};
|
|
238
279
|
|
|
239
280
|
/** @internal */
|
|
@@ -241,33 +282,48 @@ export const CreateLinkRequestBody$outboundSchema: z.ZodType<
|
|
|
241
282
|
CreateLinkRequestBody$Outbound,
|
|
242
283
|
z.ZodTypeDef,
|
|
243
284
|
CreateLinkRequestBody
|
|
244
|
-
> = z
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
285
|
+
> = z
|
|
286
|
+
.object({
|
|
287
|
+
url: z.string(),
|
|
288
|
+
domain: z.string().optional(),
|
|
289
|
+
key: z.string().optional(),
|
|
290
|
+
externalId: z.nullable(z.string()).optional(),
|
|
291
|
+
prefix: z.string().optional(),
|
|
292
|
+
trackConversion: z.boolean().default(false),
|
|
293
|
+
archived: z.boolean().default(false),
|
|
294
|
+
publicStats: z.boolean().default(false),
|
|
295
|
+
tagId: z.nullable(z.string()).optional(),
|
|
296
|
+
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
297
|
+
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
|
|
298
|
+
comments: z.nullable(z.string()).optional(),
|
|
299
|
+
expiresAt: z.nullable(z.string()).optional(),
|
|
300
|
+
expiredUrl: z.nullable(z.string()).optional(),
|
|
301
|
+
password: z.nullable(z.string()).optional(),
|
|
302
|
+
proxy: z.boolean().default(false),
|
|
303
|
+
title: z.nullable(z.string()).optional(),
|
|
304
|
+
description: z.nullable(z.string()).optional(),
|
|
305
|
+
image: z.nullable(z.string()).optional(),
|
|
306
|
+
video: z.nullable(z.string()).optional(),
|
|
307
|
+
rewrite: z.boolean().default(false),
|
|
308
|
+
ios: z.nullable(z.string()).optional(),
|
|
309
|
+
android: z.nullable(z.string()).optional(),
|
|
310
|
+
geo: z.nullable(components.LinkGeoTargeting$outboundSchema).optional(),
|
|
311
|
+
doIndex: z.boolean().default(false),
|
|
312
|
+
utmSource: z.nullable(z.string()).optional(),
|
|
313
|
+
utmMedium: z.nullable(z.string()).optional(),
|
|
314
|
+
utmCampaign: z.nullable(z.string()).optional(),
|
|
315
|
+
utmTerm: z.nullable(z.string()).optional(),
|
|
316
|
+
utmContent: z.nullable(z.string()).optional(),
|
|
317
|
+
})
|
|
318
|
+
.transform((v) => {
|
|
319
|
+
return remap$(v, {
|
|
320
|
+
utmSource: "utm_source",
|
|
321
|
+
utmMedium: "utm_medium",
|
|
322
|
+
utmCampaign: "utm_campaign",
|
|
323
|
+
utmTerm: "utm_term",
|
|
324
|
+
utmContent: "utm_content",
|
|
325
|
+
});
|
|
326
|
+
});
|
|
271
327
|
|
|
272
328
|
/**
|
|
273
329
|
* @internal
|