@codeqr/ts 0.19.3 → 0.24.1

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 (202) hide show
  1. package/CHANGELOG.md +290 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +4 -4
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +4 -4
  11. package/client.d.ts.map +1 -1
  12. package/client.js +20 -1
  13. package/client.js.map +1 -1
  14. package/client.mjs +20 -1
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/resource.d.mts.map +1 -1
  21. package/core/resource.d.ts.map +1 -1
  22. package/core/uploads.d.mts.map +1 -1
  23. package/core/uploads.d.ts.map +1 -1
  24. package/core/uploads.mjs.map +1 -1
  25. package/error.d.mts +1 -0
  26. package/error.d.mts.map +1 -1
  27. package/error.d.ts +1 -0
  28. package/error.d.ts.map +1 -1
  29. package/error.mjs +1 -0
  30. package/error.mjs.map +1 -1
  31. package/index.d.mts.map +1 -1
  32. package/index.d.ts.map +1 -1
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.mjs.map +1 -1
  35. package/internal/headers.mjs.map +1 -1
  36. package/internal/parse.d.mts.map +1 -1
  37. package/internal/parse.d.ts.map +1 -1
  38. package/internal/parse.mjs.map +1 -1
  39. package/internal/qs/formats.d.mts.map +1 -1
  40. package/internal/qs/formats.d.ts.map +1 -1
  41. package/internal/qs/index.d.mts +2 -2
  42. package/internal/qs/index.d.mts.map +1 -1
  43. package/internal/qs/index.d.ts +2 -2
  44. package/internal/qs/index.d.ts.map +1 -1
  45. package/internal/qs/index.mjs.map +1 -1
  46. package/internal/qs/stringify.d.mts.map +1 -1
  47. package/internal/qs/stringify.d.ts.map +1 -1
  48. package/internal/qs/stringify.mjs.map +1 -1
  49. package/internal/qs/utils.d.mts.map +1 -1
  50. package/internal/qs/utils.d.ts.map +1 -1
  51. package/internal/qs/utils.mjs.map +1 -1
  52. package/internal/request-options.d.mts.map +1 -1
  53. package/internal/request-options.d.ts.map +1 -1
  54. package/internal/shims.d.mts +6 -0
  55. package/internal/shims.d.mts.map +1 -1
  56. package/internal/shims.d.ts +6 -0
  57. package/internal/shims.d.ts.map +1 -1
  58. package/internal/to-file.d.mts.map +1 -1
  59. package/internal/to-file.d.ts.map +1 -1
  60. package/internal/to-file.mjs.map +1 -1
  61. package/internal/types.d.mts +10 -10
  62. package/internal/types.d.mts.map +1 -1
  63. package/internal/types.d.ts +10 -10
  64. package/internal/types.d.ts.map +1 -1
  65. package/internal/uploads.d.mts.map +1 -1
  66. package/internal/uploads.d.ts.map +1 -1
  67. package/internal/uploads.mjs.map +1 -1
  68. package/internal/utils/base64.mjs.map +1 -1
  69. package/internal/utils/env.js +2 -2
  70. package/internal/utils/env.js.map +1 -1
  71. package/internal/utils/env.mjs +2 -2
  72. package/internal/utils/env.mjs.map +1 -1
  73. package/internal/utils/log.d.mts.map +1 -1
  74. package/internal/utils/log.d.ts.map +1 -1
  75. package/internal/utils/log.js +2 -0
  76. package/internal/utils/log.js.map +1 -1
  77. package/internal/utils/log.mjs +2 -0
  78. package/internal/utils/log.mjs.map +1 -1
  79. package/internal/utils/path.mjs.map +1 -1
  80. package/internal/utils/query.mjs.map +1 -1
  81. package/internal/utils/values.mjs.map +1 -1
  82. package/internal/utils.d.mts.map +1 -1
  83. package/internal/utils.d.ts.map +1 -1
  84. package/internal/utils.mjs.map +1 -1
  85. package/package.json +1 -1
  86. package/resource.d.mts +1 -0
  87. package/resource.d.mts.map +1 -1
  88. package/resource.d.ts +1 -0
  89. package/resource.d.ts.map +1 -1
  90. package/resource.mjs +1 -0
  91. package/resource.mjs.map +1 -1
  92. package/resources/analytics.d.mts +22 -2
  93. package/resources/analytics.d.mts.map +1 -1
  94. package/resources/analytics.d.ts +22 -2
  95. package/resources/analytics.d.ts.map +1 -1
  96. package/resources/analytics.mjs.map +1 -1
  97. package/resources/domains.d.mts +26 -26
  98. package/resources/domains.d.mts.map +1 -1
  99. package/resources/domains.d.ts +26 -26
  100. package/resources/domains.d.ts.map +1 -1
  101. package/resources/domains.js +8 -8
  102. package/resources/domains.js.map +1 -1
  103. package/resources/domains.mjs +8 -8
  104. package/resources/domains.mjs.map +1 -1
  105. package/resources/events.d.mts +49 -3
  106. package/resources/events.d.mts.map +1 -1
  107. package/resources/events.d.ts +49 -3
  108. package/resources/events.d.ts.map +1 -1
  109. package/resources/events.mjs.map +1 -1
  110. package/resources/index.d.mts +4 -4
  111. package/resources/index.d.mts.map +1 -1
  112. package/resources/index.d.ts +4 -4
  113. package/resources/index.d.ts.map +1 -1
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/links/bulk.d.mts +10 -0
  116. package/resources/links/bulk.d.mts.map +1 -1
  117. package/resources/links/bulk.d.ts +10 -0
  118. package/resources/links/bulk.d.ts.map +1 -1
  119. package/resources/links/bulk.mjs.map +1 -1
  120. package/resources/links/index.d.mts +1 -1
  121. package/resources/links/index.d.mts.map +1 -1
  122. package/resources/links/index.d.ts +1 -1
  123. package/resources/links/index.d.ts.map +1 -1
  124. package/resources/links/index.mjs.map +1 -1
  125. package/resources/links/links.d.mts +257 -201
  126. package/resources/links/links.d.mts.map +1 -1
  127. package/resources/links/links.d.ts +257 -201
  128. package/resources/links/links.d.ts.map +1 -1
  129. package/resources/links/links.js +21 -21
  130. package/resources/links/links.js.map +1 -1
  131. package/resources/links/links.mjs +21 -21
  132. package/resources/links/links.mjs.map +1 -1
  133. package/resources/links.d.mts.map +1 -1
  134. package/resources/links.d.ts.map +1 -1
  135. package/resources/links.mjs.map +1 -1
  136. package/resources/projects.d.mts.map +1 -1
  137. package/resources/projects.d.ts.map +1 -1
  138. package/resources/projects.mjs.map +1 -1
  139. package/resources/qrcodes/bulk.d.mts +83 -7
  140. package/resources/qrcodes/bulk.d.mts.map +1 -1
  141. package/resources/qrcodes/bulk.d.ts +83 -7
  142. package/resources/qrcodes/bulk.d.ts.map +1 -1
  143. package/resources/qrcodes/bulk.mjs.map +1 -1
  144. package/resources/qrcodes/index.d.mts +1 -1
  145. package/resources/qrcodes/index.d.mts.map +1 -1
  146. package/resources/qrcodes/index.d.ts +1 -1
  147. package/resources/qrcodes/index.d.ts.map +1 -1
  148. package/resources/qrcodes/index.mjs.map +1 -1
  149. package/resources/qrcodes/qrcodes.d.mts +385 -169
  150. package/resources/qrcodes/qrcodes.d.mts.map +1 -1
  151. package/resources/qrcodes/qrcodes.d.ts +385 -169
  152. package/resources/qrcodes/qrcodes.d.ts.map +1 -1
  153. package/resources/qrcodes/qrcodes.js +11 -11
  154. package/resources/qrcodes/qrcodes.js.map +1 -1
  155. package/resources/qrcodes/qrcodes.mjs +11 -11
  156. package/resources/qrcodes/qrcodes.mjs.map +1 -1
  157. package/resources/qrcodes.d.mts.map +1 -1
  158. package/resources/qrcodes.d.ts.map +1 -1
  159. package/resources/qrcodes.mjs.map +1 -1
  160. package/resources/tags.d.mts +12 -12
  161. package/resources/tags.d.mts.map +1 -1
  162. package/resources/tags.d.ts +12 -12
  163. package/resources/tags.d.ts.map +1 -1
  164. package/resources/tags.js +6 -6
  165. package/resources/tags.js.map +1 -1
  166. package/resources/tags.mjs +6 -6
  167. package/resources/tags.mjs.map +1 -1
  168. package/resources/track.d.mts +8 -7
  169. package/resources/track.d.mts.map +1 -1
  170. package/resources/track.d.ts +8 -7
  171. package/resources/track.d.ts.map +1 -1
  172. package/resources/track.mjs.map +1 -1
  173. package/resources.d.mts.map +1 -1
  174. package/resources.d.ts.map +1 -1
  175. package/resources.mjs.map +1 -1
  176. package/src/client.ts +25 -5
  177. package/src/internal/types.ts +6 -8
  178. package/src/internal/utils/env.ts +2 -2
  179. package/src/internal/utils/log.ts +2 -0
  180. package/src/resources/analytics.ts +32 -2
  181. package/src/resources/domains.ts +37 -37
  182. package/src/resources/events.ts +80 -3
  183. package/src/resources/index.ts +4 -4
  184. package/src/resources/links/bulk.ts +22 -0
  185. package/src/resources/links/index.ts +1 -1
  186. package/src/resources/links/links.ts +289 -212
  187. package/src/resources/qrcodes/bulk.ts +118 -7
  188. package/src/resources/qrcodes/index.ts +1 -1
  189. package/src/resources/qrcodes/qrcodes.ts +603 -309
  190. package/src/resources/tags.ts +16 -16
  191. package/src/resources/track.ts +8 -7
  192. package/src/version.ts +1 -1
  193. package/uploads.d.mts +1 -0
  194. package/uploads.d.mts.map +1 -1
  195. package/uploads.d.ts +1 -0
  196. package/uploads.d.ts.map +1 -1
  197. package/uploads.mjs +1 -0
  198. package/uploads.mjs.map +1 -1
  199. package/version.d.mts +1 -1
  200. package/version.d.ts +1 -1
  201. package/version.js +1 -1
  202. package/version.mjs +1 -1
@@ -18,46 +18,46 @@ export declare class Links extends APIResource {
18
18
  */
19
19
  create(body: LinkCreateParams, options?: RequestOptions): APIPromise<Link>;
20
20
  /**
21
- * Update a link for the authenticated workspace. If there's no change, returns it
22
- * as it is.
21
+ * Retrieve a paginated list of links for the authenticated workspace.
23
22
  *
24
23
  * @example
25
24
  * ```ts
26
- * const link = await client.links.update('linkId');
25
+ * const links = await client.links.list();
27
26
  * ```
28
27
  */
29
- update(linkID: string, body?: LinkUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Link>;
28
+ list(query?: LinkListParams | null | undefined, options?: RequestOptions): APIPromise<LinkListResponse>;
30
29
  /**
31
- * Retrieve a paginated list of links for the authenticated workspace.
30
+ * Retrieve the info for a link.
32
31
  *
33
32
  * @example
34
33
  * ```ts
35
- * const links = await client.links.list();
34
+ * const link = await client.links.retrieveInfo({
35
+ * domain: 'x',
36
+ * key: 'x',
37
+ * projectSlug: 'x',
38
+ * });
36
39
  * ```
37
40
  */
38
- list(query?: LinkListParams | null | undefined, options?: RequestOptions): APIPromise<LinkListResponse>;
41
+ retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link>;
39
42
  /**
40
- * Delete a link for the authenticated workspace.
43
+ * Update a link for the authenticated workspace. If there's no change, returns it
44
+ * as it is.
41
45
  *
42
46
  * @example
43
47
  * ```ts
44
- * const link = await client.links.delete('linkId');
48
+ * const link = await client.links.update('linkId');
45
49
  * ```
46
50
  */
47
- delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse>;
51
+ update(linkID: string, body?: LinkUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Link>;
48
52
  /**
49
- * Retrieve the info for a link.
53
+ * Delete a link for the authenticated workspace.
50
54
  *
51
55
  * @example
52
56
  * ```ts
53
- * const link = await client.links.retrieveInfo({
54
- * domain: 'x',
55
- * key: 'x',
56
- * projectSlug: 'x',
57
- * });
57
+ * const link = await client.links.delete('linkId');
58
58
  * ```
59
59
  */
60
- retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link>;
60
+ delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse>;
61
61
  }
62
62
  export interface Link {
63
63
  /**
@@ -184,6 +184,10 @@ export interface Link {
184
184
  * Whether the short link uses link cloaking.
185
185
  */
186
186
  rewrite: boolean;
187
+ /**
188
+ * Smart rules for conditional destination routing by request attribute.
189
+ */
190
+ rules: Array<Link.Rule> | null;
187
191
  /**
188
192
  * The amount of the sale generated by the link.
189
193
  */
@@ -218,6 +222,10 @@ export interface Link {
218
222
  * The destination URL of the short link.
219
223
  */
220
224
  url: string;
225
+ /**
226
+ * Whether this link should be used as a reusable template.
227
+ */
228
+ useAsTemplate: boolean;
221
229
  /**
222
230
  * The ID of the user who created the short link.
223
231
  */
@@ -265,6 +273,14 @@ export interface Link {
265
273
  */
266
274
  shortLink?: string;
267
275
  }
276
+ export declare namespace Link {
277
+ interface Rule {
278
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
279
+ operator: 'equals' | 'not_equals';
280
+ url: string;
281
+ value: string;
282
+ }
283
+ }
268
284
  export type LinkListResponse = Array<Link>;
269
285
  export interface LinkDeleteResponse {
270
286
  /**
@@ -384,6 +400,10 @@ export interface LinkCreateParams {
384
400
  * Whether the short link uses link cloaking.
385
401
  */
386
402
  rewrite?: boolean;
403
+ /**
404
+ * Smart rules for conditional destination routing by request attribute.
405
+ */
406
+ rules?: Array<LinkCreateParams.Rule> | null;
387
407
  /**
388
408
  * @deprecated The unique ID of the tag assigned to the short link. This field is
389
409
  * deprecated – use `tagIds` instead.
@@ -677,122 +697,144 @@ export declare namespace LinkCreateParams {
677
697
  ZM?: string;
678
698
  ZW?: string;
679
699
  }
700
+ interface Rule {
701
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
702
+ operator: 'equals' | 'not_equals';
703
+ url: string;
704
+ value: string;
705
+ }
680
706
  }
681
- export interface LinkUpdateParams {
707
+ export interface LinkListParams {
682
708
  /**
683
- * The Android destination URL for the short link for Android device targeting.
709
+ * The Android device to filter by.
684
710
  */
685
- android?: string | null;
711
+ android?: string;
686
712
  /**
687
- * Whether the short link is archived.
713
+ * Maximum number of clicks
688
714
  */
689
- archived?: boolean;
715
+ clicksMax?: number;
690
716
  /**
691
- * The comments for the short link.
717
+ * Minimum number of clicks
692
718
  */
693
- comments?: string | null;
719
+ clicksMin?: number;
694
720
  /**
695
- * The description of the short link generated via `api.codeqr.io/metatags`. Will
696
- * be used for custom link preview if `proxy` is true.
721
+ * The comments to filter by.
697
722
  */
698
- description?: string | null;
723
+ comments?: string;
699
724
  /**
700
- * Allow search engines to index your short link. Default is `false` if not
701
- * provided. Learn more: https://codeqr.link/noindex
725
+ * Created after date (ISO string)
702
726
  */
703
- doIndex?: boolean;
727
+ createdAfter?: string;
704
728
  /**
705
- * The domain of the short link. If not provided, the main domain of the project
706
- * will be used (or `codeqr.link` if the project has no domains).
729
+ * Created before date (ISO string)
730
+ */
731
+ createdBefore?: string;
732
+ /**
733
+ * The domain to filter the links. For example, `ac.me`. If not provided, all links
734
+ * of the project will be returned.
707
735
  */
708
736
  domain?: string;
709
737
  /**
710
- * The URL to redirect to when the short link expires.
738
+ * Expires after date (ISO string)
711
739
  */
712
- expiredUrl?: string | null;
740
+ expiresAfter?: string;
713
741
  /**
714
- * The date and time when the short link will expire in ISO-8601 format. Must be in
715
- * the future.
742
+ * The date and time the short link will expire in ISO-8601 format. Must be in the
743
+ * future.
716
744
  */
717
745
  expiresAt?: string | null;
718
746
  /**
719
- * This is the ID of the link in your database. If set, it can be used to identify
720
- * the link in the future. Must be prefixed with `ext_` when passed as a query
721
- * parameter.
747
+ * Expires before date (ISO string)
722
748
  */
723
- externalId?: string | null;
749
+ expiresBefore?: string;
724
750
  /**
725
- * Whether the short link is flexible.
751
+ * The folder ID to filter the links by.
726
752
  */
727
- flexible?: boolean;
753
+ folderId?: string;
728
754
  /**
729
- * The unique ID existing folder to assign the short link to.
755
+ * Geographic segmentation information for the short link in JSON format
756
+ * `{[COUNTRY]: https://example.com }`.
730
757
  */
731
- folderId?: string | null;
758
+ geo?: LinkListParams.Geo | null;
732
759
  /**
733
- * Geographic targeting information for the short link in JSON format
734
- * `{[COUNTRY]: https://example.com }`.
760
+ * Filter links that have comments (any comments)
735
761
  */
736
- geo?: LinkUpdateParams.Geo | null;
762
+ hasComments?: boolean;
737
763
  /**
738
- * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
739
- * for custom link preview if `proxy` is true.
764
+ * Filter links that have custom social media cards
740
765
  */
741
- image?: string | null;
766
+ hasCustomSocial?: boolean;
742
767
  /**
743
- * The iOS destination URL for the short link for iOS device targeting.
768
+ * Filter links that have device targeting
744
769
  */
745
- ios?: string | null;
770
+ hasDevice?: boolean;
746
771
  /**
747
- * If the form is mandatory for the page.
772
+ * Filter links that have expiration date (any expiration)
748
773
  */
749
- isFormMandatory?: boolean;
774
+ hasExpiration?: boolean;
750
775
  /**
751
- * The slug of the short link. If not provided, a random 7-character slug will be
752
- * generated.
776
+ * Filter links that have geo-targeting
753
777
  */
754
- key?: string;
778
+ hasGeo?: boolean;
755
779
  /**
756
- * The ID of the page to redirect to before the link destination.
780
+ * Filter links that have password protection (any password)
757
781
  */
758
- pageId?: string | null;
782
+ hasPassword?: boolean;
759
783
  /**
760
- * The URL of the page to redirect to before the link destination.
784
+ * Filter links that have tags (any tags)
761
785
  */
762
- pageUrl?: string | null;
786
+ hasTags?: boolean;
763
787
  /**
764
- * The password required to access the short link destination URL.
788
+ * Filter links that have UTM parameters
765
789
  */
766
- password?: string | null;
790
+ hasUTM?: boolean;
767
791
  /**
768
- * The prefix of the short link slug for randomly generated keys (for example, if
769
- * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
770
- * be ignored if `key` is provided.
792
+ * The iOS device to filter by.
771
793
  */
772
- prefix?: string;
794
+ ios?: string;
773
795
  /**
774
- * Whether the short link has pre-redirection.
796
+ * Link IDs to filter by.
775
797
  */
776
- preRedirection?: boolean;
798
+ linkIds?: string | Array<string>;
777
799
  /**
778
- * Whether the short link uses the custom link preview feature.
800
+ * The page number for pagination.
779
801
  */
780
- proxy?: boolean;
802
+ page?: number;
781
803
  /**
782
- * Whether the short link statistics are publicly accessible.
804
+ * The number of items per page.
783
805
  */
784
- publicStats?: boolean;
806
+ pageSize?: number;
785
807
  /**
786
- * Whether the short link uses link cloaking.
808
+ * The password to filter by.
787
809
  */
788
- rewrite?: boolean;
810
+ password?: string;
789
811
  /**
790
- * @deprecated The unique ID of the tag assigned to the short link. This field is
791
- * deprecated – use `tagIds` instead.
812
+ * The slug of the project to which the link belongs. For example, for
813
+ * `app.codeqr.io/acme`, the projectSlug is `acme`.
792
814
  */
793
- tagId?: string | null;
815
+ projectSlug?: string;
794
816
  /**
795
- * The unique IDs of the tags assigned to the short link.
817
+ * The search term to filter the links. The search term will be matched against the
818
+ * short link slug and the destination URL.
819
+ */
820
+ search?: string;
821
+ /**
822
+ * If should include archived links in the response. The default is `false` if not
823
+ * provided.
824
+ */
825
+ showArchived?: boolean;
826
+ /**
827
+ * The field to sort the links by. The default is `createdAt`, and sort order is
828
+ * always descending.
829
+ */
830
+ sort?: 'createdAt' | 'clicks' | 'lastClicked';
831
+ /**
832
+ * @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
833
+ * assigned to the short link.
834
+ */
835
+ tagId?: string;
836
+ /**
837
+ * The IDs of the tags to filter the links.
796
838
  */
797
839
  tagIds?: string | Array<string>;
798
840
  /**
@@ -800,35 +842,46 @@ export interface LinkUpdateParams {
800
842
  */
801
843
  tagNames?: string | Array<string>;
802
844
  /**
803
- * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
804
- * for custom link preview if `proxy` is true.
845
+ * If should include links with conversion tracking enabled. The default is `false`
846
+ * if not provided.
805
847
  */
806
- title?: string | null;
848
+ trackConversion?: boolean;
807
849
  /**
808
- * Whether to track conversions for the short link.
850
+ * Filter links marked as templates.
809
851
  */
810
- trackConversion?: boolean;
852
+ useAsTemplate?: boolean;
811
853
  /**
812
- * The destination URL of the short link.
854
+ * The ID of the user to filter by.
813
855
  */
814
- url?: string;
856
+ userId?: string;
815
857
  /**
816
- * Whether this link should be used as a reusable template.
858
+ * Filter by UTM campaign value
817
859
  */
818
- useAsTemplate?: boolean;
860
+ utm_campaign?: string;
819
861
  /**
820
- * The video of the short link.
862
+ * Filter by UTM content value
821
863
  */
822
- video?: string | null;
864
+ utm_content?: string;
823
865
  /**
824
- * An array of webhook IDs to trigger when the link is clicked. These webhooks will
825
- * receive click event data.
866
+ * Filter by UTM medium value
826
867
  */
827
- webhookIds?: Array<string> | null;
868
+ utm_medium?: string;
869
+ /**
870
+ * Filter by UTM source value
871
+ */
872
+ utm_source?: string;
873
+ /**
874
+ * Filter by UTM term value
875
+ */
876
+ utm_term?: string;
877
+ /**
878
+ * If should include tags in the response. The default is `false` if not provided.
879
+ */
880
+ withTags?: boolean;
828
881
  }
829
- export declare namespace LinkUpdateParams {
882
+ export declare namespace LinkListParams {
830
883
  /**
831
- * Geographic targeting information for the short link in JSON format
884
+ * Geographic segmentation information for the short link in JSON format
832
885
  * `{[COUNTRY]: https://example.com }`.
833
886
  */
834
887
  interface Geo {
@@ -1084,137 +1137,151 @@ export declare namespace LinkUpdateParams {
1084
1137
  ZW?: string;
1085
1138
  }
1086
1139
  }
1087
- export interface LinkListParams {
1140
+ export interface LinkRetrieveInfoParams {
1088
1141
  /**
1089
- * The Android device to filter by.
1142
+ * The domain of the link to be retrieved. For example, for `codeqr.link/github`,
1143
+ * the domain is `codeqr.link`.
1090
1144
  */
1091
- android?: string;
1145
+ domain: string;
1092
1146
  /**
1093
- * Maximum number of clicks
1147
+ * The key of the link to be retrieved. For example, for `codeqr.link/github`, the
1148
+ * key is `github`.
1094
1149
  */
1095
- clicksMax?: number;
1150
+ key: string;
1096
1151
  /**
1097
- * Minimum number of clicks
1152
+ * The slug of the project to which the link belongs. For example, for
1153
+ * `app.codeqr.io/acme`, the projectSlug is `acme`.
1098
1154
  */
1099
- clicksMin?: number;
1155
+ projectSlug: string;
1100
1156
  /**
1101
- * The comments to filter by.
1157
+ * This is the ID of the link in your database. Must be prefixed with `ext_` when
1158
+ * passed as a query parameter.
1102
1159
  */
1103
- comments?: string;
1160
+ externalId?: string;
1104
1161
  /**
1105
- * Created after date (ISO string)
1162
+ * The unique ID of the short link.
1106
1163
  */
1107
- createdAfter?: string;
1164
+ linkId?: string;
1165
+ }
1166
+ export interface LinkUpdateParams {
1108
1167
  /**
1109
- * Created before date (ISO string)
1168
+ * The Android destination URL for the short link for Android device targeting.
1110
1169
  */
1111
- createdBefore?: string;
1170
+ android?: string | null;
1112
1171
  /**
1113
- * The domain to filter the links. For example, `ac.me`. If not provided, all links
1114
- * of the project will be returned.
1172
+ * Whether the short link is archived.
1115
1173
  */
1116
- domain?: string;
1174
+ archived?: boolean;
1117
1175
  /**
1118
- * Expires after date (ISO string)
1176
+ * The comments for the short link.
1119
1177
  */
1120
- expiresAfter?: string;
1178
+ comments?: string | null;
1121
1179
  /**
1122
- * The date and time the short link will expire in ISO-8601 format. Must be in the
1123
- * future.
1180
+ * The description of the short link generated via `api.codeqr.io/metatags`. Will
1181
+ * be used for custom link preview if `proxy` is true.
1124
1182
  */
1125
- expiresAt?: string | null;
1183
+ description?: string | null;
1126
1184
  /**
1127
- * Expires before date (ISO string)
1185
+ * Allow search engines to index your short link. Default is `false` if not
1186
+ * provided. Learn more: https://codeqr.link/noindex
1128
1187
  */
1129
- expiresBefore?: string;
1188
+ doIndex?: boolean;
1130
1189
  /**
1131
- * The folder ID to filter the links by.
1190
+ * The domain of the short link. If not provided, the main domain of the project
1191
+ * will be used (or `codeqr.link` if the project has no domains).
1132
1192
  */
1133
- folderId?: string;
1193
+ domain?: string;
1134
1194
  /**
1135
- * Geographic segmentation information for the short link in JSON format
1136
- * `{[COUNTRY]: https://example.com }`.
1195
+ * The URL to redirect to when the short link expires.
1137
1196
  */
1138
- geo?: LinkListParams.Geo | null;
1197
+ expiredUrl?: string | null;
1139
1198
  /**
1140
- * Filter links that have comments (any comments)
1199
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
1200
+ * the future.
1141
1201
  */
1142
- hasComments?: boolean;
1202
+ expiresAt?: string | null;
1143
1203
  /**
1144
- * Filter links that have custom social media cards
1204
+ * This is the ID of the link in your database. If set, it can be used to identify
1205
+ * the link in the future. Must be prefixed with `ext_` when passed as a query
1206
+ * parameter.
1145
1207
  */
1146
- hasCustomSocial?: boolean;
1208
+ externalId?: string | null;
1147
1209
  /**
1148
- * Filter links that have device targeting
1210
+ * Whether the short link is flexible.
1149
1211
  */
1150
- hasDevice?: boolean;
1212
+ flexible?: boolean;
1151
1213
  /**
1152
- * Filter links that have expiration date (any expiration)
1214
+ * The unique ID existing folder to assign the short link to.
1153
1215
  */
1154
- hasExpiration?: boolean;
1216
+ folderId?: string | null;
1155
1217
  /**
1156
- * Filter links that have geo-targeting
1218
+ * Geographic targeting information for the short link in JSON format
1219
+ * `{[COUNTRY]: https://example.com }`.
1157
1220
  */
1158
- hasGeo?: boolean;
1221
+ geo?: LinkUpdateParams.Geo | null;
1159
1222
  /**
1160
- * Filter links that have password protection (any password)
1223
+ * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
1224
+ * for custom link preview if `proxy` is true.
1161
1225
  */
1162
- hasPassword?: boolean;
1226
+ image?: string | null;
1163
1227
  /**
1164
- * Filter links that have tags (any tags)
1228
+ * The iOS destination URL for the short link for iOS device targeting.
1165
1229
  */
1166
- hasTags?: boolean;
1230
+ ios?: string | null;
1167
1231
  /**
1168
- * Filter links that have UTM parameters
1232
+ * If the form is mandatory for the page.
1169
1233
  */
1170
- hasUTM?: boolean;
1234
+ isFormMandatory?: boolean;
1171
1235
  /**
1172
- * The iOS device to filter by.
1236
+ * The slug of the short link. If not provided, a random 7-character slug will be
1237
+ * generated.
1173
1238
  */
1174
- ios?: string;
1239
+ key?: string;
1175
1240
  /**
1176
- * Link IDs to filter by.
1241
+ * The ID of the page to redirect to before the link destination.
1177
1242
  */
1178
- linkIds?: string | Array<string>;
1243
+ pageId?: string | null;
1179
1244
  /**
1180
- * The page number for pagination.
1245
+ * The URL of the page to redirect to before the link destination.
1181
1246
  */
1182
- page?: number;
1247
+ pageUrl?: string | null;
1183
1248
  /**
1184
- * The number of items per page.
1249
+ * The password required to access the short link destination URL.
1185
1250
  */
1186
- pageSize?: number;
1251
+ password?: string | null;
1187
1252
  /**
1188
- * The password to filter by.
1253
+ * The prefix of the short link slug for randomly generated keys (for example, if
1254
+ * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
1255
+ * be ignored if `key` is provided.
1189
1256
  */
1190
- password?: string;
1257
+ prefix?: string;
1191
1258
  /**
1192
- * The slug of the project to which the link belongs. For example, for
1193
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
1259
+ * Whether the short link has pre-redirection.
1194
1260
  */
1195
- projectSlug?: string;
1261
+ preRedirection?: boolean;
1196
1262
  /**
1197
- * The search term to filter the links. The search term will be matched against the
1198
- * short link slug and the destination URL.
1263
+ * Whether the short link uses the custom link preview feature.
1199
1264
  */
1200
- search?: string;
1265
+ proxy?: boolean;
1201
1266
  /**
1202
- * If should include archived links in the response. The default is `false` if not
1203
- * provided.
1267
+ * Whether the short link statistics are publicly accessible.
1204
1268
  */
1205
- showArchived?: boolean;
1269
+ publicStats?: boolean;
1206
1270
  /**
1207
- * The field to sort the links by. The default is `createdAt`, and sort order is
1208
- * always descending.
1271
+ * Whether the short link uses link cloaking.
1209
1272
  */
1210
- sort?: 'createdAt' | 'clicks' | 'lastClicked';
1273
+ rewrite?: boolean;
1211
1274
  /**
1212
- * @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
1213
- * assigned to the short link.
1275
+ * Smart rules for conditional destination routing by request attribute.
1214
1276
  */
1215
- tagId?: string;
1277
+ rules?: Array<LinkUpdateParams.Rule> | null;
1216
1278
  /**
1217
- * The IDs of the tags to filter the links.
1279
+ * @deprecated The unique ID of the tag assigned to the short link. This field is
1280
+ * deprecated – use `tagIds` instead.
1281
+ */
1282
+ tagId?: string | null;
1283
+ /**
1284
+ * The unique IDs of the tags assigned to the short link.
1218
1285
  */
1219
1286
  tagIds?: string | Array<string>;
1220
1287
  /**
@@ -1222,26 +1289,35 @@ export interface LinkListParams {
1222
1289
  */
1223
1290
  tagNames?: string | Array<string>;
1224
1291
  /**
1225
- * If should include links with conversion tracking enabled. The default is `false`
1226
- * if not provided.
1292
+ * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
1293
+ * for custom link preview if `proxy` is true.
1294
+ */
1295
+ title?: string | null;
1296
+ /**
1297
+ * Whether to track conversions for the short link.
1227
1298
  */
1228
1299
  trackConversion?: boolean;
1229
1300
  /**
1230
- * Filter links marked as templates.
1301
+ * The destination URL of the short link.
1302
+ */
1303
+ url?: string;
1304
+ /**
1305
+ * Whether this link should be used as a reusable template.
1231
1306
  */
1232
1307
  useAsTemplate?: boolean;
1233
1308
  /**
1234
- * The ID of the user to filter by.
1309
+ * The video of the short link.
1235
1310
  */
1236
- userId?: string;
1311
+ video?: string | null;
1237
1312
  /**
1238
- * If should include tags in the response. The default is `false` if not provided.
1313
+ * An array of webhook IDs to trigger when the link is clicked. These webhooks will
1314
+ * receive click event data.
1239
1315
  */
1240
- withTags?: boolean;
1316
+ webhookIds?: Array<string> | null;
1241
1317
  }
1242
- export declare namespace LinkListParams {
1318
+ export declare namespace LinkUpdateParams {
1243
1319
  /**
1244
- * Geographic segmentation information for the short link in JSON format
1320
+ * Geographic targeting information for the short link in JSON format
1245
1321
  * `{[COUNTRY]: https://example.com }`.
1246
1322
  */
1247
1323
  interface Geo {
@@ -1496,35 +1572,15 @@ export declare namespace LinkListParams {
1496
1572
  ZM?: string;
1497
1573
  ZW?: string;
1498
1574
  }
1499
- }
1500
- export interface LinkRetrieveInfoParams {
1501
- /**
1502
- * The domain of the link to be retrieved. For example, for `codeqr.link/github`,
1503
- * the domain is `codeqr.link`.
1504
- */
1505
- domain: string;
1506
- /**
1507
- * The key of the link to be retrieved. For example, for `codeqr.link/github`, the
1508
- * key is `github`.
1509
- */
1510
- key: string;
1511
- /**
1512
- * The slug of the project to which the link belongs. For example, for
1513
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
1514
- */
1515
- projectSlug: string;
1516
- /**
1517
- * This is the ID of the link in your database. Must be prefixed with `ext_` when
1518
- * passed as a query parameter.
1519
- */
1520
- externalId?: string;
1521
- /**
1522
- * The unique ID of the short link.
1523
- */
1524
- linkId?: string;
1575
+ interface Rule {
1576
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
1577
+ operator: 'equals' | 'not_equals';
1578
+ url: string;
1579
+ value: string;
1580
+ }
1525
1581
  }
1526
1582
  export declare namespace Links {
1527
- export { type Link as Link, type LinkListResponse as LinkListResponse, type LinkDeleteResponse as LinkDeleteResponse, type LinkCreateParams as LinkCreateParams, type LinkUpdateParams as LinkUpdateParams, type LinkListParams as LinkListParams, type LinkRetrieveInfoParams as LinkRetrieveInfoParams, };
1583
+ export { type Link as Link, type LinkListResponse as LinkListResponse, type LinkDeleteResponse as LinkDeleteResponse, type LinkCreateParams as LinkCreateParams, type LinkListParams as LinkListParams, type LinkRetrieveInfoParams as LinkRetrieveInfoParams, type LinkUpdateParams as LinkUpdateParams, };
1528
1584
  export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams, };
1529
1585
  }
1530
1586
  //# sourceMappingURL=links.d.mts.map