@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
@@ -26,63 +26,63 @@ export class Links extends APIResource {
26
26
  }
27
27
 
28
28
  /**
29
- * Update a link for the authenticated workspace. If there's no change, returns it
30
- * as it is.
29
+ * Retrieve a paginated list of links for the authenticated workspace.
31
30
  *
32
31
  * @example
33
32
  * ```ts
34
- * const link = await client.links.update('linkId');
33
+ * const links = await client.links.list();
35
34
  * ```
36
35
  */
37
- update(
38
- linkID: string,
39
- body: LinkUpdateParams | null | undefined = {},
36
+ list(
37
+ query: LinkListParams | null | undefined = {},
40
38
  options?: RequestOptions,
41
- ): APIPromise<Link> {
42
- return this._client.put(path`/links/${linkID}`, { body, ...options });
39
+ ): APIPromise<LinkListResponse> {
40
+ return this._client.get('/links', { query, ...options });
43
41
  }
44
42
 
45
43
  /**
46
- * Retrieve a paginated list of links for the authenticated workspace.
44
+ * Retrieve the info for a link.
47
45
  *
48
46
  * @example
49
47
  * ```ts
50
- * const links = await client.links.list();
48
+ * const link = await client.links.retrieveInfo({
49
+ * domain: 'x',
50
+ * key: 'x',
51
+ * projectSlug: 'x',
52
+ * });
51
53
  * ```
52
54
  */
53
- list(
54
- query: LinkListParams | null | undefined = {},
55
- options?: RequestOptions,
56
- ): APIPromise<LinkListResponse> {
57
- return this._client.get('/links', { query, ...options });
55
+ retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link> {
56
+ return this._client.get('/links/info', { query, ...options });
58
57
  }
59
58
 
60
59
  /**
61
- * Delete a link for the authenticated workspace.
60
+ * Update a link for the authenticated workspace. If there's no change, returns it
61
+ * as it is.
62
62
  *
63
63
  * @example
64
64
  * ```ts
65
- * const link = await client.links.delete('linkId');
65
+ * const link = await client.links.update('linkId');
66
66
  * ```
67
67
  */
68
- delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse> {
69
- return this._client.delete(path`/links/${linkID}`, options);
68
+ update(
69
+ linkID: string,
70
+ body: LinkUpdateParams | null | undefined = {},
71
+ options?: RequestOptions,
72
+ ): APIPromise<Link> {
73
+ return this._client.put(path`/links/${linkID}`, { body, ...options });
70
74
  }
71
75
 
72
76
  /**
73
- * Retrieve the info for a link.
77
+ * Delete a link for the authenticated workspace.
74
78
  *
75
79
  * @example
76
80
  * ```ts
77
- * const link = await client.links.retrieveInfo({
78
- * domain: 'x',
79
- * key: 'x',
80
- * projectSlug: 'x',
81
- * });
81
+ * const link = await client.links.delete('linkId');
82
82
  * ```
83
83
  */
84
- retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link> {
85
- return this._client.get('/links/info', { query, ...options });
84
+ delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse> {
85
+ return this._client.delete(path`/links/${linkID}`, options);
86
86
  }
87
87
  }
88
88
 
@@ -238,6 +238,11 @@ export interface Link {
238
238
  */
239
239
  rewrite: boolean;
240
240
 
241
+ /**
242
+ * Smart rules for conditional destination routing by request attribute.
243
+ */
244
+ rules: Array<Link.Rule> | null;
245
+
241
246
  /**
242
247
  * The amount of the sale generated by the link.
243
248
  */
@@ -280,6 +285,11 @@ export interface Link {
280
285
  */
281
286
  url: string;
282
287
 
288
+ /**
289
+ * Whether this link should be used as a reusable template.
290
+ */
291
+ useAsTemplate: boolean;
292
+
283
293
  /**
284
294
  * The ID of the user who created the short link.
285
295
  */
@@ -338,6 +348,18 @@ export interface Link {
338
348
  shortLink?: string;
339
349
  }
340
350
 
351
+ export namespace Link {
352
+ export interface Rule {
353
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
354
+
355
+ operator: 'equals' | 'not_equals';
356
+
357
+ url: string;
358
+
359
+ value: string;
360
+ }
361
+ }
362
+
341
363
  export type LinkListResponse = Array<Link>;
342
364
 
343
365
  export interface LinkDeleteResponse {
@@ -484,6 +506,11 @@ export interface LinkCreateParams {
484
506
  */
485
507
  rewrite?: boolean;
486
508
 
509
+ /**
510
+ * Smart rules for conditional destination routing by request attribute.
511
+ */
512
+ rules?: Array<LinkCreateParams.Rule> | null;
513
+
487
514
  /**
488
515
  * @deprecated The unique ID of the tag assigned to the short link. This field is
489
516
  * deprecated – use `tagIds` instead.
@@ -1034,148 +1061,179 @@ export namespace LinkCreateParams {
1034
1061
 
1035
1062
  ZW?: string;
1036
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
+ }
1037
1074
  }
1038
1075
 
1039
- export interface LinkUpdateParams {
1076
+ export interface LinkListParams {
1040
1077
  /**
1041
- * The Android destination URL for the short link for Android device targeting.
1078
+ * The Android device to filter by.
1042
1079
  */
1043
- android?: string | null;
1080
+ android?: string;
1044
1081
 
1045
1082
  /**
1046
- * Whether the short link is archived.
1083
+ * Maximum number of clicks
1047
1084
  */
1048
- archived?: boolean;
1085
+ clicksMax?: number;
1049
1086
 
1050
1087
  /**
1051
- * The comments for the short link.
1088
+ * Minimum number of clicks
1052
1089
  */
1053
- comments?: string | null;
1090
+ clicksMin?: number;
1054
1091
 
1055
1092
  /**
1056
- * The description of the short link generated via `api.codeqr.io/metatags`. Will
1057
- * be used for custom link preview if `proxy` is true.
1093
+ * The comments to filter by.
1058
1094
  */
1059
- description?: string | null;
1095
+ comments?: string;
1060
1096
 
1061
1097
  /**
1062
- * Allow search engines to index your short link. Default is `false` if not
1063
- * provided. Learn more: https://codeqr.link/noindex
1098
+ * Created after date (ISO string)
1064
1099
  */
1065
- doIndex?: boolean;
1100
+ createdAfter?: string;
1066
1101
 
1067
1102
  /**
1068
- * The domain of the short link. If not provided, the main domain of the project
1069
- * will be used (or `codeqr.link` if the project has no domains).
1103
+ * Created before date (ISO string)
1104
+ */
1105
+ createdBefore?: string;
1106
+
1107
+ /**
1108
+ * The domain to filter the links. For example, `ac.me`. If not provided, all links
1109
+ * of the project will be returned.
1070
1110
  */
1071
1111
  domain?: string;
1072
1112
 
1073
1113
  /**
1074
- * The URL to redirect to when the short link expires.
1114
+ * Expires after date (ISO string)
1075
1115
  */
1076
- expiredUrl?: string | null;
1116
+ expiresAfter?: string;
1077
1117
 
1078
1118
  /**
1079
- * The date and time when the short link will expire in ISO-8601 format. Must be in
1080
- * the future.
1119
+ * The date and time the short link will expire in ISO-8601 format. Must be in the
1120
+ * future.
1081
1121
  */
1082
1122
  expiresAt?: string | null;
1083
1123
 
1084
1124
  /**
1085
- * This is the ID of the link in your database. If set, it can be used to identify
1086
- * the link in the future. Must be prefixed with `ext_` when passed as a query
1087
- * parameter.
1125
+ * Expires before date (ISO string)
1088
1126
  */
1089
- externalId?: string | null;
1127
+ expiresBefore?: string;
1090
1128
 
1091
1129
  /**
1092
- * Whether the short link is flexible.
1130
+ * The folder ID to filter the links by.
1093
1131
  */
1094
- flexible?: boolean;
1132
+ folderId?: string;
1095
1133
 
1096
1134
  /**
1097
- * The unique ID existing folder to assign the short link to.
1135
+ * Geographic segmentation information for the short link in JSON format
1136
+ * `{[COUNTRY]: https://example.com }`.
1098
1137
  */
1099
- folderId?: string | null;
1138
+ geo?: LinkListParams.Geo | null;
1100
1139
 
1101
1140
  /**
1102
- * Geographic targeting information for the short link in JSON format
1103
- * `{[COUNTRY]: https://example.com }`.
1141
+ * Filter links that have comments (any comments)
1104
1142
  */
1105
- geo?: LinkUpdateParams.Geo | null;
1143
+ hasComments?: boolean;
1106
1144
 
1107
1145
  /**
1108
- * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
1109
- * for custom link preview if `proxy` is true.
1146
+ * Filter links that have custom social media cards
1110
1147
  */
1111
- image?: string | null;
1148
+ hasCustomSocial?: boolean;
1112
1149
 
1113
1150
  /**
1114
- * The iOS destination URL for the short link for iOS device targeting.
1151
+ * Filter links that have device targeting
1115
1152
  */
1116
- ios?: string | null;
1153
+ hasDevice?: boolean;
1117
1154
 
1118
1155
  /**
1119
- * If the form is mandatory for the page.
1156
+ * Filter links that have expiration date (any expiration)
1120
1157
  */
1121
- isFormMandatory?: boolean;
1158
+ hasExpiration?: boolean;
1122
1159
 
1123
1160
  /**
1124
- * The slug of the short link. If not provided, a random 7-character slug will be
1125
- * generated.
1161
+ * Filter links that have geo-targeting
1126
1162
  */
1127
- key?: string;
1163
+ hasGeo?: boolean;
1128
1164
 
1129
1165
  /**
1130
- * The ID of the page to redirect to before the link destination.
1166
+ * Filter links that have password protection (any password)
1131
1167
  */
1132
- pageId?: string | null;
1168
+ hasPassword?: boolean;
1133
1169
 
1134
1170
  /**
1135
- * The URL of the page to redirect to before the link destination.
1171
+ * Filter links that have tags (any tags)
1136
1172
  */
1137
- pageUrl?: string | null;
1173
+ hasTags?: boolean;
1138
1174
 
1139
1175
  /**
1140
- * The password required to access the short link destination URL.
1176
+ * Filter links that have UTM parameters
1141
1177
  */
1142
- password?: string | null;
1178
+ hasUTM?: boolean;
1143
1179
 
1144
1180
  /**
1145
- * The prefix of the short link slug for randomly generated keys (for example, if
1146
- * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
1147
- * be ignored if `key` is provided.
1181
+ * The iOS device to filter by.
1148
1182
  */
1149
- prefix?: string;
1183
+ ios?: string;
1150
1184
 
1151
1185
  /**
1152
- * Whether the short link has pre-redirection.
1186
+ * Link IDs to filter by.
1153
1187
  */
1154
- preRedirection?: boolean;
1188
+ linkIds?: string | Array<string>;
1155
1189
 
1156
1190
  /**
1157
- * Whether the short link uses the custom link preview feature.
1191
+ * The page number for pagination.
1158
1192
  */
1159
- proxy?: boolean;
1193
+ page?: number;
1160
1194
 
1161
1195
  /**
1162
- * Whether the short link statistics are publicly accessible.
1196
+ * The number of items per page.
1163
1197
  */
1164
- publicStats?: boolean;
1198
+ pageSize?: number;
1165
1199
 
1166
1200
  /**
1167
- * Whether the short link uses link cloaking.
1201
+ * The password to filter by.
1168
1202
  */
1169
- rewrite?: boolean;
1203
+ password?: string;
1170
1204
 
1171
1205
  /**
1172
- * @deprecated The unique ID of the tag assigned to the short link. This field is
1173
- * deprecated – use `tagIds` instead.
1206
+ * The slug of the project to which the link belongs. For example, for
1207
+ * `app.codeqr.io/acme`, the projectSlug is `acme`.
1174
1208
  */
1175
- tagId?: string | null;
1209
+ projectSlug?: string;
1176
1210
 
1177
1211
  /**
1178
- * The unique IDs of the tags assigned to the short link.
1212
+ * The search term to filter the links. The search term will be matched against the
1213
+ * short link slug and the destination URL.
1214
+ */
1215
+ search?: string;
1216
+
1217
+ /**
1218
+ * If should include archived links in the response. The default is `false` if not
1219
+ * provided.
1220
+ */
1221
+ showArchived?: boolean;
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
+
1229
+ /**
1230
+ * @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
1231
+ * assigned to the short link.
1232
+ */
1233
+ tagId?: string;
1234
+
1235
+ /**
1236
+ * The IDs of the tags to filter the links.
1179
1237
  */
1180
1238
  tagIds?: string | Array<string>;
1181
1239
 
@@ -1185,41 +1243,55 @@ export interface LinkUpdateParams {
1185
1243
  tagNames?: string | Array<string>;
1186
1244
 
1187
1245
  /**
1188
- * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
1189
- * for custom link preview if `proxy` is true.
1246
+ * If should include links with conversion tracking enabled. The default is `false`
1247
+ * if not provided.
1190
1248
  */
1191
- title?: string | null;
1249
+ trackConversion?: boolean;
1192
1250
 
1193
1251
  /**
1194
- * Whether to track conversions for the short link.
1252
+ * Filter links marked as templates.
1195
1253
  */
1196
- trackConversion?: boolean;
1254
+ useAsTemplate?: boolean;
1197
1255
 
1198
1256
  /**
1199
- * The destination URL of the short link.
1257
+ * The ID of the user to filter by.
1200
1258
  */
1201
- url?: string;
1259
+ userId?: string;
1202
1260
 
1203
1261
  /**
1204
- * Whether this link should be used as a reusable template.
1262
+ * Filter by UTM campaign value
1205
1263
  */
1206
- useAsTemplate?: boolean;
1264
+ utm_campaign?: string;
1207
1265
 
1208
1266
  /**
1209
- * The video of the short link.
1267
+ * Filter by UTM content value
1210
1268
  */
1211
- video?: string | null;
1269
+ utm_content?: string;
1212
1270
 
1213
1271
  /**
1214
- * An array of webhook IDs to trigger when the link is clicked. These webhooks will
1215
- * receive click event data.
1272
+ * Filter by UTM medium value
1216
1273
  */
1217
- webhookIds?: Array<string> | null;
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
+
1286
+ /**
1287
+ * If should include tags in the response. The default is `false` if not provided.
1288
+ */
1289
+ withTags?: boolean;
1218
1290
  }
1219
1291
 
1220
- export namespace LinkUpdateParams {
1292
+ export namespace LinkListParams {
1221
1293
  /**
1222
- * Geographic targeting information for the short link in JSON format
1294
+ * Geographic segmentation information for the short link in JSON format
1223
1295
  * `{[COUNTRY]: https://example.com }`.
1224
1296
  */
1225
1297
  export interface Geo {
@@ -1725,167 +1797,182 @@ export namespace LinkUpdateParams {
1725
1797
  }
1726
1798
  }
1727
1799
 
1728
- export interface LinkListParams {
1800
+ export interface LinkRetrieveInfoParams {
1729
1801
  /**
1730
- * The Android device to filter by.
1802
+ * The domain of the link to be retrieved. For example, for `codeqr.link/github`,
1803
+ * the domain is `codeqr.link`.
1731
1804
  */
1732
- android?: string;
1805
+ domain: string;
1733
1806
 
1734
1807
  /**
1735
- * Maximum number of clicks
1808
+ * The key of the link to be retrieved. For example, for `codeqr.link/github`, the
1809
+ * key is `github`.
1736
1810
  */
1737
- clicksMax?: number;
1811
+ key: string;
1738
1812
 
1739
1813
  /**
1740
- * Minimum number of clicks
1814
+ * The slug of the project to which the link belongs. For example, for
1815
+ * `app.codeqr.io/acme`, the projectSlug is `acme`.
1741
1816
  */
1742
- clicksMin?: number;
1817
+ projectSlug: string;
1743
1818
 
1744
1819
  /**
1745
- * The comments to filter by.
1820
+ * This is the ID of the link in your database. Must be prefixed with `ext_` when
1821
+ * passed as a query parameter.
1746
1822
  */
1747
- comments?: string;
1823
+ externalId?: string;
1748
1824
 
1749
1825
  /**
1750
- * Created after date (ISO string)
1826
+ * The unique ID of the short link.
1751
1827
  */
1752
- createdAfter?: string;
1828
+ linkId?: string;
1829
+ }
1753
1830
 
1831
+ export interface LinkUpdateParams {
1754
1832
  /**
1755
- * Created before date (ISO string)
1833
+ * The Android destination URL for the short link for Android device targeting.
1756
1834
  */
1757
- createdBefore?: string;
1835
+ android?: string | null;
1758
1836
 
1759
1837
  /**
1760
- * The domain to filter the links. For example, `ac.me`. If not provided, all links
1761
- * of the project will be returned.
1838
+ * Whether the short link is archived.
1762
1839
  */
1763
- domain?: string;
1840
+ archived?: boolean;
1764
1841
 
1765
1842
  /**
1766
- * Expires after date (ISO string)
1843
+ * The comments for the short link.
1767
1844
  */
1768
- expiresAfter?: string;
1845
+ comments?: string | null;
1769
1846
 
1770
1847
  /**
1771
- * The date and time the short link will expire in ISO-8601 format. Must be in the
1772
- * future.
1848
+ * The description of the short link generated via `api.codeqr.io/metatags`. Will
1849
+ * be used for custom link preview if `proxy` is true.
1773
1850
  */
1774
- expiresAt?: string | null;
1851
+ description?: string | null;
1775
1852
 
1776
1853
  /**
1777
- * Expires before date (ISO string)
1854
+ * Allow search engines to index your short link. Default is `false` if not
1855
+ * provided. Learn more: https://codeqr.link/noindex
1778
1856
  */
1779
- expiresBefore?: string;
1857
+ doIndex?: boolean;
1780
1858
 
1781
1859
  /**
1782
- * The folder ID to filter the links by.
1860
+ * The domain of the short link. If not provided, the main domain of the project
1861
+ * will be used (or `codeqr.link` if the project has no domains).
1783
1862
  */
1784
- folderId?: string;
1863
+ domain?: string;
1785
1864
 
1786
1865
  /**
1787
- * Geographic segmentation information for the short link in JSON format
1788
- * `{[COUNTRY]: https://example.com }`.
1866
+ * The URL to redirect to when the short link expires.
1789
1867
  */
1790
- geo?: LinkListParams.Geo | null;
1868
+ expiredUrl?: string | null;
1791
1869
 
1792
1870
  /**
1793
- * Filter links that have comments (any comments)
1871
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
1872
+ * the future.
1794
1873
  */
1795
- hasComments?: boolean;
1874
+ expiresAt?: string | null;
1796
1875
 
1797
1876
  /**
1798
- * Filter links that have custom social media cards
1877
+ * This is the ID of the link in your database. If set, it can be used to identify
1878
+ * the link in the future. Must be prefixed with `ext_` when passed as a query
1879
+ * parameter.
1799
1880
  */
1800
- hasCustomSocial?: boolean;
1881
+ externalId?: string | null;
1801
1882
 
1802
1883
  /**
1803
- * Filter links that have device targeting
1884
+ * Whether the short link is flexible.
1804
1885
  */
1805
- hasDevice?: boolean;
1886
+ flexible?: boolean;
1806
1887
 
1807
1888
  /**
1808
- * Filter links that have expiration date (any expiration)
1889
+ * The unique ID existing folder to assign the short link to.
1809
1890
  */
1810
- hasExpiration?: boolean;
1891
+ folderId?: string | null;
1811
1892
 
1812
1893
  /**
1813
- * Filter links that have geo-targeting
1894
+ * Geographic targeting information for the short link in JSON format
1895
+ * `{[COUNTRY]: https://example.com }`.
1814
1896
  */
1815
- hasGeo?: boolean;
1897
+ geo?: LinkUpdateParams.Geo | null;
1816
1898
 
1817
1899
  /**
1818
- * Filter links that have password protection (any password)
1900
+ * The image of the short link generated via `api.codeqr.io/metatags`. Will be used
1901
+ * for custom link preview if `proxy` is true.
1819
1902
  */
1820
- hasPassword?: boolean;
1903
+ image?: string | null;
1821
1904
 
1822
1905
  /**
1823
- * Filter links that have tags (any tags)
1906
+ * The iOS destination URL for the short link for iOS device targeting.
1824
1907
  */
1825
- hasTags?: boolean;
1908
+ ios?: string | null;
1826
1909
 
1827
1910
  /**
1828
- * Filter links that have UTM parameters
1911
+ * If the form is mandatory for the page.
1829
1912
  */
1830
- hasUTM?: boolean;
1913
+ isFormMandatory?: boolean;
1831
1914
 
1832
1915
  /**
1833
- * The iOS device to filter by.
1916
+ * The slug of the short link. If not provided, a random 7-character slug will be
1917
+ * generated.
1834
1918
  */
1835
- ios?: string;
1919
+ key?: string;
1836
1920
 
1837
1921
  /**
1838
- * Link IDs to filter by.
1922
+ * The ID of the page to redirect to before the link destination.
1839
1923
  */
1840
- linkIds?: string | Array<string>;
1924
+ pageId?: string | null;
1841
1925
 
1842
1926
  /**
1843
- * The page number for pagination.
1927
+ * The URL of the page to redirect to before the link destination.
1844
1928
  */
1845
- page?: number;
1929
+ pageUrl?: string | null;
1846
1930
 
1847
1931
  /**
1848
- * The number of items per page.
1932
+ * The password required to access the short link destination URL.
1849
1933
  */
1850
- pageSize?: number;
1934
+ password?: string | null;
1851
1935
 
1852
1936
  /**
1853
- * The password to filter by.
1937
+ * The prefix of the short link slug for randomly generated keys (for example, if
1938
+ * the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
1939
+ * be ignored if `key` is provided.
1854
1940
  */
1855
- password?: string;
1941
+ prefix?: string;
1856
1942
 
1857
1943
  /**
1858
- * The slug of the project to which the link belongs. For example, for
1859
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
1944
+ * Whether the short link has pre-redirection.
1860
1945
  */
1861
- projectSlug?: string;
1946
+ preRedirection?: boolean;
1862
1947
 
1863
1948
  /**
1864
- * The search term to filter the links. The search term will be matched against the
1865
- * short link slug and the destination URL.
1949
+ * Whether the short link uses the custom link preview feature.
1866
1950
  */
1867
- search?: string;
1951
+ proxy?: boolean;
1868
1952
 
1869
1953
  /**
1870
- * If should include archived links in the response. The default is `false` if not
1871
- * provided.
1954
+ * Whether the short link statistics are publicly accessible.
1872
1955
  */
1873
- showArchived?: boolean;
1956
+ publicStats?: boolean;
1874
1957
 
1875
1958
  /**
1876
- * The field to sort the links by. The default is `createdAt`, and sort order is
1877
- * always descending.
1959
+ * Whether the short link uses link cloaking.
1878
1960
  */
1879
- sort?: 'createdAt' | 'clicks' | 'lastClicked';
1961
+ rewrite?: boolean;
1880
1962
 
1881
1963
  /**
1882
- * @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
1883
- * assigned to the short link.
1964
+ * Smart rules for conditional destination routing by request attribute.
1884
1965
  */
1885
- tagId?: string;
1966
+ rules?: Array<LinkUpdateParams.Rule> | null;
1886
1967
 
1887
1968
  /**
1888
- * The IDs of the tags to filter the links.
1969
+ * @deprecated The unique ID of the tag assigned to the short link. This field is
1970
+ * deprecated – use `tagIds` instead.
1971
+ */
1972
+ tagId?: string | null;
1973
+
1974
+ /**
1975
+ * The unique IDs of the tags assigned to the short link.
1889
1976
  */
1890
1977
  tagIds?: string | Array<string>;
1891
1978
 
@@ -1895,30 +1982,41 @@ export interface LinkListParams {
1895
1982
  tagNames?: string | Array<string>;
1896
1983
 
1897
1984
  /**
1898
- * If should include links with conversion tracking enabled. The default is `false`
1899
- * if not provided.
1985
+ * The title of the short link generated via `api.codeqr.io/metatags`. Will be used
1986
+ * for custom link preview if `proxy` is true.
1987
+ */
1988
+ title?: string | null;
1989
+
1990
+ /**
1991
+ * Whether to track conversions for the short link.
1900
1992
  */
1901
1993
  trackConversion?: boolean;
1902
1994
 
1903
1995
  /**
1904
- * Filter links marked as templates.
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.
1905
2002
  */
1906
2003
  useAsTemplate?: boolean;
1907
2004
 
1908
2005
  /**
1909
- * The ID of the user to filter by.
2006
+ * The video of the short link.
1910
2007
  */
1911
- userId?: string;
2008
+ video?: string | null;
1912
2009
 
1913
2010
  /**
1914
- * If should include tags in the response. The default is `false` if not provided.
2011
+ * An array of webhook IDs to trigger when the link is clicked. These webhooks will
2012
+ * receive click event data.
1915
2013
  */
1916
- withTags?: boolean;
2014
+ webhookIds?: Array<string> | null;
1917
2015
  }
1918
2016
 
1919
- export namespace LinkListParams {
2017
+ export namespace LinkUpdateParams {
1920
2018
  /**
1921
- * Geographic segmentation information for the short link in JSON format
2019
+ * Geographic targeting information for the short link in JSON format
1922
2020
  * `{[COUNTRY]: https://example.com }`.
1923
2021
  */
1924
2022
  export interface Geo {
@@ -2422,37 +2520,16 @@ export namespace LinkListParams {
2422
2520
 
2423
2521
  ZW?: string;
2424
2522
  }
2425
- }
2426
2523
 
2427
- export interface LinkRetrieveInfoParams {
2428
- /**
2429
- * The domain of the link to be retrieved. For example, for `codeqr.link/github`,
2430
- * the domain is `codeqr.link`.
2431
- */
2432
- domain: string;
2524
+ export interface Rule {
2525
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
2433
2526
 
2434
- /**
2435
- * The key of the link to be retrieved. For example, for `codeqr.link/github`, the
2436
- * key is `github`.
2437
- */
2438
- key: string;
2527
+ operator: 'equals' | 'not_equals';
2439
2528
 
2440
- /**
2441
- * The slug of the project to which the link belongs. For example, for
2442
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
2443
- */
2444
- projectSlug: string;
2445
-
2446
- /**
2447
- * This is the ID of the link in your database. Must be prefixed with `ext_` when
2448
- * passed as a query parameter.
2449
- */
2450
- externalId?: string;
2529
+ url: string;
2451
2530
 
2452
- /**
2453
- * The unique ID of the short link.
2454
- */
2455
- linkId?: string;
2531
+ value: string;
2532
+ }
2456
2533
  }
2457
2534
 
2458
2535
  Links.Bulk = Bulk;
@@ -2463,9 +2540,9 @@ export declare namespace Links {
2463
2540
  type LinkListResponse as LinkListResponse,
2464
2541
  type LinkDeleteResponse as LinkDeleteResponse,
2465
2542
  type LinkCreateParams as LinkCreateParams,
2466
- type LinkUpdateParams as LinkUpdateParams,
2467
2543
  type LinkListParams as LinkListParams,
2468
2544
  type LinkRetrieveInfoParams as LinkRetrieveInfoParams,
2545
+ type LinkUpdateParams as LinkUpdateParams,
2469
2546
  };
2470
2547
 
2471
2548
  export {