dub 0.7.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 (72) hide show
  1. package/CHANGELOG.md +17 -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 +176 -10
  16. package/resources/links/bulk.d.ts.map +1 -1
  17. package/resources/links/bulk.js +2 -2
  18. package/resources/links/bulk.js.map +1 -1
  19. package/resources/links/bulk.mjs +2 -2
  20. package/resources/links/bulk.mjs.map +1 -1
  21. package/resources/links/index.d.ts +2 -2
  22. package/resources/links/index.d.ts.map +1 -1
  23. package/resources/links/index.js.map +1 -1
  24. package/resources/links/index.mjs.map +1 -1
  25. package/resources/links/info.d.ts +156 -5
  26. package/resources/links/info.d.ts.map +1 -1
  27. package/resources/links/info.js.map +1 -1
  28. package/resources/links/info.mjs.map +1 -1
  29. package/resources/links/links.d.ts +554 -52
  30. package/resources/links/links.d.ts.map +1 -1
  31. package/resources/links/links.js.map +1 -1
  32. package/resources/links/links.mjs.map +1 -1
  33. package/resources/projects/index.d.ts +2 -2
  34. package/resources/projects/index.d.ts.map +1 -1
  35. package/resources/projects/index.js.map +1 -1
  36. package/resources/projects/index.mjs.map +1 -1
  37. package/resources/projects/projects.d.ts +135 -34
  38. package/resources/projects/projects.d.ts.map +1 -1
  39. package/resources/projects/projects.js.map +1 -1
  40. package/resources/projects/projects.mjs.map +1 -1
  41. package/resources/projects/tags.d.ts +0 -49
  42. package/resources/projects/tags.d.ts.map +1 -1
  43. package/resources/projects/tags.js +0 -16
  44. package/resources/projects/tags.js.map +1 -1
  45. package/resources/projects/tags.mjs +0 -16
  46. package/resources/projects/tags.mjs.map +1 -1
  47. package/resources/qr.d.ts +7 -6
  48. package/resources/qr.d.ts.map +1 -1
  49. package/resources/qr.js +5 -4
  50. package/resources/qr.js.map +1 -1
  51. package/resources/qr.mjs +5 -4
  52. package/resources/qr.mjs.map +1 -1
  53. package/src/index.ts +9 -3
  54. package/src/resources/index.ts +4 -3
  55. package/src/resources/links/bulk.ts +216 -13
  56. package/src/resources/links/index.ts +4 -2
  57. package/src/resources/links/info.ts +190 -5
  58. package/src/resources/links/links.ts +670 -53
  59. package/src/resources/projects/index.ts +2 -2
  60. package/src/resources/projects/projects.ts +166 -34
  61. package/src/resources/projects/tags.ts +1 -66
  62. package/src/resources/qr.ts +16 -7
  63. package/src/uploads.ts +2 -3
  64. package/src/version.ts +1 -1
  65. package/uploads.d.ts.map +1 -1
  66. package/uploads.js +2 -1
  67. package/uploads.js.map +1 -1
  68. package/uploads.mjs +2 -1
  69. package/uploads.mjs.map +1 -1
  70. package/version.d.ts +1 -1
  71. package/version.js +1 -1
  72. package/version.mjs +1 -1
@@ -9,11 +9,11 @@ export declare class Links extends APIResource {
9
9
  /**
10
10
  * Create a new link for the authenticated project.
11
11
  */
12
- create(params: LinkCreateParams, options?: Core.RequestOptions): Core.APIPromise<Link>;
12
+ create(params: LinkCreateParams, options?: Core.RequestOptions): Core.APIPromise<LinkCreateResponse>;
13
13
  /**
14
14
  * Edit a link for the authenticated project.
15
15
  */
16
- update(linkId: string, params: LinkUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Link>;
16
+ update(linkId: string, params: LinkUpdateParams, options?: Core.RequestOptions): Core.APIPromise<LinkUpdateResponse>;
17
17
  /**
18
18
  * Retrieve a list of links for the authenticated project. The list will be
19
19
  * paginated and the provided query parameters allow filtering the returned links.
@@ -22,147 +22,618 @@ export declare class Links extends APIResource {
22
22
  /**
23
23
  * Delete a link for the authenticated project.
24
24
  */
25
- deleteLink(linkId: string, params: LinkDeleteLinkParams, options?: Core.RequestOptions): Core.APIPromise<Link>;
25
+ deleteLink(linkId: string, params: LinkDeleteLinkParams, options?: Core.RequestOptions): Core.APIPromise<LinkDeleteLinkResponse>;
26
26
  }
27
- export interface Link {
27
+ export interface LinkCreateResponse {
28
28
  /**
29
29
  * The unique ID of the short link.
30
30
  */
31
- id?: string;
31
+ id: string;
32
32
  /**
33
33
  * The Android destination URL for the short link for Android device targeting.
34
34
  */
35
- android?: string | null;
35
+ android: string | null;
36
36
  /**
37
37
  * Whether the short link is archived.
38
38
  */
39
- archived?: boolean;
39
+ archived: boolean;
40
40
  /**
41
41
  * The number of clicks on the short link.
42
42
  */
43
- clicks?: number;
43
+ clicks: number;
44
44
  /**
45
45
  * The comments for the short link.
46
46
  */
47
- comments?: string | null;
47
+ comments: string | null;
48
48
  /**
49
49
  * The date and time when the short link was created.
50
50
  */
51
- createdAt?: string;
51
+ createdAt: string;
52
52
  /**
53
53
  * The description of the short link generated via `api.dub.co/metatags`. Will be
54
54
  * used for Custom Social Media Cards if `proxy` is true.
55
55
  */
56
- description?: string | null;
56
+ description: string | null;
57
57
  /**
58
58
  * The domain of the short link. If not provided, the primary domain for the
59
59
  * project will be used (or `dub.sh` if the project has no domains).
60
60
  */
61
- domain?: string;
61
+ domain: string;
62
62
  /**
63
63
  * The date and time when the short link will expire in ISO-8601 format. Must be in
64
64
  * the future.
65
65
  */
66
- expiresAt?: string | null;
66
+ expiresAt: string | null;
67
67
  /**
68
- * Geo targeting information for the short link in JSON format {[COUNTRY]:
69
- * `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
70
70
  */
71
- geo?: Record<string, string> | null;
71
+ geo: Record<string, string> | null;
72
72
  /**
73
73
  * The image of the short link generated via `api.dub.co/metatags`. Will be used
74
74
  * for Custom Social Media Cards if `proxy` is true.
75
75
  */
76
- image?: string | null;
76
+ image: string | null;
77
77
  /**
78
78
  * The iOS destination URL for the short link for iOS device targeting.
79
79
  */
80
- ios?: string | null;
80
+ ios: string | null;
81
81
  /**
82
82
  * The short link slug. If not provided, a random 7-character slug will be
83
83
  * generated.
84
84
  */
85
- key?: string;
85
+ key: string;
86
86
  /**
87
87
  * The date and time when the short link was last clicked.
88
88
  */
89
- lastClicked?: string | null;
89
+ lastClicked: string | null;
90
90
  /**
91
91
  * The password required to access the destination URL of the short link.
92
92
  */
93
- password?: string | null;
93
+ password: string | null;
94
94
  /**
95
95
  * The project ID of the short link.
96
96
  */
97
- projectId?: string;
97
+ projectId: string;
98
98
  /**
99
99
  * Whether the short link uses Custom Social Media Cards feature.
100
100
  */
101
- proxy?: boolean;
101
+ proxy: boolean;
102
102
  /**
103
103
  * Whether the short link's stats are publicly accessible.
104
104
  */
105
- publicStats?: boolean;
105
+ publicStats: boolean;
106
106
  /**
107
107
  * The full URL of the QR code for the short link (e.g.
108
108
  * `https://api.dub.co/qr?url=https://dub.sh/try`).
109
109
  */
110
- qrCode?: string;
110
+ qrCode: string;
111
111
  /**
112
112
  * Whether the short link uses link cloaking.
113
113
  */
114
- rewrite?: boolean;
114
+ rewrite: boolean;
115
115
  /**
116
116
  * The full URL of the short link, including the https protocol (e.g.
117
117
  * `https://dub.sh/try`).
118
118
  */
119
- shortLink?: string;
119
+ shortLink: string;
120
120
  /**
121
- * The unique id of the tag assigned to the short link.
121
+ * The tags assigned to the short link.
122
122
  */
123
- tagId?: string | null;
123
+ tags: Array<LinkCreateResponse.Tag> | null;
124
124
  /**
125
125
  * The title of the short link generated via `api.dub.co/metatags`. Will be used
126
126
  * for Custom Social Media Cards if `proxy` is true.
127
127
  */
128
- title?: string | null;
128
+ title: string | null;
129
129
  /**
130
130
  * The date and time when the short link was last updated.
131
131
  */
132
- updatedAt?: string;
132
+ updatedAt: string;
133
133
  /**
134
134
  * The destination URL of the short link.
135
135
  */
136
- url?: string;
136
+ url: string;
137
137
  /**
138
138
  * The user ID of the creator of the short link.
139
139
  */
140
- userId?: string;
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;
245
+ /**
246
+ * The project ID of the short link.
247
+ */
248
+ projectId: string;
249
+ /**
250
+ * Whether the short link uses Custom Social Media Cards feature.
251
+ */
252
+ proxy: boolean;
253
+ /**
254
+ * Whether the short link's stats are publicly accessible.
255
+ */
256
+ publicStats: boolean;
257
+ /**
258
+ * The full URL of the QR code for the short link (e.g.
259
+ * `https://api.dub.co/qr?url=https://dub.sh/try`).
260
+ */
261
+ qrCode: string;
262
+ /**
263
+ * Whether the short link uses link cloaking.
264
+ */
265
+ rewrite: boolean;
266
+ /**
267
+ * The full URL of the short link, including the https protocol (e.g.
268
+ * `https://dub.sh/try`).
269
+ */
270
+ shortLink: string;
271
+ /**
272
+ * The tags assigned to the short link.
273
+ */
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;
280
+ /**
281
+ * The date and time when the short link was last updated.
282
+ */
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;
576
+ /**
577
+ * The tags assigned to the short link.
578
+ */
579
+ tags: Array<LinkDeleteLinkResponse.Tag> | null;
580
+ /**
581
+ * The title of the short link generated via `api.dub.co/metatags`. Will be used
582
+ * for Custom Social Media Cards if `proxy` is true.
583
+ */
584
+ title: string | null;
585
+ /**
586
+ * The date and time when the short link was last updated.
587
+ */
588
+ updatedAt: string;
589
+ /**
590
+ * The destination URL of the short link.
591
+ */
592
+ url: string;
593
+ /**
594
+ * The user ID of the creator of the short link.
595
+ */
596
+ userId: string;
141
597
  /**
142
598
  * The UTM campaign of the short link.
143
599
  */
144
- utm_campaign?: string | null;
600
+ utm_campaign: string | null;
145
601
  /**
146
602
  * The UTM content of the short link.
147
603
  */
148
- utm_content?: string | null;
604
+ utm_content: string | null;
149
605
  /**
150
606
  * The UTM medium of the short link.
151
607
  */
152
- utm_medium?: string | null;
608
+ utm_medium: string | null;
153
609
  /**
154
610
  * The UTM source of the short link.
155
611
  */
156
- utm_source?: string | null;
612
+ utm_source: string | null;
157
613
  /**
158
614
  * The UTM term of the short link.
159
615
  */
160
- 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
+ }
161
633
  }
162
- export type LinkListResponse = Array<Link>;
163
634
  export interface LinkCreateParams {
164
635
  /**
165
- * 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
166
637
  * `app.dub.co/acme`, the projectSlug is `acme`.
167
638
  */
168
639
  projectSlug?: string;
@@ -201,7 +672,7 @@ export interface LinkCreateParams {
201
672
  expiresAt?: string | null;
202
673
  /**
203
674
  * Body param: Geo targeting information for the short link in JSON format
204
- * {[COUNTRY]: `https://example.com` }. Learn more: `https://dub.sh/geo`
675
+ * `{[COUNTRY]: https://example.com }`.
205
676
  */
206
677
  geo?: Record<string, string> | null;
207
678
  /**
@@ -223,6 +694,12 @@ export interface LinkCreateParams {
223
694
  * link.
224
695
  */
225
696
  password?: string | null;
697
+ /**
698
+ * Body param: The prefix of the short link slug for randomly-generated keys (e.g.
699
+ * if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be
700
+ * ignored if `key` is provided.
701
+ */
702
+ prefix?: string;
226
703
  /**
227
704
  * Body param: Whether the short link uses Custom Social Media Cards feature.
228
705
  */
@@ -236,9 +713,13 @@ export interface LinkCreateParams {
236
713
  */
237
714
  rewrite?: boolean;
238
715
  /**
239
- * Body param: The unique id of the tag assigned to the short link.
716
+ * Body param: The unique ID of the tag assigned to the short link.
240
717
  */
241
718
  tagId?: string | null;
719
+ /**
720
+ * Body param: The unique IDs of the tags assigned to the short link.
721
+ */
722
+ tagIds?: Array<string> | null;
242
723
  /**
243
724
  * Body param: The title of the short link generated via `api.dub.co/metatags`.
244
725
  * Will be used for Custom Social Media Cards if `proxy` is true.
@@ -251,6 +732,10 @@ export interface LinkUpdateParams {
251
732
  * `app.dub.co/acme`, the projectSlug is `acme`.
252
733
  */
253
734
  projectSlug?: string;
735
+ /**
736
+ * Body param: The destination URL of the short link.
737
+ */
738
+ url: string;
254
739
  /**
255
740
  * Body param: The Android destination URL for the short link for Android device
256
741
  * targeting.
@@ -282,7 +767,7 @@ export interface LinkUpdateParams {
282
767
  expiresAt?: string | null;
283
768
  /**
284
769
  * Body param: Geo targeting information for the short link in JSON format
285
- * {[COUNTRY]: `https://example.com` }. Learn more: `https://dub.sh/geo`
770
+ * `{[COUNTRY]: https://example.com }`.
286
771
  */
287
772
  geo?: Record<string, string> | null;
288
773
  /**
@@ -304,6 +789,12 @@ export interface LinkUpdateParams {
304
789
  * link.
305
790
  */
306
791
  password?: string | null;
792
+ /**
793
+ * Body param: The prefix of the short link slug for randomly-generated keys (e.g.
794
+ * if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be
795
+ * ignored if `key` is provided.
796
+ */
797
+ prefix?: string;
307
798
  /**
308
799
  * Body param: Whether the short link uses Custom Social Media Cards feature.
309
800
  */
@@ -317,23 +808,23 @@ export interface LinkUpdateParams {
317
808
  */
318
809
  rewrite?: boolean;
319
810
  /**
320
- * Body param: The unique id of the tag assigned to the short link.
811
+ * Body param: The unique ID of the tag assigned to the short link.
321
812
  */
322
813
  tagId?: string | null;
814
+ /**
815
+ * Body param: The unique IDs of the tags assigned to the short link.
816
+ */
817
+ tagIds?: Array<string> | null;
323
818
  /**
324
819
  * Body param: The title of the short link generated via `api.dub.co/metatags`.
325
820
  * Will be used for Custom Social Media Cards if `proxy` is true.
326
821
  */
327
822
  title?: string | null;
328
- /**
329
- * Body param: The destination URL of the short link.
330
- */
331
- url?: string;
332
823
  }
333
824
  export interface LinkListParams {
334
825
  /**
335
- * The slug for the project to retrieve links for. E.g. for `app.dub.co/acme`, the
336
- * 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`.
337
828
  */
338
829
  projectSlug?: string;
339
830
  /**
@@ -354,7 +845,7 @@ export interface LinkListParams {
354
845
  * Whether to include archived links in the response. Defaults to `false` if not
355
846
  * provided.
356
847
  */
357
- showArchived?: true | false;
848
+ showArchived?: boolean;
358
849
  /**
359
850
  * The field to sort the links by. The default is `createdAt`, and sort order is
360
851
  * always descending.
@@ -364,10 +855,18 @@ export interface LinkListParams {
364
855
  * The tag ID to filter the links by.
365
856
  */
366
857
  tagId?: string;
858
+ /**
859
+ * The tag IDs to filter the links by.
860
+ */
861
+ tagIds?: Array<string>;
367
862
  /**
368
863
  * The user ID to filter the links by.
369
864
  */
370
865
  userId?: string;
866
+ /**
867
+ * Whether to include tags in the response. Defaults to `false` if not provided.
868
+ */
869
+ withTags?: boolean;
371
870
  }
372
871
  export interface LinkDeleteLinkParams {
373
872
  /**
@@ -377,13 +876,16 @@ export interface LinkDeleteLinkParams {
377
876
  projectSlug?: string;
378
877
  }
379
878
  export declare namespace Links {
380
- export import Link = LinksAPI.Link;
879
+ export import LinkCreateResponse = LinksAPI.LinkCreateResponse;
880
+ export import LinkUpdateResponse = LinksAPI.LinkUpdateResponse;
381
881
  export import LinkListResponse = LinksAPI.LinkListResponse;
882
+ export import LinkDeleteLinkResponse = LinksAPI.LinkDeleteLinkResponse;
382
883
  export import LinkCreateParams = LinksAPI.LinkCreateParams;
383
884
  export import LinkUpdateParams = LinksAPI.LinkUpdateParams;
384
885
  export import LinkListParams = LinksAPI.LinkListParams;
385
886
  export import LinkDeleteLinkParams = LinksAPI.LinkDeleteLinkParams;
386
887
  export import Info = InfoAPI.Info;
888
+ export import InfoRetrieveResponse = InfoAPI.InfoRetrieveResponse;
387
889
  export import InfoRetrieveParams = InfoAPI.InfoRetrieveParams;
388
890
  export import Bulk = BulkAPI.Bulk;
389
891
  export import BulkCreateResponse = BulkAPI.BulkCreateResponse;