@codeqr/ts 0.9.0 → 0.24.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 (243) hide show
  1. package/CHANGELOG.md +509 -0
  2. package/LICENSE +1 -1
  3. package/README.md +12 -1
  4. package/api-promise.d.mts +1 -0
  5. package/api-promise.d.mts.map +1 -1
  6. package/api-promise.d.ts +1 -0
  7. package/api-promise.d.ts.map +1 -1
  8. package/api-promise.mjs +1 -0
  9. package/api-promise.mjs.map +1 -1
  10. package/client.d.mts +8 -7
  11. package/client.d.mts.map +1 -1
  12. package/client.d.ts +8 -7
  13. package/client.d.ts.map +1 -1
  14. package/client.js +43 -10
  15. package/client.js.map +1 -1
  16. package/client.mjs +43 -10
  17. package/client.mjs.map +1 -1
  18. package/core/api-promise.d.mts.map +1 -1
  19. package/core/api-promise.d.ts.map +1 -1
  20. package/core/api-promise.mjs.map +1 -1
  21. package/core/error.mjs.map +1 -1
  22. package/core/resource.d.mts.map +1 -1
  23. package/core/resource.d.ts.map +1 -1
  24. package/core/uploads.d.mts.map +1 -1
  25. package/core/uploads.d.ts.map +1 -1
  26. package/core/uploads.mjs.map +1 -1
  27. package/error.d.mts +1 -0
  28. package/error.d.mts.map +1 -1
  29. package/error.d.ts +1 -0
  30. package/error.d.ts.map +1 -1
  31. package/error.mjs +1 -0
  32. package/error.mjs.map +1 -1
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts.map +1 -1
  35. package/index.mjs.map +1 -1
  36. package/internal/detect-platform.mjs.map +1 -1
  37. package/internal/headers.mjs.map +1 -1
  38. package/internal/parse.d.mts.map +1 -1
  39. package/internal/parse.d.ts.map +1 -1
  40. package/internal/parse.js +5 -0
  41. package/internal/parse.js.map +1 -1
  42. package/internal/parse.mjs +5 -0
  43. package/internal/parse.mjs.map +1 -1
  44. package/internal/qs/formats.d.mts.map +1 -1
  45. package/internal/qs/formats.d.ts.map +1 -1
  46. package/internal/qs/index.d.mts +2 -2
  47. package/internal/qs/index.d.mts.map +1 -1
  48. package/internal/qs/index.d.ts +2 -2
  49. package/internal/qs/index.d.ts.map +1 -1
  50. package/internal/qs/index.mjs.map +1 -1
  51. package/internal/qs/stringify.d.mts.map +1 -1
  52. package/internal/qs/stringify.d.ts.map +1 -1
  53. package/internal/qs/stringify.mjs.map +1 -1
  54. package/internal/qs/utils.d.mts.map +1 -1
  55. package/internal/qs/utils.d.ts.map +1 -1
  56. package/internal/qs/utils.mjs.map +1 -1
  57. package/internal/request-options.d.mts.map +1 -1
  58. package/internal/request-options.d.ts.map +1 -1
  59. package/internal/shims.d.mts +6 -0
  60. package/internal/shims.d.mts.map +1 -1
  61. package/internal/shims.d.ts +6 -0
  62. package/internal/shims.d.ts.map +1 -1
  63. package/internal/to-file.d.mts.map +1 -1
  64. package/internal/to-file.d.ts.map +1 -1
  65. package/internal/to-file.mjs.map +1 -1
  66. package/internal/types.d.mts +10 -10
  67. package/internal/types.d.mts.map +1 -1
  68. package/internal/types.d.ts +10 -10
  69. package/internal/types.d.ts.map +1 -1
  70. package/internal/uploads.d.mts.map +1 -1
  71. package/internal/uploads.d.ts.map +1 -1
  72. package/internal/uploads.mjs.map +1 -1
  73. package/internal/utils/base64.mjs.map +1 -1
  74. package/internal/utils/env.js +2 -2
  75. package/internal/utils/env.js.map +1 -1
  76. package/internal/utils/env.mjs +2 -2
  77. package/internal/utils/env.mjs.map +1 -1
  78. package/internal/utils/log.d.mts.map +1 -1
  79. package/internal/utils/log.d.ts.map +1 -1
  80. package/internal/utils/log.js +2 -0
  81. package/internal/utils/log.js.map +1 -1
  82. package/internal/utils/log.mjs +2 -0
  83. package/internal/utils/log.mjs.map +1 -1
  84. package/internal/utils/path.mjs.map +1 -1
  85. package/internal/utils/query.d.mts +2 -0
  86. package/internal/utils/query.d.mts.map +1 -0
  87. package/internal/utils/query.d.ts +2 -0
  88. package/internal/utils/query.d.ts.map +1 -0
  89. package/internal/utils/query.js +10 -0
  90. package/internal/utils/query.js.map +1 -0
  91. package/internal/utils/query.mjs +6 -0
  92. package/internal/utils/query.mjs.map +1 -0
  93. package/internal/utils/values.mjs.map +1 -1
  94. package/internal/utils.d.mts +1 -0
  95. package/internal/utils.d.mts.map +1 -1
  96. package/internal/utils.d.ts +1 -0
  97. package/internal/utils.d.ts.map +1 -1
  98. package/internal/utils.js +1 -0
  99. package/internal/utils.js.map +1 -1
  100. package/internal/utils.mjs +1 -0
  101. package/internal/utils.mjs.map +1 -1
  102. package/package.json +12 -1
  103. package/resource.d.mts +1 -0
  104. package/resource.d.mts.map +1 -1
  105. package/resource.d.ts +1 -0
  106. package/resource.d.ts.map +1 -1
  107. package/resource.mjs +1 -0
  108. package/resource.mjs.map +1 -1
  109. package/resources/analytics.d.mts +23 -3
  110. package/resources/analytics.d.mts.map +1 -1
  111. package/resources/analytics.d.ts +23 -3
  112. package/resources/analytics.d.ts.map +1 -1
  113. package/resources/analytics.mjs.map +1 -1
  114. package/resources/domains.d.mts +27 -27
  115. package/resources/domains.d.mts.map +1 -1
  116. package/resources/domains.d.ts +27 -27
  117. package/resources/domains.d.ts.map +1 -1
  118. package/resources/domains.js +8 -8
  119. package/resources/domains.js.map +1 -1
  120. package/resources/domains.mjs +8 -8
  121. package/resources/domains.mjs.map +1 -1
  122. package/resources/events.d.mts +53 -137
  123. package/resources/events.d.mts.map +1 -1
  124. package/resources/events.d.ts +53 -137
  125. package/resources/events.d.ts.map +1 -1
  126. package/resources/events.mjs.map +1 -1
  127. package/resources/index.d.mts +4 -4
  128. package/resources/index.d.mts.map +1 -1
  129. package/resources/index.d.ts +4 -4
  130. package/resources/index.d.ts.map +1 -1
  131. package/resources/index.js.map +1 -1
  132. package/resources/index.mjs.map +1 -1
  133. package/resources/links/bulk.d.mts +16 -26
  134. package/resources/links/bulk.d.mts.map +1 -1
  135. package/resources/links/bulk.d.ts +16 -26
  136. package/resources/links/bulk.d.ts.map +1 -1
  137. package/resources/links/bulk.js +0 -14
  138. package/resources/links/bulk.js.map +1 -1
  139. package/resources/links/bulk.mjs +0 -14
  140. package/resources/links/bulk.mjs.map +1 -1
  141. package/resources/links/index.d.mts +2 -2
  142. package/resources/links/index.d.mts.map +1 -1
  143. package/resources/links/index.d.ts +2 -2
  144. package/resources/links/index.d.ts.map +1 -1
  145. package/resources/links/index.js.map +1 -1
  146. package/resources/links/index.mjs +1 -1
  147. package/resources/links/index.mjs.map +1 -1
  148. package/resources/links/links.d.mts +232 -988
  149. package/resources/links/links.d.mts.map +1 -1
  150. package/resources/links/links.d.ts +232 -988
  151. package/resources/links/links.d.ts.map +1 -1
  152. package/resources/links/links.js +16 -42
  153. package/resources/links/links.js.map +1 -1
  154. package/resources/links/links.mjs +16 -42
  155. package/resources/links/links.mjs.map +1 -1
  156. package/resources/links.d.mts.map +1 -1
  157. package/resources/links.d.ts.map +1 -1
  158. package/resources/links.mjs.map +1 -1
  159. package/resources/projects.d.mts +0 -4
  160. package/resources/projects.d.mts.map +1 -1
  161. package/resources/projects.d.ts +0 -4
  162. package/resources/projects.d.ts.map +1 -1
  163. package/resources/projects.js +0 -7
  164. package/resources/projects.js.map +1 -1
  165. package/resources/projects.mjs +0 -7
  166. package/resources/projects.mjs.map +1 -1
  167. package/resources/qrcodes/bulk.d.mts +111 -38
  168. package/resources/qrcodes/bulk.d.mts.map +1 -1
  169. package/resources/qrcodes/bulk.d.ts +111 -38
  170. package/resources/qrcodes/bulk.d.ts.map +1 -1
  171. package/resources/qrcodes/bulk.js +0 -14
  172. package/resources/qrcodes/bulk.js.map +1 -1
  173. package/resources/qrcodes/bulk.mjs +0 -14
  174. package/resources/qrcodes/bulk.mjs.map +1 -1
  175. package/resources/qrcodes/index.d.mts +2 -2
  176. package/resources/qrcodes/index.d.mts.map +1 -1
  177. package/resources/qrcodes/index.d.ts +2 -2
  178. package/resources/qrcodes/index.d.ts.map +1 -1
  179. package/resources/qrcodes/index.js.map +1 -1
  180. package/resources/qrcodes/index.mjs +1 -1
  181. package/resources/qrcodes/index.mjs.map +1 -1
  182. package/resources/qrcodes/qrcodes.d.mts +442 -855
  183. package/resources/qrcodes/qrcodes.d.mts.map +1 -1
  184. package/resources/qrcodes/qrcodes.d.ts +442 -855
  185. package/resources/qrcodes/qrcodes.d.ts.map +1 -1
  186. package/resources/qrcodes/qrcodes.js +12 -42
  187. package/resources/qrcodes/qrcodes.js.map +1 -1
  188. package/resources/qrcodes/qrcodes.mjs +12 -42
  189. package/resources/qrcodes/qrcodes.mjs.map +1 -1
  190. package/resources/qrcodes.d.mts.map +1 -1
  191. package/resources/qrcodes.d.ts.map +1 -1
  192. package/resources/qrcodes.mjs.map +1 -1
  193. package/resources/tags.d.mts +19 -15
  194. package/resources/tags.d.mts.map +1 -1
  195. package/resources/tags.d.ts +19 -15
  196. package/resources/tags.d.ts.map +1 -1
  197. package/resources/tags.js +7 -7
  198. package/resources/tags.js.map +1 -1
  199. package/resources/tags.mjs +7 -7
  200. package/resources/tags.mjs.map +1 -1
  201. package/resources/track.d.mts +10 -9
  202. package/resources/track.d.mts.map +1 -1
  203. package/resources/track.d.ts +10 -9
  204. package/resources/track.d.ts.map +1 -1
  205. package/resources/track.mjs.map +1 -1
  206. package/resources.d.mts.map +1 -1
  207. package/resources.d.ts.map +1 -1
  208. package/resources.mjs.map +1 -1
  209. package/src/client.ts +53 -29
  210. package/src/internal/parse.ts +6 -0
  211. package/src/internal/types.ts +6 -8
  212. package/src/internal/utils/env.ts +2 -2
  213. package/src/internal/utils/log.ts +2 -0
  214. package/src/internal/utils/query.ts +7 -0
  215. package/src/internal/utils.ts +1 -0
  216. package/src/resources/analytics.ts +33 -3
  217. package/src/resources/domains.ts +38 -38
  218. package/src/resources/events.ts +90 -143
  219. package/src/resources/index.ts +4 -10
  220. package/src/resources/links/bulk.ts +30 -37
  221. package/src/resources/links/index.ts +2 -11
  222. package/src/resources/links/links.ts +227 -1538
  223. package/src/resources/projects.ts +0 -8
  224. package/src/resources/qrcodes/bulk.ts +151 -50
  225. package/src/resources/qrcodes/index.ts +2 -11
  226. package/src/resources/qrcodes/qrcodes.ts +405 -1083
  227. package/src/resources/tags.ts +23 -18
  228. package/src/resources/track.ts +10 -9
  229. package/src/version.ts +1 -1
  230. package/uploads.d.mts +1 -0
  231. package/uploads.d.mts.map +1 -1
  232. package/uploads.d.ts +1 -0
  233. package/uploads.d.ts.map +1 -1
  234. package/uploads.mjs +1 -0
  235. package/uploads.mjs.map +1 -1
  236. package/version.d.mts +1 -1
  237. package/version.d.mts.map +1 -1
  238. package/version.d.ts +1 -1
  239. package/version.d.ts.map +1 -1
  240. package/version.js +1 -1
  241. package/version.js.map +1 -1
  242. package/version.mjs +1 -1
  243. package/version.mjs.map +1 -1
@@ -3,7 +3,7 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as TagsAPI from '../tags';
5
5
  import * as BulkAPI from './bulk';
6
- import { Bulk, BulkCreateParams, BulkCreateResponse, BulkDeleteParams, BulkDeleteResponse } from './bulk';
6
+ import { Bulk, BulkCreateParams, BulkCreateResponse } from './bulk';
7
7
  import { APIPromise } from '../../core/api-promise';
8
8
  import { RequestOptions } from '../../internal/request-options';
9
9
  import { path } from '../../internal/utils/path';
@@ -25,23 +25,6 @@ export class Links extends APIResource {
25
25
  return this._client.post('/links', { body, ...options });
26
26
  }
27
27
 
28
- /**
29
- * Update a link for the authenticated workspace. If there's no change, returns it
30
- * as it is.
31
- *
32
- * @example
33
- * ```ts
34
- * const link = await client.links.update('linkId');
35
- * ```
36
- */
37
- update(
38
- linkID: string,
39
- body: LinkUpdateParams | null | undefined = {},
40
- options?: RequestOptions,
41
- ): APIPromise<Link> {
42
- return this._client.put(path`/links/${linkID}`, { body, ...options });
43
- }
44
-
45
28
  /**
46
29
  * Retrieve a paginated list of links for the authenticated workspace.
47
30
  *
@@ -58,62 +41,48 @@ export class Links extends APIResource {
58
41
  }
59
42
 
60
43
  /**
61
- * Delete a link for the authenticated workspace.
44
+ * Retrieve the info for a link.
62
45
  *
63
46
  * @example
64
47
  * ```ts
65
- * const link = await client.links.delete('linkId');
48
+ * const link = await client.links.retrieveInfo({
49
+ * domain: 'x',
50
+ * key: 'x',
51
+ * projectSlug: 'x',
52
+ * });
66
53
  * ```
67
54
  */
68
- delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse> {
69
- return this._client.delete(path`/links/${linkID}`, options);
55
+ retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link> {
56
+ return this._client.get('/links/info', { query, ...options });
70
57
  }
71
58
 
72
59
  /**
73
- * Retrieve the number of links for the authenticated workspace.
60
+ * Update a link for the authenticated workspace. If there's no change, returns it
61
+ * as it is.
74
62
  *
75
63
  * @example
76
64
  * ```ts
77
- * const response = await client.links.count();
65
+ * const link = await client.links.update('linkId');
78
66
  * ```
79
67
  */
80
- count(
81
- query: LinkCountParams | null | undefined = {},
68
+ update(
69
+ linkID: string,
70
+ body: LinkUpdateParams | null | undefined = {},
82
71
  options?: RequestOptions,
83
- ): APIPromise<LinkCountResponse> {
84
- return this._client.get('/links/count', { query, ...options });
85
- }
86
-
87
- /**
88
- * Retrieve the info for a link.
89
- *
90
- * @example
91
- * ```ts
92
- * const link = await client.links.retrieveInfo({
93
- * domain: 'x',
94
- * key: 'x',
95
- * projectSlug: 'x',
96
- * });
97
- * ```
98
- */
99
- retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link> {
100
- return this._client.get('/links/info', { query, ...options });
72
+ ): APIPromise<Link> {
73
+ return this._client.put(path`/links/${linkID}`, { body, ...options });
101
74
  }
102
75
 
103
76
  /**
104
- * Upsert a link for the authenticated workspace by its URL. If a link with the
105
- * same URL already exists, return it (or update it if there are any changes).
106
- * Otherwise, a new link will be created.
77
+ * Delete a link for the authenticated workspace.
107
78
  *
108
79
  * @example
109
80
  * ```ts
110
- * const link = await client.links.upsert({
111
- * url: 'https://google.com',
112
- * });
81
+ * const link = await client.links.delete('linkId');
113
82
  * ```
114
83
  */
115
- upsert(body: LinkUpsertParams, options?: RequestOptions): APIPromise<Link> {
116
- return this._client.patch('/links/update', { body, ...options });
84
+ delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse> {
85
+ return this._client.delete(path`/links/${linkID}`, options);
117
86
  }
118
87
  }
119
88
 
@@ -269,6 +238,11 @@ export interface Link {
269
238
  */
270
239
  rewrite: boolean;
271
240
 
241
+ /**
242
+ * Smart rules for conditional destination routing by request attribute.
243
+ */
244
+ rules: Array<Link.Rule> | null;
245
+
272
246
  /**
273
247
  * The amount of the sale generated by the link.
274
248
  */
@@ -311,6 +285,11 @@ export interface Link {
311
285
  */
312
286
  url: string;
313
287
 
288
+ /**
289
+ * Whether this link should be used as a reusable template.
290
+ */
291
+ useAsTemplate: boolean;
292
+
314
293
  /**
315
294
  * The ID of the user who created the short link.
316
295
  */
@@ -362,1584 +341,223 @@ export interface Link {
362
341
  */
363
342
  qrCode?: string;
364
343
 
365
- /**
366
- * The complete URL of the short link, including the https protocol (for example,
367
- * `https://codeqr.link/try`).
368
- */
369
- shortLink?: string;
370
- }
371
-
372
- export type LinkListResponse = Array<Link>;
373
-
374
- export interface LinkDeleteResponse {
375
- /**
376
- * The ID of the link.
377
- */
378
- id: string;
379
- }
380
-
381
- /**
382
- * The number of links matching the query.
383
- */
384
- export type LinkCountResponse = number;
385
-
386
- export interface LinkCreateParams {
387
- /**
388
- * The destination URL of the short link.
389
- */
390
- url: string;
391
-
392
- /**
393
- * The Android destination URL for the short link for Android device targeting.
394
- */
395
- android?: string | null;
396
-
397
- /**
398
- * Whether the short link is archived.
399
- */
400
- archived?: boolean;
401
-
402
- /**
403
- * The comments for the short link.
404
- */
405
- comments?: string | null;
406
-
407
- /**
408
- * The description of the short link generated via `api.codeqr.io/metatags`. Will
409
- * be used for custom link preview if `proxy` is true.
410
- */
411
- description?: string | null;
412
-
413
- /**
414
- * Allow search engines to index your short link. Default is `false` if not
415
- * provided. Learn more: https://codeqr.link/noindex
416
- */
417
- doIndex?: boolean;
418
-
419
- /**
420
- * The domain of the short link. If not provided, the main domain of the project
421
- * will be used (or `codeqr.link` if the project has no domains).
422
- */
423
- domain?: string;
424
-
425
- /**
426
- * The URL to redirect to when the short link expires.
427
- */
428
- expiredUrl?: string | null;
429
-
430
- /**
431
- * The date and time when the short link will expire in ISO-8601 format. Must be in
432
- * the future.
433
- */
434
- expiresAt?: string | null;
435
-
436
- /**
437
- * This is the ID of the link in your database. If set, it can be used to identify
438
- * the link in the future. Must be prefixed with `ext_` when passed as a query
439
- * parameter.
440
- */
441
- externalId?: string | null;
442
-
443
- /**
444
- * Whether the short link is flexible.
445
- */
446
- flexible?: boolean;
447
-
448
- /**
449
- * The unique ID existing folder to assign the short link to.
450
- */
451
- folderId?: string | null;
452
-
453
- /**
454
- * Geographic targeting information for the short link in JSON format
455
- * `{[COUNTRY]: https://example.com }`.
456
- */
457
- geo?: LinkCreateParams.Geo | null;
458
-
459
- /**
460
- * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
461
- * for custom link preview if `proxy` is true.
462
- */
463
- image?: string | null;
464
-
465
- /**
466
- * The iOS destination URL for the short link for iOS device targeting.
467
- */
468
- ios?: string | null;
469
-
470
- /**
471
- * If the form is mandatory for the page.
472
- */
473
- isFormMandatory?: boolean;
474
-
475
- /**
476
- * The slug of the short link. If not provided, a random 7-character slug will be
477
- * generated.
478
- */
479
- key?: string;
480
-
481
- /**
482
- * The ID of the page to redirect to before the link destination.
483
- */
484
- pageId?: string | null;
485
-
486
- /**
487
- * The URL of the page to redirect to before the link destination.
488
- */
489
- pageUrl?: string | null;
490
-
491
- /**
492
- * The password required to access the short link destination URL.
493
- */
494
- password?: string | null;
495
-
496
- /**
497
- * The prefix of the short link slug for randomly generated keys (for example, if
498
- * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
499
- * be ignored if `key` is provided.
500
- */
501
- prefix?: string;
502
-
503
- /**
504
- * Whether the short link has pre-redirection.
505
- */
506
- preRedirection?: boolean;
507
-
508
- /**
509
- * Whether the short link uses the custom link preview feature.
510
- */
511
- proxy?: boolean;
512
-
513
- /**
514
- * Whether the short link statistics are publicly accessible.
515
- */
516
- publicStats?: boolean;
517
-
518
- /**
519
- * Whether the short link uses link cloaking.
520
- */
521
- rewrite?: boolean;
522
-
523
- /**
524
- * @deprecated The unique ID of the tag assigned to the short link. This field is
525
- * deprecated – use `tagIds` instead.
526
- */
527
- tagId?: string | null;
528
-
529
- /**
530
- * The unique IDs of the tags assigned to the short link.
531
- */
532
- tagIds?: string | Array<string>;
533
-
534
- /**
535
- * The unique name of the tags assigned to the short link (case insensitive).
536
- */
537
- tagNames?: string | Array<string>;
538
-
539
- /**
540
- * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
541
- * for custom link preview if `proxy` is true.
542
- */
543
- title?: string | null;
544
-
545
- /**
546
- * Whether to track conversions for the short link.
547
- */
548
- trackConversion?: boolean;
549
-
550
- /**
551
- * The video of the short link.
552
- */
553
- video?: string | null;
554
-
555
- /**
556
- * An array of webhook IDs to trigger when the link is clicked. These webhooks will
557
- * receive click event data.
558
- */
559
- webhookIds?: Array<string> | null;
560
- }
561
-
562
- export namespace LinkCreateParams {
563
- /**
564
- * Geographic targeting information for the short link in JSON format
565
- * `{[COUNTRY]: https://example.com }`.
566
- */
567
- export interface Geo {
568
- AD?: string;
569
-
570
- AE?: string;
571
-
572
- AF?: string;
573
-
574
- AG?: string;
575
-
576
- AI?: string;
577
-
578
- AL?: string;
579
-
580
- AM?: string;
581
-
582
- AO?: string;
583
-
584
- AQ?: string;
585
-
586
- AR?: string;
587
-
588
- AS?: string;
589
-
590
- AT?: string;
591
-
592
- AU?: string;
593
-
594
- AW?: string;
595
-
596
- AX?: string;
597
-
598
- AZ?: string;
599
-
600
- BA?: string;
601
-
602
- BB?: string;
603
-
604
- BD?: string;
605
-
606
- BE?: string;
607
-
608
- BF?: string;
609
-
610
- BG?: string;
611
-
612
- BH?: string;
613
-
614
- BI?: string;
615
-
616
- BJ?: string;
617
-
618
- BL?: string;
619
-
620
- BM?: string;
621
-
622
- BN?: string;
623
-
624
- BO?: string;
625
-
626
- BQ?: string;
627
-
628
- BR?: string;
629
-
630
- BS?: string;
631
-
632
- BT?: string;
633
-
634
- BV?: string;
635
-
636
- BW?: string;
637
-
638
- BY?: string;
639
-
640
- BZ?: string;
641
-
642
- CA?: string;
643
-
644
- CC?: string;
645
-
646
- CD?: string;
647
-
648
- CF?: string;
649
-
650
- CG?: string;
651
-
652
- CH?: string;
653
-
654
- CI?: string;
655
-
656
- CK?: string;
657
-
658
- CL?: string;
659
-
660
- CM?: string;
661
-
662
- CN?: string;
663
-
664
- CO?: string;
665
-
666
- CR?: string;
667
-
668
- CU?: string;
669
-
670
- CV?: string;
671
-
672
- CW?: string;
673
-
674
- CX?: string;
675
-
676
- CY?: string;
677
-
678
- CZ?: string;
679
-
680
- DE?: string;
681
-
682
- DJ?: string;
683
-
684
- DK?: string;
685
-
686
- DM?: string;
687
-
688
- DO?: string;
689
-
690
- DZ?: string;
691
-
692
- EC?: string;
693
-
694
- EE?: string;
695
-
696
- EG?: string;
697
-
698
- EH?: string;
699
-
700
- ER?: string;
701
-
702
- ES?: string;
703
-
704
- ET?: string;
705
-
706
- FI?: string;
707
-
708
- FJ?: string;
709
-
710
- FK?: string;
711
-
712
- FM?: string;
713
-
714
- FO?: string;
715
-
716
- FR?: string;
717
-
718
- GA?: string;
719
-
720
- GB?: string;
721
-
722
- GD?: string;
723
-
724
- GE?: string;
725
-
726
- GF?: string;
727
-
728
- GG?: string;
729
-
730
- GH?: string;
731
-
732
- GI?: string;
733
-
734
- GL?: string;
735
-
736
- GM?: string;
737
-
738
- GN?: string;
739
-
740
- GP?: string;
741
-
742
- GQ?: string;
743
-
744
- GR?: string;
745
-
746
- GS?: string;
747
-
748
- GT?: string;
749
-
750
- GU?: string;
751
-
752
- GW?: string;
753
-
754
- GY?: string;
755
-
756
- HK?: string;
757
-
758
- HM?: string;
759
-
760
- HN?: string;
761
-
762
- HR?: string;
763
-
764
- HT?: string;
765
-
766
- HU?: string;
767
-
768
- ID?: string;
769
-
770
- IE?: string;
771
-
772
- IL?: string;
773
-
774
- IM?: string;
775
-
776
- IN?: string;
777
-
778
- IO?: string;
779
-
780
- IQ?: string;
781
-
782
- IR?: string;
783
-
784
- IS?: string;
785
-
786
- IT?: string;
787
-
788
- JE?: string;
789
-
790
- JM?: string;
791
-
792
- JO?: string;
793
-
794
- JP?: string;
795
-
796
- KE?: string;
797
-
798
- KG?: string;
799
-
800
- KH?: string;
801
-
802
- KI?: string;
803
-
804
- KM?: string;
805
-
806
- KN?: string;
807
-
808
- KP?: string;
809
-
810
- KR?: string;
811
-
812
- KW?: string;
813
-
814
- KY?: string;
815
-
816
- KZ?: string;
817
-
818
- LA?: string;
819
-
820
- LB?: string;
821
-
822
- LC?: string;
823
-
824
- LI?: string;
825
-
826
- LK?: string;
827
-
828
- LR?: string;
829
-
830
- LS?: string;
831
-
832
- LT?: string;
833
-
834
- LU?: string;
835
-
836
- LV?: string;
837
-
838
- LY?: string;
839
-
840
- MA?: string;
841
-
842
- MC?: string;
843
-
844
- MD?: string;
845
-
846
- ME?: string;
847
-
848
- MF?: string;
849
-
850
- MG?: string;
851
-
852
- MH?: string;
853
-
854
- MK?: string;
855
-
856
- ML?: string;
857
-
858
- MM?: string;
859
-
860
- MN?: string;
861
-
862
- MO?: string;
863
-
864
- MP?: string;
865
-
866
- MQ?: string;
867
-
868
- MR?: string;
869
-
870
- MS?: string;
871
-
872
- MT?: string;
873
-
874
- MU?: string;
875
-
876
- MV?: string;
877
-
878
- MW?: string;
879
-
880
- MX?: string;
881
-
882
- MY?: string;
883
-
884
- MZ?: string;
885
-
886
- NA?: string;
887
-
888
- NC?: string;
889
-
890
- NE?: string;
891
-
892
- NF?: string;
893
-
894
- NG?: string;
895
-
896
- NI?: string;
897
-
898
- NL?: string;
899
-
900
- NO?: string;
901
-
902
- NP?: string;
903
-
904
- NR?: string;
905
-
906
- NU?: string;
907
-
908
- NZ?: string;
909
-
910
- OM?: string;
911
-
912
- PA?: string;
913
-
914
- PE?: string;
915
-
916
- PF?: string;
917
-
918
- PG?: string;
919
-
920
- PH?: string;
921
-
922
- PK?: string;
923
-
924
- PL?: string;
925
-
926
- PM?: string;
927
-
928
- PN?: string;
929
-
930
- PR?: string;
931
-
932
- PS?: string;
933
-
934
- PT?: string;
935
-
936
- PW?: string;
937
-
938
- PY?: string;
939
-
940
- QA?: string;
941
-
942
- RE?: string;
943
-
944
- RO?: string;
945
-
946
- RS?: string;
947
-
948
- RU?: string;
949
-
950
- RW?: string;
951
-
952
- SA?: string;
953
-
954
- SB?: string;
955
-
956
- SC?: string;
957
-
958
- SD?: string;
959
-
960
- SE?: string;
961
-
962
- SG?: string;
963
-
964
- SH?: string;
965
-
966
- SI?: string;
967
-
968
- SJ?: string;
969
-
970
- SK?: string;
971
-
972
- SL?: string;
973
-
974
- SM?: string;
975
-
976
- SN?: string;
977
-
978
- SO?: string;
979
-
980
- SR?: string;
981
-
982
- SS?: string;
983
-
984
- ST?: string;
985
-
986
- SV?: string;
987
-
988
- SX?: string;
989
-
990
- SY?: string;
991
-
992
- SZ?: string;
993
-
994
- TC?: string;
995
-
996
- TD?: string;
997
-
998
- TF?: string;
999
-
1000
- TG?: string;
1001
-
1002
- TH?: string;
1003
-
1004
- TJ?: string;
1005
-
1006
- TK?: string;
1007
-
1008
- TL?: string;
1009
-
1010
- TM?: string;
1011
-
1012
- TN?: string;
1013
-
1014
- TO?: string;
1015
-
1016
- TR?: string;
1017
-
1018
- TT?: string;
1019
-
1020
- TV?: string;
1021
-
1022
- TW?: string;
1023
-
1024
- TZ?: string;
1025
-
1026
- UA?: string;
1027
-
1028
- UG?: string;
1029
-
1030
- UM?: string;
1031
-
1032
- US?: string;
1033
-
1034
- UY?: string;
1035
-
1036
- UZ?: string;
1037
-
1038
- VA?: string;
1039
-
1040
- VC?: string;
1041
-
1042
- VE?: string;
1043
-
1044
- VG?: string;
1045
-
1046
- VI?: string;
1047
-
1048
- VN?: string;
1049
-
1050
- VU?: string;
1051
-
1052
- WF?: string;
1053
-
1054
- WS?: string;
1055
-
1056
- XK?: string;
1057
-
1058
- YE?: string;
1059
-
1060
- YT?: string;
1061
-
1062
- ZA?: string;
1063
-
1064
- ZM?: string;
1065
-
1066
- ZW?: string;
1067
- }
1068
- }
1069
-
1070
- export interface LinkUpdateParams {
1071
- /**
1072
- * The Android destination URL for the short link for Android device targeting.
1073
- */
1074
- android?: string | null;
1075
-
1076
- /**
1077
- * Whether the short link is archived.
1078
- */
1079
- archived?: boolean;
1080
-
1081
- /**
1082
- * The comments for the short link.
1083
- */
1084
- comments?: string | null;
1085
-
1086
- /**
1087
- * The description of the short link generated via `api.codeqr.io/metatags`. Will
1088
- * be used for custom link preview if `proxy` is true.
1089
- */
1090
- description?: string | null;
1091
-
1092
- /**
1093
- * Allow search engines to index your short link. Default is `false` if not
1094
- * provided. Learn more: https://codeqr.link/noindex
1095
- */
1096
- doIndex?: boolean;
1097
-
1098
- /**
1099
- * The domain of the short link. If not provided, the main domain of the project
1100
- * will be used (or `codeqr.link` if the project has no domains).
1101
- */
1102
- domain?: string;
1103
-
1104
- /**
1105
- * The URL to redirect to when the short link expires.
1106
- */
1107
- expiredUrl?: string | null;
1108
-
1109
- /**
1110
- * The date and time when the short link will expire in ISO-8601 format. Must be in
1111
- * the future.
1112
- */
1113
- expiresAt?: string | null;
1114
-
1115
- /**
1116
- * This is the ID of the link in your database. If set, it can be used to identify
1117
- * the link in the future. Must be prefixed with `ext_` when passed as a query
1118
- * parameter.
1119
- */
1120
- externalId?: string | null;
1121
-
1122
- /**
1123
- * Whether the short link is flexible.
1124
- */
1125
- flexible?: boolean;
1126
-
1127
- /**
1128
- * The unique ID existing folder to assign the short link to.
1129
- */
1130
- folderId?: string | null;
1131
-
1132
- /**
1133
- * Geographic targeting information for the short link in JSON format
1134
- * `{[COUNTRY]: https://example.com }`.
1135
- */
1136
- geo?: LinkUpdateParams.Geo | null;
1137
-
1138
- /**
1139
- * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
1140
- * for custom link preview if `proxy` is true.
1141
- */
1142
- image?: string | null;
1143
-
1144
- /**
1145
- * The iOS destination URL for the short link for iOS device targeting.
1146
- */
1147
- ios?: string | null;
1148
-
1149
- /**
1150
- * If the form is mandatory for the page.
1151
- */
1152
- isFormMandatory?: boolean;
1153
-
1154
- /**
1155
- * The slug of the short link. If not provided, a random 7-character slug will be
1156
- * generated.
1157
- */
1158
- key?: string;
1159
-
1160
- /**
1161
- * The ID of the page to redirect to before the link destination.
1162
- */
1163
- pageId?: string | null;
1164
-
1165
- /**
1166
- * The URL of the page to redirect to before the link destination.
1167
- */
1168
- pageUrl?: string | null;
1169
-
1170
- /**
1171
- * The password required to access the short link destination URL.
1172
- */
1173
- password?: string | null;
1174
-
1175
- /**
1176
- * The prefix of the short link slug for randomly generated keys (for example, if
1177
- * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
1178
- * be ignored if `key` is provided.
1179
- */
1180
- prefix?: string;
1181
-
1182
- /**
1183
- * Whether the short link has pre-redirection.
1184
- */
1185
- preRedirection?: boolean;
1186
-
1187
- /**
1188
- * Whether the short link uses the custom link preview feature.
1189
- */
1190
- proxy?: boolean;
1191
-
1192
- /**
1193
- * Whether the short link statistics are publicly accessible.
1194
- */
1195
- publicStats?: boolean;
1196
-
1197
- /**
1198
- * Whether the short link uses link cloaking.
1199
- */
1200
- rewrite?: boolean;
1201
-
1202
- /**
1203
- * @deprecated The unique ID of the tag assigned to the short link. This field is
1204
- * deprecated – use `tagIds` instead.
1205
- */
1206
- tagId?: string | null;
1207
-
1208
- /**
1209
- * The unique IDs of the tags assigned to the short link.
1210
- */
1211
- tagIds?: string | Array<string>;
1212
-
1213
- /**
1214
- * The unique name of the tags assigned to the short link (case insensitive).
1215
- */
1216
- tagNames?: string | Array<string>;
1217
-
1218
- /**
1219
- * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
1220
- * for custom link preview if `proxy` is true.
1221
- */
1222
- title?: string | null;
1223
-
1224
- /**
1225
- * Whether to track conversions for the short link.
1226
- */
1227
- trackConversion?: boolean;
1228
-
1229
- /**
1230
- * The destination URL of the short link.
1231
- */
1232
- url?: string;
1233
-
1234
- /**
1235
- * The video of the short link.
1236
- */
1237
- video?: string | null;
1238
-
1239
- /**
1240
- * An array of webhook IDs to trigger when the link is clicked. These webhooks will
1241
- * receive click event data.
1242
- */
1243
- webhookIds?: Array<string> | null;
1244
- }
1245
-
1246
- export namespace LinkUpdateParams {
1247
- /**
1248
- * Geographic targeting information for the short link in JSON format
1249
- * `{[COUNTRY]: https://example.com }`.
1250
- */
1251
- export interface Geo {
1252
- AD?: string;
1253
-
1254
- AE?: string;
1255
-
1256
- AF?: string;
1257
-
1258
- AG?: string;
1259
-
1260
- AI?: string;
1261
-
1262
- AL?: string;
1263
-
1264
- AM?: string;
1265
-
1266
- AO?: string;
1267
-
1268
- AQ?: string;
1269
-
1270
- AR?: string;
1271
-
1272
- AS?: string;
1273
-
1274
- AT?: string;
1275
-
1276
- AU?: string;
1277
-
1278
- AW?: string;
1279
-
1280
- AX?: string;
1281
-
1282
- AZ?: string;
1283
-
1284
- BA?: string;
1285
-
1286
- BB?: string;
1287
-
1288
- BD?: string;
1289
-
1290
- BE?: string;
1291
-
1292
- BF?: string;
1293
-
1294
- BG?: string;
1295
-
1296
- BH?: string;
1297
-
1298
- BI?: string;
1299
-
1300
- BJ?: string;
1301
-
1302
- BL?: string;
1303
-
1304
- BM?: string;
1305
-
1306
- BN?: string;
1307
-
1308
- BO?: string;
1309
-
1310
- BQ?: string;
1311
-
1312
- BR?: string;
1313
-
1314
- BS?: string;
1315
-
1316
- BT?: string;
1317
-
1318
- BV?: string;
1319
-
1320
- BW?: string;
1321
-
1322
- BY?: string;
1323
-
1324
- BZ?: string;
1325
-
1326
- CA?: string;
1327
-
1328
- CC?: string;
1329
-
1330
- CD?: string;
1331
-
1332
- CF?: string;
1333
-
1334
- CG?: string;
1335
-
1336
- CH?: string;
1337
-
1338
- CI?: string;
1339
-
1340
- CK?: string;
1341
-
1342
- CL?: string;
1343
-
1344
- CM?: string;
1345
-
1346
- CN?: string;
1347
-
1348
- CO?: string;
1349
-
1350
- CR?: string;
1351
-
1352
- CU?: string;
1353
-
1354
- CV?: string;
1355
-
1356
- CW?: string;
1357
-
1358
- CX?: string;
1359
-
1360
- CY?: string;
1361
-
1362
- CZ?: string;
1363
-
1364
- DE?: string;
1365
-
1366
- DJ?: string;
1367
-
1368
- DK?: string;
1369
-
1370
- DM?: string;
1371
-
1372
- DO?: string;
1373
-
1374
- DZ?: string;
1375
-
1376
- EC?: string;
1377
-
1378
- EE?: string;
1379
-
1380
- EG?: string;
1381
-
1382
- EH?: string;
1383
-
1384
- ER?: string;
1385
-
1386
- ES?: string;
1387
-
1388
- ET?: string;
1389
-
1390
- FI?: string;
1391
-
1392
- FJ?: string;
1393
-
1394
- FK?: string;
1395
-
1396
- FM?: string;
1397
-
1398
- FO?: string;
1399
-
1400
- FR?: string;
1401
-
1402
- GA?: string;
1403
-
1404
- GB?: string;
1405
-
1406
- GD?: string;
1407
-
1408
- GE?: string;
1409
-
1410
- GF?: string;
1411
-
1412
- GG?: string;
1413
-
1414
- GH?: string;
1415
-
1416
- GI?: string;
1417
-
1418
- GL?: string;
1419
-
1420
- GM?: string;
1421
-
1422
- GN?: string;
1423
-
1424
- GP?: string;
1425
-
1426
- GQ?: string;
1427
-
1428
- GR?: string;
1429
-
1430
- GS?: string;
1431
-
1432
- GT?: string;
1433
-
1434
- GU?: string;
1435
-
1436
- GW?: string;
1437
-
1438
- GY?: string;
1439
-
1440
- HK?: string;
1441
-
1442
- HM?: string;
1443
-
1444
- HN?: string;
1445
-
1446
- HR?: string;
1447
-
1448
- HT?: string;
1449
-
1450
- HU?: string;
1451
-
1452
- ID?: string;
1453
-
1454
- IE?: string;
1455
-
1456
- IL?: string;
1457
-
1458
- IM?: string;
1459
-
1460
- IN?: string;
1461
-
1462
- IO?: string;
1463
-
1464
- IQ?: string;
1465
-
1466
- IR?: string;
1467
-
1468
- IS?: string;
1469
-
1470
- IT?: string;
1471
-
1472
- JE?: string;
1473
-
1474
- JM?: string;
1475
-
1476
- JO?: string;
1477
-
1478
- JP?: string;
1479
-
1480
- KE?: string;
1481
-
1482
- KG?: string;
1483
-
1484
- KH?: string;
1485
-
1486
- KI?: string;
1487
-
1488
- KM?: string;
1489
-
1490
- KN?: string;
1491
-
1492
- KP?: string;
1493
-
1494
- KR?: string;
1495
-
1496
- KW?: string;
1497
-
1498
- KY?: string;
1499
-
1500
- KZ?: string;
1501
-
1502
- LA?: string;
1503
-
1504
- LB?: string;
1505
-
1506
- LC?: string;
1507
-
1508
- LI?: string;
1509
-
1510
- LK?: string;
1511
-
1512
- LR?: string;
1513
-
1514
- LS?: string;
1515
-
1516
- LT?: string;
1517
-
1518
- LU?: string;
1519
-
1520
- LV?: string;
1521
-
1522
- LY?: string;
1523
-
1524
- MA?: string;
1525
-
1526
- MC?: string;
1527
-
1528
- MD?: string;
1529
-
1530
- ME?: string;
1531
-
1532
- MF?: string;
1533
-
1534
- MG?: string;
1535
-
1536
- MH?: string;
1537
-
1538
- MK?: string;
1539
-
1540
- ML?: string;
1541
-
1542
- MM?: string;
1543
-
1544
- MN?: string;
1545
-
1546
- MO?: string;
1547
-
1548
- MP?: string;
1549
-
1550
- MQ?: string;
1551
-
1552
- MR?: string;
1553
-
1554
- MS?: string;
1555
-
1556
- MT?: string;
1557
-
1558
- MU?: string;
1559
-
1560
- MV?: string;
1561
-
1562
- MW?: string;
1563
-
1564
- MX?: string;
1565
-
1566
- MY?: string;
1567
-
1568
- MZ?: string;
1569
-
1570
- NA?: string;
1571
-
1572
- NC?: string;
1573
-
1574
- NE?: string;
1575
-
1576
- NF?: string;
1577
-
1578
- NG?: string;
1579
-
1580
- NI?: string;
1581
-
1582
- NL?: string;
1583
-
1584
- NO?: string;
1585
-
1586
- NP?: string;
1587
-
1588
- NR?: string;
1589
-
1590
- NU?: string;
1591
-
1592
- NZ?: string;
1593
-
1594
- OM?: string;
1595
-
1596
- PA?: string;
1597
-
1598
- PE?: string;
1599
-
1600
- PF?: string;
1601
-
1602
- PG?: string;
1603
-
1604
- PH?: string;
1605
-
1606
- PK?: string;
1607
-
1608
- PL?: string;
1609
-
1610
- PM?: string;
1611
-
1612
- PN?: string;
1613
-
1614
- PR?: string;
1615
-
1616
- PS?: string;
1617
-
1618
- PT?: string;
1619
-
1620
- PW?: string;
1621
-
1622
- PY?: string;
1623
-
1624
- QA?: string;
1625
-
1626
- RE?: string;
1627
-
1628
- RO?: string;
1629
-
1630
- RS?: string;
1631
-
1632
- RU?: string;
1633
-
1634
- RW?: string;
1635
-
1636
- SA?: string;
1637
-
1638
- SB?: string;
1639
-
1640
- SC?: string;
1641
-
1642
- SD?: string;
1643
-
1644
- SE?: string;
1645
-
1646
- SG?: string;
1647
-
1648
- SH?: string;
1649
-
1650
- SI?: string;
1651
-
1652
- SJ?: string;
1653
-
1654
- SK?: string;
1655
-
1656
- SL?: string;
1657
-
1658
- SM?: string;
1659
-
1660
- SN?: string;
1661
-
1662
- SO?: string;
1663
-
1664
- SR?: string;
1665
-
1666
- SS?: string;
1667
-
1668
- ST?: string;
1669
-
1670
- SV?: string;
1671
-
1672
- SX?: string;
1673
-
1674
- SY?: string;
1675
-
1676
- SZ?: string;
1677
-
1678
- TC?: string;
1679
-
1680
- TD?: string;
1681
-
1682
- TF?: string;
1683
-
1684
- TG?: string;
1685
-
1686
- TH?: string;
1687
-
1688
- TJ?: string;
1689
-
1690
- TK?: string;
1691
-
1692
- TL?: string;
1693
-
1694
- TM?: string;
1695
-
1696
- TN?: string;
1697
-
1698
- TO?: string;
1699
-
1700
- TR?: string;
1701
-
1702
- TT?: string;
1703
-
1704
- TV?: string;
1705
-
1706
- TW?: string;
1707
-
1708
- TZ?: string;
1709
-
1710
- UA?: string;
1711
-
1712
- UG?: string;
1713
-
1714
- UM?: string;
1715
-
1716
- US?: string;
1717
-
1718
- UY?: string;
1719
-
1720
- UZ?: string;
1721
-
1722
- VA?: string;
1723
-
1724
- VC?: string;
1725
-
1726
- VE?: string;
1727
-
1728
- VG?: string;
1729
-
1730
- VI?: string;
1731
-
1732
- VN?: string;
1733
-
1734
- VU?: string;
1735
-
1736
- WF?: string;
1737
-
1738
- WS?: string;
1739
-
1740
- XK?: string;
1741
-
1742
- YE?: string;
344
+ /**
345
+ * The complete URL of the short link, including the https protocol (for example,
346
+ * `https://codeqr.link/try`).
347
+ */
348
+ shortLink?: string;
349
+ }
1743
350
 
1744
- YT?: string;
351
+ export namespace Link {
352
+ export interface Rule {
353
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
1745
354
 
1746
- ZA?: string;
355
+ operator: 'equals' | 'not_equals';
1747
356
 
1748
- ZM?: string;
357
+ url: string;
1749
358
 
1750
- ZW?: string;
359
+ value: string;
1751
360
  }
1752
361
  }
1753
362
 
1754
- export interface LinkListParams {
363
+ export type LinkListResponse = Array<Link>;
364
+
365
+ export interface LinkDeleteResponse {
1755
366
  /**
1756
- * The Android device to filter by.
367
+ * The ID of the link.
1757
368
  */
1758
- android?: string;
369
+ id: string;
370
+ }
1759
371
 
372
+ export interface LinkCreateParams {
1760
373
  /**
1761
- * Maximum number of clicks
374
+ * The destination URL of the short link.
1762
375
  */
1763
- clicksMax?: number;
376
+ url: string;
1764
377
 
1765
378
  /**
1766
- * Minimum number of clicks
379
+ * The Android destination URL for the short link for Android device targeting.
1767
380
  */
1768
- clicksMin?: number;
381
+ android?: string | null;
1769
382
 
1770
383
  /**
1771
- * The comments to filter by.
384
+ * Whether the short link is archived.
1772
385
  */
1773
- comments?: string;
386
+ archived?: boolean;
1774
387
 
1775
388
  /**
1776
- * Created after date (ISO string)
389
+ * The comments for the short link.
1777
390
  */
1778
- createdAfter?: string;
391
+ comments?: string | null;
1779
392
 
1780
393
  /**
1781
- * Created before date (ISO string)
394
+ * The description of the short link generated via `api.codeqr.io/metatags`. Will
395
+ * be used for custom link preview if `proxy` is true.
1782
396
  */
1783
- createdBefore?: string;
397
+ description?: string | null;
1784
398
 
1785
399
  /**
1786
- * The domain to filter the links. For example, `ac.me`. If not provided, all links
1787
- * of the project will be returned.
400
+ * Allow search engines to index your short link. Default is `false` if not
401
+ * provided. Learn more: https://codeqr.link/noindex
1788
402
  */
1789
- domain?: string;
403
+ doIndex?: boolean;
1790
404
 
1791
405
  /**
1792
- * Expires after date (ISO string)
406
+ * The domain of the short link. If not provided, the main domain of the project
407
+ * will be used (or `codeqr.link` if the project has no domains).
1793
408
  */
1794
- expiresAfter?: string;
409
+ domain?: string;
1795
410
 
1796
411
  /**
1797
- * The date and time the short link will expire in ISO-8601 format. Must be in the
1798
- * future.
412
+ * The URL to redirect to when the short link expires.
1799
413
  */
1800
- expiresAt?: string | null;
414
+ expiredUrl?: string | null;
1801
415
 
1802
416
  /**
1803
- * Expires before date (ISO string)
417
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
418
+ * the future.
1804
419
  */
1805
- expiresBefore?: string;
420
+ expiresAt?: string | null;
1806
421
 
1807
422
  /**
1808
- * The folder ID to filter the links by.
423
+ * This is the ID of the link in your database. If set, it can be used to identify
424
+ * the link in the future. Must be prefixed with `ext_` when passed as a query
425
+ * parameter.
1809
426
  */
1810
- folderId?: string;
427
+ externalId?: string | null;
1811
428
 
1812
429
  /**
1813
- * Geographic segmentation information for the short link in JSON format
1814
- * `{[COUNTRY]: https://example.com }`.
430
+ * Whether the short link is flexible.
1815
431
  */
1816
- geo?: LinkListParams.Geo | null;
432
+ flexible?: boolean;
1817
433
 
1818
434
  /**
1819
- * Filter links that have comments (any comments)
435
+ * The unique ID existing folder to assign the short link to.
1820
436
  */
1821
- hasComments?: boolean;
437
+ folderId?: string | null;
1822
438
 
1823
439
  /**
1824
- * Filter links that have custom social media cards
440
+ * Geographic targeting information for the short link in JSON format
441
+ * `{[COUNTRY]: https://example.com }`.
1825
442
  */
1826
- hasCustomSocial?: boolean;
443
+ geo?: LinkCreateParams.Geo | null;
1827
444
 
1828
445
  /**
1829
- * Filter links that have device targeting
446
+ * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
447
+ * for custom link preview if `proxy` is true.
1830
448
  */
1831
- hasDevice?: boolean;
449
+ image?: string | null;
1832
450
 
1833
451
  /**
1834
- * Filter links that have expiration date (any expiration)
452
+ * The iOS destination URL for the short link for iOS device targeting.
1835
453
  */
1836
- hasExpiration?: boolean;
454
+ ios?: string | null;
1837
455
 
1838
456
  /**
1839
- * Filter links that have geo-targeting
457
+ * If the form is mandatory for the page.
1840
458
  */
1841
- hasGeo?: boolean;
459
+ isFormMandatory?: boolean;
1842
460
 
1843
461
  /**
1844
- * Filter links that have password protection (any password)
462
+ * The slug of the short link. If not provided, a random 7-character slug will be
463
+ * generated.
1845
464
  */
1846
- hasPassword?: boolean;
465
+ key?: string;
1847
466
 
1848
467
  /**
1849
- * Filter links that have tags (any tags)
468
+ * The ID of the page to redirect to before the link destination.
1850
469
  */
1851
- hasTags?: boolean;
470
+ pageId?: string | null;
1852
471
 
1853
472
  /**
1854
- * Filter links that have UTM parameters
473
+ * The URL of the page to redirect to before the link destination.
1855
474
  */
1856
- hasUTM?: boolean;
475
+ pageUrl?: string | null;
1857
476
 
1858
477
  /**
1859
- * The iOS device to filter by.
478
+ * The password required to access the short link destination URL.
1860
479
  */
1861
- ios?: string;
480
+ password?: string | null;
1862
481
 
1863
482
  /**
1864
- * Link IDs to filter by.
483
+ * The prefix of the short link slug for randomly generated keys (for example, if
484
+ * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
485
+ * be ignored if `key` is provided.
1865
486
  */
1866
- linkIds?: string | Array<string>;
487
+ prefix?: string;
1867
488
 
1868
489
  /**
1869
- * The page number for pagination.
490
+ * Whether the short link has pre-redirection.
1870
491
  */
1871
- page?: number;
492
+ preRedirection?: boolean;
1872
493
 
1873
494
  /**
1874
- * The number of items per page.
495
+ * Whether the short link uses the custom link preview feature.
1875
496
  */
1876
- pageSize?: number;
497
+ proxy?: boolean;
1877
498
 
1878
499
  /**
1879
- * The password to filter by.
500
+ * Whether the short link statistics are publicly accessible.
1880
501
  */
1881
- password?: string;
502
+ publicStats?: boolean;
1882
503
 
1883
504
  /**
1884
- * The slug of the project to which the link belongs. For example, for
1885
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
505
+ * Whether the short link uses link cloaking.
1886
506
  */
1887
- projectSlug?: string;
507
+ rewrite?: boolean;
1888
508
 
1889
509
  /**
1890
- * The search term to filter the links. The search term will be matched against the
1891
- * short link slug and the destination URL.
510
+ * Smart rules for conditional destination routing by request attribute.
1892
511
  */
1893
- search?: string;
512
+ rules?: Array<LinkCreateParams.Rule> | null;
1894
513
 
1895
514
  /**
1896
- * If should include archived links in the response. The default is `false` if not
1897
- * provided.
515
+ * @deprecated The unique ID of the tag assigned to the short link. This field is
516
+ * deprecated – use `tagIds` instead.
1898
517
  */
1899
- showArchived?: boolean;
518
+ tagId?: string | null;
1900
519
 
1901
520
  /**
1902
- * The field to sort the links by. The default is `createdAt`, and sort order is
1903
- * always descending.
521
+ * The unique IDs of the tags assigned to the short link.
1904
522
  */
1905
- sort?: 'createdAt' | 'clicks' | 'lastClicked';
523
+ tagIds?: string | Array<string>;
1906
524
 
1907
525
  /**
1908
- * @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
1909
- * assigned to the short link.
526
+ * The unique name of the tags assigned to the short link (case insensitive).
1910
527
  */
1911
- tagId?: string;
528
+ tagNames?: string | Array<string>;
1912
529
 
1913
530
  /**
1914
- * The IDs of the tags to filter the links.
531
+ * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
532
+ * for custom link preview if `proxy` is true.
1915
533
  */
1916
- tagIds?: string | Array<string>;
534
+ title?: string | null;
1917
535
 
1918
536
  /**
1919
- * The unique name of the tags assigned to the short link (case insensitive).
537
+ * Whether to track conversions for the short link.
1920
538
  */
1921
- tagNames?: string | Array<string>;
539
+ trackConversion?: boolean;
1922
540
 
1923
541
  /**
1924
- * If should include links with conversion tracking enabled. The default is `false`
1925
- * if not provided.
542
+ * Whether this link should be used as a reusable template.
1926
543
  */
1927
- trackConversion?: boolean;
544
+ useAsTemplate?: boolean;
1928
545
 
1929
546
  /**
1930
- * The ID of the user to filter by.
547
+ * The video of the short link.
1931
548
  */
1932
- userId?: string;
549
+ video?: string | null;
1933
550
 
1934
551
  /**
1935
- * If should include tags in the response. The default is `false` if not provided.
552
+ * An array of webhook IDs to trigger when the link is clicked. These webhooks will
553
+ * receive click event data.
1936
554
  */
1937
- withTags?: boolean;
555
+ webhookIds?: Array<string> | null;
1938
556
  }
1939
557
 
1940
- export namespace LinkListParams {
558
+ export namespace LinkCreateParams {
1941
559
  /**
1942
- * Geographic segmentation information for the short link in JSON format
560
+ * Geographic targeting information for the short link in JSON format
1943
561
  * `{[COUNTRY]: https://example.com }`.
1944
562
  */
1945
563
  export interface Geo {
@@ -2443,9 +1061,19 @@ export namespace LinkListParams {
2443
1061
 
2444
1062
  ZW?: string;
2445
1063
  }
1064
+
1065
+ export interface Rule {
1066
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
1067
+
1068
+ operator: 'equals' | 'not_equals';
1069
+
1070
+ url: string;
1071
+
1072
+ value: string;
1073
+ }
2446
1074
  }
2447
1075
 
2448
- export interface LinkCountParams {
1076
+ export interface LinkListParams {
2449
1077
  /**
2450
1078
  * The Android device to filter by.
2451
1079
  */
@@ -2507,12 +1135,7 @@ export interface LinkCountParams {
2507
1135
  * Geographic segmentation information for the short link in JSON format
2508
1136
  * `{[COUNTRY]: https://example.com }`.
2509
1137
  */
2510
- geo?: LinkCountParams.Geo | null;
2511
-
2512
- /**
2513
- * The field to group the links by.
2514
- */
2515
- groupBy?: 'domain' | 'tagId' | 'userId' | 'folderId';
1138
+ geo?: LinkListParams.Geo | null;
2516
1139
 
2517
1140
  /**
2518
1141
  * Filter links that have comments (any comments)
@@ -2559,6 +1182,21 @@ export interface LinkCountParams {
2559
1182
  */
2560
1183
  ios?: string;
2561
1184
 
1185
+ /**
1186
+ * Link IDs to filter by.
1187
+ */
1188
+ linkIds?: string | Array<string>;
1189
+
1190
+ /**
1191
+ * The page number for pagination.
1192
+ */
1193
+ page?: number;
1194
+
1195
+ /**
1196
+ * The number of items per page.
1197
+ */
1198
+ pageSize?: number;
1199
+
2562
1200
  /**
2563
1201
  * The password to filter by.
2564
1202
  */
@@ -2582,6 +1220,12 @@ export interface LinkCountParams {
2582
1220
  */
2583
1221
  showArchived?: boolean;
2584
1222
 
1223
+ /**
1224
+ * The field to sort the links by. The default is `createdAt`, and sort order is
1225
+ * always descending.
1226
+ */
1227
+ sort?: 'createdAt' | 'clicks' | 'lastClicked';
1228
+
2585
1229
  /**
2586
1230
  * @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
2587
1231
  * assigned to the short link.
@@ -2604,18 +1248,48 @@ export interface LinkCountParams {
2604
1248
  */
2605
1249
  trackConversion?: boolean;
2606
1250
 
1251
+ /**
1252
+ * Filter links marked as templates.
1253
+ */
1254
+ useAsTemplate?: boolean;
1255
+
2607
1256
  /**
2608
1257
  * The ID of the user to filter by.
2609
1258
  */
2610
1259
  userId?: string;
2611
1260
 
1261
+ /**
1262
+ * Filter by UTM campaign value
1263
+ */
1264
+ utm_campaign?: string;
1265
+
1266
+ /**
1267
+ * Filter by UTM content value
1268
+ */
1269
+ utm_content?: string;
1270
+
1271
+ /**
1272
+ * Filter by UTM medium value
1273
+ */
1274
+ utm_medium?: string;
1275
+
1276
+ /**
1277
+ * Filter by UTM source value
1278
+ */
1279
+ utm_source?: string;
1280
+
1281
+ /**
1282
+ * Filter by UTM term value
1283
+ */
1284
+ utm_term?: string;
1285
+
2612
1286
  /**
2613
1287
  * If should include tags in the response. The default is `false` if not provided.
2614
1288
  */
2615
1289
  withTags?: boolean;
2616
1290
  }
2617
1291
 
2618
- export namespace LinkCountParams {
1292
+ export namespace LinkListParams {
2619
1293
  /**
2620
1294
  * Geographic segmentation information for the short link in JSON format
2621
1295
  * `{[COUNTRY]: https://example.com }`.
@@ -3154,12 +1828,7 @@ export interface LinkRetrieveInfoParams {
3154
1828
  linkId?: string;
3155
1829
  }
3156
1830
 
3157
- export interface LinkUpsertParams {
3158
- /**
3159
- * The destination URL of the short link.
3160
- */
3161
- url: string;
3162
-
1831
+ export interface LinkUpdateParams {
3163
1832
  /**
3164
1833
  * The Android destination URL for the short link for Android device targeting.
3165
1834
  */
@@ -3225,7 +1894,7 @@ export interface LinkUpsertParams {
3225
1894
  * Geographic targeting information for the short link in JSON format
3226
1895
  * `{[COUNTRY]: https://example.com }`.
3227
1896
  */
3228
- geo?: LinkUpsertParams.Geo | null;
1897
+ geo?: LinkUpdateParams.Geo | null;
3229
1898
 
3230
1899
  /**
3231
1900
  * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
@@ -3291,6 +1960,11 @@ export interface LinkUpsertParams {
3291
1960
  */
3292
1961
  rewrite?: boolean;
3293
1962
 
1963
+ /**
1964
+ * Smart rules for conditional destination routing by request attribute.
1965
+ */
1966
+ rules?: Array<LinkUpdateParams.Rule> | null;
1967
+
3294
1968
  /**
3295
1969
  * @deprecated The unique ID of the tag assigned to the short link. This field is
3296
1970
  * deprecated – use `tagIds` instead.
@@ -3318,6 +1992,16 @@ export interface LinkUpsertParams {
3318
1992
  */
3319
1993
  trackConversion?: boolean;
3320
1994
 
1995
+ /**
1996
+ * The destination URL of the short link.
1997
+ */
1998
+ url?: string;
1999
+
2000
+ /**
2001
+ * Whether this link should be used as a reusable template.
2002
+ */
2003
+ useAsTemplate?: boolean;
2004
+
3321
2005
  /**
3322
2006
  * The video of the short link.
3323
2007
  */
@@ -3330,7 +2014,7 @@ export interface LinkUpsertParams {
3330
2014
  webhookIds?: Array<string> | null;
3331
2015
  }
3332
2016
 
3333
- export namespace LinkUpsertParams {
2017
+ export namespace LinkUpdateParams {
3334
2018
  /**
3335
2019
  * Geographic targeting information for the short link in JSON format
3336
2020
  * `{[COUNTRY]: https://example.com }`.
@@ -3836,6 +2520,16 @@ export namespace LinkUpsertParams {
3836
2520
 
3837
2521
  ZW?: string;
3838
2522
  }
2523
+
2524
+ export interface Rule {
2525
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
2526
+
2527
+ operator: 'equals' | 'not_equals';
2528
+
2529
+ url: string;
2530
+
2531
+ value: string;
2532
+ }
3839
2533
  }
3840
2534
 
3841
2535
  Links.Bulk = Bulk;
@@ -3845,20 +2539,15 @@ export declare namespace Links {
3845
2539
  type Link as Link,
3846
2540
  type LinkListResponse as LinkListResponse,
3847
2541
  type LinkDeleteResponse as LinkDeleteResponse,
3848
- type LinkCountResponse as LinkCountResponse,
3849
2542
  type LinkCreateParams as LinkCreateParams,
3850
- type LinkUpdateParams as LinkUpdateParams,
3851
2543
  type LinkListParams as LinkListParams,
3852
- type LinkCountParams as LinkCountParams,
3853
2544
  type LinkRetrieveInfoParams as LinkRetrieveInfoParams,
3854
- type LinkUpsertParams as LinkUpsertParams,
2545
+ type LinkUpdateParams as LinkUpdateParams,
3855
2546
  };
3856
2547
 
3857
2548
  export {
3858
2549
  Bulk as Bulk,
3859
2550
  type BulkCreateResponse as BulkCreateResponse,
3860
- type BulkDeleteResponse as BulkDeleteResponse,
3861
2551
  type BulkCreateParams as BulkCreateParams,
3862
- type BulkDeleteParams as BulkDeleteParams,
3863
2552
  };
3864
2553
  }