@codeqr/ts 0.19.3 → 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 (202) hide show
  1. package/CHANGELOG.md +278 -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
@@ -15,6 +15,15 @@ export declare class Qrcodes extends APIResource {
15
15
  * ```
16
16
  */
17
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>;
18
27
  /**
19
28
  * Retrieve the info for a QR Code.
20
29
  *
@@ -38,15 +47,6 @@ export declare class Qrcodes extends APIResource {
38
47
  * ```
39
48
  */
40
49
  update(qrcodeID: string, body?: QrcodeUpdateParams | null | undefined, options?: RequestOptions): APIPromise<QrCode>;
41
- /**
42
- * Retrieve a paginated list of QR Codes for the authenticated workspace.
43
- *
44
- * @example
45
- * ```ts
46
- * const qrCodes = await client.qrcodes.list();
47
- * ```
48
- */
49
- list(query?: QrcodeListParams | null | undefined, options?: RequestOptions): APIPromise<QrcodeListResponse>;
50
50
  /**
51
51
  * Delete a QR Code for the authenticated workspace.
52
52
  *
@@ -234,6 +234,10 @@ export interface QrCode {
234
234
  * If the QR code uses link cloaking.
235
235
  */
236
236
  rewrite: boolean;
237
+ /**
238
+ * Smart rules for conditional destination routing by request attribute.
239
+ */
240
+ rules: Array<QrCode.Rule> | null;
237
241
  /**
238
242
  * The amount of the sale generated by the link.
239
243
  */
@@ -293,7 +297,7 @@ export interface QrCode {
293
297
  /**
294
298
  * The type of the QR code.
295
299
  */
296
- 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';
297
301
  /**
298
302
  * The date and time the QR code was updated last.
299
303
  */
@@ -338,6 +342,11 @@ export interface QrCode {
338
342
  vcard: {
339
343
  [key: string]: string;
340
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;
341
350
  /**
342
351
  * The width of the QR code.
343
352
  */
@@ -348,6 +357,13 @@ export interface QrCode {
348
357
  wifi: {
349
358
  [key: string]: string;
350
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;
351
367
  /**
352
368
  * The ID of the page to redirect to before the QR code destination.
353
369
  */
@@ -357,6 +373,34 @@ export interface QrCode {
357
373
  */
358
374
  pageUrl?: string | null;
359
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
+ }
360
404
  export type QrcodeListResponse = Array<QrCode>;
361
405
  export interface QrcodeDeleteResponse {
362
406
  /**
@@ -368,7 +412,7 @@ export interface QrcodeCreateParams {
368
412
  /**
369
413
  * The type of content of the QR code.
370
414
  */
371
- 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';
372
416
  /**
373
417
  * The destination URL for Android for the QR code for device targeting Android.
374
418
  */
@@ -378,7 +422,8 @@ export interface QrcodeCreateParams {
378
422
  */
379
423
  archived?: boolean;
380
424
  /**
381
- * 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.
382
427
  */
383
428
  bgColor?: string;
384
429
  /**
@@ -442,7 +487,8 @@ export interface QrcodeCreateParams {
442
487
  [key: string]: string;
443
488
  } | null;
444
489
  /**
445
- * 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.
446
492
  */
447
493
  fgColor?: string;
448
494
  /**
@@ -470,14 +516,24 @@ export interface QrcodeCreateParams {
470
516
  */
471
517
  frameColor?: string;
472
518
  /**
473
- * 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.
474
522
  */
475
523
  frameText?: string;
476
524
  /**
477
- * The color of the text inside the frame (hex or CSS keyword). When not set, a
478
- * contrasting color is derived from the frame color.
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`.
479
528
  */
480
- frameTextColor?: string;
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;
481
537
  /**
482
538
  * Geographic segmentation information for the QR code in the JSON format
483
539
  * `{[COUNTRY]: https://example.com }`.
@@ -540,6 +596,11 @@ export interface QrcodeCreateParams {
540
596
  * The phone number of the QR code.
541
597
  */
542
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;
543
604
  /**
544
605
  * If the QR code has pre-redirection.
545
606
  */
@@ -556,6 +617,10 @@ export interface QrcodeCreateParams {
556
617
  * If the QR code uses link cloaking.
557
618
  */
558
619
  rewrite?: boolean;
620
+ /**
621
+ * Smart rules for conditional destination routing by request attribute.
622
+ */
623
+ rules?: Array<QrcodeCreateParams.Rule> | null;
559
624
  /**
560
625
  * The shape of the design around the QR code (none, square, circle).
561
626
  */
@@ -595,6 +660,12 @@ export interface QrcodeCreateParams {
595
660
  * The unique name of the tags assigned to the QR code (case insensitive).
596
661
  */
597
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;
598
669
  /**
599
670
  * The text of the QR code.
600
671
  */
@@ -633,6 +704,11 @@ export interface QrcodeCreateParams {
633
704
  * receive click event data.
634
705
  */
635
706
  webhookIds?: Array<string> | null;
707
+ /**
708
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
709
+ * prefilled message.
710
+ */
711
+ whatsapp?: QrcodeCreateParams.Whatsapp | null;
636
712
  /**
637
713
  * Logo width in pixels. When omitted, a proportional size is used based on the QR
638
714
  * code size (about 10–20% depending on size).
@@ -646,6 +722,36 @@ export interface QrcodeCreateParams {
646
722
  } | null;
647
723
  }
648
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
+ }
649
755
  /**
650
756
  * Geographic segmentation information for the QR code in the JSON format
651
757
  * `{[COUNTRY]: https://example.com }`.
@@ -902,6 +1008,186 @@ export declare namespace QrcodeCreateParams {
902
1008
  ZM?: string;
903
1009
  ZW?: string;
904
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;
905
1191
  }
906
1192
  export interface QrcodeRetrieveParams {
907
1193
  /**
@@ -939,7 +1225,8 @@ export interface QrcodeUpdateParams {
939
1225
  */
940
1226
  archived?: boolean;
941
1227
  /**
942
- * 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.
943
1230
  */
944
1231
  bgColor?: string;
945
1232
  /**
@@ -1003,7 +1290,8 @@ export interface QrcodeUpdateParams {
1003
1290
  [key: string]: string;
1004
1291
  } | null;
1005
1292
  /**
1006
- * 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.
1007
1295
  */
1008
1296
  fgColor?: string;
1009
1297
  /**
@@ -1031,14 +1319,24 @@ export interface QrcodeUpdateParams {
1031
1319
  */
1032
1320
  frameColor?: string;
1033
1321
  /**
1034
- * 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.
1035
1325
  */
1036
1326
  frameText?: string;
1037
1327
  /**
1038
- * The color of the text inside the frame (hex or CSS keyword). When not set, a
1039
- * contrasting color is derived from the frame color.
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).
1040
1338
  */
1041
- frameTextColor?: string;
1339
+ frameTextStyles?: QrcodeUpdateParams.FrameTextStyles | null;
1042
1340
  /**
1043
1341
  * Geographic segmentation information for the QR code in the JSON format
1044
1342
  * `{[COUNTRY]: https://example.com }`.
@@ -1101,6 +1399,11 @@ export interface QrcodeUpdateParams {
1101
1399
  * The phone number of the QR code.
1102
1400
  */
1103
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;
1104
1407
  /**
1105
1408
  * If the QR code has pre-redirection.
1106
1409
  */
@@ -1117,6 +1420,10 @@ export interface QrcodeUpdateParams {
1117
1420
  * If the QR code uses link cloaking.
1118
1421
  */
1119
1422
  rewrite?: boolean;
1423
+ /**
1424
+ * Smart rules for conditional destination routing by request attribute.
1425
+ */
1426
+ rules?: Array<QrcodeUpdateParams.Rule> | null;
1120
1427
  /**
1121
1428
  * The shape of the design around the QR code (none, square, circle).
1122
1429
  */
@@ -1156,6 +1463,12 @@ export interface QrcodeUpdateParams {
1156
1463
  * The unique name of the tags assigned to the QR code (case insensitive).
1157
1464
  */
1158
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;
1159
1472
  /**
1160
1473
  * The text of the QR code.
1161
1474
  */
@@ -1172,7 +1485,7 @@ export interface QrcodeUpdateParams {
1172
1485
  /**
1173
1486
  * The type of content of the QR code.
1174
1487
  */
1175
- 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';
1176
1489
  /**
1177
1490
  * The destination URL of the QR code.
1178
1491
  */
@@ -1198,6 +1511,11 @@ export interface QrcodeUpdateParams {
1198
1511
  * receive click event data.
1199
1512
  */
1200
1513
  webhookIds?: Array<string> | null;
1514
+ /**
1515
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
1516
+ * prefilled message.
1517
+ */
1518
+ whatsapp?: QrcodeUpdateParams.Whatsapp | null;
1201
1519
  /**
1202
1520
  * Logo width in pixels. When omitted, a proportional size is used based on the QR
1203
1521
  * code size (about 10–20% depending on size).
@@ -1211,6 +1529,36 @@ export interface QrcodeUpdateParams {
1211
1529
  } | null;
1212
1530
  }
1213
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
+ }
1214
1562
  /**
1215
1563
  * Geographic segmentation information for the QR code in the JSON format
1216
1564
  * `{[COUNTRY]: https://example.com }`.
@@ -1467,155 +1815,23 @@ export declare namespace QrcodeUpdateParams {
1467
1815
  ZM?: string;
1468
1816
  ZW?: string;
1469
1817
  }
1470
- }
1471
- export interface QrcodeListParams {
1472
- /**
1473
- * The comments to filter by.
1474
- */
1475
- comments?: string;
1476
- /**
1477
- * Filter QR codes created after this date
1478
- */
1479
- createdAfter?: string;
1480
- /**
1481
- * Filter QR codes created before this date
1482
- */
1483
- createdBefore?: string;
1484
- /**
1485
- * The domain to filter the QR codes. For example, `ac.me`. If not provided, all QR
1486
- * codes of the project will be returned.
1487
- */
1488
- domain?: string;
1489
- /**
1490
- * Filter QR codes expiring after this date
1491
- */
1492
- expiresAfter?: string;
1493
- /**
1494
- * The date and time the QR code will expire in ISO-8601 format. Must be in the
1495
- * future.
1496
- */
1497
- expiresAt?: string | null;
1498
- /**
1499
- * Filter QR codes expiring before this date
1500
- */
1501
- expiresBefore?: string;
1502
- /**
1503
- * The folder ID to filter the QR codes by.
1504
- */
1505
- folderId?: string;
1506
- /**
1507
- * Filter by QR code format - static or dynamic
1508
- */
1509
- format?: 'static' | 'dynamic';
1510
- /**
1511
- * Filter QR codes with/without comments
1512
- */
1513
- hasComments?: boolean;
1514
- /**
1515
- * Filter QR codes with/without custom social media cards
1516
- */
1517
- hasCustomSocial?: boolean;
1518
- /**
1519
- * Filter QR codes with/without device targeting
1520
- */
1521
- hasDevice?: boolean;
1522
- /**
1523
- * Filter QR codes with/without expiration date
1524
- */
1525
- hasExpiration?: boolean;
1526
- /**
1527
- * Filter QR codes with/without geo-targeting
1528
- */
1529
- hasGeo?: boolean;
1530
- /**
1531
- * Filter QR codes with/without password protection
1532
- */
1533
- hasPassword?: boolean;
1534
- /**
1535
- * Filter QR codes with/without tags
1536
- */
1537
- hasTags?: boolean;
1538
- /**
1539
- * Filter QR codes with/without UTM parameters
1540
- */
1541
- hasUTM?: boolean;
1542
- /**
1543
- * The page number for pagination.
1544
- */
1545
- page?: number;
1546
- /**
1547
- * The number of items per page.
1548
- */
1549
- pageSize?: number;
1550
- /**
1551
- * The password to filter by.
1552
- */
1553
- password?: string;
1554
- /**
1555
- * The slug of the project to which the QR code belongs. For example, for
1556
- * `app.codeqr.io/acme`, the projectSlug is `acme`.
1557
- */
1558
- projectSlug?: string;
1559
- /**
1560
- * Maximum number of scans
1561
- */
1562
- scansMax?: number;
1563
- /**
1564
- * Minimum number of scans
1565
- */
1566
- scansMin?: number;
1567
- /**
1568
- * The search term to filter the QR codes. The search term will be matched against
1569
- * the QR code slug and the destination URL.
1570
- */
1571
- search?: string;
1572
- /**
1573
- * If should include archived QR codes in the response. The default is `false` if
1574
- * not provided.
1575
- */
1576
- showArchived?: boolean;
1577
- /**
1578
- * The field to order the QR codes. The default is `createdAt`, and the order of
1579
- * sorting is always descending.
1580
- */
1581
- sort?: 'createdAt' | 'scans' | 'lastClicked';
1582
- /**
1583
- * @deprecated [DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned
1584
- * to the QR code.
1585
- */
1586
- tagId?: string;
1587
- /**
1588
- * The IDs of the tags to filter the QR codes.
1589
- */
1590
- tagIds?: string | Array<string>;
1591
- /**
1592
- * The unique name of the tags assigned to the QR code (case insensitive).
1593
- */
1594
- tagNames?: string | Array<string>;
1595
- /**
1596
- * If should include QR codes with conversion tracking enabled. The default is
1597
- * `false` if not provided.
1598
- */
1599
- trackConversion?: boolean;
1600
- /**
1601
- * Filter by QR code type
1602
- */
1603
- type?: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog' | 'pix';
1604
- /**
1605
- * Filter QR codes marked as templates.
1606
- */
1607
- useAsTemplate?: boolean;
1608
- /**
1609
- * The ID of the user to filter by.
1610
- */
1611
- userId?: string;
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
+ }
1612
1824
  /**
1613
- * If should include tags in the response. The default is `false` if not provided.
1825
+ * The WhatsApp click-to-chat info: E.164 number (digits only) and optional
1826
+ * prefilled message.
1614
1827
  */
1615
- withTags?: boolean;
1828
+ interface Whatsapp {
1829
+ number: string;
1830
+ message?: string;
1831
+ }
1616
1832
  }
1617
1833
  export declare namespace Qrcodes {
1618
- export { type QrCode as QrCode, type QrcodeListResponse as QrcodeListResponse, type QrcodeDeleteResponse as QrcodeDeleteResponse, type QrcodeCreateParams as QrcodeCreateParams, type QrcodeRetrieveParams as QrcodeRetrieveParams, type QrcodeUpdateParams as QrcodeUpdateParams, type QrcodeListParams as QrcodeListParams, };
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, };
1619
1835
  export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams, };
1620
1836
  }
1621
1837
  //# sourceMappingURL=qrcodes.d.ts.map