dub 0.8.0 → 0.9.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +27 -23
  3. package/index.d.mts +5 -3
  4. package/index.d.ts +5 -3
  5. package/index.d.ts.map +1 -1
  6. package/index.js +4 -0
  7. package/index.js.map +1 -1
  8. package/index.mjs +4 -0
  9. package/index.mjs.map +1 -1
  10. package/package.json +3 -1
  11. package/resources/index.d.ts +2 -2
  12. package/resources/index.d.ts.map +1 -1
  13. package/resources/index.js.map +1 -1
  14. package/resources/index.mjs.map +1 -1
  15. package/resources/links/bulk.d.ts +163 -11
  16. package/resources/links/bulk.d.ts.map +1 -1
  17. package/resources/links/bulk.js.map +1 -1
  18. package/resources/links/bulk.mjs.map +1 -1
  19. package/resources/links/index.d.ts +2 -2
  20. package/resources/links/index.d.ts.map +1 -1
  21. package/resources/links/index.js.map +1 -1
  22. package/resources/links/index.mjs.map +1 -1
  23. package/resources/links/info.d.ts +156 -5
  24. package/resources/links/info.d.ts.map +1 -1
  25. package/resources/links/info.js.map +1 -1
  26. package/resources/links/info.mjs.map +1 -1
  27. package/resources/links/links.d.ts +529 -66
  28. package/resources/links/links.d.ts.map +1 -1
  29. package/resources/links/links.js.map +1 -1
  30. package/resources/links/links.mjs.map +1 -1
  31. package/resources/projects/index.d.ts +2 -2
  32. package/resources/projects/index.d.ts.map +1 -1
  33. package/resources/projects/index.js.map +1 -1
  34. package/resources/projects/index.mjs.map +1 -1
  35. package/resources/projects/projects.d.ts +135 -31
  36. package/resources/projects/projects.d.ts.map +1 -1
  37. package/resources/projects/projects.js.map +1 -1
  38. package/resources/projects/projects.mjs.map +1 -1
  39. package/resources/projects/tags.d.ts +0 -18
  40. package/resources/projects/tags.d.ts.map +1 -1
  41. package/resources/projects/tags.js +0 -2
  42. package/resources/projects/tags.js.map +1 -1
  43. package/resources/projects/tags.mjs +0 -2
  44. package/resources/projects/tags.mjs.map +1 -1
  45. package/resources/qr.d.ts +7 -6
  46. package/resources/qr.d.ts.map +1 -1
  47. package/resources/qr.js +5 -4
  48. package/resources/qr.js.map +1 -1
  49. package/resources/qr.mjs +5 -4
  50. package/resources/qr.mjs.map +1 -1
  51. package/src/index.ts +9 -3
  52. package/src/resources/index.ts +4 -3
  53. package/src/resources/links/bulk.ts +198 -12
  54. package/src/resources/links/index.ts +4 -2
  55. package/src/resources/links/info.ts +190 -5
  56. package/src/resources/links/links.ts +637 -67
  57. package/src/resources/projects/index.ts +2 -2
  58. package/src/resources/projects/projects.ts +166 -31
  59. package/src/resources/projects/tags.ts +0 -22
  60. package/src/resources/qr.ts +16 -7
  61. package/src/version.ts +1 -1
  62. package/version.d.ts +1 -1
  63. package/version.js +1 -1
  64. package/version.mjs +1 -1
@@ -3,18 +3,17 @@ import { APIResource } from 'dub/resource';
3
3
  import * as LinksAPI from 'dub/resources/links/links';
4
4
  import * as BulkAPI from 'dub/resources/links/bulk';
5
5
  import * as InfoAPI from 'dub/resources/links/info';
6
- import * as TagsAPI from 'dub/resources/projects/tags';
7
6
  export declare class Links extends APIResource {
8
7
  info: InfoAPI.Info;
9
8
  bulk: BulkAPI.Bulk;
10
9
  /**
11
10
  * Create a new link for the authenticated project.
12
11
  */
13
- create(params: LinkCreateParams, options?: Core.RequestOptions): Core.APIPromise<Link>;
12
+ create(params: LinkCreateParams, options?: Core.RequestOptions): Core.APIPromise<LinkCreateResponse>;
14
13
  /**
15
14
  * Edit a link for the authenticated project.
16
15
  */
17
- update(linkId: string, params: LinkUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Link>;
16
+ update(linkId: string, params: LinkUpdateParams, options?: Core.RequestOptions): Core.APIPromise<LinkUpdateResponse>;
18
17
  /**
19
18
  * Retrieve a list of links for the authenticated project. The list will be
20
19
  * paginated and the provided query parameters allow filtering the returned links.
@@ -23,161 +22,618 @@ export declare class Links extends APIResource {
23
22
  /**
24
23
  * Delete a link for the authenticated project.
25
24
  */
26
- deleteLink(linkId: string, params: LinkDeleteLinkParams, options?: Core.RequestOptions): Core.APIPromise<Link>;
25
+ deleteLink(linkId: string, params: LinkDeleteLinkParams, options?: Core.RequestOptions): Core.APIPromise<LinkDeleteLinkResponse>;
27
26
  }
28
- export interface Link {
27
+ export interface LinkCreateResponse {
29
28
  /**
30
29
  * The unique ID of the short link.
31
30
  */
32
- id?: string;
31
+ id: string;
33
32
  /**
34
33
  * The Android destination URL for the short link for Android device targeting.
35
34
  */
36
- android?: string | null;
35
+ android: string | null;
37
36
  /**
38
37
  * Whether the short link is archived.
39
38
  */
40
- archived?: boolean;
39
+ archived: boolean;
41
40
  /**
42
41
  * The number of clicks on the short link.
43
42
  */
44
- clicks?: number;
43
+ clicks: number;
45
44
  /**
46
45
  * The comments for the short link.
47
46
  */
48
- comments?: string | null;
47
+ comments: string | null;
49
48
  /**
50
49
  * The date and time when the short link was created.
51
50
  */
52
- createdAt?: string;
51
+ createdAt: string;
53
52
  /**
54
53
  * The description of the short link generated via `api.dub.co/metatags`. Will be
55
54
  * used for Custom Social Media Cards if `proxy` is true.
56
55
  */
57
- description?: string | null;
56
+ description: string | null;
58
57
  /**
59
58
  * The domain of the short link. If not provided, the primary domain for the
60
59
  * project will be used (or `dub.sh` if the project has no domains).
61
60
  */
62
- domain?: string;
61
+ domain: string;
63
62
  /**
64
63
  * The date and time when the short link will expire in ISO-8601 format. Must be in
65
64
  * the future.
66
65
  */
67
- expiresAt?: string | null;
66
+ expiresAt: string | null;
68
67
  /**
69
- * Geo targeting information for the short link in JSON format {[COUNTRY]:
70
- * `https://example.com` }. Learn more: `https://dub.sh/geo`
68
+ * Geo targeting information for the short link in JSON format
69
+ * `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
71
70
  */
72
- geo?: Record<string, string> | null;
71
+ geo: Record<string, string> | null;
73
72
  /**
74
73
  * The image of the short link generated via `api.dub.co/metatags`. Will be used
75
74
  * for Custom Social Media Cards if `proxy` is true.
76
75
  */
77
- image?: string | null;
76
+ image: string | null;
78
77
  /**
79
78
  * The iOS destination URL for the short link for iOS device targeting.
80
79
  */
81
- ios?: string | null;
80
+ ios: string | null;
82
81
  /**
83
82
  * The short link slug. If not provided, a random 7-character slug will be
84
83
  * generated.
85
84
  */
86
- key?: string;
85
+ key: string;
87
86
  /**
88
87
  * The date and time when the short link was last clicked.
89
88
  */
90
- lastClicked?: string | null;
89
+ lastClicked: string | null;
91
90
  /**
92
91
  * The password required to access the destination URL of the short link.
93
92
  */
94
- password?: string | null;
93
+ password: string | null;
95
94
  /**
96
- * The prefix of the short link slug for randomly-generated keys (e.g. if prefix is
97
- * `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key`
98
- * is provided.
95
+ * The project ID of the short link.
99
96
  */
100
- prefix?: string;
97
+ projectId: string;
98
+ /**
99
+ * Whether the short link uses Custom Social Media Cards feature.
100
+ */
101
+ proxy: boolean;
102
+ /**
103
+ * Whether the short link's stats are publicly accessible.
104
+ */
105
+ publicStats: boolean;
106
+ /**
107
+ * The full URL of the QR code for the short link (e.g.
108
+ * `https://api.dub.co/qr?url=https://dub.sh/try`).
109
+ */
110
+ qrCode: string;
111
+ /**
112
+ * Whether the short link uses link cloaking.
113
+ */
114
+ rewrite: boolean;
115
+ /**
116
+ * The full URL of the short link, including the https protocol (e.g.
117
+ * `https://dub.sh/try`).
118
+ */
119
+ shortLink: string;
120
+ /**
121
+ * The tags assigned to the short link.
122
+ */
123
+ tags: Array<LinkCreateResponse.Tag> | null;
124
+ /**
125
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used
126
+ * for Custom Social Media Cards if `proxy` is true.
127
+ */
128
+ title: string | null;
129
+ /**
130
+ * The date and time when the short link was last updated.
131
+ */
132
+ updatedAt: string;
133
+ /**
134
+ * The destination URL of the short link.
135
+ */
136
+ url: string;
137
+ /**
138
+ * The user ID of the creator of the short link.
139
+ */
140
+ userId: string;
141
+ /**
142
+ * The UTM campaign of the short link.
143
+ */
144
+ utm_campaign: string | null;
145
+ /**
146
+ * The UTM content of the short link.
147
+ */
148
+ utm_content: string | null;
149
+ /**
150
+ * The UTM medium of the short link.
151
+ */
152
+ utm_medium: string | null;
153
+ /**
154
+ * The UTM source of the short link.
155
+ */
156
+ utm_source: string | null;
157
+ /**
158
+ * The UTM term of the short link.
159
+ */
160
+ utm_term: string | null;
161
+ }
162
+ export declare namespace LinkCreateResponse {
163
+ interface Tag {
164
+ /**
165
+ * The unique ID of the tag.
166
+ */
167
+ id: string;
168
+ /**
169
+ * The color of the tag.
170
+ */
171
+ color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown';
172
+ /**
173
+ * The name of the tag.
174
+ */
175
+ name: string;
176
+ }
177
+ }
178
+ export interface LinkUpdateResponse {
179
+ /**
180
+ * The unique ID of the short link.
181
+ */
182
+ id: string;
183
+ /**
184
+ * The Android destination URL for the short link for Android device targeting.
185
+ */
186
+ android: string | null;
187
+ /**
188
+ * Whether the short link is archived.
189
+ */
190
+ archived: boolean;
191
+ /**
192
+ * The number of clicks on the short link.
193
+ */
194
+ clicks: number;
195
+ /**
196
+ * The comments for the short link.
197
+ */
198
+ comments: string | null;
199
+ /**
200
+ * The date and time when the short link was created.
201
+ */
202
+ createdAt: string;
203
+ /**
204
+ * The description of the short link generated via `api.dub.co/metatags`. Will be
205
+ * used for Custom Social Media Cards if `proxy` is true.
206
+ */
207
+ description: string | null;
208
+ /**
209
+ * The domain of the short link. If not provided, the primary domain for the
210
+ * project will be used (or `dub.sh` if the project has no domains).
211
+ */
212
+ domain: string;
213
+ /**
214
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
215
+ * the future.
216
+ */
217
+ expiresAt: string | null;
218
+ /**
219
+ * Geo targeting information for the short link in JSON format
220
+ * `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
221
+ */
222
+ geo: Record<string, string> | null;
223
+ /**
224
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used
225
+ * for Custom Social Media Cards if `proxy` is true.
226
+ */
227
+ image: string | null;
228
+ /**
229
+ * The iOS destination URL for the short link for iOS device targeting.
230
+ */
231
+ ios: string | null;
232
+ /**
233
+ * The short link slug. If not provided, a random 7-character slug will be
234
+ * generated.
235
+ */
236
+ key: string;
237
+ /**
238
+ * The date and time when the short link was last clicked.
239
+ */
240
+ lastClicked: string | null;
241
+ /**
242
+ * The password required to access the destination URL of the short link.
243
+ */
244
+ password: string | null;
101
245
  /**
102
246
  * The project ID of the short link.
103
247
  */
104
- projectId?: string;
248
+ projectId: string;
105
249
  /**
106
250
  * Whether the short link uses Custom Social Media Cards feature.
107
251
  */
108
- proxy?: boolean;
252
+ proxy: boolean;
109
253
  /**
110
254
  * Whether the short link's stats are publicly accessible.
111
255
  */
112
- publicStats?: boolean;
256
+ publicStats: boolean;
113
257
  /**
114
258
  * The full URL of the QR code for the short link (e.g.
115
259
  * `https://api.dub.co/qr?url=https://dub.sh/try`).
116
260
  */
117
- qrCode?: string;
261
+ qrCode: string;
118
262
  /**
119
263
  * Whether the short link uses link cloaking.
120
264
  */
121
- rewrite?: boolean;
265
+ rewrite: boolean;
122
266
  /**
123
267
  * The full URL of the short link, including the https protocol (e.g.
124
268
  * `https://dub.sh/try`).
125
269
  */
126
- shortLink?: string;
270
+ shortLink: string;
127
271
  /**
128
- * The unique ID of the tag assigned to the short link.
272
+ * The tags assigned to the short link.
129
273
  */
130
- tagId?: string;
274
+ tags: Array<LinkUpdateResponse.Tag> | null;
275
+ /**
276
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used
277
+ * for Custom Social Media Cards if `proxy` is true.
278
+ */
279
+ title: string | null;
131
280
  /**
132
- * The unique IDs of the tags assigned to the short link.
281
+ * The date and time when the short link was last updated.
133
282
  */
134
- tagIds?: Array<string>;
283
+ updatedAt: string;
284
+ /**
285
+ * The destination URL of the short link.
286
+ */
287
+ url: string;
288
+ /**
289
+ * The user ID of the creator of the short link.
290
+ */
291
+ userId: string;
292
+ /**
293
+ * The UTM campaign of the short link.
294
+ */
295
+ utm_campaign: string | null;
296
+ /**
297
+ * The UTM content of the short link.
298
+ */
299
+ utm_content: string | null;
300
+ /**
301
+ * The UTM medium of the short link.
302
+ */
303
+ utm_medium: string | null;
304
+ /**
305
+ * The UTM source of the short link.
306
+ */
307
+ utm_source: string | null;
308
+ /**
309
+ * The UTM term of the short link.
310
+ */
311
+ utm_term: string | null;
312
+ }
313
+ export declare namespace LinkUpdateResponse {
314
+ interface Tag {
315
+ /**
316
+ * The unique ID of the tag.
317
+ */
318
+ id: string;
319
+ /**
320
+ * The color of the tag.
321
+ */
322
+ color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown';
323
+ /**
324
+ * The name of the tag.
325
+ */
326
+ name: string;
327
+ }
328
+ }
329
+ export type LinkListResponse = Array<LinkListResponse.LinkListResponseItem>;
330
+ export declare namespace LinkListResponse {
331
+ interface LinkListResponseItem {
332
+ /**
333
+ * The unique ID of the short link.
334
+ */
335
+ id: string;
336
+ /**
337
+ * The Android destination URL for the short link for Android device targeting.
338
+ */
339
+ android: string | null;
340
+ /**
341
+ * Whether the short link is archived.
342
+ */
343
+ archived: boolean;
344
+ /**
345
+ * The number of clicks on the short link.
346
+ */
347
+ clicks: number;
348
+ /**
349
+ * The comments for the short link.
350
+ */
351
+ comments: string | null;
352
+ /**
353
+ * The date and time when the short link was created.
354
+ */
355
+ createdAt: string;
356
+ /**
357
+ * The description of the short link generated via `api.dub.co/metatags`. Will be
358
+ * used for Custom Social Media Cards if `proxy` is true.
359
+ */
360
+ description: string | null;
361
+ /**
362
+ * The domain of the short link. If not provided, the primary domain for the
363
+ * project will be used (or `dub.sh` if the project has no domains).
364
+ */
365
+ domain: string;
366
+ /**
367
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
368
+ * the future.
369
+ */
370
+ expiresAt: string | null;
371
+ /**
372
+ * Geo targeting information for the short link in JSON format
373
+ * `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
374
+ */
375
+ geo: Record<string, string> | null;
376
+ /**
377
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used
378
+ * for Custom Social Media Cards if `proxy` is true.
379
+ */
380
+ image: string | null;
381
+ /**
382
+ * The iOS destination URL for the short link for iOS device targeting.
383
+ */
384
+ ios: string | null;
385
+ /**
386
+ * The short link slug. If not provided, a random 7-character slug will be
387
+ * generated.
388
+ */
389
+ key: string;
390
+ /**
391
+ * The date and time when the short link was last clicked.
392
+ */
393
+ lastClicked: string | null;
394
+ /**
395
+ * The password required to access the destination URL of the short link.
396
+ */
397
+ password: string | null;
398
+ /**
399
+ * The project ID of the short link.
400
+ */
401
+ projectId: string;
402
+ /**
403
+ * Whether the short link uses Custom Social Media Cards feature.
404
+ */
405
+ proxy: boolean;
406
+ /**
407
+ * Whether the short link's stats are publicly accessible.
408
+ */
409
+ publicStats: boolean;
410
+ /**
411
+ * The full URL of the QR code for the short link (e.g.
412
+ * `https://api.dub.co/qr?url=https://dub.sh/try`).
413
+ */
414
+ qrCode: string;
415
+ /**
416
+ * Whether the short link uses link cloaking.
417
+ */
418
+ rewrite: boolean;
419
+ /**
420
+ * The full URL of the short link, including the https protocol (e.g.
421
+ * `https://dub.sh/try`).
422
+ */
423
+ shortLink: string;
424
+ /**
425
+ * The tags assigned to the short link.
426
+ */
427
+ tags: Array<LinkListResponseItem.Tag> | null;
428
+ /**
429
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used
430
+ * for Custom Social Media Cards if `proxy` is true.
431
+ */
432
+ title: string | null;
433
+ /**
434
+ * The date and time when the short link was last updated.
435
+ */
436
+ updatedAt: string;
437
+ /**
438
+ * The destination URL of the short link.
439
+ */
440
+ url: string;
441
+ /**
442
+ * The user ID of the creator of the short link.
443
+ */
444
+ userId: string;
445
+ /**
446
+ * The UTM campaign of the short link.
447
+ */
448
+ utm_campaign: string | null;
449
+ /**
450
+ * The UTM content of the short link.
451
+ */
452
+ utm_content: string | null;
453
+ /**
454
+ * The UTM medium of the short link.
455
+ */
456
+ utm_medium: string | null;
457
+ /**
458
+ * The UTM source of the short link.
459
+ */
460
+ utm_source: string | null;
461
+ /**
462
+ * The UTM term of the short link.
463
+ */
464
+ utm_term: string | null;
465
+ }
466
+ namespace LinkListResponseItem {
467
+ interface Tag {
468
+ /**
469
+ * The unique ID of the tag.
470
+ */
471
+ id: string;
472
+ /**
473
+ * The color of the tag.
474
+ */
475
+ color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown';
476
+ /**
477
+ * The name of the tag.
478
+ */
479
+ name: string;
480
+ }
481
+ }
482
+ }
483
+ export interface LinkDeleteLinkResponse {
484
+ /**
485
+ * The unique ID of the short link.
486
+ */
487
+ id: string;
488
+ /**
489
+ * The Android destination URL for the short link for Android device targeting.
490
+ */
491
+ android: string | null;
492
+ /**
493
+ * Whether the short link is archived.
494
+ */
495
+ archived: boolean;
496
+ /**
497
+ * The number of clicks on the short link.
498
+ */
499
+ clicks: number;
500
+ /**
501
+ * The comments for the short link.
502
+ */
503
+ comments: string | null;
504
+ /**
505
+ * The date and time when the short link was created.
506
+ */
507
+ createdAt: string;
508
+ /**
509
+ * The description of the short link generated via `api.dub.co/metatags`. Will be
510
+ * used for Custom Social Media Cards if `proxy` is true.
511
+ */
512
+ description: string | null;
513
+ /**
514
+ * The domain of the short link. If not provided, the primary domain for the
515
+ * project will be used (or `dub.sh` if the project has no domains).
516
+ */
517
+ domain: string;
518
+ /**
519
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
520
+ * the future.
521
+ */
522
+ expiresAt: string | null;
523
+ /**
524
+ * Geo targeting information for the short link in JSON format
525
+ * `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
526
+ */
527
+ geo: Record<string, string> | null;
528
+ /**
529
+ * The image of the short link generated via `api.dub.co/metatags`. Will be used
530
+ * for Custom Social Media Cards if `proxy` is true.
531
+ */
532
+ image: string | null;
533
+ /**
534
+ * The iOS destination URL for the short link for iOS device targeting.
535
+ */
536
+ ios: string | null;
537
+ /**
538
+ * The short link slug. If not provided, a random 7-character slug will be
539
+ * generated.
540
+ */
541
+ key: string;
542
+ /**
543
+ * The date and time when the short link was last clicked.
544
+ */
545
+ lastClicked: string | null;
546
+ /**
547
+ * The password required to access the destination URL of the short link.
548
+ */
549
+ password: string | null;
550
+ /**
551
+ * The project ID of the short link.
552
+ */
553
+ projectId: string;
554
+ /**
555
+ * Whether the short link uses Custom Social Media Cards feature.
556
+ */
557
+ proxy: boolean;
558
+ /**
559
+ * Whether the short link's stats are publicly accessible.
560
+ */
561
+ publicStats: boolean;
562
+ /**
563
+ * The full URL of the QR code for the short link (e.g.
564
+ * `https://api.dub.co/qr?url=https://dub.sh/try`).
565
+ */
566
+ qrCode: string;
567
+ /**
568
+ * Whether the short link uses link cloaking.
569
+ */
570
+ rewrite: boolean;
571
+ /**
572
+ * The full URL of the short link, including the https protocol (e.g.
573
+ * `https://dub.sh/try`).
574
+ */
575
+ shortLink: string;
135
576
  /**
136
577
  * The tags assigned to the short link.
137
578
  */
138
- tags?: Array<TagsAPI.Tag>;
579
+ tags: Array<LinkDeleteLinkResponse.Tag> | null;
139
580
  /**
140
581
  * The title of the short link generated via `api.dub.co/metatags`. Will be used
141
582
  * for Custom Social Media Cards if `proxy` is true.
142
583
  */
143
- title?: string | null;
584
+ title: string | null;
144
585
  /**
145
586
  * The date and time when the short link was last updated.
146
587
  */
147
- updatedAt?: string;
588
+ updatedAt: string;
148
589
  /**
149
590
  * The destination URL of the short link.
150
591
  */
151
- url?: string;
592
+ url: string;
152
593
  /**
153
594
  * The user ID of the creator of the short link.
154
595
  */
155
- userId?: string;
596
+ userId: string;
156
597
  /**
157
598
  * The UTM campaign of the short link.
158
599
  */
159
- utm_campaign?: string | null;
600
+ utm_campaign: string | null;
160
601
  /**
161
602
  * The UTM content of the short link.
162
603
  */
163
- utm_content?: string | null;
604
+ utm_content: string | null;
164
605
  /**
165
606
  * The UTM medium of the short link.
166
607
  */
167
- utm_medium?: string | null;
608
+ utm_medium: string | null;
168
609
  /**
169
610
  * The UTM source of the short link.
170
611
  */
171
- utm_source?: string | null;
612
+ utm_source: string | null;
172
613
  /**
173
614
  * The UTM term of the short link.
174
615
  */
175
- utm_term?: string | null;
616
+ utm_term: string | null;
617
+ }
618
+ export declare namespace LinkDeleteLinkResponse {
619
+ interface Tag {
620
+ /**
621
+ * The unique ID of the tag.
622
+ */
623
+ id: string;
624
+ /**
625
+ * The color of the tag.
626
+ */
627
+ color: 'red' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown';
628
+ /**
629
+ * The name of the tag.
630
+ */
631
+ name: string;
632
+ }
176
633
  }
177
- export type LinkListResponse = Array<Link>;
178
634
  export interface LinkCreateParams {
179
635
  /**
180
- * Query param: The slug for the project to create links for. E.g. for
636
+ * Query param: The slug for the project that the link belongs to. E.g. for
181
637
  * `app.dub.co/acme`, the projectSlug is `acme`.
182
638
  */
183
639
  projectSlug?: string;
@@ -216,7 +672,7 @@ export interface LinkCreateParams {
216
672
  expiresAt?: string | null;
217
673
  /**
218
674
  * Body param: Geo targeting information for the short link in JSON format
219
- * {[COUNTRY]: `https://example.com` }. Learn more: `https://dub.sh/geo`
675
+ * `{[COUNTRY]: https://example.com }`.
220
676
  */
221
677
  geo?: Record<string, string> | null;
222
678
  /**
@@ -259,11 +715,11 @@ export interface LinkCreateParams {
259
715
  /**
260
716
  * Body param: The unique ID of the tag assigned to the short link.
261
717
  */
262
- tagId?: string;
718
+ tagId?: string | null;
263
719
  /**
264
720
  * Body param: The unique IDs of the tags assigned to the short link.
265
721
  */
266
- tagIds?: Array<string>;
722
+ tagIds?: Array<string> | null;
267
723
  /**
268
724
  * Body param: The title of the short link generated via `api.dub.co/metatags`.
269
725
  * Will be used for Custom Social Media Cards if `proxy` is true.
@@ -276,6 +732,10 @@ export interface LinkUpdateParams {
276
732
  * `app.dub.co/acme`, the projectSlug is `acme`.
277
733
  */
278
734
  projectSlug?: string;
735
+ /**
736
+ * Body param: The destination URL of the short link.
737
+ */
738
+ url: string;
279
739
  /**
280
740
  * Body param: The Android destination URL for the short link for Android device
281
741
  * targeting.
@@ -307,7 +767,7 @@ export interface LinkUpdateParams {
307
767
  expiresAt?: string | null;
308
768
  /**
309
769
  * Body param: Geo targeting information for the short link in JSON format
310
- * {[COUNTRY]: `https://example.com` }. Learn more: `https://dub.sh/geo`
770
+ * `{[COUNTRY]: https://example.com }`.
311
771
  */
312
772
  geo?: Record<string, string> | null;
313
773
  /**
@@ -350,25 +810,21 @@ export interface LinkUpdateParams {
350
810
  /**
351
811
  * Body param: The unique ID of the tag assigned to the short link.
352
812
  */
353
- tagId?: string;
813
+ tagId?: string | null;
354
814
  /**
355
815
  * Body param: The unique IDs of the tags assigned to the short link.
356
816
  */
357
- tagIds?: Array<string>;
817
+ tagIds?: Array<string> | null;
358
818
  /**
359
819
  * Body param: The title of the short link generated via `api.dub.co/metatags`.
360
820
  * Will be used for Custom Social Media Cards if `proxy` is true.
361
821
  */
362
822
  title?: string | null;
363
- /**
364
- * Body param: The destination URL of the short link.
365
- */
366
- url?: string;
367
823
  }
368
824
  export interface LinkListParams {
369
825
  /**
370
- * The slug for the project to retrieve links for. E.g. for `app.dub.co/acme`, the
371
- * projectSlug is `acme`.
826
+ * The slug for the project that the link belongs to. E.g. for `app.dub.co/acme`,
827
+ * the projectSlug is `acme`.
372
828
  */
373
829
  projectSlug?: string;
374
830
  /**
@@ -389,24 +845,28 @@ export interface LinkListParams {
389
845
  * Whether to include archived links in the response. Defaults to `false` if not
390
846
  * provided.
391
847
  */
392
- showArchived?: true | false;
848
+ showArchived?: boolean;
393
849
  /**
394
850
  * The field to sort the links by. The default is `createdAt`, and sort order is
395
851
  * always descending.
396
852
  */
397
853
  sort?: 'createdAt' | 'clicks' | 'lastClicked';
398
854
  /**
399
- * The tag ID(s) to filter the links by.
855
+ * The tag ID to filter the links by.
400
856
  */
401
- tagId?: string | Array<string>;
857
+ tagId?: string;
858
+ /**
859
+ * The tag IDs to filter the links by.
860
+ */
861
+ tagIds?: Array<string>;
402
862
  /**
403
863
  * The user ID to filter the links by.
404
864
  */
405
865
  userId?: string;
406
866
  /**
407
- * Only return links with tags. Defaults to `false` if not provided.
867
+ * Whether to include tags in the response. Defaults to `false` if not provided.
408
868
  */
409
- withTags?: true | false;
869
+ withTags?: boolean;
410
870
  }
411
871
  export interface LinkDeleteLinkParams {
412
872
  /**
@@ -416,13 +876,16 @@ export interface LinkDeleteLinkParams {
416
876
  projectSlug?: string;
417
877
  }
418
878
  export declare namespace Links {
419
- export import Link = LinksAPI.Link;
879
+ export import LinkCreateResponse = LinksAPI.LinkCreateResponse;
880
+ export import LinkUpdateResponse = LinksAPI.LinkUpdateResponse;
420
881
  export import LinkListResponse = LinksAPI.LinkListResponse;
882
+ export import LinkDeleteLinkResponse = LinksAPI.LinkDeleteLinkResponse;
421
883
  export import LinkCreateParams = LinksAPI.LinkCreateParams;
422
884
  export import LinkUpdateParams = LinksAPI.LinkUpdateParams;
423
885
  export import LinkListParams = LinksAPI.LinkListParams;
424
886
  export import LinkDeleteLinkParams = LinksAPI.LinkDeleteLinkParams;
425
887
  export import Info = InfoAPI.Info;
888
+ export import InfoRetrieveResponse = InfoAPI.InfoRetrieveResponse;
426
889
  export import InfoRetrieveParams = InfoAPI.InfoRetrieveParams;
427
890
  export import Bulk = BulkAPI.Bulk;
428
891
  export import BulkCreateResponse = BulkAPI.BulkCreateResponse;