@codeqr/ts 0.24.0 → 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 +29 -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
|
@@ -18,46 +18,46 @@ export declare class Links extends APIResource {
|
|
|
18
18
|
*/
|
|
19
19
|
create(body: LinkCreateParams, options?: RequestOptions): APIPromise<Link>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Update a link for the authenticated workspace. If there's no change, returns it
|
|
22
|
+
* as it is.
|
|
22
23
|
*
|
|
23
24
|
* @example
|
|
24
25
|
* ```ts
|
|
25
|
-
* const
|
|
26
|
+
* const link = await client.links.update('linkId');
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
+
update(linkID: string, body?: LinkUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Link>;
|
|
29
30
|
/**
|
|
30
|
-
* Retrieve
|
|
31
|
+
* Retrieve a paginated list of links for the authenticated workspace.
|
|
31
32
|
*
|
|
32
33
|
* @example
|
|
33
34
|
* ```ts
|
|
34
|
-
* const
|
|
35
|
-
* domain: 'x',
|
|
36
|
-
* key: 'x',
|
|
37
|
-
* projectSlug: 'x',
|
|
38
|
-
* });
|
|
35
|
+
* const links = await client.links.list();
|
|
39
36
|
* ```
|
|
40
37
|
*/
|
|
41
|
-
|
|
38
|
+
list(query?: LinkListParams | null | undefined, options?: RequestOptions): APIPromise<LinkListResponse>;
|
|
42
39
|
/**
|
|
43
|
-
*
|
|
44
|
-
* as it is.
|
|
40
|
+
* Delete a link for the authenticated workspace.
|
|
45
41
|
*
|
|
46
42
|
* @example
|
|
47
43
|
* ```ts
|
|
48
|
-
* const link = await client.links.
|
|
44
|
+
* const link = await client.links.delete('linkId');
|
|
49
45
|
* ```
|
|
50
46
|
*/
|
|
51
|
-
|
|
47
|
+
delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse>;
|
|
52
48
|
/**
|
|
53
|
-
*
|
|
49
|
+
* Retrieve the info for a link.
|
|
54
50
|
*
|
|
55
51
|
* @example
|
|
56
52
|
* ```ts
|
|
57
|
-
* const link = await client.links.
|
|
53
|
+
* const link = await client.links.retrieveInfo({
|
|
54
|
+
* domain: 'x',
|
|
55
|
+
* key: 'x',
|
|
56
|
+
* projectSlug: 'x',
|
|
57
|
+
* });
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link>;
|
|
61
61
|
}
|
|
62
62
|
export interface Link {
|
|
63
63
|
/**
|
|
@@ -69,7 +69,8 @@ export interface Link {
|
|
|
69
69
|
*/
|
|
70
70
|
android: string | null;
|
|
71
71
|
/**
|
|
72
|
-
* Whether the short link is archived.
|
|
72
|
+
* Whether the short link is archived. Archiving hides it from the default
|
|
73
|
+
* dashboard listing; the link keeps redirecting and keeps counting clicks.
|
|
73
74
|
*/
|
|
74
75
|
archived: boolean;
|
|
75
76
|
/**
|
|
@@ -275,10 +276,17 @@ export interface Link {
|
|
|
275
276
|
}
|
|
276
277
|
export declare namespace Link {
|
|
277
278
|
interface Rule {
|
|
278
|
-
attribute
|
|
279
|
-
operator
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
attribute?: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language' | 'city' | 'region' | 'continent' | 'utm_term' | 'utm_content';
|
|
280
|
+
operator?: 'equals' | 'not_equals';
|
|
281
|
+
split?: Array<Rule.Split>;
|
|
282
|
+
url?: string;
|
|
283
|
+
value?: string;
|
|
284
|
+
}
|
|
285
|
+
namespace Rule {
|
|
286
|
+
interface Split {
|
|
287
|
+
url: string;
|
|
288
|
+
weight: number;
|
|
289
|
+
}
|
|
282
290
|
}
|
|
283
291
|
}
|
|
284
292
|
export type LinkListResponse = Array<Link>;
|
|
@@ -298,7 +306,8 @@ export interface LinkCreateParams {
|
|
|
298
306
|
*/
|
|
299
307
|
android?: string | null;
|
|
300
308
|
/**
|
|
301
|
-
* Whether the short link is archived.
|
|
309
|
+
* Whether the short link is archived. Archiving hides it from the default
|
|
310
|
+
* dashboard listing; the link keeps redirecting and keeps counting clicks.
|
|
302
311
|
*/
|
|
303
312
|
archived?: boolean;
|
|
304
313
|
/**
|
|
@@ -415,6 +424,7 @@ export interface LinkCreateParams {
|
|
|
415
424
|
tagIds?: string | Array<string>;
|
|
416
425
|
/**
|
|
417
426
|
* The unique name of the tags assigned to the short link (case insensitive).
|
|
427
|
+
* Ignored when `tagIds` is also present.
|
|
418
428
|
*/
|
|
419
429
|
tagNames?: string | Array<string>;
|
|
420
430
|
/**
|
|
@@ -698,190 +708,176 @@ export declare namespace LinkCreateParams {
|
|
|
698
708
|
ZW?: string;
|
|
699
709
|
}
|
|
700
710
|
interface Rule {
|
|
701
|
-
attribute
|
|
702
|
-
operator
|
|
703
|
-
|
|
704
|
-
|
|
711
|
+
attribute?: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language' | 'city' | 'region' | 'continent' | 'utm_term' | 'utm_content';
|
|
712
|
+
operator?: 'equals' | 'not_equals';
|
|
713
|
+
split?: Array<Rule.Split>;
|
|
714
|
+
url?: string;
|
|
715
|
+
value?: string;
|
|
716
|
+
}
|
|
717
|
+
namespace Rule {
|
|
718
|
+
interface Split {
|
|
719
|
+
url: string;
|
|
720
|
+
weight: number;
|
|
721
|
+
}
|
|
705
722
|
}
|
|
706
723
|
}
|
|
707
|
-
export interface
|
|
708
|
-
/**
|
|
709
|
-
* The Android device to filter by.
|
|
710
|
-
*/
|
|
711
|
-
android?: string;
|
|
724
|
+
export interface LinkUpdateParams {
|
|
712
725
|
/**
|
|
713
|
-
*
|
|
726
|
+
* The Android destination URL for the short link for Android device targeting.
|
|
714
727
|
*/
|
|
715
|
-
|
|
728
|
+
android?: string | null;
|
|
716
729
|
/**
|
|
717
|
-
*
|
|
730
|
+
* Whether the short link is archived. Archiving hides it from the default
|
|
731
|
+
* dashboard listing; the link keeps redirecting and keeps counting clicks.
|
|
718
732
|
*/
|
|
719
|
-
|
|
733
|
+
archived?: boolean;
|
|
720
734
|
/**
|
|
721
|
-
* The comments
|
|
735
|
+
* The comments for the short link.
|
|
722
736
|
*/
|
|
723
|
-
comments?: string;
|
|
737
|
+
comments?: string | null;
|
|
724
738
|
/**
|
|
725
|
-
*
|
|
739
|
+
* The description of the short link generated via `api.codeqr.io/metatags`. Will
|
|
740
|
+
* be used for custom link preview if `proxy` is true.
|
|
726
741
|
*/
|
|
727
|
-
|
|
742
|
+
description?: string | null;
|
|
728
743
|
/**
|
|
729
|
-
*
|
|
744
|
+
* Allow search engines to index your short link. Default is `false` if not
|
|
745
|
+
* provided. Learn more: https://codeqr.link/noindex
|
|
730
746
|
*/
|
|
731
|
-
|
|
747
|
+
doIndex?: boolean;
|
|
732
748
|
/**
|
|
733
|
-
* The domain
|
|
734
|
-
*
|
|
749
|
+
* The domain of the short link. If not provided, the main domain of the project
|
|
750
|
+
* will be used (or `codeqr.link` if the project has no domains).
|
|
735
751
|
*/
|
|
736
752
|
domain?: string;
|
|
737
753
|
/**
|
|
738
|
-
*
|
|
754
|
+
* The URL to redirect to when the short link expires.
|
|
739
755
|
*/
|
|
740
|
-
|
|
756
|
+
expiredUrl?: string | null;
|
|
741
757
|
/**
|
|
742
|
-
* The date and time the short link will expire in ISO-8601 format. Must be in
|
|
743
|
-
* future.
|
|
758
|
+
* The date and time when the short link will expire in ISO-8601 format. Must be in
|
|
759
|
+
* the future.
|
|
744
760
|
*/
|
|
745
761
|
expiresAt?: string | null;
|
|
746
762
|
/**
|
|
747
|
-
*
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* The folder ID to filter the links by.
|
|
752
|
-
*/
|
|
753
|
-
folderId?: string;
|
|
754
|
-
/**
|
|
755
|
-
* Geographic segmentation information for the short link in JSON format
|
|
756
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
757
|
-
*/
|
|
758
|
-
geo?: LinkListParams.Geo | null;
|
|
759
|
-
/**
|
|
760
|
-
* Filter links that have comments (any comments)
|
|
763
|
+
* This is the ID of the link in your database. If set, it can be used to identify
|
|
764
|
+
* the link in the future. Must be prefixed with `ext_` when passed as a query
|
|
765
|
+
* parameter.
|
|
761
766
|
*/
|
|
762
|
-
|
|
767
|
+
externalId?: string | null;
|
|
763
768
|
/**
|
|
764
|
-
*
|
|
769
|
+
* Whether the short link is flexible.
|
|
765
770
|
*/
|
|
766
|
-
|
|
771
|
+
flexible?: boolean;
|
|
767
772
|
/**
|
|
768
|
-
*
|
|
773
|
+
* The unique ID existing folder to assign the short link to.
|
|
769
774
|
*/
|
|
770
|
-
|
|
775
|
+
folderId?: string | null;
|
|
771
776
|
/**
|
|
772
|
-
*
|
|
777
|
+
* Geographic targeting information for the short link in JSON format
|
|
778
|
+
* `{[COUNTRY]: https://example.com }`.
|
|
773
779
|
*/
|
|
774
|
-
|
|
780
|
+
geo?: LinkUpdateParams.Geo | null;
|
|
775
781
|
/**
|
|
776
|
-
*
|
|
782
|
+
* The image of the short link generated via `api.codeqr.io/metatags`. Will be used
|
|
783
|
+
* for custom link preview if `proxy` is true.
|
|
777
784
|
*/
|
|
778
|
-
|
|
785
|
+
image?: string | null;
|
|
779
786
|
/**
|
|
780
|
-
*
|
|
787
|
+
* The iOS destination URL for the short link for iOS device targeting.
|
|
781
788
|
*/
|
|
782
|
-
|
|
789
|
+
ios?: string | null;
|
|
783
790
|
/**
|
|
784
|
-
*
|
|
791
|
+
* If the form is mandatory for the page.
|
|
785
792
|
*/
|
|
786
|
-
|
|
793
|
+
isFormMandatory?: boolean;
|
|
787
794
|
/**
|
|
788
|
-
*
|
|
795
|
+
* The slug of the short link. If not provided, a random 7-character slug will be
|
|
796
|
+
* generated.
|
|
789
797
|
*/
|
|
790
|
-
|
|
798
|
+
key?: string;
|
|
791
799
|
/**
|
|
792
|
-
* The
|
|
800
|
+
* The ID of the page to redirect to before the link destination.
|
|
793
801
|
*/
|
|
794
|
-
|
|
802
|
+
pageId?: string | null;
|
|
795
803
|
/**
|
|
796
|
-
*
|
|
804
|
+
* The URL of the page to redirect to before the link destination.
|
|
797
805
|
*/
|
|
798
|
-
|
|
806
|
+
pageUrl?: string | null;
|
|
799
807
|
/**
|
|
800
|
-
* The
|
|
808
|
+
* The password required to access the short link destination URL.
|
|
801
809
|
*/
|
|
802
|
-
|
|
810
|
+
password?: string | null;
|
|
803
811
|
/**
|
|
804
|
-
* The
|
|
812
|
+
* The prefix of the short link slug for randomly generated keys (for example, if
|
|
813
|
+
* the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
|
|
814
|
+
* be ignored if `key` is provided.
|
|
805
815
|
*/
|
|
806
|
-
|
|
816
|
+
prefix?: string;
|
|
807
817
|
/**
|
|
808
|
-
*
|
|
818
|
+
* Whether the short link has pre-redirection.
|
|
809
819
|
*/
|
|
810
|
-
|
|
820
|
+
preRedirection?: boolean;
|
|
811
821
|
/**
|
|
812
|
-
*
|
|
813
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
822
|
+
* Whether the short link uses the custom link preview feature.
|
|
814
823
|
*/
|
|
815
|
-
|
|
824
|
+
proxy?: boolean;
|
|
816
825
|
/**
|
|
817
|
-
*
|
|
818
|
-
* short link slug and the destination URL.
|
|
826
|
+
* Whether the short link statistics are publicly accessible.
|
|
819
827
|
*/
|
|
820
|
-
|
|
828
|
+
publicStats?: boolean;
|
|
821
829
|
/**
|
|
822
|
-
*
|
|
823
|
-
* provided.
|
|
830
|
+
* Whether the short link uses link cloaking.
|
|
824
831
|
*/
|
|
825
|
-
|
|
832
|
+
rewrite?: boolean;
|
|
826
833
|
/**
|
|
827
|
-
*
|
|
828
|
-
* always descending.
|
|
834
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
829
835
|
*/
|
|
830
|
-
|
|
836
|
+
rules?: Array<LinkUpdateParams.Rule> | null;
|
|
831
837
|
/**
|
|
832
|
-
* @deprecated
|
|
833
|
-
*
|
|
838
|
+
* @deprecated The unique ID of the tag assigned to the short link. This field is
|
|
839
|
+
* deprecated – use `tagIds` instead.
|
|
834
840
|
*/
|
|
835
|
-
tagId?: string;
|
|
841
|
+
tagId?: string | null;
|
|
836
842
|
/**
|
|
837
|
-
* The IDs of the tags to
|
|
843
|
+
* The unique IDs of the tags assigned to the short link.
|
|
838
844
|
*/
|
|
839
845
|
tagIds?: string | Array<string>;
|
|
840
846
|
/**
|
|
841
847
|
* The unique name of the tags assigned to the short link (case insensitive).
|
|
848
|
+
* Ignored when `tagIds` is also present.
|
|
842
849
|
*/
|
|
843
850
|
tagNames?: string | Array<string>;
|
|
844
851
|
/**
|
|
845
|
-
*
|
|
846
|
-
* if
|
|
847
|
-
*/
|
|
848
|
-
trackConversion?: boolean;
|
|
849
|
-
/**
|
|
850
|
-
* Filter links marked as templates.
|
|
851
|
-
*/
|
|
852
|
-
useAsTemplate?: boolean;
|
|
853
|
-
/**
|
|
854
|
-
* The ID of the user to filter by.
|
|
855
|
-
*/
|
|
856
|
-
userId?: string;
|
|
857
|
-
/**
|
|
858
|
-
* Filter by UTM campaign value
|
|
852
|
+
* The title of the short link generated via `api.codeqr.io/metatags`. Will be used
|
|
853
|
+
* for custom link preview if `proxy` is true.
|
|
859
854
|
*/
|
|
860
|
-
|
|
855
|
+
title?: string | null;
|
|
861
856
|
/**
|
|
862
|
-
*
|
|
857
|
+
* Whether to track conversions for the short link.
|
|
863
858
|
*/
|
|
864
|
-
|
|
859
|
+
trackConversion?: boolean;
|
|
865
860
|
/**
|
|
866
|
-
*
|
|
861
|
+
* The destination URL of the short link.
|
|
867
862
|
*/
|
|
868
|
-
|
|
863
|
+
url?: string;
|
|
869
864
|
/**
|
|
870
|
-
*
|
|
865
|
+
* Whether this link should be used as a reusable template.
|
|
871
866
|
*/
|
|
872
|
-
|
|
867
|
+
useAsTemplate?: boolean;
|
|
873
868
|
/**
|
|
874
|
-
*
|
|
869
|
+
* The video of the short link.
|
|
875
870
|
*/
|
|
876
|
-
|
|
871
|
+
video?: string | null;
|
|
877
872
|
/**
|
|
878
|
-
*
|
|
873
|
+
* An array of webhook IDs to trigger when the link is clicked. These webhooks will
|
|
874
|
+
* receive click event data.
|
|
879
875
|
*/
|
|
880
|
-
|
|
876
|
+
webhookIds?: Array<string> | null;
|
|
881
877
|
}
|
|
882
|
-
export declare namespace
|
|
878
|
+
export declare namespace LinkUpdateParams {
|
|
883
879
|
/**
|
|
884
|
-
* Geographic
|
|
880
|
+
* Geographic targeting information for the short link in JSON format
|
|
885
881
|
* `{[COUNTRY]: https://example.com }`.
|
|
886
882
|
*/
|
|
887
883
|
interface Geo {
|
|
@@ -1136,152 +1132,151 @@ export declare namespace LinkListParams {
|
|
|
1136
1132
|
ZM?: string;
|
|
1137
1133
|
ZW?: string;
|
|
1138
1134
|
}
|
|
1135
|
+
interface Rule {
|
|
1136
|
+
attribute?: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language' | 'city' | 'region' | 'continent' | 'utm_term' | 'utm_content';
|
|
1137
|
+
operator?: 'equals' | 'not_equals';
|
|
1138
|
+
split?: Array<Rule.Split>;
|
|
1139
|
+
url?: string;
|
|
1140
|
+
value?: string;
|
|
1141
|
+
}
|
|
1142
|
+
namespace Rule {
|
|
1143
|
+
interface Split {
|
|
1144
|
+
url: string;
|
|
1145
|
+
weight: number;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1139
1148
|
}
|
|
1140
|
-
export interface
|
|
1141
|
-
/**
|
|
1142
|
-
* The domain of the link to be retrieved. For example, for `codeqr.link/github`,
|
|
1143
|
-
* the domain is `codeqr.link`.
|
|
1144
|
-
*/
|
|
1145
|
-
domain: string;
|
|
1149
|
+
export interface LinkListParams {
|
|
1146
1150
|
/**
|
|
1147
|
-
* The
|
|
1148
|
-
* key is `github`.
|
|
1151
|
+
* The Android device to filter by.
|
|
1149
1152
|
*/
|
|
1150
|
-
|
|
1153
|
+
android?: string;
|
|
1151
1154
|
/**
|
|
1152
|
-
*
|
|
1153
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1155
|
+
* Maximum number of clicks
|
|
1154
1156
|
*/
|
|
1155
|
-
|
|
1157
|
+
clicksMax?: number;
|
|
1156
1158
|
/**
|
|
1157
|
-
*
|
|
1158
|
-
* passed as a query parameter.
|
|
1159
|
+
* Minimum number of clicks
|
|
1159
1160
|
*/
|
|
1160
|
-
|
|
1161
|
+
clicksMin?: number;
|
|
1161
1162
|
/**
|
|
1162
|
-
* The
|
|
1163
|
+
* The comments to filter by.
|
|
1163
1164
|
*/
|
|
1164
|
-
|
|
1165
|
-
}
|
|
1166
|
-
export interface LinkUpdateParams {
|
|
1165
|
+
comments?: string;
|
|
1167
1166
|
/**
|
|
1168
|
-
*
|
|
1167
|
+
* Created after date (ISO string)
|
|
1169
1168
|
*/
|
|
1170
|
-
|
|
1169
|
+
createdAfter?: string;
|
|
1171
1170
|
/**
|
|
1172
|
-
*
|
|
1171
|
+
* Created before date (ISO string)
|
|
1173
1172
|
*/
|
|
1174
|
-
|
|
1173
|
+
createdBefore?: string;
|
|
1175
1174
|
/**
|
|
1176
|
-
* The
|
|
1175
|
+
* The domain to filter the links. For example, `ac.me`. If not provided, all links
|
|
1176
|
+
* of the project will be returned.
|
|
1177
1177
|
*/
|
|
1178
|
-
|
|
1178
|
+
domain?: string;
|
|
1179
1179
|
/**
|
|
1180
|
-
*
|
|
1181
|
-
* be used for custom link preview if `proxy` is true.
|
|
1180
|
+
* Expires after date (ISO string)
|
|
1182
1181
|
*/
|
|
1183
|
-
|
|
1182
|
+
expiresAfter?: string;
|
|
1184
1183
|
/**
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1184
|
+
* The date and time the short link will expire in ISO-8601 format. Must be in the
|
|
1185
|
+
* future.
|
|
1187
1186
|
*/
|
|
1188
|
-
|
|
1187
|
+
expiresAt?: string | null;
|
|
1189
1188
|
/**
|
|
1190
|
-
*
|
|
1191
|
-
* will be used (or `codeqr.link` if the project has no domains).
|
|
1189
|
+
* Expires before date (ISO string)
|
|
1192
1190
|
*/
|
|
1193
|
-
|
|
1191
|
+
expiresBefore?: string;
|
|
1194
1192
|
/**
|
|
1195
|
-
* The
|
|
1193
|
+
* The folder ID to filter the links by.
|
|
1196
1194
|
*/
|
|
1197
|
-
|
|
1195
|
+
folderId?: string;
|
|
1198
1196
|
/**
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1197
|
+
* Geographic segmentation information for the short link in JSON format
|
|
1198
|
+
* `{[COUNTRY]: https://example.com }`.
|
|
1201
1199
|
*/
|
|
1202
|
-
|
|
1200
|
+
geo?: LinkListParams.Geo | null;
|
|
1203
1201
|
/**
|
|
1204
|
-
*
|
|
1205
|
-
* the link in the future. Must be prefixed with `ext_` when passed as a query
|
|
1206
|
-
* parameter.
|
|
1202
|
+
* Filter links that have comments (any comments)
|
|
1207
1203
|
*/
|
|
1208
|
-
|
|
1204
|
+
hasComments?: boolean;
|
|
1209
1205
|
/**
|
|
1210
|
-
*
|
|
1206
|
+
* Filter links that have custom social media cards
|
|
1211
1207
|
*/
|
|
1212
|
-
|
|
1208
|
+
hasCustomSocial?: boolean;
|
|
1213
1209
|
/**
|
|
1214
|
-
*
|
|
1210
|
+
* Filter links that have device targeting
|
|
1215
1211
|
*/
|
|
1216
|
-
|
|
1212
|
+
hasDevice?: boolean;
|
|
1217
1213
|
/**
|
|
1218
|
-
*
|
|
1219
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
1214
|
+
* Filter links that have expiration date (any expiration)
|
|
1220
1215
|
*/
|
|
1221
|
-
|
|
1216
|
+
hasExpiration?: boolean;
|
|
1222
1217
|
/**
|
|
1223
|
-
*
|
|
1224
|
-
* for custom link preview if `proxy` is true.
|
|
1218
|
+
* Filter links that have geo-targeting
|
|
1225
1219
|
*/
|
|
1226
|
-
|
|
1220
|
+
hasGeo?: boolean;
|
|
1227
1221
|
/**
|
|
1228
|
-
*
|
|
1222
|
+
* Filter links that have password protection (any password)
|
|
1229
1223
|
*/
|
|
1230
|
-
|
|
1224
|
+
hasPassword?: boolean;
|
|
1231
1225
|
/**
|
|
1232
|
-
*
|
|
1226
|
+
* Filter links that have tags (any tags)
|
|
1233
1227
|
*/
|
|
1234
|
-
|
|
1228
|
+
hasTags?: boolean;
|
|
1235
1229
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
* generated.
|
|
1230
|
+
* Filter links that have UTM parameters
|
|
1238
1231
|
*/
|
|
1239
|
-
|
|
1232
|
+
hasUTM?: boolean;
|
|
1240
1233
|
/**
|
|
1241
|
-
* The
|
|
1234
|
+
* The iOS device to filter by.
|
|
1242
1235
|
*/
|
|
1243
|
-
|
|
1236
|
+
ios?: string;
|
|
1244
1237
|
/**
|
|
1245
|
-
*
|
|
1238
|
+
* Link IDs to filter by.
|
|
1246
1239
|
*/
|
|
1247
|
-
|
|
1240
|
+
linkIds?: string | Array<string>;
|
|
1248
1241
|
/**
|
|
1249
|
-
* The
|
|
1242
|
+
* The page number for pagination.
|
|
1250
1243
|
*/
|
|
1251
|
-
|
|
1244
|
+
page?: number;
|
|
1252
1245
|
/**
|
|
1253
|
-
* The
|
|
1254
|
-
* the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
|
|
1255
|
-
* be ignored if `key` is provided.
|
|
1246
|
+
* The number of items per page.
|
|
1256
1247
|
*/
|
|
1257
|
-
|
|
1248
|
+
pageSize?: number;
|
|
1258
1249
|
/**
|
|
1259
|
-
*
|
|
1250
|
+
* The password to filter by.
|
|
1260
1251
|
*/
|
|
1261
|
-
|
|
1252
|
+
password?: string;
|
|
1262
1253
|
/**
|
|
1263
|
-
*
|
|
1254
|
+
* The slug of the project to which the link belongs. For example, for
|
|
1255
|
+
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1264
1256
|
*/
|
|
1265
|
-
|
|
1257
|
+
projectSlug?: string;
|
|
1266
1258
|
/**
|
|
1267
|
-
*
|
|
1259
|
+
* The search term to filter the links. The search term will be matched against the
|
|
1260
|
+
* short link slug and the destination URL.
|
|
1268
1261
|
*/
|
|
1269
|
-
|
|
1262
|
+
search?: string;
|
|
1270
1263
|
/**
|
|
1271
|
-
*
|
|
1264
|
+
* If should include archived links in the response. The default is `false` if not
|
|
1265
|
+
* provided.
|
|
1272
1266
|
*/
|
|
1273
|
-
|
|
1267
|
+
showArchived?: boolean;
|
|
1274
1268
|
/**
|
|
1275
|
-
*
|
|
1269
|
+
* The field to sort the links by. The default is `createdAt`, and sort order is
|
|
1270
|
+
* always descending.
|
|
1276
1271
|
*/
|
|
1277
|
-
|
|
1272
|
+
sort?: 'createdAt' | 'clicks' | 'lastClicked';
|
|
1278
1273
|
/**
|
|
1279
|
-
* @deprecated The unique ID of the tag
|
|
1280
|
-
*
|
|
1274
|
+
* @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
|
|
1275
|
+
* assigned to the short link.
|
|
1281
1276
|
*/
|
|
1282
|
-
tagId?: string
|
|
1277
|
+
tagId?: string;
|
|
1283
1278
|
/**
|
|
1284
|
-
* The
|
|
1279
|
+
* The IDs of the tags to filter the links.
|
|
1285
1280
|
*/
|
|
1286
1281
|
tagIds?: string | Array<string>;
|
|
1287
1282
|
/**
|
|
@@ -1289,35 +1284,46 @@ export interface LinkUpdateParams {
|
|
|
1289
1284
|
*/
|
|
1290
1285
|
tagNames?: string | Array<string>;
|
|
1291
1286
|
/**
|
|
1292
|
-
*
|
|
1293
|
-
*
|
|
1287
|
+
* If should include links with conversion tracking enabled. The default is `false`
|
|
1288
|
+
* if not provided.
|
|
1294
1289
|
*/
|
|
1295
|
-
|
|
1290
|
+
trackConversion?: boolean;
|
|
1296
1291
|
/**
|
|
1297
|
-
*
|
|
1292
|
+
* Filter links marked as templates.
|
|
1298
1293
|
*/
|
|
1299
|
-
|
|
1294
|
+
useAsTemplate?: boolean;
|
|
1300
1295
|
/**
|
|
1301
|
-
* The
|
|
1296
|
+
* The ID of the user to filter by.
|
|
1302
1297
|
*/
|
|
1303
|
-
|
|
1298
|
+
userId?: string;
|
|
1304
1299
|
/**
|
|
1305
|
-
*
|
|
1300
|
+
* Filter by UTM campaign value
|
|
1306
1301
|
*/
|
|
1307
|
-
|
|
1302
|
+
utm_campaign?: string;
|
|
1308
1303
|
/**
|
|
1309
|
-
*
|
|
1304
|
+
* Filter by UTM content value
|
|
1310
1305
|
*/
|
|
1311
|
-
|
|
1306
|
+
utm_content?: string;
|
|
1312
1307
|
/**
|
|
1313
|
-
*
|
|
1314
|
-
* receive click event data.
|
|
1308
|
+
* Filter by UTM medium value
|
|
1315
1309
|
*/
|
|
1316
|
-
|
|
1310
|
+
utm_medium?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* Filter by UTM source value
|
|
1313
|
+
*/
|
|
1314
|
+
utm_source?: string;
|
|
1315
|
+
/**
|
|
1316
|
+
* Filter by UTM term value
|
|
1317
|
+
*/
|
|
1318
|
+
utm_term?: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* If should include tags in the response. The default is `false` if not provided.
|
|
1321
|
+
*/
|
|
1322
|
+
withTags?: boolean;
|
|
1317
1323
|
}
|
|
1318
|
-
export declare namespace
|
|
1324
|
+
export declare namespace LinkListParams {
|
|
1319
1325
|
/**
|
|
1320
|
-
* Geographic
|
|
1326
|
+
* Geographic segmentation information for the short link in JSON format
|
|
1321
1327
|
* `{[COUNTRY]: https://example.com }`.
|
|
1322
1328
|
*/
|
|
1323
1329
|
interface Geo {
|
|
@@ -1572,15 +1578,35 @@ export declare namespace LinkUpdateParams {
|
|
|
1572
1578
|
ZM?: string;
|
|
1573
1579
|
ZW?: string;
|
|
1574
1580
|
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
+
}
|
|
1582
|
+
export interface LinkRetrieveInfoParams {
|
|
1583
|
+
/**
|
|
1584
|
+
* The domain of the link to be retrieved. For example, for `codeqr.link/github`,
|
|
1585
|
+
* the domain is `codeqr.link`.
|
|
1586
|
+
*/
|
|
1587
|
+
domain: string;
|
|
1588
|
+
/**
|
|
1589
|
+
* The key of the link to be retrieved. For example, for `codeqr.link/github`, the
|
|
1590
|
+
* key is `github`.
|
|
1591
|
+
*/
|
|
1592
|
+
key: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* The slug of the project to which the link belongs. For example, for
|
|
1595
|
+
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1596
|
+
*/
|
|
1597
|
+
projectSlug: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* This is the ID of the link in your database. Must be prefixed with `ext_` when
|
|
1600
|
+
* passed as a query parameter.
|
|
1601
|
+
*/
|
|
1602
|
+
externalId?: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* The unique ID of the short link.
|
|
1605
|
+
*/
|
|
1606
|
+
linkId?: string;
|
|
1581
1607
|
}
|
|
1582
1608
|
export declare namespace Links {
|
|
1583
|
-
export { type Link as Link, type LinkListResponse as LinkListResponse, type LinkDeleteResponse as LinkDeleteResponse, type LinkCreateParams as LinkCreateParams, type
|
|
1609
|
+
export { type Link as Link, type LinkListResponse as LinkListResponse, type LinkDeleteResponse as LinkDeleteResponse, type LinkCreateParams as LinkCreateParams, type LinkUpdateParams as LinkUpdateParams, type LinkListParams as LinkListParams, type LinkRetrieveInfoParams as LinkRetrieveInfoParams, };
|
|
1584
1610
|
export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams, };
|
|
1585
1611
|
}
|
|
1586
1612
|
//# sourceMappingURL=links.d.mts.map
|