@codeqr/ts 0.24.1 → 0.25.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 (129) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +1 -1
  3. package/README.md +28 -28
  4. package/client.d.mts +10 -10
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +10 -10
  7. package/client.d.ts.map +1 -1
  8. package/client.js +38 -38
  9. package/client.mjs +36 -36
  10. package/core/api-promise.d.mts +2 -2
  11. package/core/api-promise.d.ts +2 -2
  12. package/core/error.d.mts +2 -2
  13. package/core/error.d.ts +2 -2
  14. package/core/error.js +4 -4
  15. package/core/error.mjs +2 -2
  16. package/core/resource.d.mts +3 -3
  17. package/core/resource.d.ts +3 -3
  18. package/index.d.mts +3 -3
  19. package/index.d.ts +3 -3
  20. package/index.js +4 -4
  21. package/index.mjs +3 -3
  22. package/internal/parse.d.mts +2 -2
  23. package/internal/parse.d.ts +2 -2
  24. package/internal/shims.js +1 -1
  25. package/internal/shims.mjs +1 -1
  26. package/internal/uploads.d.mts +4 -4
  27. package/internal/uploads.d.ts +4 -4
  28. package/internal/utils/base64.js +2 -2
  29. package/internal/utils/base64.mjs +3 -3
  30. package/internal/utils/log.d.mts +3 -3
  31. package/internal/utils/log.d.ts +3 -3
  32. package/internal/utils/path.js +1 -1
  33. package/internal/utils/path.mjs +2 -2
  34. package/internal/utils/values.js +5 -5
  35. package/internal/utils/values.mjs +6 -6
  36. package/package.json +3 -3
  37. package/resources/analytics.d.mts +38 -5
  38. package/resources/analytics.d.mts.map +1 -1
  39. package/resources/analytics.d.ts +38 -5
  40. package/resources/analytics.d.ts.map +1 -1
  41. package/resources/domains.d.mts +26 -26
  42. package/resources/domains.d.mts.map +1 -1
  43. package/resources/domains.d.ts +26 -26
  44. package/resources/domains.d.ts.map +1 -1
  45. package/resources/domains.js +8 -8
  46. package/resources/domains.js.map +1 -1
  47. package/resources/domains.mjs +8 -8
  48. package/resources/domains.mjs.map +1 -1
  49. package/resources/events.d.mts +29 -72
  50. package/resources/events.d.mts.map +1 -1
  51. package/resources/events.d.ts +29 -72
  52. package/resources/events.d.ts.map +1 -1
  53. package/resources/index.d.mts +4 -4
  54. package/resources/index.d.mts.map +1 -1
  55. package/resources/index.d.ts +4 -4
  56. package/resources/index.d.ts.map +1 -1
  57. package/resources/links/bulk.d.mts +14 -5
  58. package/resources/links/bulk.d.mts.map +1 -1
  59. package/resources/links/bulk.d.ts +14 -5
  60. package/resources/links/bulk.d.ts.map +1 -1
  61. package/resources/links/index.d.mts +1 -1
  62. package/resources/links/index.d.mts.map +1 -1
  63. package/resources/links/index.d.ts +1 -1
  64. package/resources/links/index.d.ts.map +1 -1
  65. package/resources/links/links.d.mts +263 -237
  66. package/resources/links/links.d.mts.map +1 -1
  67. package/resources/links/links.d.ts +263 -237
  68. package/resources/links/links.d.ts.map +1 -1
  69. package/resources/links/links.js +21 -21
  70. package/resources/links/links.js.map +1 -1
  71. package/resources/links/links.mjs +21 -21
  72. package/resources/links/links.mjs.map +1 -1
  73. package/resources/qrcodes/bulk.d.mts +84 -17
  74. package/resources/qrcodes/bulk.d.mts.map +1 -1
  75. package/resources/qrcodes/bulk.d.ts +84 -17
  76. package/resources/qrcodes/bulk.d.ts.map +1 -1
  77. package/resources/qrcodes/index.d.mts +1 -1
  78. package/resources/qrcodes/index.d.mts.map +1 -1
  79. package/resources/qrcodes/index.d.ts +1 -1
  80. package/resources/qrcodes/index.d.ts.map +1 -1
  81. package/resources/qrcodes/qrcodes.d.mts +409 -223
  82. package/resources/qrcodes/qrcodes.d.mts.map +1 -1
  83. package/resources/qrcodes/qrcodes.d.ts +409 -223
  84. package/resources/qrcodes/qrcodes.d.ts.map +1 -1
  85. package/resources/qrcodes/qrcodes.js +11 -11
  86. package/resources/qrcodes/qrcodes.js.map +1 -1
  87. package/resources/qrcodes/qrcodes.mjs +11 -11
  88. package/resources/qrcodes/qrcodes.mjs.map +1 -1
  89. package/resources/tags.d.mts +12 -12
  90. package/resources/tags.d.mts.map +1 -1
  91. package/resources/tags.d.ts +12 -12
  92. package/resources/tags.d.ts.map +1 -1
  93. package/resources/tags.js +6 -6
  94. package/resources/tags.js.map +1 -1
  95. package/resources/tags.mjs +6 -6
  96. package/resources/tags.mjs.map +1 -1
  97. package/resources/track.d.mts +12 -0
  98. package/resources/track.d.mts.map +1 -1
  99. package/resources/track.d.ts +12 -0
  100. package/resources/track.d.ts.map +1 -1
  101. package/src/client.ts +21 -21
  102. package/src/core/api-promise.ts +4 -4
  103. package/src/core/error.ts +2 -2
  104. package/src/core/resource.ts +3 -3
  105. package/src/index.ts +3 -3
  106. package/src/internal/parse.ts +2 -2
  107. package/src/internal/shims.ts +1 -1
  108. package/src/internal/uploads.ts +5 -5
  109. package/src/internal/utils/base64.ts +3 -3
  110. package/src/internal/utils/log.ts +3 -3
  111. package/src/internal/utils/path.ts +2 -2
  112. package/src/internal/utils/values.ts +6 -6
  113. package/src/resources/analytics.ts +45 -5
  114. package/src/resources/domains.ts +37 -37
  115. package/src/resources/events.ts +48 -82
  116. package/src/resources/index.ts +4 -4
  117. package/src/resources/links/bulk.ts +23 -6
  118. package/src/resources/links/index.ts +1 -1
  119. package/src/resources/links/links.ts +328 -257
  120. package/src/resources/qrcodes/bulk.ts +103 -17
  121. package/src/resources/qrcodes/index.ts +1 -1
  122. package/src/resources/qrcodes/qrcodes.ts +629 -368
  123. package/src/resources/tags.ts +16 -16
  124. package/src/resources/track.ts +14 -0
  125. package/src/version.ts +1 -1
  126. package/version.d.mts +1 -1
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
  129. package/version.mjs +1 -1
@@ -86,7 +86,8 @@ export namespace BulkCreateParams {
86
86
  android?: string | null;
87
87
 
88
88
  /**
89
- * If the QR code is archived.
89
+ * If the QR code is archived. Archiving hides it from the default dashboard
90
+ * listing; the code keeps redirecting and keeps counting scans.
90
91
  */
91
92
  archived?: boolean;
92
93
 
@@ -101,15 +102,10 @@ export namespace BulkCreateParams {
101
102
  */
102
103
  comments?: string | null;
103
104
 
104
- /**
105
- * The static content of the QR code.
106
- */
107
- contentStatic?: string | null;
108
-
109
105
  /**
110
106
  * The cryptocurrency information of the QR code.
111
107
  */
112
- crypto?: { [key: string]: string } | null;
108
+ crypto?: Body.Crypto | null;
113
109
 
114
110
  /**
115
111
  * The description of the QR code generated via `api.codeqr.io/metatags`. Will be
@@ -264,7 +260,8 @@ export namespace BulkCreateParams {
264
260
  level?: string;
265
261
 
266
262
  /**
267
- * The logo of the QR code.
263
+ * @deprecated [DEPRECATED (use `src` instead)]: Not read by any renderer. Set
264
+ * `src` to an image uploaded via `POST /qrcodes/logo`.
268
265
  */
269
266
  logo?: string | null;
270
267
 
@@ -293,6 +290,11 @@ export namespace BulkCreateParams {
293
290
  */
294
291
  phone?: string | null;
295
292
 
293
+ /**
294
+ * The Pix information of the QR code (key, name, city, amount, description).
295
+ */
296
+ pix?: unknown;
297
+
296
298
  /**
297
299
  * The prefix for the randomly generated key. If provided, the key will be prefixed
298
300
  * with this value.
@@ -366,7 +368,8 @@ export namespace BulkCreateParams {
366
368
  tagIds?: string | Array<string>;
367
369
 
368
370
  /**
369
- * The unique name of the tags assigned to the QR code (case insensitive).
371
+ * The unique name of the tags assigned to the QR code (case insensitive). Ignored
372
+ * when `tagIds` is also present.
370
373
  */
371
374
  tagNames?: string | Array<string>;
372
375
 
@@ -404,9 +407,9 @@ export namespace BulkCreateParams {
404
407
  useAsTemplate?: boolean;
405
408
 
406
409
  /**
407
- * For dynamic QR codes with phone, email, or sms types: if true (default), shows
408
- * an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
409
- * URI.
410
+ * Kept for compatibility. A dynamic phone, email or SMS code is always served the
411
+ * display page, whose buttons open the dialler, the mail client or the SMS app;
412
+ * setting this to false changes nothing about what a scan gets.
410
413
  */
411
414
  useDisplayPage?: boolean;
412
415
 
@@ -415,6 +418,19 @@ export namespace BulkCreateParams {
415
418
  */
416
419
  vcard?: { [key: string]: string } | null;
417
420
 
421
+ /**
422
+ * Customizes the Google Wallet and Apple Wallet passes saved from this QR code.
423
+ * `name` and `logo` replace the workspace name and logo; left out (or `null`), the
424
+ * pass shows the workspace value. `barcodeText` sets the text under the QR code.
425
+ * On update: omit `walletPass` to keep the stored value, send `null` to clear it,
426
+ * or send an object to replace the stored one as a whole — fields missing from the
427
+ * object are cleared, not merged. Available on the Business plan and above,
428
+ * outside a trial: elsewhere a new value is refused with `403 forbidden` (`null`
429
+ * is always accepted) and a stored value is ignored, so the passes show the
430
+ * workspace name and logo.
431
+ */
432
+ walletPass?: Body.WalletPass | null;
433
+
418
434
  /**
419
435
  * An array of webhook IDs to trigger when the link is clicked. These webhooks will
420
436
  * receive click event data.
@@ -440,6 +456,27 @@ export namespace BulkCreateParams {
440
456
  }
441
457
 
442
458
  export namespace Body {
459
+ /**
460
+ * The cryptocurrency information of the QR code.
461
+ */
462
+ export interface Crypto {
463
+ /**
464
+ * The wallet address, as the display page reads it.
465
+ */
466
+ address?: string;
467
+
468
+ amount?: string;
469
+
470
+ cryptocurrency?: 'bitcoin' | 'bitcoincash' | 'ethereum' | 'litecoin' | 'dash' | 'dogecoin';
471
+
472
+ /**
473
+ * The wallet address.
474
+ */
475
+ email?: string;
476
+
477
+ message?: string;
478
+ }
479
+
443
480
  /**
444
481
  * Typographic styles applied to the frame label text. Every key is enum-gated —
445
482
  * unknown keys or out-of-enum values are rejected to prevent SVG attribute
@@ -981,20 +1018,69 @@ export namespace BulkCreateParams {
981
1018
  }
982
1019
 
983
1020
  export interface Rule {
984
- attribute:
1021
+ attribute?:
985
1022
  | 'device'
986
1023
  | 'country'
987
1024
  | 'utm_source'
988
1025
  | 'utm_medium'
989
1026
  | 'utm_campaign'
990
1027
  | 'referrer'
991
- | 'language';
1028
+ | 'language'
1029
+ | 'city'
1030
+ | 'region'
1031
+ | 'continent'
1032
+ | 'utm_term'
1033
+ | 'utm_content';
1034
+
1035
+ operator?: 'equals' | 'not_equals';
1036
+
1037
+ split?: Array<Rule.Split>;
992
1038
 
993
- operator: 'equals' | 'not_equals';
1039
+ url?: string;
994
1040
 
995
- url: string;
1041
+ value?: string;
1042
+ }
1043
+
1044
+ export namespace Rule {
1045
+ export interface Split {
1046
+ url: string;
996
1047
 
997
- value: string;
1048
+ weight: number;
1049
+ }
1050
+ }
1051
+
1052
+ /**
1053
+ * Customizes the Google Wallet and Apple Wallet passes saved from this QR code.
1054
+ * `name` and `logo` replace the workspace name and logo; left out (or `null`), the
1055
+ * pass shows the workspace value. `barcodeText` sets the text under the QR code.
1056
+ * On update: omit `walletPass` to keep the stored value, send `null` to clear it,
1057
+ * or send an object to replace the stored one as a whole — fields missing from the
1058
+ * object are cleared, not merged. Available on the Business plan and above,
1059
+ * outside a trial: elsewhere a new value is refused with `403 forbidden` (`null`
1060
+ * is always accepted) and a stored value is ignored, so the passes show the
1061
+ * workspace name and logo.
1062
+ */
1063
+ export interface WalletPass {
1064
+ /**
1065
+ * The text shown under the QR code on the pass, such as the member's name or card
1066
+ * number. The QR code's title is never shown there. Trimmed; 1 to 40 characters.
1067
+ */
1068
+ barcodeText?: string | null;
1069
+
1070
+ /**
1071
+ * The logo shown on the pass, in place of the workspace logo. Either the URL of an
1072
+ * image uploaded via `POST /qrcodes/logo`, or any https URL serving a PNG, JPEG or
1073
+ * WebP image of up to 2 MB without a redirect. An external image is copied to
1074
+ * CodeQR storage when the QR code is written, and the response returns the URL of
1075
+ * the copy, not the URL sent.
1076
+ */
1077
+ logo?: string | null;
1078
+
1079
+ /**
1080
+ * The name shown at the top of the pass, in place of the workspace name. Trimmed;
1081
+ * 1 to 64 characters.
1082
+ */
1083
+ name?: string | null;
998
1084
  }
999
1085
 
1000
1086
  /**
@@ -7,7 +7,7 @@ export {
7
7
  type QrcodeListResponse,
8
8
  type QrcodeDeleteResponse,
9
9
  type QrcodeCreateParams,
10
- type QrcodeListParams,
11
10
  type QrcodeRetrieveParams,
12
11
  type QrcodeUpdateParams,
12
+ type QrcodeListParams,
13
13
  } from './qrcodes';