@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
@@ -1,7 +1,7 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as TagsAPI from "../tags.mjs";
3
3
  import * as BulkAPI from "./bulk.mjs";
4
- import { Bulk, BulkCreateParams, BulkCreateResponse, BulkDeleteParams, BulkDeleteResponse } from "./bulk.mjs";
4
+ import { Bulk, BulkCreateParams, BulkCreateResponse } from "./bulk.mjs";
5
5
  import { APIPromise } from "../../core/api-promise.mjs";
6
6
  import { RequestOptions } from "../../internal/request-options.mjs";
7
7
  export declare class Qrcodes extends APIResource {
@@ -11,13 +11,19 @@ export declare class Qrcodes extends APIResource {
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
- * const qrCode = await client.qrcodes.create({
15
- * folderId: 'folderId',
16
- * type: 'url',
17
- * });
14
+ * const qrCode = await client.qrcodes.create({ type: 'url' });
18
15
  * ```
19
16
  */
20
17
  create(body: QrcodeCreateParams, options?: RequestOptions): APIPromise<QrCode>;
18
+ /**
19
+ * Retrieve a paginated list of QR Codes for the authenticated workspace.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const qrCodes = await client.qrcodes.list();
24
+ * ```
25
+ */
26
+ list(query?: QrcodeListParams | null | undefined, options?: RequestOptions): APIPromise<QrcodeListResponse>;
21
27
  /**
22
28
  * Retrieve the info for a QR Code.
23
29
  *
@@ -41,15 +47,6 @@ export declare class Qrcodes extends APIResource {
41
47
  * ```
42
48
  */
43
49
  update(qrcodeID: string, body?: QrcodeUpdateParams | null | undefined, options?: RequestOptions): APIPromise<QrCode>;
44
- /**
45
- * Retrieve a paginated list of QR Codes for the authenticated workspace.
46
- *
47
- * @example
48
- * ```ts
49
- * const qrCodes = await client.qrcodes.list();
50
- * ```
51
- */
52
- list(query?: QrcodeListParams | null | undefined, options?: RequestOptions): APIPromise<QrcodeListResponse>;
53
50
  /**
54
51
  * Delete a QR Code for the authenticated workspace.
55
52
  *
@@ -59,29 +56,6 @@ export declare class Qrcodes extends APIResource {
59
56
  * ```
60
57
  */
61
58
  delete(qrcodeID: string, options?: RequestOptions): APIPromise<QrcodeDeleteResponse>;
62
- /**
63
- * Retrieve the number of QR Codes for the authenticated workspace.
64
- *
65
- * @example
66
- * ```ts
67
- * const response = await client.qrcodes.count();
68
- * ```
69
- */
70
- count(query?: QrcodeCountParams | null | undefined, options?: RequestOptions): APIPromise<QrcodeCountResponse>;
71
- /**
72
- * Upsert a QR Code for the authenticated workspace by its URL. If a QR Code with
73
- * the same URL already exists, return it (or update it if there are any changes).
74
- * Otherwise, a new QR Code will be created.
75
- *
76
- * @example
77
- * ```ts
78
- * const qrCode = await client.qrcodes.upsert({
79
- * folderId: 'folderId',
80
- * type: 'url',
81
- * });
82
- * ```
83
- */
84
- upsert(body: QrcodeUpsertParams, options?: RequestOptions): APIPromise<QrCode>;
85
59
  }
86
60
  export interface QrCode {
87
61
  /**
@@ -260,6 +234,10 @@ export interface QrCode {
260
234
  * If the QR code uses link cloaking.
261
235
  */
262
236
  rewrite: boolean;
237
+ /**
238
+ * Smart rules for conditional destination routing by request attribute.
239
+ */
240
+ rules: Array<QrCode.Rule> | null;
263
241
  /**
264
242
  * The amount of the sale generated by the link.
265
243
  */
@@ -319,7 +297,7 @@ export interface QrCode {
319
297
  /**
320
298
  * The type of the QR code.
321
299
  */
322
- type: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog' | 'pix';
300
+ type: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'geo' | 'latlog' | 'pix' | 'whatsapp';
323
301
  /**
324
302
  * The date and time the QR code was updated last.
325
303
  */
@@ -328,6 +306,12 @@ export interface QrCode {
328
306
  * The URL of the QR code.
329
307
  */
330
308
  url: string | null;
309
+ /**
310
+ * For dynamic QR codes with phone, email, or sms types: if true (default), shows
311
+ * an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
312
+ * URI.
313
+ */
314
+ useDisplayPage: boolean;
331
315
  /**
332
316
  * The ID of the user that created the QR code.
333
317
  */
@@ -358,6 +342,11 @@ export interface QrCode {
358
342
  vcard: {
359
343
  [key: string]: string;
360
344
  } | null;
345
+ /**
346
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
347
+ * prefilled message.
348
+ */
349
+ whatsapp: QrCode.Whatsapp | null;
361
350
  /**
362
351
  * The width of the QR code.
363
352
  */
@@ -368,6 +357,13 @@ export interface QrCode {
368
357
  wifi: {
369
358
  [key: string]: string;
370
359
  } | null;
360
+ /**
361
+ * Typographic styles applied to the frame label text. Object with optional keys:
362
+ * `weight` (`normal` | `bold`), `style` (`normal` | `italic`), `family` (`sans` |
363
+ * `sans-condensed` | `serif` | `serif-elegant` | `mono`), `size` (`s` | `m` | `l`
364
+ * | `xl`). Every field is enum-gated on write; omitted keys render with defaults.
365
+ */
366
+ frameTextStyles?: QrCode.FrameTextStyles | null;
371
367
  /**
372
368
  * The ID of the page to redirect to before the QR code destination.
373
369
  */
@@ -377,6 +373,34 @@ export interface QrCode {
377
373
  */
378
374
  pageUrl?: string | null;
379
375
  }
376
+ export declare namespace QrCode {
377
+ interface Rule {
378
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
379
+ operator: 'equals' | 'not_equals';
380
+ url: string;
381
+ value: string;
382
+ }
383
+ /**
384
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
385
+ * prefilled message.
386
+ */
387
+ interface Whatsapp {
388
+ number: string;
389
+ message?: string;
390
+ }
391
+ /**
392
+ * Typographic styles applied to the frame label text. Object with optional keys:
393
+ * `weight` (`normal` | `bold`), `style` (`normal` | `italic`), `family` (`sans` |
394
+ * `sans-condensed` | `serif` | `serif-elegant` | `mono`), `size` (`s` | `m` | `l`
395
+ * | `xl`). Every field is enum-gated on write; omitted keys render with defaults.
396
+ */
397
+ interface FrameTextStyles {
398
+ family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono';
399
+ size?: 's' | 'm' | 'l' | 'xl';
400
+ style?: 'normal' | 'italic';
401
+ weight?: 'normal' | 'bold';
402
+ }
403
+ }
380
404
  export type QrcodeListResponse = Array<QrCode>;
381
405
  export interface QrcodeDeleteResponse {
382
406
  /**
@@ -384,19 +408,11 @@ export interface QrcodeDeleteResponse {
384
408
  */
385
409
  id: string;
386
410
  }
387
- /**
388
- * The number of QR Codes matching the query.
389
- */
390
- export type QrcodeCountResponse = number;
391
411
  export interface QrcodeCreateParams {
392
- /**
393
- * The unique ID of the folder assigned to the QR code.
394
- */
395
- folderId: string | null;
396
412
  /**
397
413
  * The type of content of the QR code.
398
414
  */
399
- type: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog';
415
+ type: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'geo' | 'latlog' | 'pix' | 'whatsapp';
400
416
  /**
401
417
  * The destination URL for Android for the QR code for device targeting Android.
402
418
  */
@@ -406,7 +422,8 @@ export interface QrcodeCreateParams {
406
422
  */
407
423
  archived?: boolean;
408
424
  /**
409
- * The background color of the QR code.
425
+ * The background color of the QR code (hex or CSS keyword). Invalid values are
426
+ * coerced to default.
410
427
  */
411
428
  bgColor?: string;
412
429
  /**
@@ -470,7 +487,8 @@ export interface QrcodeCreateParams {
470
487
  [key: string]: string;
471
488
  } | null;
472
489
  /**
473
- * The foreground color of the QR code.
490
+ * The foreground color of the QR code (hex or CSS keyword). Invalid values are
491
+ * coerced to default.
474
492
  */
475
493
  fgColor?: string;
476
494
  /**
@@ -482,24 +500,48 @@ export interface QrcodeCreateParams {
482
500
  */
483
501
  flexible?: boolean;
484
502
  /**
485
- * The type of frame of the QR code.
503
+ * The unique ID of the folder assigned to the QR code. Omit or set to null for no
504
+ * folder.
505
+ */
506
+ folderId?: string | null;
507
+ /**
508
+ * The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5,
509
+ * frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at
510
+ * render.
486
511
  */
487
512
  frame?: string;
488
513
  /**
489
- * The color of the frame of the QR code.
514
+ * The color of the frame (hex or CSS keyword). Invalid values are coerced to
515
+ * default.
490
516
  */
491
517
  frameColor?: string;
492
518
  /**
493
- * The text of the frame of the QR code.
519
+ * Label text rendered inside the frame (e.g. "SCAN ME", a product SKU). Maximum
520
+ * 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar
521
+ * grows vertically to fit.
494
522
  */
495
523
  frameText?: string;
524
+ /**
525
+ * Color of the frame label text (hex `#RRGGBB`, `#RGB`, `#RRGGBBAA`, or a CSS
526
+ * keyword from the allowlist). When omitted, a contrasting color is derived
527
+ * automatically from `frameColor`.
528
+ */
529
+ frameTextColor?: string | null;
530
+ /**
531
+ * Typographic styles applied to the frame label text. Every key is enum-gated —
532
+ * unknown keys or out-of-enum values are rejected to prevent SVG attribute
533
+ * injection. All fields are optional; omitted keys fall back to the default
534
+ * (normal weight, normal style, sans family, medium size).
535
+ */
536
+ frameTextStyles?: QrcodeCreateParams.FrameTextStyles | null;
496
537
  /**
497
538
  * Geographic segmentation information for the QR code in the JSON format
498
539
  * `{[COUNTRY]: https://example.com }`.
499
540
  */
500
541
  geo?: QrcodeCreateParams.Geo | null;
501
542
  /**
502
- * The height of the QR code.
543
+ * Logo height in pixels. When omitted, a proportional size is used based on the QR
544
+ * code size (about 10–20% depending on size).
503
545
  */
504
546
  height?: number;
505
547
  /**
@@ -554,6 +596,11 @@ export interface QrcodeCreateParams {
554
596
  * The phone number of the QR code.
555
597
  */
556
598
  phone?: string | null;
599
+ /**
600
+ * The prefix for the randomly generated key. If provided, the key will be prefixed
601
+ * with this value.
602
+ */
603
+ prefix?: string;
557
604
  /**
558
605
  * If the QR code has pre-redirection.
559
606
  */
@@ -570,6 +617,10 @@ export interface QrcodeCreateParams {
570
617
  * If the QR code uses link cloaking.
571
618
  */
572
619
  rewrite?: boolean;
620
+ /**
621
+ * Smart rules for conditional destination routing by request attribute.
622
+ */
623
+ rules?: Array<QrcodeCreateParams.Rule> | null;
573
624
  /**
574
625
  * The shape of the design around the QR code (none, square, circle).
575
626
  */
@@ -609,6 +660,12 @@ export interface QrcodeCreateParams {
609
660
  * The unique name of the tags assigned to the QR code (case insensitive).
610
661
  */
611
662
  tagNames?: string | Array<string>;
663
+ /**
664
+ * ID of a QR code (in the same project) marked as a template. Its customization
665
+ * fields (colors, logo, pattern, shape, frame) will be applied to the new QR code
666
+ * unless explicitly overridden.
667
+ */
668
+ templateId?: string | null;
612
669
  /**
613
670
  * The text of the QR code.
614
671
  */
@@ -626,6 +683,16 @@ export interface QrcodeCreateParams {
626
683
  * The destination URL of the QR code.
627
684
  */
628
685
  url?: string | null;
686
+ /**
687
+ * Whether this QR code should be used as a reusable template.
688
+ */
689
+ useAsTemplate?: boolean;
690
+ /**
691
+ * For dynamic QR codes with phone, email, or sms types: if true (default), shows
692
+ * an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
693
+ * URI.
694
+ */
695
+ useDisplayPage?: boolean;
629
696
  /**
630
697
  * The vCard information of the QR code.
631
698
  */
@@ -638,7 +705,13 @@ export interface QrcodeCreateParams {
638
705
  */
639
706
  webhookIds?: Array<string> | null;
640
707
  /**
641
- * The width of the QR code.
708
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
709
+ * prefilled message.
710
+ */
711
+ whatsapp?: QrcodeCreateParams.Whatsapp | null;
712
+ /**
713
+ * Logo width in pixels. When omitted, a proportional size is used based on the QR
714
+ * code size (about 10–20% depending on size).
642
715
  */
643
716
  width?: number;
644
717
  /**
@@ -649,6 +722,36 @@ export interface QrcodeCreateParams {
649
722
  } | null;
650
723
  }
651
724
  export declare namespace QrcodeCreateParams {
725
+ /**
726
+ * Typographic styles applied to the frame label text. Every key is enum-gated —
727
+ * unknown keys or out-of-enum values are rejected to prevent SVG attribute
728
+ * injection. All fields are optional; omitted keys fall back to the default
729
+ * (normal weight, normal style, sans family, medium size).
730
+ */
731
+ interface FrameTextStyles {
732
+ /**
733
+ * Font family used for the frame label text. `sans` = Arial / Helvetica (default).
734
+ * `sans-condensed` = Arial Narrow. `serif` = Georgia / Times New Roman.
735
+ * `serif-elegant` = Palatino Linotype / Book Antiqua. `mono` = Courier New. Values
736
+ * resolve to safe system font stacks on the rendered SVG.
737
+ */
738
+ family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono';
739
+ /**
740
+ * Font size preset for the frame label. `s` = 60 viewBox units, `m` = 89.1
741
+ * (default), `l` = 120, `xl` = 150. Larger sizes grow the frame bar vertically to
742
+ * fit. Extremely long text auto-shrinks to keep within 4 lines (floor 48).
743
+ */
744
+ size?: 's' | 'm' | 'l' | 'xl';
745
+ /**
746
+ * Font style of the frame label text. `italic` applies `font-style="italic"`.
747
+ */
748
+ style?: 'normal' | 'italic';
749
+ /**
750
+ * Font weight of the frame label text. `bold` renders at SVG `font-weight="700"`,
751
+ * `normal` at `400`.
752
+ */
753
+ weight?: 'normal' | 'bold';
754
+ }
652
755
  /**
653
756
  * Geographic segmentation information for the QR code in the JSON format
654
757
  * `{[COUNTRY]: https://example.com }`.
@@ -905,6 +1008,186 @@ export declare namespace QrcodeCreateParams {
905
1008
  ZM?: string;
906
1009
  ZW?: string;
907
1010
  }
1011
+ interface Rule {
1012
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
1013
+ operator: 'equals' | 'not_equals';
1014
+ url: string;
1015
+ value: string;
1016
+ }
1017
+ /**
1018
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
1019
+ * prefilled message.
1020
+ */
1021
+ interface Whatsapp {
1022
+ number: string;
1023
+ message?: string;
1024
+ }
1025
+ }
1026
+ export interface QrcodeListParams {
1027
+ /**
1028
+ * The comments to filter by.
1029
+ */
1030
+ comments?: string;
1031
+ /**
1032
+ * Filter QR codes created after this date
1033
+ */
1034
+ createdAfter?: string;
1035
+ /**
1036
+ * Filter QR codes created before this date
1037
+ */
1038
+ createdBefore?: string;
1039
+ /**
1040
+ * The domain to filter the QR codes. For example, `ac.me`. If not provided, all QR
1041
+ * codes of the project will be returned.
1042
+ */
1043
+ domain?: string;
1044
+ /**
1045
+ * Filter QR codes expiring after this date
1046
+ */
1047
+ expiresAfter?: string;
1048
+ /**
1049
+ * The date and time the QR code will expire in ISO-8601 format. Must be in the
1050
+ * future.
1051
+ */
1052
+ expiresAt?: string | null;
1053
+ /**
1054
+ * Filter QR codes expiring before this date
1055
+ */
1056
+ expiresBefore?: string;
1057
+ /**
1058
+ * The folder ID to filter the QR codes by.
1059
+ */
1060
+ folderId?: string;
1061
+ /**
1062
+ * Filter by QR code format - static or dynamic
1063
+ */
1064
+ format?: 'static' | 'dynamic';
1065
+ /**
1066
+ * Filter QR codes with/without comments
1067
+ */
1068
+ hasComments?: boolean;
1069
+ /**
1070
+ * Filter QR codes with/without custom social media cards
1071
+ */
1072
+ hasCustomSocial?: boolean;
1073
+ /**
1074
+ * Filter QR codes with/without device targeting
1075
+ */
1076
+ hasDevice?: boolean;
1077
+ /**
1078
+ * Filter QR codes with/without expiration date
1079
+ */
1080
+ hasExpiration?: boolean;
1081
+ /**
1082
+ * Filter QR codes with/without geo-targeting
1083
+ */
1084
+ hasGeo?: boolean;
1085
+ /**
1086
+ * Filter QR codes with/without password protection
1087
+ */
1088
+ hasPassword?: boolean;
1089
+ /**
1090
+ * Filter QR codes with/without tags
1091
+ */
1092
+ hasTags?: boolean;
1093
+ /**
1094
+ * Filter QR codes with/without UTM parameters
1095
+ */
1096
+ hasUTM?: boolean;
1097
+ /**
1098
+ * The page number for pagination.
1099
+ */
1100
+ page?: number;
1101
+ /**
1102
+ * The number of items per page.
1103
+ */
1104
+ pageSize?: number;
1105
+ /**
1106
+ * The password to filter by.
1107
+ */
1108
+ password?: string;
1109
+ /**
1110
+ * The slug of the project to which the QR code belongs. For example, for
1111
+ * `app.codeqr.io/acme`, the projectSlug is `acme`.
1112
+ */
1113
+ projectSlug?: string;
1114
+ /**
1115
+ * Maximum number of scans
1116
+ */
1117
+ scansMax?: number;
1118
+ /**
1119
+ * Minimum number of scans
1120
+ */
1121
+ scansMin?: number;
1122
+ /**
1123
+ * The search term to filter the QR codes. The search term will be matched against
1124
+ * the QR code slug, title, and the destination URL.
1125
+ */
1126
+ search?: string;
1127
+ /**
1128
+ * If should include archived QR codes in the response. The default is `false` if
1129
+ * not provided.
1130
+ */
1131
+ showArchived?: boolean;
1132
+ /**
1133
+ * The field to order the QR codes. The default is `createdAt`, and the order of
1134
+ * sorting is always descending.
1135
+ */
1136
+ sort?: 'createdAt' | 'scans' | 'lastClicked';
1137
+ /**
1138
+ * @deprecated [DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned
1139
+ * to the QR code.
1140
+ */
1141
+ tagId?: string;
1142
+ /**
1143
+ * The IDs of the tags to filter the QR codes.
1144
+ */
1145
+ tagIds?: string | Array<string>;
1146
+ /**
1147
+ * The unique name of the tags assigned to the QR code (case insensitive).
1148
+ */
1149
+ tagNames?: string | Array<string>;
1150
+ /**
1151
+ * If should include QR codes with conversion tracking enabled. The default is
1152
+ * `false` if not provided.
1153
+ */
1154
+ trackConversion?: boolean;
1155
+ /**
1156
+ * Filter by QR code type
1157
+ */
1158
+ type?: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'geo' | 'latlog' | 'pix' | 'whatsapp';
1159
+ /**
1160
+ * Filter QR codes marked as templates.
1161
+ */
1162
+ useAsTemplate?: boolean;
1163
+ /**
1164
+ * The ID of the user to filter by.
1165
+ */
1166
+ userId?: string;
1167
+ /**
1168
+ * Filter by UTM campaign value
1169
+ */
1170
+ utm_campaign?: string;
1171
+ /**
1172
+ * Filter by UTM content value
1173
+ */
1174
+ utm_content?: string;
1175
+ /**
1176
+ * Filter by UTM medium value
1177
+ */
1178
+ utm_medium?: string;
1179
+ /**
1180
+ * Filter by UTM source value
1181
+ */
1182
+ utm_source?: string;
1183
+ /**
1184
+ * Filter by UTM term value
1185
+ */
1186
+ utm_term?: string;
1187
+ /**
1188
+ * If should include tags in the response. The default is `false` if not provided.
1189
+ */
1190
+ withTags?: boolean;
908
1191
  }
909
1192
  export interface QrcodeRetrieveParams {
910
1193
  /**
@@ -942,7 +1225,8 @@ export interface QrcodeUpdateParams {
942
1225
  */
943
1226
  archived?: boolean;
944
1227
  /**
945
- * The background color of the QR code.
1228
+ * The background color of the QR code (hex or CSS keyword). Invalid values are
1229
+ * coerced to default.
946
1230
  */
947
1231
  bgColor?: string;
948
1232
  /**
@@ -1006,7 +1290,8 @@ export interface QrcodeUpdateParams {
1006
1290
  [key: string]: string;
1007
1291
  } | null;
1008
1292
  /**
1009
- * The foreground color of the QR code.
1293
+ * The foreground color of the QR code (hex or CSS keyword). Invalid values are
1294
+ * coerced to default.
1010
1295
  */
1011
1296
  fgColor?: string;
1012
1297
  /**
@@ -1018,28 +1303,48 @@ export interface QrcodeUpdateParams {
1018
1303
  */
1019
1304
  flexible?: boolean;
1020
1305
  /**
1021
- * The unique ID of the folder assigned to the QR code.
1306
+ * The unique ID of the folder assigned to the QR code. Omit or set to null for no
1307
+ * folder.
1022
1308
  */
1023
1309
  folderId?: string | null;
1024
1310
  /**
1025
- * The type of frame of the QR code.
1311
+ * The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5,
1312
+ * frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at
1313
+ * render.
1026
1314
  */
1027
1315
  frame?: string;
1028
1316
  /**
1029
- * The color of the frame of the QR code.
1317
+ * The color of the frame (hex or CSS keyword). Invalid values are coerced to
1318
+ * default.
1030
1319
  */
1031
1320
  frameColor?: string;
1032
1321
  /**
1033
- * The text of the frame of the QR code.
1322
+ * Label text rendered inside the frame (e.g. "SCAN ME", a product SKU). Maximum
1323
+ * 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar
1324
+ * grows vertically to fit.
1034
1325
  */
1035
1326
  frameText?: string;
1327
+ /**
1328
+ * Color of the frame label text (hex `#RRGGBB`, `#RGB`, `#RRGGBBAA`, or a CSS
1329
+ * keyword from the allowlist). When omitted, a contrasting color is derived
1330
+ * automatically from `frameColor`.
1331
+ */
1332
+ frameTextColor?: string | null;
1333
+ /**
1334
+ * Typographic styles applied to the frame label text. Every key is enum-gated —
1335
+ * unknown keys or out-of-enum values are rejected to prevent SVG attribute
1336
+ * injection. All fields are optional; omitted keys fall back to the default
1337
+ * (normal weight, normal style, sans family, medium size).
1338
+ */
1339
+ frameTextStyles?: QrcodeUpdateParams.FrameTextStyles | null;
1036
1340
  /**
1037
1341
  * Geographic segmentation information for the QR code in the JSON format
1038
1342
  * `{[COUNTRY]: https://example.com }`.
1039
1343
  */
1040
1344
  geo?: QrcodeUpdateParams.Geo | null;
1041
1345
  /**
1042
- * The height of the QR code.
1346
+ * Logo height in pixels. When omitted, a proportional size is used based on the QR
1347
+ * code size (about 10–20% depending on size).
1043
1348
  */
1044
1349
  height?: number;
1045
1350
  /**
@@ -1094,6 +1399,11 @@ export interface QrcodeUpdateParams {
1094
1399
  * The phone number of the QR code.
1095
1400
  */
1096
1401
  phone?: string | null;
1402
+ /**
1403
+ * The prefix for the randomly generated key. If provided, the key will be prefixed
1404
+ * with this value.
1405
+ */
1406
+ prefix?: string;
1097
1407
  /**
1098
1408
  * If the QR code has pre-redirection.
1099
1409
  */
@@ -1110,6 +1420,10 @@ export interface QrcodeUpdateParams {
1110
1420
  * If the QR code uses link cloaking.
1111
1421
  */
1112
1422
  rewrite?: boolean;
1423
+ /**
1424
+ * Smart rules for conditional destination routing by request attribute.
1425
+ */
1426
+ rules?: Array<QrcodeUpdateParams.Rule> | null;
1113
1427
  /**
1114
1428
  * The shape of the design around the QR code (none, square, circle).
1115
1429
  */
@@ -1149,6 +1463,12 @@ export interface QrcodeUpdateParams {
1149
1463
  * The unique name of the tags assigned to the QR code (case insensitive).
1150
1464
  */
1151
1465
  tagNames?: string | Array<string>;
1466
+ /**
1467
+ * ID of a QR code (in the same project) marked as a template. Its customization
1468
+ * fields (colors, logo, pattern, shape, frame) will be applied to the new QR code
1469
+ * unless explicitly overridden.
1470
+ */
1471
+ templateId?: string | null;
1152
1472
  /**
1153
1473
  * The text of the QR code.
1154
1474
  */
@@ -1165,11 +1485,21 @@ export interface QrcodeUpdateParams {
1165
1485
  /**
1166
1486
  * The type of content of the QR code.
1167
1487
  */
1168
- type?: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog';
1488
+ type?: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'geo' | 'latlog' | 'pix' | 'whatsapp';
1169
1489
  /**
1170
1490
  * The destination URL of the QR code.
1171
1491
  */
1172
1492
  url?: string | null;
1493
+ /**
1494
+ * Whether this QR code should be used as a reusable template.
1495
+ */
1496
+ useAsTemplate?: boolean;
1497
+ /**
1498
+ * For dynamic QR codes with phone, email, or sms types: if true (default), shows
1499
+ * an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
1500
+ * URI.
1501
+ */
1502
+ useDisplayPage?: boolean;
1173
1503
  /**
1174
1504
  * The vCard information of the QR code.
1175
1505
  */
@@ -1182,7 +1512,13 @@ export interface QrcodeUpdateParams {
1182
1512
  */
1183
1513
  webhookIds?: Array<string> | null;
1184
1514
  /**
1185
- * The width of the QR code.
1515
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
1516
+ * prefilled message.
1517
+ */
1518
+ whatsapp?: QrcodeUpdateParams.Whatsapp | null;
1519
+ /**
1520
+ * Logo width in pixels. When omitted, a proportional size is used based on the QR
1521
+ * code size (about 10–20% depending on size).
1186
1522
  */
1187
1523
  width?: number;
1188
1524
  /**
@@ -1193,6 +1529,36 @@ export interface QrcodeUpdateParams {
1193
1529
  } | null;
1194
1530
  }
1195
1531
  export declare namespace QrcodeUpdateParams {
1532
+ /**
1533
+ * Typographic styles applied to the frame label text. Every key is enum-gated —
1534
+ * unknown keys or out-of-enum values are rejected to prevent SVG attribute
1535
+ * injection. All fields are optional; omitted keys fall back to the default
1536
+ * (normal weight, normal style, sans family, medium size).
1537
+ */
1538
+ interface FrameTextStyles {
1539
+ /**
1540
+ * Font family used for the frame label text. `sans` = Arial / Helvetica (default).
1541
+ * `sans-condensed` = Arial Narrow. `serif` = Georgia / Times New Roman.
1542
+ * `serif-elegant` = Palatino Linotype / Book Antiqua. `mono` = Courier New. Values
1543
+ * resolve to safe system font stacks on the rendered SVG.
1544
+ */
1545
+ family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono';
1546
+ /**
1547
+ * Font size preset for the frame label. `s` = 60 viewBox units, `m` = 89.1
1548
+ * (default), `l` = 120, `xl` = 150. Larger sizes grow the frame bar vertically to
1549
+ * fit. Extremely long text auto-shrinks to keep within 4 lines (floor 48).
1550
+ */
1551
+ size?: 's' | 'm' | 'l' | 'xl';
1552
+ /**
1553
+ * Font style of the frame label text. `italic` applies `font-style="italic"`.
1554
+ */
1555
+ style?: 'normal' | 'italic';
1556
+ /**
1557
+ * Font weight of the frame label text. `bold` renders at SVG `font-weight="700"`,
1558
+ * `normal` at `400`.
1559
+ */
1560
+ weight?: 'normal' | 'bold';
1561
+ }
1196
1562
  /**
1197
1563
  * Geographic segmentation information for the QR code in the JSON format
1198
1564
  * `{[COUNTRY]: https://example.com }`.
@@ -1449,802 +1815,23 @@ export declare namespace QrcodeUpdateParams {
1449
1815
  ZM?: string;
1450
1816
  ZW?: string;
1451
1817
  }
1452
- }
1453
- export interface QrcodeListParams {
1454
- /**
1455
- * The comments to filter by.
1456
- */
1457
- comments?: string;
1458
- /**
1459
- * Filter QR codes created after this date
1460
- */
1461
- createdAfter?: string;
1462
- /**
1463
- * Filter QR codes created before this date
1464
- */
1465
- createdBefore?: string;
1466
- /**
1467
- * The domain to filter the QR codes. For example, `ac.me`. If not provided, all QR
1468
- * codes of the project will be returned.
1469
- */
1470
- domain?: string;
1471
- /**
1472
- * Filter QR codes expiring after this date
1473
- */
1474
- expiresAfter?: string;
1475
- /**
1476
- * The date and time the QR code will expire in ISO-8601 format. Must be in the
1477
- * future.
1478
- */
1479
- expiresAt?: string | null;
1480
- /**
1481
- * Filter QR codes expiring before this date
1482
- */
1483
- expiresBefore?: string;
1484
- /**
1485
- * The folder ID to filter the QR codes by.
1486
- */
1487
- folderId?: string;
1488
- /**
1489
- * Filter by QR code format - static or dynamic
1490
- */
1491
- format?: 'static' | 'dynamic';
1492
- /**
1493
- * Filter QR codes with/without comments
1494
- */
1495
- hasComments?: boolean;
1496
- /**
1497
- * Filter QR codes with/without custom social media cards
1498
- */
1499
- hasCustomSocial?: boolean;
1500
- /**
1501
- * Filter QR codes with/without device targeting
1502
- */
1503
- hasDevice?: boolean;
1504
- /**
1505
- * Filter QR codes with/without expiration date
1506
- */
1507
- hasExpiration?: boolean;
1508
- /**
1509
- * Filter QR codes with/without geo-targeting
1510
- */
1511
- hasGeo?: boolean;
1512
- /**
1513
- * Filter QR codes with/without password protection
1514
- */
1515
- hasPassword?: boolean;
1516
- /**
1517
- * Filter QR codes with/without tags
1518
- */
1519
- hasTags?: boolean;
1520
- /**
1521
- * Filter QR codes with/without UTM parameters
1522
- */
1523
- hasUTM?: boolean;
1524
- /**
1525
- * The page number for pagination.
1526
- */
1527
- page?: number;
1528
- /**
1529
- * The number of items per page.
1530
- */
1531
- pageSize?: number;
1532
- /**
1533
- * The password to filter by.
1534
- */
1535
- password?: string;
1536
- /**
1537
- * The slug of the project to which the QR code belongs. For example, for
1538
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
1539
- */
1540
- projectSlug?: string;
1541
- /**
1542
- * Maximum number of scans
1543
- */
1544
- scansMax?: number;
1545
- /**
1546
- * Minimum number of scans
1547
- */
1548
- scansMin?: number;
1549
- /**
1550
- * The search term to filter the QR codes. The search term will be matched against
1551
- * the QR code slug and the destination URL.
1552
- */
1553
- search?: string;
1554
- /**
1555
- * If should include archived QR codes in the response. The default is `false` if
1556
- * not provided.
1557
- */
1558
- showArchived?: boolean;
1559
- /**
1560
- * The field to order the QR codes. The default is `createdAt`, and the order of
1561
- * sorting is always descending.
1562
- */
1563
- sort?: 'createdAt' | 'scans' | 'lastClicked';
1564
- /**
1565
- * @deprecated [DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned
1566
- * to the QR code.
1567
- */
1568
- tagId?: string;
1569
- /**
1570
- * The IDs of the tags to filter the QR codes.
1571
- */
1572
- tagIds?: string | Array<string>;
1573
- /**
1574
- * The unique name of the tags assigned to the QR code (case insensitive).
1575
- */
1576
- tagNames?: string | Array<string>;
1577
- /**
1578
- * If should include QR codes with conversion tracking enabled. The default is
1579
- * `false` if not provided.
1580
- */
1581
- trackConversion?: boolean;
1582
- /**
1583
- * Filter by QR code type
1584
- */
1585
- type?: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog' | 'pix';
1586
- /**
1587
- * The ID of the user to filter by.
1588
- */
1589
- userId?: string;
1590
- /**
1591
- * If should include tags in the response. The default is `false` if not provided.
1592
- */
1593
- withTags?: boolean;
1594
- }
1595
- export interface QrcodeCountParams {
1596
- /**
1597
- * The comments to filter by.
1598
- */
1599
- comments?: string;
1600
- /**
1601
- * Filter QR codes created after this date
1602
- */
1603
- createdAfter?: string;
1604
- /**
1605
- * Filter QR codes created before this date
1606
- */
1607
- createdBefore?: string;
1608
- /**
1609
- * The domain to filter the QR codes. For example, `ac.me`. If not provided, all QR
1610
- * codes of the project will be returned.
1611
- */
1612
- domain?: string;
1613
- /**
1614
- * Filter QR codes expiring after this date
1615
- */
1616
- expiresAfter?: string;
1617
- /**
1618
- * The date and time the QR code will expire in ISO-8601 format. Must be in the
1619
- * future.
1620
- */
1621
- expiresAt?: string | null;
1622
- /**
1623
- * Filter QR codes expiring before this date
1624
- */
1625
- expiresBefore?: string;
1626
- /**
1627
- * The folder ID to filter the QR codes by.
1628
- */
1629
- folderId?: string;
1630
- /**
1631
- * Filter by QR code format - static or dynamic
1632
- */
1633
- format?: 'static' | 'dynamic';
1634
- /**
1635
- * The field to group the QR codes.
1636
- */
1637
- groupBy?: 'domain' | 'tagId' | 'userId' | 'folderId';
1638
- /**
1639
- * Filter QR codes with/without comments
1640
- */
1641
- hasComments?: boolean;
1642
- /**
1643
- * Filter QR codes with/without custom social media cards
1644
- */
1645
- hasCustomSocial?: boolean;
1646
- /**
1647
- * Filter QR codes with/without device targeting
1648
- */
1649
- hasDevice?: boolean;
1650
- /**
1651
- * Filter QR codes with/without expiration date
1652
- */
1653
- hasExpiration?: boolean;
1654
- /**
1655
- * Filter QR codes with/without geo-targeting
1656
- */
1657
- hasGeo?: boolean;
1658
- /**
1659
- * Filter QR codes with/without password protection
1660
- */
1661
- hasPassword?: boolean;
1662
- /**
1663
- * Filter QR codes with/without tags
1664
- */
1665
- hasTags?: boolean;
1666
- /**
1667
- * Filter QR codes with/without UTM parameters
1668
- */
1669
- hasUTM?: boolean;
1670
- /**
1671
- * The password to filter by.
1672
- */
1673
- password?: string;
1674
- /**
1675
- * The slug of the project to which the QR code belongs. For example, for
1676
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
1677
- */
1678
- projectSlug?: string;
1679
- /**
1680
- * Maximum number of scans
1681
- */
1682
- scansMax?: number;
1683
- /**
1684
- * Minimum number of scans
1685
- */
1686
- scansMin?: number;
1687
- /**
1688
- * The search term to filter the QR codes. The search term will be matched against
1689
- * the QR code slug and the destination URL.
1690
- */
1691
- search?: string;
1692
- /**
1693
- * If should include archived QR codes in the response. The default is `false` if
1694
- * not provided.
1695
- */
1696
- showArchived?: boolean;
1697
- /**
1698
- * @deprecated [DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned
1699
- * to the QR code.
1700
- */
1701
- tagId?: string;
1702
- /**
1703
- * The IDs of the tags to filter the QR codes.
1704
- */
1705
- tagIds?: string | Array<string>;
1706
- /**
1707
- * The unique name of the tags assigned to the QR code (case insensitive).
1708
- */
1709
- tagNames?: string | Array<string>;
1710
- /**
1711
- * If should include QR codes with conversion tracking enabled. The default is
1712
- * `false` if not provided.
1713
- */
1714
- trackConversion?: boolean;
1715
- /**
1716
- * Filter by QR code type
1717
- */
1718
- type?: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog' | 'pix';
1719
- /**
1720
- * The ID of the user to filter by.
1721
- */
1722
- userId?: string;
1723
- /**
1724
- * If should include tags in the response. The default is `false` if not provided.
1725
- */
1726
- withTags?: boolean;
1727
- }
1728
- export interface QrcodeUpsertParams {
1729
- /**
1730
- * The unique ID of the folder assigned to the QR code.
1731
- */
1732
- folderId: string | null;
1733
- /**
1734
- * The type of content of the QR code.
1735
- */
1736
- type: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog';
1737
- /**
1738
- * The destination URL for Android for the QR code for device targeting Android.
1739
- */
1740
- android?: string | null;
1741
- /**
1742
- * If the QR code is archived.
1743
- */
1744
- archived?: boolean;
1745
- /**
1746
- * The background color of the QR code.
1747
- */
1748
- bgColor?: string;
1749
- /**
1750
- * The comments for the QR code.
1751
- */
1752
- comments?: string | null;
1753
- /**
1754
- * The static content of the QR code.
1755
- */
1756
- contentStatic?: string | null;
1757
- /**
1758
- * The cryptocurrency information of the QR code.
1759
- */
1760
- crypto?: {
1761
- [key: string]: string;
1762
- } | null;
1763
- /**
1764
- * The description of the QR code generated via `api.codeqr.io/metatags`. Will be
1765
- * used for custom link preview if `proxy` is true.
1766
- */
1767
- description?: string | null;
1768
- /**
1769
- * Allow search engines to index your QR code. The default is `false` if not
1770
- * provided. Learn more: https://codeqr.link/noindex
1771
- */
1772
- doIndex?: boolean;
1773
- /**
1774
- * The domain of the QR code. If not provided, the main domain of the project will
1775
- * be used (or `codeqr.link` if the project does not have domains).
1776
- */
1777
- domain?: string;
1778
- /**
1779
- * The email information of the QR code.
1780
- */
1781
- email?: {
1782
- [key: string]: string;
1783
- } | null;
1784
- /**
1785
- * If the QR code should have excavated areas.
1786
- */
1787
- excavate?: boolean;
1788
- /**
1789
- * The URL to redirect when the QR code expires.
1790
- */
1791
- expiredUrl?: string | null;
1792
- /**
1793
- * The date and time the QR code will expire in ISO-8601 format. Must be in the
1794
- * future.
1795
- */
1796
- expiresAt?: string | null;
1797
- /**
1798
- * This is the ID of the QR code in your database. If defined, it can be used to
1799
- * identify the QR code in the future. It must be prefixed with `ext_` when passed
1800
- * as a query parameter.
1801
- */
1802
- externalId?: string | null;
1803
- /**
1804
- * The FaceTime information of the QR code.
1805
- */
1806
- facetime?: {
1807
- [key: string]: string;
1808
- } | null;
1809
- /**
1810
- * The foreground color of the QR code.
1811
- */
1812
- fgColor?: string;
1813
- /**
1814
- * If the QR code is filled.
1815
- */
1816
- filled?: boolean;
1817
- /**
1818
- * If the QR code is flexible.
1819
- */
1820
- flexible?: boolean;
1821
- /**
1822
- * The type of frame of the QR code.
1823
- */
1824
- frame?: string;
1825
- /**
1826
- * The color of the frame of the QR code.
1827
- */
1828
- frameColor?: string;
1829
- /**
1830
- * The text of the frame of the QR code.
1831
- */
1832
- frameText?: string;
1833
- /**
1834
- * Geographic segmentation information for the QR code in the JSON format
1835
- * `{[COUNTRY]: https://example.com }`.
1836
- */
1837
- geo?: QrcodeUpsertParams.Geo | null;
1838
- /**
1839
- * The height of the QR code.
1840
- */
1841
- height?: number;
1842
- /**
1843
- * The image of the QR code generated via `api.codeqr.io/metatags`. Will be used
1844
- * for custom link preview if `proxy` is true.
1845
- */
1846
- image?: string | null;
1847
- /**
1848
- * The destination URL for iOS for the QR code for device targeting iOS.
1849
- */
1850
- ios?: string | null;
1851
- /**
1852
- * If the form is mandatory for the page.
1853
- */
1854
- isFormMandatory?: boolean;
1855
- /**
1856
- * The slug of the QR code. If not provided, a random slug of 7 characters will be
1857
- * generated.
1858
- */
1859
- key?: string;
1860
- /**
1861
- * The latitude and longitude information of the QR code.
1862
- */
1863
- latlog?: {
1864
- [key: string]: string;
1865
- } | null;
1866
- /**
1867
- * The level of error correction of the QR code.
1868
- */
1869
- level?: string;
1870
- /**
1871
- * The logo of the QR code.
1872
- */
1873
- logo?: string | null;
1874
- /**
1875
- * The ID of the page to redirect to before the QR code destination.
1876
- */
1877
- pageId?: string | null;
1878
- /**
1879
- * The URL of the page to redirect to before the QR code destination.
1880
- */
1881
- pageUrl?: string | null;
1882
- /**
1883
- * The password required to access the destination URL of the QR code.
1884
- */
1885
- password?: string | null;
1886
- /**
1887
- * The pattern of the modules of the QR code.
1888
- */
1889
- pattern?: string;
1890
- /**
1891
- * The phone number of the QR code.
1892
- */
1893
- phone?: string | null;
1894
- /**
1895
- * If the QR code has pre-redirection.
1896
- */
1897
- preRedirection?: boolean;
1898
- /**
1899
- * If the QR code uses the custom link preview feature.
1900
- */
1901
- proxy?: boolean;
1902
- /**
1903
- * If the statistics of the QR code are publicly accessible.
1904
- */
1905
- publicStats?: boolean;
1906
- /**
1907
- * If the QR code uses link cloaking.
1908
- */
1909
- rewrite?: boolean;
1910
- /**
1911
- * The shape of the design around the QR code (none, square, circle).
1912
- */
1913
- shape?: string;
1914
- /**
1915
- * If the logo should be displayed in the QR code.
1916
- */
1917
- showLogo?: boolean;
1918
- /**
1919
- * The size of the QR code.
1920
- */
1921
- size?: number;
1922
- /**
1923
- * The SMS information of the QR code.
1924
- */
1925
- sms?: {
1926
- [key: string]: string;
1927
- } | null;
1928
- /**
1929
- * The image URL of the QR code.
1930
- */
1931
- src?: string | null;
1932
- /**
1933
- * If the QR code is static.
1934
- */
1935
- static?: boolean;
1936
- /**
1937
- * @deprecated The unique ID of the tag assigned to the QR code. This field is
1938
- * deprecated – use `tagIds` instead.
1939
- */
1940
- tagId?: string | null;
1941
- /**
1942
- * The unique IDs of the tags assigned to the QR code.
1943
- */
1944
- tagIds?: string | Array<string>;
1945
- /**
1946
- * The unique name of the tags assigned to the QR code (case insensitive).
1947
- */
1948
- tagNames?: string | Array<string>;
1949
- /**
1950
- * The text of the QR code.
1951
- */
1952
- text?: string | null;
1953
- /**
1954
- * The title of the QR code generated via `api.codeqr.io/metatags`. Will be used
1955
- * for custom link preview if `proxy` is true.
1956
- */
1957
- title?: string | null;
1958
- /**
1959
- * If should track conversions for the QR code.
1960
- */
1961
- trackConversion?: boolean;
1962
- /**
1963
- * The destination URL of the QR code.
1964
- */
1965
- url?: string | null;
1966
- /**
1967
- * The vCard information of the QR code.
1968
- */
1969
- vcard?: {
1970
- [key: string]: string;
1971
- } | null;
1972
- /**
1973
- * An array of webhook IDs to trigger when the link is clicked. These webhooks will
1974
- * receive click event data.
1975
- */
1976
- webhookIds?: Array<string> | null;
1977
- /**
1978
- * The width of the QR code.
1979
- */
1980
- width?: number;
1981
- /**
1982
- * The WiFi information of the QR code.
1983
- */
1984
- wifi?: {
1985
- [key: string]: string;
1986
- } | null;
1987
- }
1988
- export declare namespace QrcodeUpsertParams {
1818
+ interface Rule {
1819
+ attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
1820
+ operator: 'equals' | 'not_equals';
1821
+ url: string;
1822
+ value: string;
1823
+ }
1989
1824
  /**
1990
- * Geographic segmentation information for the QR code in the JSON format
1991
- * `{[COUNTRY]: https://example.com }`.
1825
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
1826
+ * prefilled message.
1992
1827
  */
1993
- interface Geo {
1994
- AD?: string;
1995
- AE?: string;
1996
- AF?: string;
1997
- AG?: string;
1998
- AI?: string;
1999
- AL?: string;
2000
- AM?: string;
2001
- AO?: string;
2002
- AQ?: string;
2003
- AR?: string;
2004
- AS?: string;
2005
- AT?: string;
2006
- AU?: string;
2007
- AW?: string;
2008
- AX?: string;
2009
- AZ?: string;
2010
- BA?: string;
2011
- BB?: string;
2012
- BD?: string;
2013
- BE?: string;
2014
- BF?: string;
2015
- BG?: string;
2016
- BH?: string;
2017
- BI?: string;
2018
- BJ?: string;
2019
- BL?: string;
2020
- BM?: string;
2021
- BN?: string;
2022
- BO?: string;
2023
- BQ?: string;
2024
- BR?: string;
2025
- BS?: string;
2026
- BT?: string;
2027
- BV?: string;
2028
- BW?: string;
2029
- BY?: string;
2030
- BZ?: string;
2031
- CA?: string;
2032
- CC?: string;
2033
- CD?: string;
2034
- CF?: string;
2035
- CG?: string;
2036
- CH?: string;
2037
- CI?: string;
2038
- CK?: string;
2039
- CL?: string;
2040
- CM?: string;
2041
- CN?: string;
2042
- CO?: string;
2043
- CR?: string;
2044
- CU?: string;
2045
- CV?: string;
2046
- CW?: string;
2047
- CX?: string;
2048
- CY?: string;
2049
- CZ?: string;
2050
- DE?: string;
2051
- DJ?: string;
2052
- DK?: string;
2053
- DM?: string;
2054
- DO?: string;
2055
- DZ?: string;
2056
- EC?: string;
2057
- EE?: string;
2058
- EG?: string;
2059
- EH?: string;
2060
- ER?: string;
2061
- ES?: string;
2062
- ET?: string;
2063
- FI?: string;
2064
- FJ?: string;
2065
- FK?: string;
2066
- FM?: string;
2067
- FO?: string;
2068
- FR?: string;
2069
- GA?: string;
2070
- GB?: string;
2071
- GD?: string;
2072
- GE?: string;
2073
- GF?: string;
2074
- GG?: string;
2075
- GH?: string;
2076
- GI?: string;
2077
- GL?: string;
2078
- GM?: string;
2079
- GN?: string;
2080
- GP?: string;
2081
- GQ?: string;
2082
- GR?: string;
2083
- GS?: string;
2084
- GT?: string;
2085
- GU?: string;
2086
- GW?: string;
2087
- GY?: string;
2088
- HK?: string;
2089
- HM?: string;
2090
- HN?: string;
2091
- HR?: string;
2092
- HT?: string;
2093
- HU?: string;
2094
- ID?: string;
2095
- IE?: string;
2096
- IL?: string;
2097
- IM?: string;
2098
- IN?: string;
2099
- IO?: string;
2100
- IQ?: string;
2101
- IR?: string;
2102
- IS?: string;
2103
- IT?: string;
2104
- JE?: string;
2105
- JM?: string;
2106
- JO?: string;
2107
- JP?: string;
2108
- KE?: string;
2109
- KG?: string;
2110
- KH?: string;
2111
- KI?: string;
2112
- KM?: string;
2113
- KN?: string;
2114
- KP?: string;
2115
- KR?: string;
2116
- KW?: string;
2117
- KY?: string;
2118
- KZ?: string;
2119
- LA?: string;
2120
- LB?: string;
2121
- LC?: string;
2122
- LI?: string;
2123
- LK?: string;
2124
- LR?: string;
2125
- LS?: string;
2126
- LT?: string;
2127
- LU?: string;
2128
- LV?: string;
2129
- LY?: string;
2130
- MA?: string;
2131
- MC?: string;
2132
- MD?: string;
2133
- ME?: string;
2134
- MF?: string;
2135
- MG?: string;
2136
- MH?: string;
2137
- MK?: string;
2138
- ML?: string;
2139
- MM?: string;
2140
- MN?: string;
2141
- MO?: string;
2142
- MP?: string;
2143
- MQ?: string;
2144
- MR?: string;
2145
- MS?: string;
2146
- MT?: string;
2147
- MU?: string;
2148
- MV?: string;
2149
- MW?: string;
2150
- MX?: string;
2151
- MY?: string;
2152
- MZ?: string;
2153
- NA?: string;
2154
- NC?: string;
2155
- NE?: string;
2156
- NF?: string;
2157
- NG?: string;
2158
- NI?: string;
2159
- NL?: string;
2160
- NO?: string;
2161
- NP?: string;
2162
- NR?: string;
2163
- NU?: string;
2164
- NZ?: string;
2165
- OM?: string;
2166
- PA?: string;
2167
- PE?: string;
2168
- PF?: string;
2169
- PG?: string;
2170
- PH?: string;
2171
- PK?: string;
2172
- PL?: string;
2173
- PM?: string;
2174
- PN?: string;
2175
- PR?: string;
2176
- PS?: string;
2177
- PT?: string;
2178
- PW?: string;
2179
- PY?: string;
2180
- QA?: string;
2181
- RE?: string;
2182
- RO?: string;
2183
- RS?: string;
2184
- RU?: string;
2185
- RW?: string;
2186
- SA?: string;
2187
- SB?: string;
2188
- SC?: string;
2189
- SD?: string;
2190
- SE?: string;
2191
- SG?: string;
2192
- SH?: string;
2193
- SI?: string;
2194
- SJ?: string;
2195
- SK?: string;
2196
- SL?: string;
2197
- SM?: string;
2198
- SN?: string;
2199
- SO?: string;
2200
- SR?: string;
2201
- SS?: string;
2202
- ST?: string;
2203
- SV?: string;
2204
- SX?: string;
2205
- SY?: string;
2206
- SZ?: string;
2207
- TC?: string;
2208
- TD?: string;
2209
- TF?: string;
2210
- TG?: string;
2211
- TH?: string;
2212
- TJ?: string;
2213
- TK?: string;
2214
- TL?: string;
2215
- TM?: string;
2216
- TN?: string;
2217
- TO?: string;
2218
- TR?: string;
2219
- TT?: string;
2220
- TV?: string;
2221
- TW?: string;
2222
- TZ?: string;
2223
- UA?: string;
2224
- UG?: string;
2225
- UM?: string;
2226
- US?: string;
2227
- UY?: string;
2228
- UZ?: string;
2229
- VA?: string;
2230
- VC?: string;
2231
- VE?: string;
2232
- VG?: string;
2233
- VI?: string;
2234
- VN?: string;
2235
- VU?: string;
2236
- WF?: string;
2237
- WS?: string;
2238
- XK?: string;
2239
- YE?: string;
2240
- YT?: string;
2241
- ZA?: string;
2242
- ZM?: string;
2243
- ZW?: string;
1828
+ interface Whatsapp {
1829
+ number: string;
1830
+ message?: string;
2244
1831
  }
2245
1832
  }
2246
1833
  export declare namespace Qrcodes {
2247
- export { type QrCode as QrCode, type QrcodeListResponse as QrcodeListResponse, type QrcodeDeleteResponse as QrcodeDeleteResponse, type QrcodeCountResponse as QrcodeCountResponse, type QrcodeCreateParams as QrcodeCreateParams, type QrcodeRetrieveParams as QrcodeRetrieveParams, type QrcodeUpdateParams as QrcodeUpdateParams, type QrcodeListParams as QrcodeListParams, type QrcodeCountParams as QrcodeCountParams, type QrcodeUpsertParams as QrcodeUpsertParams, };
2248
- export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkDeleteResponse as BulkDeleteResponse, type BulkCreateParams as BulkCreateParams, type BulkDeleteParams as BulkDeleteParams, };
1834
+ export { type QrCode as QrCode, type QrcodeListResponse as QrcodeListResponse, type QrcodeDeleteResponse as QrcodeDeleteResponse, type QrcodeCreateParams as QrcodeCreateParams, type QrcodeListParams as QrcodeListParams, type QrcodeRetrieveParams as QrcodeRetrieveParams, type QrcodeUpdateParams as QrcodeUpdateParams, };
1835
+ export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams, };
2249
1836
  }
2250
1837
  //# sourceMappingURL=qrcodes.d.mts.map