@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.
- package/CHANGELOG.md +509 -0
- package/LICENSE +1 -1
- package/README.md +12 -1
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +8 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -7
- package/client.d.ts.map +1 -1
- package/client.js +43 -10
- package/client.js.map +1 -1
- package/client.mjs +43 -10
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts +1 -0
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/internal/utils.mjs.map +1 -1
- package/package.json +12 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/analytics.d.mts +23 -3
- package/resources/analytics.d.mts.map +1 -1
- package/resources/analytics.d.ts +23 -3
- package/resources/analytics.d.ts.map +1 -1
- package/resources/analytics.mjs.map +1 -1
- package/resources/domains.d.mts +27 -27
- package/resources/domains.d.mts.map +1 -1
- package/resources/domains.d.ts +27 -27
- package/resources/domains.d.ts.map +1 -1
- package/resources/domains.js +8 -8
- package/resources/domains.js.map +1 -1
- package/resources/domains.mjs +8 -8
- package/resources/domains.mjs.map +1 -1
- package/resources/events.d.mts +53 -137
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +53 -137
- package/resources/events.d.ts.map +1 -1
- package/resources/events.mjs.map +1 -1
- package/resources/index.d.mts +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/links/bulk.d.mts +16 -26
- package/resources/links/bulk.d.mts.map +1 -1
- package/resources/links/bulk.d.ts +16 -26
- package/resources/links/bulk.d.ts.map +1 -1
- package/resources/links/bulk.js +0 -14
- package/resources/links/bulk.js.map +1 -1
- package/resources/links/bulk.mjs +0 -14
- package/resources/links/bulk.mjs.map +1 -1
- package/resources/links/index.d.mts +2 -2
- package/resources/links/index.d.mts.map +1 -1
- package/resources/links/index.d.ts +2 -2
- package/resources/links/index.d.ts.map +1 -1
- package/resources/links/index.js.map +1 -1
- package/resources/links/index.mjs +1 -1
- package/resources/links/index.mjs.map +1 -1
- package/resources/links/links.d.mts +232 -988
- package/resources/links/links.d.mts.map +1 -1
- package/resources/links/links.d.ts +232 -988
- package/resources/links/links.d.ts.map +1 -1
- package/resources/links/links.js +16 -42
- package/resources/links/links.js.map +1 -1
- package/resources/links/links.mjs +16 -42
- package/resources/links/links.mjs.map +1 -1
- package/resources/links.d.mts.map +1 -1
- package/resources/links.d.ts.map +1 -1
- package/resources/links.mjs.map +1 -1
- package/resources/projects.d.mts +0 -4
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts +0 -4
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.js +0 -7
- package/resources/projects.js.map +1 -1
- package/resources/projects.mjs +0 -7
- package/resources/projects.mjs.map +1 -1
- package/resources/qrcodes/bulk.d.mts +111 -38
- package/resources/qrcodes/bulk.d.mts.map +1 -1
- package/resources/qrcodes/bulk.d.ts +111 -38
- package/resources/qrcodes/bulk.d.ts.map +1 -1
- package/resources/qrcodes/bulk.js +0 -14
- package/resources/qrcodes/bulk.js.map +1 -1
- package/resources/qrcodes/bulk.mjs +0 -14
- package/resources/qrcodes/bulk.mjs.map +1 -1
- package/resources/qrcodes/index.d.mts +2 -2
- package/resources/qrcodes/index.d.mts.map +1 -1
- package/resources/qrcodes/index.d.ts +2 -2
- package/resources/qrcodes/index.d.ts.map +1 -1
- package/resources/qrcodes/index.js.map +1 -1
- package/resources/qrcodes/index.mjs +1 -1
- package/resources/qrcodes/index.mjs.map +1 -1
- package/resources/qrcodes/qrcodes.d.mts +442 -855
- package/resources/qrcodes/qrcodes.d.mts.map +1 -1
- package/resources/qrcodes/qrcodes.d.ts +442 -855
- package/resources/qrcodes/qrcodes.d.ts.map +1 -1
- package/resources/qrcodes/qrcodes.js +12 -42
- package/resources/qrcodes/qrcodes.js.map +1 -1
- package/resources/qrcodes/qrcodes.mjs +12 -42
- package/resources/qrcodes/qrcodes.mjs.map +1 -1
- package/resources/qrcodes.d.mts.map +1 -1
- package/resources/qrcodes.d.ts.map +1 -1
- package/resources/qrcodes.mjs.map +1 -1
- package/resources/tags.d.mts +19 -15
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +19 -15
- package/resources/tags.d.ts.map +1 -1
- package/resources/tags.js +7 -7
- package/resources/tags.js.map +1 -1
- package/resources/tags.mjs +7 -7
- package/resources/tags.mjs.map +1 -1
- package/resources/track.d.mts +10 -9
- package/resources/track.d.mts.map +1 -1
- package/resources/track.d.ts +10 -9
- package/resources/track.d.ts.map +1 -1
- package/resources/track.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +53 -29
- package/src/internal/parse.ts +6 -0
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/utils/log.ts +2 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/analytics.ts +33 -3
- package/src/resources/domains.ts +38 -38
- package/src/resources/events.ts +90 -143
- package/src/resources/index.ts +4 -10
- package/src/resources/links/bulk.ts +30 -37
- package/src/resources/links/index.ts +2 -11
- package/src/resources/links/links.ts +227 -1538
- package/src/resources/projects.ts +0 -8
- package/src/resources/qrcodes/bulk.ts +151 -50
- package/src/resources/qrcodes/index.ts +2 -11
- package/src/resources/qrcodes/qrcodes.ts +405 -1083
- package/src/resources/tags.ts +23 -18
- package/src/resources/track.ts +10 -9
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as TagsAPI from '../tags';
|
|
5
5
|
import * as BulkAPI from './bulk';
|
|
6
|
-
import { Bulk, BulkCreateParams, BulkCreateResponse
|
|
6
|
+
import { Bulk, BulkCreateParams, BulkCreateResponse } from './bulk';
|
|
7
7
|
import { APIPromise } from '../../core/api-promise';
|
|
8
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
9
|
import { path } from '../../internal/utils/path';
|
|
@@ -16,16 +16,28 @@ export class Qrcodes extends APIResource {
|
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts
|
|
19
|
-
* const qrCode = await client.qrcodes.create({
|
|
20
|
-
* folderId: 'folderId',
|
|
21
|
-
* type: 'url',
|
|
22
|
-
* });
|
|
19
|
+
* const qrCode = await client.qrcodes.create({ type: 'url' });
|
|
23
20
|
* ```
|
|
24
21
|
*/
|
|
25
22
|
create(body: QrcodeCreateParams, options?: RequestOptions): APIPromise<QrCode> {
|
|
26
23
|
return this._client.post('/qrcodes', { body, ...options });
|
|
27
24
|
}
|
|
28
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a paginated list of QR Codes for the authenticated workspace.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const qrCodes = await client.qrcodes.list();
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(
|
|
35
|
+
query: QrcodeListParams | null | undefined = {},
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<QrcodeListResponse> {
|
|
38
|
+
return this._client.get('/qrcodes', { query, ...options });
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
/**
|
|
30
42
|
* Retrieve the info for a QR Code.
|
|
31
43
|
*
|
|
@@ -59,21 +71,6 @@ export class Qrcodes extends APIResource {
|
|
|
59
71
|
return this._client.put(path`/qrcodes/${qrcodeID}`, { body, ...options });
|
|
60
72
|
}
|
|
61
73
|
|
|
62
|
-
/**
|
|
63
|
-
* Retrieve a paginated list of QR Codes for the authenticated workspace.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* const qrCodes = await client.qrcodes.list();
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
list(
|
|
71
|
-
query: QrcodeListParams | null | undefined = {},
|
|
72
|
-
options?: RequestOptions,
|
|
73
|
-
): APIPromise<QrcodeListResponse> {
|
|
74
|
-
return this._client.get('/qrcodes', { query, ...options });
|
|
75
|
-
}
|
|
76
|
-
|
|
77
74
|
/**
|
|
78
75
|
* Delete a QR Code for the authenticated workspace.
|
|
79
76
|
*
|
|
@@ -85,38 +82,6 @@ export class Qrcodes extends APIResource {
|
|
|
85
82
|
delete(qrcodeID: string, options?: RequestOptions): APIPromise<QrcodeDeleteResponse> {
|
|
86
83
|
return this._client.delete(path`/qrcodes/${qrcodeID}`, options);
|
|
87
84
|
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Retrieve the number of QR Codes for the authenticated workspace.
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```ts
|
|
94
|
-
* const response = await client.qrcodes.count();
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
count(
|
|
98
|
-
query: QrcodeCountParams | null | undefined = {},
|
|
99
|
-
options?: RequestOptions,
|
|
100
|
-
): APIPromise<QrcodeCountResponse> {
|
|
101
|
-
return this._client.get('/qrcodes/count', { query, ...options });
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Upsert a QR Code for the authenticated workspace by its URL. If a QR Code with
|
|
106
|
-
* the same URL already exists, return it (or update it if there are any changes).
|
|
107
|
-
* Otherwise, a new QR Code will be created.
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```ts
|
|
111
|
-
* const qrCode = await client.qrcodes.upsert({
|
|
112
|
-
* folderId: 'folderId',
|
|
113
|
-
* type: 'url',
|
|
114
|
-
* });
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
upsert(body: QrcodeUpsertParams, options?: RequestOptions): APIPromise<QrCode> {
|
|
118
|
-
return this._client.patch('/qrcodes/upsert', { body, ...options });
|
|
119
|
-
}
|
|
120
85
|
}
|
|
121
86
|
|
|
122
87
|
export interface QrCode {
|
|
@@ -326,6 +291,11 @@ export interface QrCode {
|
|
|
326
291
|
*/
|
|
327
292
|
rewrite: boolean;
|
|
328
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
296
|
+
*/
|
|
297
|
+
rules: Array<QrCode.Rule> | null;
|
|
298
|
+
|
|
329
299
|
/**
|
|
330
300
|
* The amount of the sale generated by the link.
|
|
331
301
|
*/
|
|
@@ -406,8 +376,10 @@ export interface QrCode {
|
|
|
406
376
|
| 'crypto'
|
|
407
377
|
| 'sms'
|
|
408
378
|
| 'facetime'
|
|
379
|
+
| 'geo'
|
|
409
380
|
| 'latlog'
|
|
410
|
-
| 'pix'
|
|
381
|
+
| 'pix'
|
|
382
|
+
| 'whatsapp';
|
|
411
383
|
|
|
412
384
|
/**
|
|
413
385
|
* The date and time the QR code was updated last.
|
|
@@ -419,6 +391,13 @@ export interface QrCode {
|
|
|
419
391
|
*/
|
|
420
392
|
url: string | null;
|
|
421
393
|
|
|
394
|
+
/**
|
|
395
|
+
* For dynamic QR codes with phone, email, or sms types: if true (default), shows
|
|
396
|
+
* an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
|
|
397
|
+
* URI.
|
|
398
|
+
*/
|
|
399
|
+
useDisplayPage: boolean;
|
|
400
|
+
|
|
422
401
|
/**
|
|
423
402
|
* The ID of the user that created the QR code.
|
|
424
403
|
*/
|
|
@@ -454,6 +433,12 @@ export interface QrCode {
|
|
|
454
433
|
*/
|
|
455
434
|
vcard: { [key: string]: string } | null;
|
|
456
435
|
|
|
436
|
+
/**
|
|
437
|
+
* The WhatsApp click-to-chat info: E.164 number (digits only) and optional
|
|
438
|
+
* prefilled message.
|
|
439
|
+
*/
|
|
440
|
+
whatsapp: QrCode.Whatsapp | null;
|
|
441
|
+
|
|
457
442
|
/**
|
|
458
443
|
* The width of the QR code.
|
|
459
444
|
*/
|
|
@@ -464,6 +449,14 @@ export interface QrCode {
|
|
|
464
449
|
*/
|
|
465
450
|
wifi: { [key: string]: string } | null;
|
|
466
451
|
|
|
452
|
+
/**
|
|
453
|
+
* Typographic styles applied to the frame label text. Object with optional keys:
|
|
454
|
+
* `weight` (`normal` | `bold`), `style` (`normal` | `italic`), `family` (`sans` |
|
|
455
|
+
* `sans-condensed` | `serif` | `serif-elegant` | `mono`), `size` (`s` | `m` | `l`
|
|
456
|
+
* | `xl`). Every field is enum-gated on write; omitted keys render with defaults.
|
|
457
|
+
*/
|
|
458
|
+
frameTextStyles?: QrCode.FrameTextStyles | null;
|
|
459
|
+
|
|
467
460
|
/**
|
|
468
461
|
* The ID of the page to redirect to before the QR code destination.
|
|
469
462
|
*/
|
|
@@ -475,6 +468,44 @@ export interface QrCode {
|
|
|
475
468
|
pageUrl?: string | null;
|
|
476
469
|
}
|
|
477
470
|
|
|
471
|
+
export namespace QrCode {
|
|
472
|
+
export interface Rule {
|
|
473
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
474
|
+
|
|
475
|
+
operator: 'equals' | 'not_equals';
|
|
476
|
+
|
|
477
|
+
url: string;
|
|
478
|
+
|
|
479
|
+
value: string;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The WhatsApp click-to-chat info: E.164 number (digits only) and optional
|
|
484
|
+
* prefilled message.
|
|
485
|
+
*/
|
|
486
|
+
export interface Whatsapp {
|
|
487
|
+
number: string;
|
|
488
|
+
|
|
489
|
+
message?: string;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Typographic styles applied to the frame label text. Object with optional keys:
|
|
494
|
+
* `weight` (`normal` | `bold`), `style` (`normal` | `italic`), `family` (`sans` |
|
|
495
|
+
* `sans-condensed` | `serif` | `serif-elegant` | `mono`), `size` (`s` | `m` | `l`
|
|
496
|
+
* | `xl`). Every field is enum-gated on write; omitted keys render with defaults.
|
|
497
|
+
*/
|
|
498
|
+
export interface FrameTextStyles {
|
|
499
|
+
family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono';
|
|
500
|
+
|
|
501
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
502
|
+
|
|
503
|
+
style?: 'normal' | 'italic';
|
|
504
|
+
|
|
505
|
+
weight?: 'normal' | 'bold';
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
478
509
|
export type QrcodeListResponse = Array<QrCode>;
|
|
479
510
|
|
|
480
511
|
export interface QrcodeDeleteResponse {
|
|
@@ -484,21 +515,24 @@ export interface QrcodeDeleteResponse {
|
|
|
484
515
|
id: string;
|
|
485
516
|
}
|
|
486
517
|
|
|
487
|
-
/**
|
|
488
|
-
* The number of QR Codes matching the query.
|
|
489
|
-
*/
|
|
490
|
-
export type QrcodeCountResponse = number;
|
|
491
|
-
|
|
492
518
|
export interface QrcodeCreateParams {
|
|
493
|
-
/**
|
|
494
|
-
* The unique ID of the folder assigned to the QR code.
|
|
495
|
-
*/
|
|
496
|
-
folderId: string | null;
|
|
497
|
-
|
|
498
519
|
/**
|
|
499
520
|
* The type of content of the QR code.
|
|
500
521
|
*/
|
|
501
|
-
type:
|
|
522
|
+
type:
|
|
523
|
+
| 'url'
|
|
524
|
+
| 'text'
|
|
525
|
+
| 'email'
|
|
526
|
+
| 'wifi'
|
|
527
|
+
| 'phone'
|
|
528
|
+
| 'vcard'
|
|
529
|
+
| 'crypto'
|
|
530
|
+
| 'sms'
|
|
531
|
+
| 'facetime'
|
|
532
|
+
| 'geo'
|
|
533
|
+
| 'latlog'
|
|
534
|
+
| 'pix'
|
|
535
|
+
| 'whatsapp';
|
|
502
536
|
|
|
503
537
|
/**
|
|
504
538
|
* The destination URL for Android for the QR code for device targeting Android.
|
|
@@ -511,7 +545,8 @@ export interface QrcodeCreateParams {
|
|
|
511
545
|
archived?: boolean;
|
|
512
546
|
|
|
513
547
|
/**
|
|
514
|
-
* The background color of the QR code.
|
|
548
|
+
* The background color of the QR code (hex or CSS keyword). Invalid values are
|
|
549
|
+
* coerced to default.
|
|
515
550
|
*/
|
|
516
551
|
bgColor?: string;
|
|
517
552
|
|
|
@@ -582,7 +617,8 @@ export interface QrcodeCreateParams {
|
|
|
582
617
|
facetime?: { [key: string]: string } | null;
|
|
583
618
|
|
|
584
619
|
/**
|
|
585
|
-
* The foreground color of the QR code.
|
|
620
|
+
* The foreground color of the QR code (hex or CSS keyword). Invalid values are
|
|
621
|
+
* coerced to default.
|
|
586
622
|
*/
|
|
587
623
|
fgColor?: string;
|
|
588
624
|
|
|
@@ -597,20 +633,46 @@ export interface QrcodeCreateParams {
|
|
|
597
633
|
flexible?: boolean;
|
|
598
634
|
|
|
599
635
|
/**
|
|
600
|
-
* The
|
|
636
|
+
* The unique ID of the folder assigned to the QR code. Omit or set to null for no
|
|
637
|
+
* folder.
|
|
638
|
+
*/
|
|
639
|
+
folderId?: string | null;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5,
|
|
643
|
+
* frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at
|
|
644
|
+
* render.
|
|
601
645
|
*/
|
|
602
646
|
frame?: string;
|
|
603
647
|
|
|
604
648
|
/**
|
|
605
|
-
* The color of the frame
|
|
649
|
+
* The color of the frame (hex or CSS keyword). Invalid values are coerced to
|
|
650
|
+
* default.
|
|
606
651
|
*/
|
|
607
652
|
frameColor?: string;
|
|
608
653
|
|
|
609
654
|
/**
|
|
610
|
-
*
|
|
655
|
+
* Label text rendered inside the frame (e.g. "SCAN ME", a product SKU). Maximum
|
|
656
|
+
* 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar
|
|
657
|
+
* grows vertically to fit.
|
|
611
658
|
*/
|
|
612
659
|
frameText?: string;
|
|
613
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Color of the frame label text (hex `#RRGGBB`, `#RGB`, `#RRGGBBAA`, or a CSS
|
|
663
|
+
* keyword from the allowlist). When omitted, a contrasting color is derived
|
|
664
|
+
* automatically from `frameColor`.
|
|
665
|
+
*/
|
|
666
|
+
frameTextColor?: string | null;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Typographic styles applied to the frame label text. Every key is enum-gated —
|
|
670
|
+
* unknown keys or out-of-enum values are rejected to prevent SVG attribute
|
|
671
|
+
* injection. All fields are optional; omitted keys fall back to the default
|
|
672
|
+
* (normal weight, normal style, sans family, medium size).
|
|
673
|
+
*/
|
|
674
|
+
frameTextStyles?: QrcodeCreateParams.FrameTextStyles | null;
|
|
675
|
+
|
|
614
676
|
/**
|
|
615
677
|
* Geographic segmentation information for the QR code in the JSON format
|
|
616
678
|
* `{[COUNTRY]: https://example.com }`.
|
|
@@ -618,7 +680,8 @@ export interface QrcodeCreateParams {
|
|
|
618
680
|
geo?: QrcodeCreateParams.Geo | null;
|
|
619
681
|
|
|
620
682
|
/**
|
|
621
|
-
*
|
|
683
|
+
* Logo height in pixels. When omitted, a proportional size is used based on the QR
|
|
684
|
+
* code size (about 10–20% depending on size).
|
|
622
685
|
*/
|
|
623
686
|
height?: number;
|
|
624
687
|
|
|
@@ -684,6 +747,12 @@ export interface QrcodeCreateParams {
|
|
|
684
747
|
*/
|
|
685
748
|
phone?: string | null;
|
|
686
749
|
|
|
750
|
+
/**
|
|
751
|
+
* The prefix for the randomly generated key. If provided, the key will be prefixed
|
|
752
|
+
* with this value.
|
|
753
|
+
*/
|
|
754
|
+
prefix?: string;
|
|
755
|
+
|
|
687
756
|
/**
|
|
688
757
|
* If the QR code has pre-redirection.
|
|
689
758
|
*/
|
|
@@ -704,6 +773,11 @@ export interface QrcodeCreateParams {
|
|
|
704
773
|
*/
|
|
705
774
|
rewrite?: boolean;
|
|
706
775
|
|
|
776
|
+
/**
|
|
777
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
778
|
+
*/
|
|
779
|
+
rules?: Array<QrcodeCreateParams.Rule> | null;
|
|
780
|
+
|
|
707
781
|
/**
|
|
708
782
|
* The shape of the design around the QR code (none, square, circle).
|
|
709
783
|
*/
|
|
@@ -750,6 +824,13 @@ export interface QrcodeCreateParams {
|
|
|
750
824
|
*/
|
|
751
825
|
tagNames?: string | Array<string>;
|
|
752
826
|
|
|
827
|
+
/**
|
|
828
|
+
* ID of a QR code (in the same project) marked as a template. Its customization
|
|
829
|
+
* fields (colors, logo, pattern, shape, frame) will be applied to the new QR code
|
|
830
|
+
* unless explicitly overridden.
|
|
831
|
+
*/
|
|
832
|
+
templateId?: string | null;
|
|
833
|
+
|
|
753
834
|
/**
|
|
754
835
|
* The text of the QR code.
|
|
755
836
|
*/
|
|
@@ -767,852 +848,21 @@ export interface QrcodeCreateParams {
|
|
|
767
848
|
trackConversion?: boolean;
|
|
768
849
|
|
|
769
850
|
/**
|
|
770
|
-
* The destination URL of the QR code.
|
|
771
|
-
*/
|
|
772
|
-
url?: string | null;
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* The vCard information of the QR code.
|
|
776
|
-
*/
|
|
777
|
-
vcard?: { [key: string]: string } | null;
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* An array of webhook IDs to trigger when the link is clicked. These webhooks will
|
|
781
|
-
* receive click event data.
|
|
782
|
-
*/
|
|
783
|
-
webhookIds?: Array<string> | null;
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* The width of the QR code.
|
|
787
|
-
*/
|
|
788
|
-
width?: number;
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* The WiFi information of the QR code.
|
|
792
|
-
*/
|
|
793
|
-
wifi?: { [key: string]: string } | null;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
export namespace QrcodeCreateParams {
|
|
797
|
-
/**
|
|
798
|
-
* Geographic segmentation information for the QR code in the JSON format
|
|
799
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
800
|
-
*/
|
|
801
|
-
export interface Geo {
|
|
802
|
-
AD?: string;
|
|
803
|
-
|
|
804
|
-
AE?: string;
|
|
805
|
-
|
|
806
|
-
AF?: string;
|
|
807
|
-
|
|
808
|
-
AG?: string;
|
|
809
|
-
|
|
810
|
-
AI?: string;
|
|
811
|
-
|
|
812
|
-
AL?: string;
|
|
813
|
-
|
|
814
|
-
AM?: string;
|
|
815
|
-
|
|
816
|
-
AO?: string;
|
|
817
|
-
|
|
818
|
-
AQ?: string;
|
|
819
|
-
|
|
820
|
-
AR?: string;
|
|
821
|
-
|
|
822
|
-
AS?: string;
|
|
823
|
-
|
|
824
|
-
AT?: string;
|
|
825
|
-
|
|
826
|
-
AU?: string;
|
|
827
|
-
|
|
828
|
-
AW?: string;
|
|
829
|
-
|
|
830
|
-
AX?: string;
|
|
831
|
-
|
|
832
|
-
AZ?: string;
|
|
833
|
-
|
|
834
|
-
BA?: string;
|
|
835
|
-
|
|
836
|
-
BB?: string;
|
|
837
|
-
|
|
838
|
-
BD?: string;
|
|
839
|
-
|
|
840
|
-
BE?: string;
|
|
841
|
-
|
|
842
|
-
BF?: string;
|
|
843
|
-
|
|
844
|
-
BG?: string;
|
|
845
|
-
|
|
846
|
-
BH?: string;
|
|
847
|
-
|
|
848
|
-
BI?: string;
|
|
849
|
-
|
|
850
|
-
BJ?: string;
|
|
851
|
-
|
|
852
|
-
BL?: string;
|
|
853
|
-
|
|
854
|
-
BM?: string;
|
|
855
|
-
|
|
856
|
-
BN?: string;
|
|
857
|
-
|
|
858
|
-
BO?: string;
|
|
859
|
-
|
|
860
|
-
BQ?: string;
|
|
861
|
-
|
|
862
|
-
BR?: string;
|
|
863
|
-
|
|
864
|
-
BS?: string;
|
|
865
|
-
|
|
866
|
-
BT?: string;
|
|
867
|
-
|
|
868
|
-
BV?: string;
|
|
869
|
-
|
|
870
|
-
BW?: string;
|
|
871
|
-
|
|
872
|
-
BY?: string;
|
|
873
|
-
|
|
874
|
-
BZ?: string;
|
|
875
|
-
|
|
876
|
-
CA?: string;
|
|
877
|
-
|
|
878
|
-
CC?: string;
|
|
879
|
-
|
|
880
|
-
CD?: string;
|
|
881
|
-
|
|
882
|
-
CF?: string;
|
|
883
|
-
|
|
884
|
-
CG?: string;
|
|
885
|
-
|
|
886
|
-
CH?: string;
|
|
887
|
-
|
|
888
|
-
CI?: string;
|
|
889
|
-
|
|
890
|
-
CK?: string;
|
|
891
|
-
|
|
892
|
-
CL?: string;
|
|
893
|
-
|
|
894
|
-
CM?: string;
|
|
895
|
-
|
|
896
|
-
CN?: string;
|
|
897
|
-
|
|
898
|
-
CO?: string;
|
|
899
|
-
|
|
900
|
-
CR?: string;
|
|
901
|
-
|
|
902
|
-
CU?: string;
|
|
903
|
-
|
|
904
|
-
CV?: string;
|
|
905
|
-
|
|
906
|
-
CW?: string;
|
|
907
|
-
|
|
908
|
-
CX?: string;
|
|
909
|
-
|
|
910
|
-
CY?: string;
|
|
911
|
-
|
|
912
|
-
CZ?: string;
|
|
913
|
-
|
|
914
|
-
DE?: string;
|
|
915
|
-
|
|
916
|
-
DJ?: string;
|
|
917
|
-
|
|
918
|
-
DK?: string;
|
|
919
|
-
|
|
920
|
-
DM?: string;
|
|
921
|
-
|
|
922
|
-
DO?: string;
|
|
923
|
-
|
|
924
|
-
DZ?: string;
|
|
925
|
-
|
|
926
|
-
EC?: string;
|
|
927
|
-
|
|
928
|
-
EE?: string;
|
|
929
|
-
|
|
930
|
-
EG?: string;
|
|
931
|
-
|
|
932
|
-
EH?: string;
|
|
933
|
-
|
|
934
|
-
ER?: string;
|
|
935
|
-
|
|
936
|
-
ES?: string;
|
|
937
|
-
|
|
938
|
-
ET?: string;
|
|
939
|
-
|
|
940
|
-
FI?: string;
|
|
941
|
-
|
|
942
|
-
FJ?: string;
|
|
943
|
-
|
|
944
|
-
FK?: string;
|
|
945
|
-
|
|
946
|
-
FM?: string;
|
|
947
|
-
|
|
948
|
-
FO?: string;
|
|
949
|
-
|
|
950
|
-
FR?: string;
|
|
951
|
-
|
|
952
|
-
GA?: string;
|
|
953
|
-
|
|
954
|
-
GB?: string;
|
|
955
|
-
|
|
956
|
-
GD?: string;
|
|
957
|
-
|
|
958
|
-
GE?: string;
|
|
959
|
-
|
|
960
|
-
GF?: string;
|
|
961
|
-
|
|
962
|
-
GG?: string;
|
|
963
|
-
|
|
964
|
-
GH?: string;
|
|
965
|
-
|
|
966
|
-
GI?: string;
|
|
967
|
-
|
|
968
|
-
GL?: string;
|
|
969
|
-
|
|
970
|
-
GM?: string;
|
|
971
|
-
|
|
972
|
-
GN?: string;
|
|
973
|
-
|
|
974
|
-
GP?: string;
|
|
975
|
-
|
|
976
|
-
GQ?: string;
|
|
977
|
-
|
|
978
|
-
GR?: string;
|
|
979
|
-
|
|
980
|
-
GS?: string;
|
|
981
|
-
|
|
982
|
-
GT?: string;
|
|
983
|
-
|
|
984
|
-
GU?: string;
|
|
985
|
-
|
|
986
|
-
GW?: string;
|
|
987
|
-
|
|
988
|
-
GY?: string;
|
|
989
|
-
|
|
990
|
-
HK?: string;
|
|
991
|
-
|
|
992
|
-
HM?: string;
|
|
993
|
-
|
|
994
|
-
HN?: string;
|
|
995
|
-
|
|
996
|
-
HR?: string;
|
|
997
|
-
|
|
998
|
-
HT?: string;
|
|
999
|
-
|
|
1000
|
-
HU?: string;
|
|
1001
|
-
|
|
1002
|
-
ID?: string;
|
|
1003
|
-
|
|
1004
|
-
IE?: string;
|
|
1005
|
-
|
|
1006
|
-
IL?: string;
|
|
1007
|
-
|
|
1008
|
-
IM?: string;
|
|
1009
|
-
|
|
1010
|
-
IN?: string;
|
|
1011
|
-
|
|
1012
|
-
IO?: string;
|
|
1013
|
-
|
|
1014
|
-
IQ?: string;
|
|
1015
|
-
|
|
1016
|
-
IR?: string;
|
|
1017
|
-
|
|
1018
|
-
IS?: string;
|
|
1019
|
-
|
|
1020
|
-
IT?: string;
|
|
1021
|
-
|
|
1022
|
-
JE?: string;
|
|
1023
|
-
|
|
1024
|
-
JM?: string;
|
|
1025
|
-
|
|
1026
|
-
JO?: string;
|
|
1027
|
-
|
|
1028
|
-
JP?: string;
|
|
1029
|
-
|
|
1030
|
-
KE?: string;
|
|
1031
|
-
|
|
1032
|
-
KG?: string;
|
|
1033
|
-
|
|
1034
|
-
KH?: string;
|
|
1035
|
-
|
|
1036
|
-
KI?: string;
|
|
1037
|
-
|
|
1038
|
-
KM?: string;
|
|
1039
|
-
|
|
1040
|
-
KN?: string;
|
|
1041
|
-
|
|
1042
|
-
KP?: string;
|
|
1043
|
-
|
|
1044
|
-
KR?: string;
|
|
1045
|
-
|
|
1046
|
-
KW?: string;
|
|
1047
|
-
|
|
1048
|
-
KY?: string;
|
|
1049
|
-
|
|
1050
|
-
KZ?: string;
|
|
1051
|
-
|
|
1052
|
-
LA?: string;
|
|
1053
|
-
|
|
1054
|
-
LB?: string;
|
|
1055
|
-
|
|
1056
|
-
LC?: string;
|
|
1057
|
-
|
|
1058
|
-
LI?: string;
|
|
1059
|
-
|
|
1060
|
-
LK?: string;
|
|
1061
|
-
|
|
1062
|
-
LR?: string;
|
|
1063
|
-
|
|
1064
|
-
LS?: string;
|
|
1065
|
-
|
|
1066
|
-
LT?: string;
|
|
1067
|
-
|
|
1068
|
-
LU?: string;
|
|
1069
|
-
|
|
1070
|
-
LV?: string;
|
|
1071
|
-
|
|
1072
|
-
LY?: string;
|
|
1073
|
-
|
|
1074
|
-
MA?: string;
|
|
1075
|
-
|
|
1076
|
-
MC?: string;
|
|
1077
|
-
|
|
1078
|
-
MD?: string;
|
|
1079
|
-
|
|
1080
|
-
ME?: string;
|
|
1081
|
-
|
|
1082
|
-
MF?: string;
|
|
1083
|
-
|
|
1084
|
-
MG?: string;
|
|
1085
|
-
|
|
1086
|
-
MH?: string;
|
|
1087
|
-
|
|
1088
|
-
MK?: string;
|
|
1089
|
-
|
|
1090
|
-
ML?: string;
|
|
1091
|
-
|
|
1092
|
-
MM?: string;
|
|
1093
|
-
|
|
1094
|
-
MN?: string;
|
|
1095
|
-
|
|
1096
|
-
MO?: string;
|
|
1097
|
-
|
|
1098
|
-
MP?: string;
|
|
1099
|
-
|
|
1100
|
-
MQ?: string;
|
|
1101
|
-
|
|
1102
|
-
MR?: string;
|
|
1103
|
-
|
|
1104
|
-
MS?: string;
|
|
1105
|
-
|
|
1106
|
-
MT?: string;
|
|
1107
|
-
|
|
1108
|
-
MU?: string;
|
|
1109
|
-
|
|
1110
|
-
MV?: string;
|
|
1111
|
-
|
|
1112
|
-
MW?: string;
|
|
1113
|
-
|
|
1114
|
-
MX?: string;
|
|
1115
|
-
|
|
1116
|
-
MY?: string;
|
|
1117
|
-
|
|
1118
|
-
MZ?: string;
|
|
1119
|
-
|
|
1120
|
-
NA?: string;
|
|
1121
|
-
|
|
1122
|
-
NC?: string;
|
|
1123
|
-
|
|
1124
|
-
NE?: string;
|
|
1125
|
-
|
|
1126
|
-
NF?: string;
|
|
1127
|
-
|
|
1128
|
-
NG?: string;
|
|
1129
|
-
|
|
1130
|
-
NI?: string;
|
|
1131
|
-
|
|
1132
|
-
NL?: string;
|
|
1133
|
-
|
|
1134
|
-
NO?: string;
|
|
1135
|
-
|
|
1136
|
-
NP?: string;
|
|
1137
|
-
|
|
1138
|
-
NR?: string;
|
|
1139
|
-
|
|
1140
|
-
NU?: string;
|
|
1141
|
-
|
|
1142
|
-
NZ?: string;
|
|
1143
|
-
|
|
1144
|
-
OM?: string;
|
|
1145
|
-
|
|
1146
|
-
PA?: string;
|
|
1147
|
-
|
|
1148
|
-
PE?: string;
|
|
1149
|
-
|
|
1150
|
-
PF?: string;
|
|
1151
|
-
|
|
1152
|
-
PG?: string;
|
|
1153
|
-
|
|
1154
|
-
PH?: string;
|
|
1155
|
-
|
|
1156
|
-
PK?: string;
|
|
1157
|
-
|
|
1158
|
-
PL?: string;
|
|
1159
|
-
|
|
1160
|
-
PM?: string;
|
|
1161
|
-
|
|
1162
|
-
PN?: string;
|
|
1163
|
-
|
|
1164
|
-
PR?: string;
|
|
1165
|
-
|
|
1166
|
-
PS?: string;
|
|
1167
|
-
|
|
1168
|
-
PT?: string;
|
|
1169
|
-
|
|
1170
|
-
PW?: string;
|
|
1171
|
-
|
|
1172
|
-
PY?: string;
|
|
1173
|
-
|
|
1174
|
-
QA?: string;
|
|
1175
|
-
|
|
1176
|
-
RE?: string;
|
|
1177
|
-
|
|
1178
|
-
RO?: string;
|
|
1179
|
-
|
|
1180
|
-
RS?: string;
|
|
1181
|
-
|
|
1182
|
-
RU?: string;
|
|
1183
|
-
|
|
1184
|
-
RW?: string;
|
|
1185
|
-
|
|
1186
|
-
SA?: string;
|
|
1187
|
-
|
|
1188
|
-
SB?: string;
|
|
1189
|
-
|
|
1190
|
-
SC?: string;
|
|
1191
|
-
|
|
1192
|
-
SD?: string;
|
|
1193
|
-
|
|
1194
|
-
SE?: string;
|
|
1195
|
-
|
|
1196
|
-
SG?: string;
|
|
1197
|
-
|
|
1198
|
-
SH?: string;
|
|
1199
|
-
|
|
1200
|
-
SI?: string;
|
|
1201
|
-
|
|
1202
|
-
SJ?: string;
|
|
1203
|
-
|
|
1204
|
-
SK?: string;
|
|
1205
|
-
|
|
1206
|
-
SL?: string;
|
|
1207
|
-
|
|
1208
|
-
SM?: string;
|
|
1209
|
-
|
|
1210
|
-
SN?: string;
|
|
1211
|
-
|
|
1212
|
-
SO?: string;
|
|
1213
|
-
|
|
1214
|
-
SR?: string;
|
|
1215
|
-
|
|
1216
|
-
SS?: string;
|
|
1217
|
-
|
|
1218
|
-
ST?: string;
|
|
1219
|
-
|
|
1220
|
-
SV?: string;
|
|
1221
|
-
|
|
1222
|
-
SX?: string;
|
|
1223
|
-
|
|
1224
|
-
SY?: string;
|
|
1225
|
-
|
|
1226
|
-
SZ?: string;
|
|
1227
|
-
|
|
1228
|
-
TC?: string;
|
|
1229
|
-
|
|
1230
|
-
TD?: string;
|
|
1231
|
-
|
|
1232
|
-
TF?: string;
|
|
1233
|
-
|
|
1234
|
-
TG?: string;
|
|
1235
|
-
|
|
1236
|
-
TH?: string;
|
|
1237
|
-
|
|
1238
|
-
TJ?: string;
|
|
1239
|
-
|
|
1240
|
-
TK?: string;
|
|
1241
|
-
|
|
1242
|
-
TL?: string;
|
|
1243
|
-
|
|
1244
|
-
TM?: string;
|
|
1245
|
-
|
|
1246
|
-
TN?: string;
|
|
1247
|
-
|
|
1248
|
-
TO?: string;
|
|
1249
|
-
|
|
1250
|
-
TR?: string;
|
|
1251
|
-
|
|
1252
|
-
TT?: string;
|
|
1253
|
-
|
|
1254
|
-
TV?: string;
|
|
1255
|
-
|
|
1256
|
-
TW?: string;
|
|
1257
|
-
|
|
1258
|
-
TZ?: string;
|
|
1259
|
-
|
|
1260
|
-
UA?: string;
|
|
1261
|
-
|
|
1262
|
-
UG?: string;
|
|
1263
|
-
|
|
1264
|
-
UM?: string;
|
|
1265
|
-
|
|
1266
|
-
US?: string;
|
|
1267
|
-
|
|
1268
|
-
UY?: string;
|
|
1269
|
-
|
|
1270
|
-
UZ?: string;
|
|
1271
|
-
|
|
1272
|
-
VA?: string;
|
|
1273
|
-
|
|
1274
|
-
VC?: string;
|
|
1275
|
-
|
|
1276
|
-
VE?: string;
|
|
1277
|
-
|
|
1278
|
-
VG?: string;
|
|
1279
|
-
|
|
1280
|
-
VI?: string;
|
|
1281
|
-
|
|
1282
|
-
VN?: string;
|
|
1283
|
-
|
|
1284
|
-
VU?: string;
|
|
1285
|
-
|
|
1286
|
-
WF?: string;
|
|
1287
|
-
|
|
1288
|
-
WS?: string;
|
|
1289
|
-
|
|
1290
|
-
XK?: string;
|
|
1291
|
-
|
|
1292
|
-
YE?: string;
|
|
1293
|
-
|
|
1294
|
-
YT?: string;
|
|
1295
|
-
|
|
1296
|
-
ZA?: string;
|
|
1297
|
-
|
|
1298
|
-
ZM?: string;
|
|
1299
|
-
|
|
1300
|
-
ZW?: string;
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
export interface QrcodeRetrieveParams {
|
|
1305
|
-
/**
|
|
1306
|
-
* The domain of the QR code to be retrieved. For example, for
|
|
1307
|
-
* `codeqr.link/github`, the domain is `codeqr.link`.
|
|
1308
|
-
*/
|
|
1309
|
-
domain: string;
|
|
1310
|
-
|
|
1311
|
-
/**
|
|
1312
|
-
* The key of the QR code to be retrieved. For example, for `codeqr.link/github`,
|
|
1313
|
-
* the key is `github`.
|
|
1314
|
-
*/
|
|
1315
|
-
key: string;
|
|
1316
|
-
|
|
1317
|
-
/**
|
|
1318
|
-
* The slug of the project to which the QR code belongs. For example, for
|
|
1319
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1320
|
-
*/
|
|
1321
|
-
projectSlug: string;
|
|
1322
|
-
|
|
1323
|
-
/**
|
|
1324
|
-
* This is the ID of the QR code in your database. It must be prefixed with `ext_`
|
|
1325
|
-
* when passed as a query parameter.
|
|
1326
|
-
*/
|
|
1327
|
-
externalId?: string;
|
|
1328
|
-
|
|
1329
|
-
/**
|
|
1330
|
-
* The unique ID of the QR code.
|
|
1331
|
-
*/
|
|
1332
|
-
qrCodeId?: string;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
export interface QrcodeUpdateParams {
|
|
1336
|
-
/**
|
|
1337
|
-
* The destination URL for Android for the QR code for device targeting Android.
|
|
1338
|
-
*/
|
|
1339
|
-
android?: string | null;
|
|
1340
|
-
|
|
1341
|
-
/**
|
|
1342
|
-
* If the QR code is archived.
|
|
1343
|
-
*/
|
|
1344
|
-
archived?: boolean;
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* The background color of the QR code.
|
|
1348
|
-
*/
|
|
1349
|
-
bgColor?: string;
|
|
1350
|
-
|
|
1351
|
-
/**
|
|
1352
|
-
* The comments for the QR code.
|
|
1353
|
-
*/
|
|
1354
|
-
comments?: string | null;
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* The static content of the QR code.
|
|
1358
|
-
*/
|
|
1359
|
-
contentStatic?: string | null;
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* The cryptocurrency information of the QR code.
|
|
1363
|
-
*/
|
|
1364
|
-
crypto?: { [key: string]: string } | null;
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* The description of the QR code generated via `api.codeqr.io/metatags`. Will be
|
|
1368
|
-
* used for custom link preview if `proxy` is true.
|
|
1369
|
-
*/
|
|
1370
|
-
description?: string | null;
|
|
1371
|
-
|
|
1372
|
-
/**
|
|
1373
|
-
* Allow search engines to index your QR code. The default is `false` if not
|
|
1374
|
-
* provided. Learn more: https://codeqr.link/noindex
|
|
1375
|
-
*/
|
|
1376
|
-
doIndex?: boolean;
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* The domain of the QR code. If not provided, the main domain of the project will
|
|
1380
|
-
* be used (or `codeqr.link` if the project does not have domains).
|
|
1381
|
-
*/
|
|
1382
|
-
domain?: string;
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* The email information of the QR code.
|
|
1386
|
-
*/
|
|
1387
|
-
email?: { [key: string]: string } | null;
|
|
1388
|
-
|
|
1389
|
-
/**
|
|
1390
|
-
* If the QR code should have excavated areas.
|
|
1391
|
-
*/
|
|
1392
|
-
excavate?: boolean;
|
|
1393
|
-
|
|
1394
|
-
/**
|
|
1395
|
-
* The URL to redirect when the QR code expires.
|
|
1396
|
-
*/
|
|
1397
|
-
expiredUrl?: string | null;
|
|
1398
|
-
|
|
1399
|
-
/**
|
|
1400
|
-
* The date and time the QR code will expire in ISO-8601 format. Must be in the
|
|
1401
|
-
* future.
|
|
1402
|
-
*/
|
|
1403
|
-
expiresAt?: string | null;
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* This is the ID of the QR code in your database. If defined, it can be used to
|
|
1407
|
-
* identify the QR code in the future. It must be prefixed with `ext_` when passed
|
|
1408
|
-
* as a query parameter.
|
|
1409
|
-
*/
|
|
1410
|
-
externalId?: string | null;
|
|
1411
|
-
|
|
1412
|
-
/**
|
|
1413
|
-
* The FaceTime information of the QR code.
|
|
1414
|
-
*/
|
|
1415
|
-
facetime?: { [key: string]: string } | null;
|
|
1416
|
-
|
|
1417
|
-
/**
|
|
1418
|
-
* The foreground color of the QR code.
|
|
1419
|
-
*/
|
|
1420
|
-
fgColor?: string;
|
|
1421
|
-
|
|
1422
|
-
/**
|
|
1423
|
-
* If the QR code is filled.
|
|
1424
|
-
*/
|
|
1425
|
-
filled?: boolean;
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
1428
|
-
* If the QR code is flexible.
|
|
1429
|
-
*/
|
|
1430
|
-
flexible?: boolean;
|
|
1431
|
-
|
|
1432
|
-
/**
|
|
1433
|
-
* The unique ID of the folder assigned to the QR code.
|
|
1434
|
-
*/
|
|
1435
|
-
folderId?: string | null;
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* The type of frame of the QR code.
|
|
1439
|
-
*/
|
|
1440
|
-
frame?: string;
|
|
1441
|
-
|
|
1442
|
-
/**
|
|
1443
|
-
* The color of the frame of the QR code.
|
|
1444
|
-
*/
|
|
1445
|
-
frameColor?: string;
|
|
1446
|
-
|
|
1447
|
-
/**
|
|
1448
|
-
* The text of the frame of the QR code.
|
|
1449
|
-
*/
|
|
1450
|
-
frameText?: string;
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1453
|
-
* Geographic segmentation information for the QR code in the JSON format
|
|
1454
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
1455
|
-
*/
|
|
1456
|
-
geo?: QrcodeUpdateParams.Geo | null;
|
|
1457
|
-
|
|
1458
|
-
/**
|
|
1459
|
-
* The height of the QR code.
|
|
1460
|
-
*/
|
|
1461
|
-
height?: number;
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
* The image of the QR code generated via `api.codeqr.io/metatags`. Will be used
|
|
1465
|
-
* for custom link preview if `proxy` is true.
|
|
1466
|
-
*/
|
|
1467
|
-
image?: string | null;
|
|
1468
|
-
|
|
1469
|
-
/**
|
|
1470
|
-
* The destination URL for iOS for the QR code for device targeting iOS.
|
|
1471
|
-
*/
|
|
1472
|
-
ios?: string | null;
|
|
1473
|
-
|
|
1474
|
-
/**
|
|
1475
|
-
* If the form is mandatory for the page.
|
|
1476
|
-
*/
|
|
1477
|
-
isFormMandatory?: boolean;
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* The slug of the QR code. If not provided, a random slug of 7 characters will be
|
|
1481
|
-
* generated.
|
|
1482
|
-
*/
|
|
1483
|
-
key?: string;
|
|
1484
|
-
|
|
1485
|
-
/**
|
|
1486
|
-
* The latitude and longitude information of the QR code.
|
|
1487
|
-
*/
|
|
1488
|
-
latlog?: { [key: string]: string } | null;
|
|
1489
|
-
|
|
1490
|
-
/**
|
|
1491
|
-
* The level of error correction of the QR code.
|
|
1492
|
-
*/
|
|
1493
|
-
level?: string;
|
|
1494
|
-
|
|
1495
|
-
/**
|
|
1496
|
-
* The logo of the QR code.
|
|
1497
|
-
*/
|
|
1498
|
-
logo?: string | null;
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* The ID of the page to redirect to before the QR code destination.
|
|
1502
|
-
*/
|
|
1503
|
-
pageId?: string | null;
|
|
1504
|
-
|
|
1505
|
-
/**
|
|
1506
|
-
* The URL of the page to redirect to before the QR code destination.
|
|
1507
|
-
*/
|
|
1508
|
-
pageUrl?: string | null;
|
|
1509
|
-
|
|
1510
|
-
/**
|
|
1511
|
-
* The password required to access the destination URL of the QR code.
|
|
1512
|
-
*/
|
|
1513
|
-
password?: string | null;
|
|
1514
|
-
|
|
1515
|
-
/**
|
|
1516
|
-
* The pattern of the modules of the QR code.
|
|
1517
|
-
*/
|
|
1518
|
-
pattern?: string;
|
|
1519
|
-
|
|
1520
|
-
/**
|
|
1521
|
-
* The phone number of the QR code.
|
|
1522
|
-
*/
|
|
1523
|
-
phone?: string | null;
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* If the QR code has pre-redirection.
|
|
1527
|
-
*/
|
|
1528
|
-
preRedirection?: boolean;
|
|
1529
|
-
|
|
1530
|
-
/**
|
|
1531
|
-
* If the QR code uses the custom link preview feature.
|
|
1532
|
-
*/
|
|
1533
|
-
proxy?: boolean;
|
|
1534
|
-
|
|
1535
|
-
/**
|
|
1536
|
-
* If the statistics of the QR code are publicly accessible.
|
|
1537
|
-
*/
|
|
1538
|
-
publicStats?: boolean;
|
|
1539
|
-
|
|
1540
|
-
/**
|
|
1541
|
-
* If the QR code uses link cloaking.
|
|
1542
|
-
*/
|
|
1543
|
-
rewrite?: boolean;
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* The shape of the design around the QR code (none, square, circle).
|
|
1547
|
-
*/
|
|
1548
|
-
shape?: string;
|
|
1549
|
-
|
|
1550
|
-
/**
|
|
1551
|
-
* If the logo should be displayed in the QR code.
|
|
1552
|
-
*/
|
|
1553
|
-
showLogo?: boolean;
|
|
1554
|
-
|
|
1555
|
-
/**
|
|
1556
|
-
* The size of the QR code.
|
|
1557
|
-
*/
|
|
1558
|
-
size?: number;
|
|
1559
|
-
|
|
1560
|
-
/**
|
|
1561
|
-
* The SMS information of the QR code.
|
|
1562
|
-
*/
|
|
1563
|
-
sms?: { [key: string]: string } | null;
|
|
1564
|
-
|
|
1565
|
-
/**
|
|
1566
|
-
* The image URL of the QR code.
|
|
1567
|
-
*/
|
|
1568
|
-
src?: string | null;
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* If the QR code is static.
|
|
1572
|
-
*/
|
|
1573
|
-
static?: boolean;
|
|
1574
|
-
|
|
1575
|
-
/**
|
|
1576
|
-
* @deprecated The unique ID of the tag assigned to the QR code. This field is
|
|
1577
|
-
* deprecated – use `tagIds` instead.
|
|
1578
|
-
*/
|
|
1579
|
-
tagId?: string | null;
|
|
1580
|
-
|
|
1581
|
-
/**
|
|
1582
|
-
* The unique IDs of the tags assigned to the QR code.
|
|
1583
|
-
*/
|
|
1584
|
-
tagIds?: string | Array<string>;
|
|
1585
|
-
|
|
1586
|
-
/**
|
|
1587
|
-
* The unique name of the tags assigned to the QR code (case insensitive).
|
|
1588
|
-
*/
|
|
1589
|
-
tagNames?: string | Array<string>;
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* The text of the QR code.
|
|
1593
|
-
*/
|
|
1594
|
-
text?: string | null;
|
|
1595
|
-
|
|
1596
|
-
/**
|
|
1597
|
-
* The title of the QR code generated via `api.codeqr.io/metatags`. Will be used
|
|
1598
|
-
* for custom link preview if `proxy` is true.
|
|
1599
|
-
*/
|
|
1600
|
-
title?: string | null;
|
|
1601
|
-
|
|
1602
|
-
/**
|
|
1603
|
-
* If should track conversions for the QR code.
|
|
851
|
+
* The destination URL of the QR code.
|
|
1604
852
|
*/
|
|
1605
|
-
|
|
853
|
+
url?: string | null;
|
|
1606
854
|
|
|
1607
855
|
/**
|
|
1608
|
-
*
|
|
856
|
+
* Whether this QR code should be used as a reusable template.
|
|
1609
857
|
*/
|
|
1610
|
-
|
|
858
|
+
useAsTemplate?: boolean;
|
|
1611
859
|
|
|
1612
860
|
/**
|
|
1613
|
-
*
|
|
861
|
+
* For dynamic QR codes with phone, email, or sms types: if true (default), shows
|
|
862
|
+
* an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
|
|
863
|
+
* URI.
|
|
1614
864
|
*/
|
|
1615
|
-
|
|
865
|
+
useDisplayPage?: boolean;
|
|
1616
866
|
|
|
1617
867
|
/**
|
|
1618
868
|
* The vCard information of the QR code.
|
|
@@ -1626,7 +876,14 @@ export interface QrcodeUpdateParams {
|
|
|
1626
876
|
webhookIds?: Array<string> | null;
|
|
1627
877
|
|
|
1628
878
|
/**
|
|
1629
|
-
* The
|
|
879
|
+
* The WhatsApp click-to-chat info: E.164 number (digits only) and optional
|
|
880
|
+
* prefilled message.
|
|
881
|
+
*/
|
|
882
|
+
whatsapp?: QrcodeCreateParams.Whatsapp | null;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Logo width in pixels. When omitted, a proportional size is used based on the QR
|
|
886
|
+
* code size (about 10–20% depending on size).
|
|
1630
887
|
*/
|
|
1631
888
|
width?: number;
|
|
1632
889
|
|
|
@@ -1636,7 +893,41 @@ export interface QrcodeUpdateParams {
|
|
|
1636
893
|
wifi?: { [key: string]: string } | null;
|
|
1637
894
|
}
|
|
1638
895
|
|
|
1639
|
-
export namespace
|
|
896
|
+
export namespace QrcodeCreateParams {
|
|
897
|
+
/**
|
|
898
|
+
* Typographic styles applied to the frame label text. Every key is enum-gated —
|
|
899
|
+
* unknown keys or out-of-enum values are rejected to prevent SVG attribute
|
|
900
|
+
* injection. All fields are optional; omitted keys fall back to the default
|
|
901
|
+
* (normal weight, normal style, sans family, medium size).
|
|
902
|
+
*/
|
|
903
|
+
export interface FrameTextStyles {
|
|
904
|
+
/**
|
|
905
|
+
* Font family used for the frame label text. `sans` = Arial / Helvetica (default).
|
|
906
|
+
* `sans-condensed` = Arial Narrow. `serif` = Georgia / Times New Roman.
|
|
907
|
+
* `serif-elegant` = Palatino Linotype / Book Antiqua. `mono` = Courier New. Values
|
|
908
|
+
* resolve to safe system font stacks on the rendered SVG.
|
|
909
|
+
*/
|
|
910
|
+
family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono';
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Font size preset for the frame label. `s` = 60 viewBox units, `m` = 89.1
|
|
914
|
+
* (default), `l` = 120, `xl` = 150. Larger sizes grow the frame bar vertically to
|
|
915
|
+
* fit. Extremely long text auto-shrinks to keep within 4 lines (floor 48).
|
|
916
|
+
*/
|
|
917
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Font style of the frame label text. `italic` applies `font-style="italic"`.
|
|
921
|
+
*/
|
|
922
|
+
style?: 'normal' | 'italic';
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Font weight of the frame label text. `bold` renders at SVG `font-weight="700"`,
|
|
926
|
+
* `normal` at `400`.
|
|
927
|
+
*/
|
|
928
|
+
weight?: 'normal' | 'bold';
|
|
929
|
+
}
|
|
930
|
+
|
|
1640
931
|
/**
|
|
1641
932
|
* Geographic segmentation information for the QR code in the JSON format
|
|
1642
933
|
* `{[COUNTRY]: https://example.com }`.
|
|
@@ -2142,6 +1433,26 @@ export namespace QrcodeUpdateParams {
|
|
|
2142
1433
|
|
|
2143
1434
|
ZW?: string;
|
|
2144
1435
|
}
|
|
1436
|
+
|
|
1437
|
+
export interface Rule {
|
|
1438
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
1439
|
+
|
|
1440
|
+
operator: 'equals' | 'not_equals';
|
|
1441
|
+
|
|
1442
|
+
url: string;
|
|
1443
|
+
|
|
1444
|
+
value: string;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* The WhatsApp click-to-chat info: E.164 number (digits only) and optional
|
|
1449
|
+
* prefilled message.
|
|
1450
|
+
*/
|
|
1451
|
+
export interface Whatsapp {
|
|
1452
|
+
number: string;
|
|
1453
|
+
|
|
1454
|
+
message?: string;
|
|
1455
|
+
}
|
|
2145
1456
|
}
|
|
2146
1457
|
|
|
2147
1458
|
export interface QrcodeListParams {
|
|
@@ -2265,7 +1576,7 @@ export interface QrcodeListParams {
|
|
|
2265
1576
|
|
|
2266
1577
|
/**
|
|
2267
1578
|
* The search term to filter the QR codes. The search term will be matched against
|
|
2268
|
-
* the QR code slug and the destination URL.
|
|
1579
|
+
* the QR code slug, title, and the destination URL.
|
|
2269
1580
|
*/
|
|
2270
1581
|
search?: string;
|
|
2271
1582
|
|
|
@@ -2316,206 +1627,84 @@ export interface QrcodeListParams {
|
|
|
2316
1627
|
| 'crypto'
|
|
2317
1628
|
| 'sms'
|
|
2318
1629
|
| 'facetime'
|
|
1630
|
+
| 'geo'
|
|
2319
1631
|
| 'latlog'
|
|
2320
|
-
| 'pix'
|
|
2321
|
-
|
|
2322
|
-
/**
|
|
2323
|
-
* The ID of the user to filter by.
|
|
2324
|
-
*/
|
|
2325
|
-
userId?: string;
|
|
2326
|
-
|
|
2327
|
-
/**
|
|
2328
|
-
* If should include tags in the response. The default is `false` if not provided.
|
|
2329
|
-
*/
|
|
2330
|
-
withTags?: boolean;
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
export interface QrcodeCountParams {
|
|
2334
|
-
/**
|
|
2335
|
-
* The comments to filter by.
|
|
2336
|
-
*/
|
|
2337
|
-
comments?: string;
|
|
2338
|
-
|
|
2339
|
-
/**
|
|
2340
|
-
* Filter QR codes created after this date
|
|
2341
|
-
*/
|
|
2342
|
-
createdAfter?: string;
|
|
2343
|
-
|
|
2344
|
-
/**
|
|
2345
|
-
* Filter QR codes created before this date
|
|
2346
|
-
*/
|
|
2347
|
-
createdBefore?: string;
|
|
2348
|
-
|
|
2349
|
-
/**
|
|
2350
|
-
* The domain to filter the QR codes. For example, `ac.me`. If not provided, all QR
|
|
2351
|
-
* codes of the project will be returned.
|
|
2352
|
-
*/
|
|
2353
|
-
domain?: string;
|
|
2354
|
-
|
|
2355
|
-
/**
|
|
2356
|
-
* Filter QR codes expiring after this date
|
|
2357
|
-
*/
|
|
2358
|
-
expiresAfter?: string;
|
|
2359
|
-
|
|
2360
|
-
/**
|
|
2361
|
-
* The date and time the QR code will expire in ISO-8601 format. Must be in the
|
|
2362
|
-
* future.
|
|
2363
|
-
*/
|
|
2364
|
-
expiresAt?: string | null;
|
|
2365
|
-
|
|
2366
|
-
/**
|
|
2367
|
-
* Filter QR codes expiring before this date
|
|
2368
|
-
*/
|
|
2369
|
-
expiresBefore?: string;
|
|
2370
|
-
|
|
2371
|
-
/**
|
|
2372
|
-
* The folder ID to filter the QR codes by.
|
|
2373
|
-
*/
|
|
2374
|
-
folderId?: string;
|
|
2375
|
-
|
|
2376
|
-
/**
|
|
2377
|
-
* Filter by QR code format - static or dynamic
|
|
2378
|
-
*/
|
|
2379
|
-
format?: 'static' | 'dynamic';
|
|
1632
|
+
| 'pix'
|
|
1633
|
+
| 'whatsapp';
|
|
2380
1634
|
|
|
2381
1635
|
/**
|
|
2382
|
-
*
|
|
1636
|
+
* Filter QR codes marked as templates.
|
|
2383
1637
|
*/
|
|
2384
|
-
|
|
1638
|
+
useAsTemplate?: boolean;
|
|
2385
1639
|
|
|
2386
1640
|
/**
|
|
2387
|
-
*
|
|
1641
|
+
* The ID of the user to filter by.
|
|
2388
1642
|
*/
|
|
2389
|
-
|
|
1643
|
+
userId?: string;
|
|
2390
1644
|
|
|
2391
1645
|
/**
|
|
2392
|
-
* Filter
|
|
1646
|
+
* Filter by UTM campaign value
|
|
2393
1647
|
*/
|
|
2394
|
-
|
|
1648
|
+
utm_campaign?: string;
|
|
2395
1649
|
|
|
2396
1650
|
/**
|
|
2397
|
-
* Filter
|
|
1651
|
+
* Filter by UTM content value
|
|
2398
1652
|
*/
|
|
2399
|
-
|
|
1653
|
+
utm_content?: string;
|
|
2400
1654
|
|
|
2401
1655
|
/**
|
|
2402
|
-
* Filter
|
|
1656
|
+
* Filter by UTM medium value
|
|
2403
1657
|
*/
|
|
2404
|
-
|
|
1658
|
+
utm_medium?: string;
|
|
2405
1659
|
|
|
2406
1660
|
/**
|
|
2407
|
-
* Filter
|
|
1661
|
+
* Filter by UTM source value
|
|
2408
1662
|
*/
|
|
2409
|
-
|
|
1663
|
+
utm_source?: string;
|
|
2410
1664
|
|
|
2411
1665
|
/**
|
|
2412
|
-
* Filter
|
|
1666
|
+
* Filter by UTM term value
|
|
2413
1667
|
*/
|
|
2414
|
-
|
|
1668
|
+
utm_term?: string;
|
|
2415
1669
|
|
|
2416
1670
|
/**
|
|
2417
|
-
*
|
|
1671
|
+
* If should include tags in the response. The default is `false` if not provided.
|
|
2418
1672
|
*/
|
|
2419
|
-
|
|
1673
|
+
withTags?: boolean;
|
|
1674
|
+
}
|
|
2420
1675
|
|
|
1676
|
+
export interface QrcodeRetrieveParams {
|
|
2421
1677
|
/**
|
|
2422
|
-
*
|
|
1678
|
+
* The domain of the QR code to be retrieved. For example, for
|
|
1679
|
+
* `codeqr.link/github`, the domain is `codeqr.link`.
|
|
2423
1680
|
*/
|
|
2424
|
-
|
|
1681
|
+
domain: string;
|
|
2425
1682
|
|
|
2426
1683
|
/**
|
|
2427
|
-
* The
|
|
1684
|
+
* The key of the QR code to be retrieved. For example, for `codeqr.link/github`,
|
|
1685
|
+
* the key is `github`.
|
|
2428
1686
|
*/
|
|
2429
|
-
|
|
1687
|
+
key: string;
|
|
2430
1688
|
|
|
2431
1689
|
/**
|
|
2432
1690
|
* The slug of the project to which the QR code belongs. For example, for
|
|
2433
1691
|
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
2434
1692
|
*/
|
|
2435
|
-
projectSlug
|
|
2436
|
-
|
|
2437
|
-
/**
|
|
2438
|
-
* Maximum number of scans
|
|
2439
|
-
*/
|
|
2440
|
-
scansMax?: number;
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* Minimum number of scans
|
|
2444
|
-
*/
|
|
2445
|
-
scansMin?: number;
|
|
2446
|
-
|
|
2447
|
-
/**
|
|
2448
|
-
* The search term to filter the QR codes. The search term will be matched against
|
|
2449
|
-
* the QR code slug and the destination URL.
|
|
2450
|
-
*/
|
|
2451
|
-
search?: string;
|
|
2452
|
-
|
|
2453
|
-
/**
|
|
2454
|
-
* If should include archived QR codes in the response. The default is `false` if
|
|
2455
|
-
* not provided.
|
|
2456
|
-
*/
|
|
2457
|
-
showArchived?: boolean;
|
|
2458
|
-
|
|
2459
|
-
/**
|
|
2460
|
-
* @deprecated [DEPRECATED (use tagIds instead)]: The unique ID of the tag assigned
|
|
2461
|
-
* to the QR code.
|
|
2462
|
-
*/
|
|
2463
|
-
tagId?: string;
|
|
2464
|
-
|
|
2465
|
-
/**
|
|
2466
|
-
* The IDs of the tags to filter the QR codes.
|
|
2467
|
-
*/
|
|
2468
|
-
tagIds?: string | Array<string>;
|
|
2469
|
-
|
|
2470
|
-
/**
|
|
2471
|
-
* The unique name of the tags assigned to the QR code (case insensitive).
|
|
2472
|
-
*/
|
|
2473
|
-
tagNames?: string | Array<string>;
|
|
2474
|
-
|
|
2475
|
-
/**
|
|
2476
|
-
* If should include QR codes with conversion tracking enabled. The default is
|
|
2477
|
-
* `false` if not provided.
|
|
2478
|
-
*/
|
|
2479
|
-
trackConversion?: boolean;
|
|
2480
|
-
|
|
2481
|
-
/**
|
|
2482
|
-
* Filter by QR code type
|
|
2483
|
-
*/
|
|
2484
|
-
type?:
|
|
2485
|
-
| 'url'
|
|
2486
|
-
| 'text'
|
|
2487
|
-
| 'email'
|
|
2488
|
-
| 'wifi'
|
|
2489
|
-
| 'phone'
|
|
2490
|
-
| 'vcard'
|
|
2491
|
-
| 'crypto'
|
|
2492
|
-
| 'sms'
|
|
2493
|
-
| 'facetime'
|
|
2494
|
-
| 'latlog'
|
|
2495
|
-
| 'pix';
|
|
1693
|
+
projectSlug: string;
|
|
2496
1694
|
|
|
2497
1695
|
/**
|
|
2498
|
-
*
|
|
1696
|
+
* This is the ID of the QR code in your database. It must be prefixed with `ext_`
|
|
1697
|
+
* when passed as a query parameter.
|
|
2499
1698
|
*/
|
|
2500
|
-
|
|
1699
|
+
externalId?: string;
|
|
2501
1700
|
|
|
2502
1701
|
/**
|
|
2503
|
-
*
|
|
1702
|
+
* The unique ID of the QR code.
|
|
2504
1703
|
*/
|
|
2505
|
-
|
|
1704
|
+
qrCodeId?: string;
|
|
2506
1705
|
}
|
|
2507
1706
|
|
|
2508
|
-
export interface
|
|
2509
|
-
/**
|
|
2510
|
-
* The unique ID of the folder assigned to the QR code.
|
|
2511
|
-
*/
|
|
2512
|
-
folderId: string | null;
|
|
2513
|
-
|
|
2514
|
-
/**
|
|
2515
|
-
* The type of content of the QR code.
|
|
2516
|
-
*/
|
|
2517
|
-
type: 'url' | 'text' | 'email' | 'wifi' | 'phone' | 'vcard' | 'crypto' | 'sms' | 'facetime' | 'latlog';
|
|
2518
|
-
|
|
1707
|
+
export interface QrcodeUpdateParams {
|
|
2519
1708
|
/**
|
|
2520
1709
|
* The destination URL for Android for the QR code for device targeting Android.
|
|
2521
1710
|
*/
|
|
@@ -2527,7 +1716,8 @@ export interface QrcodeUpsertParams {
|
|
|
2527
1716
|
archived?: boolean;
|
|
2528
1717
|
|
|
2529
1718
|
/**
|
|
2530
|
-
* The background color of the QR code.
|
|
1719
|
+
* The background color of the QR code (hex or CSS keyword). Invalid values are
|
|
1720
|
+
* coerced to default.
|
|
2531
1721
|
*/
|
|
2532
1722
|
bgColor?: string;
|
|
2533
1723
|
|
|
@@ -2598,7 +1788,8 @@ export interface QrcodeUpsertParams {
|
|
|
2598
1788
|
facetime?: { [key: string]: string } | null;
|
|
2599
1789
|
|
|
2600
1790
|
/**
|
|
2601
|
-
* The foreground color of the QR code.
|
|
1791
|
+
* The foreground color of the QR code (hex or CSS keyword). Invalid values are
|
|
1792
|
+
* coerced to default.
|
|
2602
1793
|
*/
|
|
2603
1794
|
fgColor?: string;
|
|
2604
1795
|
|
|
@@ -2613,28 +1804,55 @@ export interface QrcodeUpsertParams {
|
|
|
2613
1804
|
flexible?: boolean;
|
|
2614
1805
|
|
|
2615
1806
|
/**
|
|
2616
|
-
* The
|
|
1807
|
+
* The unique ID of the folder assigned to the QR code. Omit or set to null for no
|
|
1808
|
+
* folder.
|
|
1809
|
+
*/
|
|
1810
|
+
folderId?: string | null;
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* The type of frame of the QR code (e.g. none, frame-1, frame-2, frame-3, frame-5,
|
|
1814
|
+
* frame-6). frame-5/6 are top-bar variants. Unknown ids fall back to no frame at
|
|
1815
|
+
* render.
|
|
2617
1816
|
*/
|
|
2618
1817
|
frame?: string;
|
|
2619
1818
|
|
|
2620
1819
|
/**
|
|
2621
|
-
* The color of the frame
|
|
1820
|
+
* The color of the frame (hex or CSS keyword). Invalid values are coerced to
|
|
1821
|
+
* default.
|
|
2622
1822
|
*/
|
|
2623
1823
|
frameColor?: string;
|
|
2624
1824
|
|
|
2625
1825
|
/**
|
|
2626
|
-
*
|
|
1826
|
+
* Label text rendered inside the frame (e.g. "SCAN ME", a product SKU). Maximum
|
|
1827
|
+
* 200 characters. Word-wraps to multiple lines at larger sizes; the frame bar
|
|
1828
|
+
* grows vertically to fit.
|
|
2627
1829
|
*/
|
|
2628
1830
|
frameText?: string;
|
|
2629
1831
|
|
|
1832
|
+
/**
|
|
1833
|
+
* Color of the frame label text (hex `#RRGGBB`, `#RGB`, `#RRGGBBAA`, or a CSS
|
|
1834
|
+
* keyword from the allowlist). When omitted, a contrasting color is derived
|
|
1835
|
+
* automatically from `frameColor`.
|
|
1836
|
+
*/
|
|
1837
|
+
frameTextColor?: string | null;
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* Typographic styles applied to the frame label text. Every key is enum-gated —
|
|
1841
|
+
* unknown keys or out-of-enum values are rejected to prevent SVG attribute
|
|
1842
|
+
* injection. All fields are optional; omitted keys fall back to the default
|
|
1843
|
+
* (normal weight, normal style, sans family, medium size).
|
|
1844
|
+
*/
|
|
1845
|
+
frameTextStyles?: QrcodeUpdateParams.FrameTextStyles | null;
|
|
1846
|
+
|
|
2630
1847
|
/**
|
|
2631
1848
|
* Geographic segmentation information for the QR code in the JSON format
|
|
2632
1849
|
* `{[COUNTRY]: https://example.com }`.
|
|
2633
1850
|
*/
|
|
2634
|
-
geo?:
|
|
1851
|
+
geo?: QrcodeUpdateParams.Geo | null;
|
|
2635
1852
|
|
|
2636
1853
|
/**
|
|
2637
|
-
*
|
|
1854
|
+
* Logo height in pixels. When omitted, a proportional size is used based on the QR
|
|
1855
|
+
* code size (about 10–20% depending on size).
|
|
2638
1856
|
*/
|
|
2639
1857
|
height?: number;
|
|
2640
1858
|
|
|
@@ -2700,6 +1918,12 @@ export interface QrcodeUpsertParams {
|
|
|
2700
1918
|
*/
|
|
2701
1919
|
phone?: string | null;
|
|
2702
1920
|
|
|
1921
|
+
/**
|
|
1922
|
+
* The prefix for the randomly generated key. If provided, the key will be prefixed
|
|
1923
|
+
* with this value.
|
|
1924
|
+
*/
|
|
1925
|
+
prefix?: string;
|
|
1926
|
+
|
|
2703
1927
|
/**
|
|
2704
1928
|
* If the QR code has pre-redirection.
|
|
2705
1929
|
*/
|
|
@@ -2720,6 +1944,11 @@ export interface QrcodeUpsertParams {
|
|
|
2720
1944
|
*/
|
|
2721
1945
|
rewrite?: boolean;
|
|
2722
1946
|
|
|
1947
|
+
/**
|
|
1948
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
1949
|
+
*/
|
|
1950
|
+
rules?: Array<QrcodeUpdateParams.Rule> | null;
|
|
1951
|
+
|
|
2723
1952
|
/**
|
|
2724
1953
|
* The shape of the design around the QR code (none, square, circle).
|
|
2725
1954
|
*/
|
|
@@ -2766,6 +1995,13 @@ export interface QrcodeUpsertParams {
|
|
|
2766
1995
|
*/
|
|
2767
1996
|
tagNames?: string | Array<string>;
|
|
2768
1997
|
|
|
1998
|
+
/**
|
|
1999
|
+
* ID of a QR code (in the same project) marked as a template. Its customization
|
|
2000
|
+
* fields (colors, logo, pattern, shape, frame) will be applied to the new QR code
|
|
2001
|
+
* unless explicitly overridden.
|
|
2002
|
+
*/
|
|
2003
|
+
templateId?: string | null;
|
|
2004
|
+
|
|
2769
2005
|
/**
|
|
2770
2006
|
* The text of the QR code.
|
|
2771
2007
|
*/
|
|
@@ -2782,11 +2018,41 @@ export interface QrcodeUpsertParams {
|
|
|
2782
2018
|
*/
|
|
2783
2019
|
trackConversion?: boolean;
|
|
2784
2020
|
|
|
2021
|
+
/**
|
|
2022
|
+
* The type of content of the QR code.
|
|
2023
|
+
*/
|
|
2024
|
+
type?:
|
|
2025
|
+
| 'url'
|
|
2026
|
+
| 'text'
|
|
2027
|
+
| 'email'
|
|
2028
|
+
| 'wifi'
|
|
2029
|
+
| 'phone'
|
|
2030
|
+
| 'vcard'
|
|
2031
|
+
| 'crypto'
|
|
2032
|
+
| 'sms'
|
|
2033
|
+
| 'facetime'
|
|
2034
|
+
| 'geo'
|
|
2035
|
+
| 'latlog'
|
|
2036
|
+
| 'pix'
|
|
2037
|
+
| 'whatsapp';
|
|
2038
|
+
|
|
2785
2039
|
/**
|
|
2786
2040
|
* The destination URL of the QR code.
|
|
2787
2041
|
*/
|
|
2788
2042
|
url?: string | null;
|
|
2789
2043
|
|
|
2044
|
+
/**
|
|
2045
|
+
* Whether this QR code should be used as a reusable template.
|
|
2046
|
+
*/
|
|
2047
|
+
useAsTemplate?: boolean;
|
|
2048
|
+
|
|
2049
|
+
/**
|
|
2050
|
+
* For dynamic QR codes with phone, email, or sms types: if true (default), shows
|
|
2051
|
+
* an action page with buttons. If false, redirects directly to tel:/mailto:/sms:
|
|
2052
|
+
* URI.
|
|
2053
|
+
*/
|
|
2054
|
+
useDisplayPage?: boolean;
|
|
2055
|
+
|
|
2790
2056
|
/**
|
|
2791
2057
|
* The vCard information of the QR code.
|
|
2792
2058
|
*/
|
|
@@ -2799,7 +2065,14 @@ export interface QrcodeUpsertParams {
|
|
|
2799
2065
|
webhookIds?: Array<string> | null;
|
|
2800
2066
|
|
|
2801
2067
|
/**
|
|
2802
|
-
* The
|
|
2068
|
+
* The WhatsApp click-to-chat info: E.164 number (digits only) and optional
|
|
2069
|
+
* prefilled message.
|
|
2070
|
+
*/
|
|
2071
|
+
whatsapp?: QrcodeUpdateParams.Whatsapp | null;
|
|
2072
|
+
|
|
2073
|
+
/**
|
|
2074
|
+
* Logo width in pixels. When omitted, a proportional size is used based on the QR
|
|
2075
|
+
* code size (about 10–20% depending on size).
|
|
2803
2076
|
*/
|
|
2804
2077
|
width?: number;
|
|
2805
2078
|
|
|
@@ -2809,7 +2082,41 @@ export interface QrcodeUpsertParams {
|
|
|
2809
2082
|
wifi?: { [key: string]: string } | null;
|
|
2810
2083
|
}
|
|
2811
2084
|
|
|
2812
|
-
export namespace
|
|
2085
|
+
export namespace QrcodeUpdateParams {
|
|
2086
|
+
/**
|
|
2087
|
+
* Typographic styles applied to the frame label text. Every key is enum-gated —
|
|
2088
|
+
* unknown keys or out-of-enum values are rejected to prevent SVG attribute
|
|
2089
|
+
* injection. All fields are optional; omitted keys fall back to the default
|
|
2090
|
+
* (normal weight, normal style, sans family, medium size).
|
|
2091
|
+
*/
|
|
2092
|
+
export interface FrameTextStyles {
|
|
2093
|
+
/**
|
|
2094
|
+
* Font family used for the frame label text. `sans` = Arial / Helvetica (default).
|
|
2095
|
+
* `sans-condensed` = Arial Narrow. `serif` = Georgia / Times New Roman.
|
|
2096
|
+
* `serif-elegant` = Palatino Linotype / Book Antiqua. `mono` = Courier New. Values
|
|
2097
|
+
* resolve to safe system font stacks on the rendered SVG.
|
|
2098
|
+
*/
|
|
2099
|
+
family?: 'sans' | 'sans-condensed' | 'serif' | 'serif-elegant' | 'mono';
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* Font size preset for the frame label. `s` = 60 viewBox units, `m` = 89.1
|
|
2103
|
+
* (default), `l` = 120, `xl` = 150. Larger sizes grow the frame bar vertically to
|
|
2104
|
+
* fit. Extremely long text auto-shrinks to keep within 4 lines (floor 48).
|
|
2105
|
+
*/
|
|
2106
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* Font style of the frame label text. `italic` applies `font-style="italic"`.
|
|
2110
|
+
*/
|
|
2111
|
+
style?: 'normal' | 'italic';
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Font weight of the frame label text. `bold` renders at SVG `font-weight="700"`,
|
|
2115
|
+
* `normal` at `400`.
|
|
2116
|
+
*/
|
|
2117
|
+
weight?: 'normal' | 'bold';
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2813
2120
|
/**
|
|
2814
2121
|
* Geographic segmentation information for the QR code in the JSON format
|
|
2815
2122
|
* `{[COUNTRY]: https://example.com }`.
|
|
@@ -3315,6 +2622,26 @@ export namespace QrcodeUpsertParams {
|
|
|
3315
2622
|
|
|
3316
2623
|
ZW?: string;
|
|
3317
2624
|
}
|
|
2625
|
+
|
|
2626
|
+
export interface Rule {
|
|
2627
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
2628
|
+
|
|
2629
|
+
operator: 'equals' | 'not_equals';
|
|
2630
|
+
|
|
2631
|
+
url: string;
|
|
2632
|
+
|
|
2633
|
+
value: string;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* The WhatsApp click-to-chat info: E.164 number (digits only) and optional
|
|
2638
|
+
* prefilled message.
|
|
2639
|
+
*/
|
|
2640
|
+
export interface Whatsapp {
|
|
2641
|
+
number: string;
|
|
2642
|
+
|
|
2643
|
+
message?: string;
|
|
2644
|
+
}
|
|
3318
2645
|
}
|
|
3319
2646
|
|
|
3320
2647
|
Qrcodes.Bulk = Bulk;
|
|
@@ -3324,20 +2651,15 @@ export declare namespace Qrcodes {
|
|
|
3324
2651
|
type QrCode as QrCode,
|
|
3325
2652
|
type QrcodeListResponse as QrcodeListResponse,
|
|
3326
2653
|
type QrcodeDeleteResponse as QrcodeDeleteResponse,
|
|
3327
|
-
type QrcodeCountResponse as QrcodeCountResponse,
|
|
3328
2654
|
type QrcodeCreateParams as QrcodeCreateParams,
|
|
2655
|
+
type QrcodeListParams as QrcodeListParams,
|
|
3329
2656
|
type QrcodeRetrieveParams as QrcodeRetrieveParams,
|
|
3330
2657
|
type QrcodeUpdateParams as QrcodeUpdateParams,
|
|
3331
|
-
type QrcodeListParams as QrcodeListParams,
|
|
3332
|
-
type QrcodeCountParams as QrcodeCountParams,
|
|
3333
|
-
type QrcodeUpsertParams as QrcodeUpsertParams,
|
|
3334
2658
|
};
|
|
3335
2659
|
|
|
3336
2660
|
export {
|
|
3337
2661
|
Bulk as Bulk,
|
|
3338
2662
|
type BulkCreateResponse as BulkCreateResponse,
|
|
3339
|
-
type BulkDeleteResponse as BulkDeleteResponse,
|
|
3340
2663
|
type BulkCreateParams as BulkCreateParams,
|
|
3341
|
-
type BulkDeleteParams as BulkDeleteParams,
|
|
3342
2664
|
};
|
|
3343
2665
|
}
|