@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.
- package/CHANGELOG.md +17 -0
- package/LICENSE +1 -1
- package/README.md +28 -28
- package/client.d.mts +10 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -10
- package/client.d.ts.map +1 -1
- package/client.js +38 -38
- package/client.mjs +36 -36
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.ts +2 -2
- package/core/error.d.mts +2 -2
- package/core/error.d.ts +2 -2
- package/core/error.js +4 -4
- package/core/error.mjs +2 -2
- package/core/resource.d.mts +3 -3
- package/core/resource.d.ts +3 -3
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.js +4 -4
- package/index.mjs +3 -3
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.ts +2 -2
- package/internal/shims.js +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.ts +4 -4
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.mjs +6 -6
- package/package.json +3 -3
- package/resources/analytics.d.mts +38 -5
- package/resources/analytics.d.mts.map +1 -1
- package/resources/analytics.d.ts +38 -5
- package/resources/analytics.d.ts.map +1 -1
- package/resources/domains.d.mts +26 -26
- package/resources/domains.d.mts.map +1 -1
- package/resources/domains.d.ts +26 -26
- 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 +29 -72
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +29 -72
- package/resources/events.d.ts.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/links/bulk.d.mts +14 -5
- package/resources/links/bulk.d.mts.map +1 -1
- package/resources/links/bulk.d.ts +14 -5
- package/resources/links/bulk.d.ts.map +1 -1
- package/resources/links/index.d.mts +1 -1
- package/resources/links/index.d.mts.map +1 -1
- package/resources/links/index.d.ts +1 -1
- package/resources/links/index.d.ts.map +1 -1
- package/resources/links/links.d.mts +263 -237
- package/resources/links/links.d.mts.map +1 -1
- package/resources/links/links.d.ts +263 -237
- package/resources/links/links.d.ts.map +1 -1
- package/resources/links/links.js +21 -21
- package/resources/links/links.js.map +1 -1
- package/resources/links/links.mjs +21 -21
- package/resources/links/links.mjs.map +1 -1
- package/resources/qrcodes/bulk.d.mts +84 -17
- package/resources/qrcodes/bulk.d.mts.map +1 -1
- package/resources/qrcodes/bulk.d.ts +84 -17
- package/resources/qrcodes/bulk.d.ts.map +1 -1
- package/resources/qrcodes/index.d.mts +1 -1
- package/resources/qrcodes/index.d.mts.map +1 -1
- package/resources/qrcodes/index.d.ts +1 -1
- package/resources/qrcodes/index.d.ts.map +1 -1
- package/resources/qrcodes/qrcodes.d.mts +409 -223
- package/resources/qrcodes/qrcodes.d.mts.map +1 -1
- package/resources/qrcodes/qrcodes.d.ts +409 -223
- package/resources/qrcodes/qrcodes.d.ts.map +1 -1
- package/resources/qrcodes/qrcodes.js +11 -11
- package/resources/qrcodes/qrcodes.js.map +1 -1
- package/resources/qrcodes/qrcodes.mjs +11 -11
- package/resources/qrcodes/qrcodes.mjs.map +1 -1
- package/resources/tags.d.mts +12 -12
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +12 -12
- package/resources/tags.d.ts.map +1 -1
- package/resources/tags.js +6 -6
- package/resources/tags.js.map +1 -1
- package/resources/tags.mjs +6 -6
- package/resources/tags.mjs.map +1 -1
- package/resources/track.d.mts +12 -0
- package/resources/track.d.mts.map +1 -1
- package/resources/track.d.ts +12 -0
- package/resources/track.d.ts.map +1 -1
- package/src/client.ts +21 -21
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/analytics.ts +45 -5
- package/src/resources/domains.ts +37 -37
- package/src/resources/events.ts +48 -82
- package/src/resources/index.ts +4 -4
- package/src/resources/links/bulk.ts +23 -6
- package/src/resources/links/index.ts +1 -1
- package/src/resources/links/links.ts +328 -257
- package/src/resources/qrcodes/bulk.ts +103 -17
- package/src/resources/qrcodes/index.ts +1 -1
- package/src/resources/qrcodes/qrcodes.ts +629 -368
- package/src/resources/tags.ts +16 -16
- package/src/resources/track.ts +14 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/events.ts
CHANGED
|
@@ -284,20 +284,35 @@ export namespace EventListResponse {
|
|
|
284
284
|
|
|
285
285
|
export namespace Link {
|
|
286
286
|
export interface Rule {
|
|
287
|
-
attribute
|
|
287
|
+
attribute?:
|
|
288
288
|
| 'device'
|
|
289
289
|
| 'country'
|
|
290
290
|
| 'utm_source'
|
|
291
291
|
| 'utm_medium'
|
|
292
292
|
| 'utm_campaign'
|
|
293
293
|
| 'referrer'
|
|
294
|
-
| 'language'
|
|
294
|
+
| 'language'
|
|
295
|
+
| 'city'
|
|
296
|
+
| 'region'
|
|
297
|
+
| 'continent'
|
|
298
|
+
| 'utm_term'
|
|
299
|
+
| 'utm_content';
|
|
295
300
|
|
|
296
|
-
operator
|
|
301
|
+
operator?: 'equals' | 'not_equals';
|
|
297
302
|
|
|
298
|
-
|
|
303
|
+
split?: Array<Rule.Split>;
|
|
299
304
|
|
|
300
|
-
|
|
305
|
+
url?: string;
|
|
306
|
+
|
|
307
|
+
value?: string;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export namespace Rule {
|
|
311
|
+
export interface Split {
|
|
312
|
+
url: string;
|
|
313
|
+
|
|
314
|
+
weight: number;
|
|
315
|
+
}
|
|
301
316
|
}
|
|
302
317
|
}
|
|
303
318
|
}
|
|
@@ -508,6 +523,8 @@ export namespace EventListResponse {
|
|
|
508
523
|
*/
|
|
509
524
|
saleAmount: number;
|
|
510
525
|
|
|
526
|
+
timestamp: string;
|
|
527
|
+
|
|
511
528
|
/**
|
|
512
529
|
* @deprecated Deprecated. Use `click.qr` instead.
|
|
513
530
|
*/
|
|
@@ -517,8 +534,6 @@ export namespace EventListResponse {
|
|
|
517
534
|
* @deprecated Deprecated. Use `click.url` instead.
|
|
518
535
|
*/
|
|
519
536
|
url: string;
|
|
520
|
-
|
|
521
|
-
timestamp?: string;
|
|
522
537
|
}
|
|
523
538
|
|
|
524
539
|
export namespace SaleEvent {
|
|
@@ -549,76 +564,13 @@ export namespace EventListResponse {
|
|
|
549
564
|
}
|
|
550
565
|
|
|
551
566
|
export interface Customer {
|
|
552
|
-
/**
|
|
553
|
-
* The unique ID of the customer. You may use either the customer's `id` on CodeQR
|
|
554
|
-
* (obtained via `/customers` endpoint) or their `externalId` (unique ID within
|
|
555
|
-
* your system, prefixed with `ext_`, e.g. `ext_123`).
|
|
556
|
-
*/
|
|
557
567
|
id: string;
|
|
558
568
|
|
|
559
|
-
|
|
560
|
-
* The date the customer was created.
|
|
561
|
-
*/
|
|
562
|
-
createdAt: string;
|
|
569
|
+
avatar: string;
|
|
563
570
|
|
|
564
|
-
|
|
565
|
-
* Unique identifier for the customer in the client's app.
|
|
566
|
-
*/
|
|
567
|
-
externalId: string;
|
|
571
|
+
email: string;
|
|
568
572
|
|
|
569
|
-
/**
|
|
570
|
-
* Name of the customer.
|
|
571
|
-
*/
|
|
572
573
|
name: string;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Avatar URL of the customer.
|
|
576
|
-
*/
|
|
577
|
-
avatar?: string | null;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Country of the customer.
|
|
581
|
-
*/
|
|
582
|
-
country?: string | null;
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Custom fields of the customer.
|
|
586
|
-
*/
|
|
587
|
-
customFields?: { [key: string]: string } | null;
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Email of the customer.
|
|
591
|
-
*/
|
|
592
|
-
email?: string | null;
|
|
593
|
-
|
|
594
|
-
link?: Customer.Link | null;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
export namespace Customer {
|
|
598
|
-
export interface Link {
|
|
599
|
-
/**
|
|
600
|
-
* The unique ID of the short link.
|
|
601
|
-
*/
|
|
602
|
-
id: string;
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* The domain of the short link. If not provided, the main domain of the project
|
|
606
|
-
* will be used (or `codeqr.link` if the project has no domains).
|
|
607
|
-
*/
|
|
608
|
-
domain: string;
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* The slug of the short link. If not provided, a random 7-character slug will be
|
|
612
|
-
* generated.
|
|
613
|
-
*/
|
|
614
|
-
key: string;
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* The complete URL of the short link, including the https protocol (for example,
|
|
618
|
-
* `https://codeqr.link/try`).
|
|
619
|
-
*/
|
|
620
|
-
shortLink?: string;
|
|
621
|
-
}
|
|
622
574
|
}
|
|
623
575
|
|
|
624
576
|
export interface Link {
|
|
@@ -780,20 +732,35 @@ export namespace EventListResponse {
|
|
|
780
732
|
|
|
781
733
|
export namespace Link {
|
|
782
734
|
export interface Rule {
|
|
783
|
-
attribute
|
|
735
|
+
attribute?:
|
|
784
736
|
| 'device'
|
|
785
737
|
| 'country'
|
|
786
738
|
| 'utm_source'
|
|
787
739
|
| 'utm_medium'
|
|
788
740
|
| 'utm_campaign'
|
|
789
741
|
| 'referrer'
|
|
790
|
-
| 'language'
|
|
742
|
+
| 'language'
|
|
743
|
+
| 'city'
|
|
744
|
+
| 'region'
|
|
745
|
+
| 'continent'
|
|
746
|
+
| 'utm_term'
|
|
747
|
+
| 'utm_content';
|
|
748
|
+
|
|
749
|
+
operator?: 'equals' | 'not_equals';
|
|
791
750
|
|
|
792
|
-
|
|
751
|
+
split?: Array<Rule.Split>;
|
|
793
752
|
|
|
794
|
-
url
|
|
753
|
+
url?: string;
|
|
795
754
|
|
|
796
|
-
value
|
|
755
|
+
value?: string;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export namespace Rule {
|
|
759
|
+
export interface Split {
|
|
760
|
+
url: string;
|
|
761
|
+
|
|
762
|
+
weight: number;
|
|
763
|
+
}
|
|
797
764
|
}
|
|
798
765
|
}
|
|
799
766
|
|
|
@@ -811,10 +778,7 @@ export namespace EventListResponse {
|
|
|
811
778
|
*/
|
|
812
779
|
invoiceId: string | null;
|
|
813
780
|
|
|
814
|
-
|
|
815
|
-
* The payment processor via which the sale was made.
|
|
816
|
-
*/
|
|
817
|
-
paymentProcessor: 'stripe' | 'shopify' | 'polar' | 'paddle' | 'revenuecat' | 'custom' | 'manual';
|
|
781
|
+
paymentProcessor: string;
|
|
818
782
|
}
|
|
819
783
|
}
|
|
820
784
|
}
|
|
@@ -949,7 +913,9 @@ export interface EventListParams {
|
|
|
949
913
|
types?: string;
|
|
950
914
|
|
|
951
915
|
/**
|
|
952
|
-
* The URL to retrieve analytics for.
|
|
916
|
+
* The destination URL to retrieve analytics for. Match it without the query params
|
|
917
|
+
* CodeQR copies off the click (UTM and ad click IDs such as fbclid or gclid):
|
|
918
|
+
* those differ per visitor, so a URL carrying them matches at most one click.
|
|
953
919
|
*/
|
|
954
920
|
url?: string;
|
|
955
921
|
|
package/src/resources/index.ts
CHANGED
|
@@ -13,8 +13,8 @@ export {
|
|
|
13
13
|
type DomainListResponse,
|
|
14
14
|
type DomainDeleteResponse,
|
|
15
15
|
type DomainCreateParams,
|
|
16
|
-
type DomainListParams,
|
|
17
16
|
type DomainUpdateParams,
|
|
17
|
+
type DomainListParams,
|
|
18
18
|
} from './domains';
|
|
19
19
|
export { Events, type EventListResponse, type EventListParams } from './events';
|
|
20
20
|
export {
|
|
@@ -23,9 +23,9 @@ export {
|
|
|
23
23
|
type LinkListResponse,
|
|
24
24
|
type LinkDeleteResponse,
|
|
25
25
|
type LinkCreateParams,
|
|
26
|
+
type LinkUpdateParams,
|
|
26
27
|
type LinkListParams,
|
|
27
28
|
type LinkRetrieveInfoParams,
|
|
28
|
-
type LinkUpdateParams,
|
|
29
29
|
} from './links/links';
|
|
30
30
|
export { Projects, type Project, type ProjectListResponse } from './projects';
|
|
31
31
|
export {
|
|
@@ -34,9 +34,9 @@ export {
|
|
|
34
34
|
type QrcodeListResponse,
|
|
35
35
|
type QrcodeDeleteResponse,
|
|
36
36
|
type QrcodeCreateParams,
|
|
37
|
-
type QrcodeListParams,
|
|
38
37
|
type QrcodeRetrieveParams,
|
|
39
38
|
type QrcodeUpdateParams,
|
|
39
|
+
type QrcodeListParams,
|
|
40
40
|
} from './qrcodes/qrcodes';
|
|
41
41
|
export {
|
|
42
42
|
Tags,
|
|
@@ -44,8 +44,8 @@ export {
|
|
|
44
44
|
type TagListResponse,
|
|
45
45
|
type TagDeleteResponse,
|
|
46
46
|
type TagCreateParams,
|
|
47
|
-
type TagListParams,
|
|
48
47
|
type TagUpdateParams,
|
|
48
|
+
type TagListParams,
|
|
49
49
|
} from './tags';
|
|
50
50
|
export {
|
|
51
51
|
Track,
|
|
@@ -73,7 +73,8 @@ export namespace BulkCreateParams {
|
|
|
73
73
|
android?: string | null;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* Whether the short link is archived.
|
|
76
|
+
* Whether the short link is archived. Archiving hides it from the default
|
|
77
|
+
* dashboard listing; the link keeps redirecting and keeps counting clicks.
|
|
77
78
|
*/
|
|
78
79
|
archived?: boolean;
|
|
79
80
|
|
|
@@ -216,6 +217,7 @@ export namespace BulkCreateParams {
|
|
|
216
217
|
|
|
217
218
|
/**
|
|
218
219
|
* The unique name of the tags assigned to the short link (case insensitive).
|
|
220
|
+
* Ignored when `tagIds` is also present.
|
|
219
221
|
*/
|
|
220
222
|
tagNames?: string | Array<string>;
|
|
221
223
|
|
|
@@ -755,20 +757,35 @@ export namespace BulkCreateParams {
|
|
|
755
757
|
}
|
|
756
758
|
|
|
757
759
|
export interface Rule {
|
|
758
|
-
attribute
|
|
760
|
+
attribute?:
|
|
759
761
|
| 'device'
|
|
760
762
|
| 'country'
|
|
761
763
|
| 'utm_source'
|
|
762
764
|
| 'utm_medium'
|
|
763
765
|
| 'utm_campaign'
|
|
764
766
|
| 'referrer'
|
|
765
|
-
| 'language'
|
|
767
|
+
| 'language'
|
|
768
|
+
| 'city'
|
|
769
|
+
| 'region'
|
|
770
|
+
| 'continent'
|
|
771
|
+
| 'utm_term'
|
|
772
|
+
| 'utm_content';
|
|
766
773
|
|
|
767
|
-
operator
|
|
774
|
+
operator?: 'equals' | 'not_equals';
|
|
768
775
|
|
|
769
|
-
|
|
776
|
+
split?: Array<Rule.Split>;
|
|
770
777
|
|
|
771
|
-
|
|
778
|
+
url?: string;
|
|
779
|
+
|
|
780
|
+
value?: string;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
export namespace Rule {
|
|
784
|
+
export interface Split {
|
|
785
|
+
url: string;
|
|
786
|
+
|
|
787
|
+
weight: number;
|
|
788
|
+
}
|
|
772
789
|
}
|
|
773
790
|
}
|
|
774
791
|
}
|