@codeqr/ts 0.19.3 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +278 -0
- 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 +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +20 -1
- package/client.js.map +1 -1
- package/client.mjs +20 -1
- 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.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.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -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 +22 -2
- package/resources/analytics.d.mts.map +1 -1
- package/resources/analytics.d.ts +22 -2
- package/resources/analytics.d.ts.map +1 -1
- package/resources/analytics.mjs.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 +49 -3
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +49 -3
- 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.mjs.map +1 -1
- package/resources/links/bulk.d.mts +10 -0
- package/resources/links/bulk.d.mts.map +1 -1
- package/resources/links/bulk.d.ts +10 -0
- package/resources/links/bulk.d.ts.map +1 -1
- package/resources/links/bulk.mjs.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/index.mjs.map +1 -1
- package/resources/links/links.d.mts +257 -201
- package/resources/links/links.d.mts.map +1 -1
- package/resources/links/links.d.ts +257 -201
- 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/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.map +1 -1
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.mjs.map +1 -1
- package/resources/qrcodes/bulk.d.mts +83 -7
- package/resources/qrcodes/bulk.d.mts.map +1 -1
- package/resources/qrcodes/bulk.d.ts +83 -7
- package/resources/qrcodes/bulk.d.ts.map +1 -1
- package/resources/qrcodes/bulk.mjs.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/index.mjs.map +1 -1
- package/resources/qrcodes/qrcodes.d.mts +385 -169
- package/resources/qrcodes/qrcodes.d.mts.map +1 -1
- package/resources/qrcodes/qrcodes.d.ts +385 -169
- 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/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 +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 +8 -7
- package/resources/track.d.mts.map +1 -1
- package/resources/track.d.ts +8 -7
- 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 +25 -5
- 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/resources/analytics.ts +32 -2
- package/src/resources/domains.ts +37 -37
- package/src/resources/events.ts +80 -3
- package/src/resources/index.ts +4 -4
- package/src/resources/links/bulk.ts +22 -0
- package/src/resources/links/index.ts +1 -1
- package/src/resources/links/links.ts +289 -212
- package/src/resources/qrcodes/bulk.ts +118 -7
- package/src/resources/qrcodes/index.ts +1 -1
- package/src/resources/qrcodes/qrcodes.ts +603 -309
- package/src/resources/tags.ts +16 -16
- package/src/resources/track.ts +8 -7
- 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.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
|
-
*
|
|
22
|
-
* as it is.
|
|
21
|
+
* Retrieve a paginated list of links for the authenticated workspace.
|
|
23
22
|
*
|
|
24
23
|
* @example
|
|
25
24
|
* ```ts
|
|
26
|
-
* const
|
|
25
|
+
* const links = await client.links.list();
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
list(query?: LinkListParams | null | undefined, options?: RequestOptions): APIPromise<LinkListResponse>;
|
|
30
29
|
/**
|
|
31
|
-
* Retrieve
|
|
30
|
+
* Retrieve the info for a link.
|
|
32
31
|
*
|
|
33
32
|
* @example
|
|
34
33
|
* ```ts
|
|
35
|
-
* const
|
|
34
|
+
* const link = await client.links.retrieveInfo({
|
|
35
|
+
* domain: 'x',
|
|
36
|
+
* key: 'x',
|
|
37
|
+
* projectSlug: 'x',
|
|
38
|
+
* });
|
|
36
39
|
* ```
|
|
37
40
|
*/
|
|
38
|
-
|
|
41
|
+
retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link>;
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
43
|
+
* Update a link for the authenticated workspace. If there's no change, returns it
|
|
44
|
+
* as it is.
|
|
41
45
|
*
|
|
42
46
|
* @example
|
|
43
47
|
* ```ts
|
|
44
|
-
* const link = await client.links.
|
|
48
|
+
* const link = await client.links.update('linkId');
|
|
45
49
|
* ```
|
|
46
50
|
*/
|
|
47
|
-
|
|
51
|
+
update(linkID: string, body?: LinkUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Link>;
|
|
48
52
|
/**
|
|
49
|
-
*
|
|
53
|
+
* Delete a link for the authenticated workspace.
|
|
50
54
|
*
|
|
51
55
|
* @example
|
|
52
56
|
* ```ts
|
|
53
|
-
* const link = await client.links.
|
|
54
|
-
* domain: 'x',
|
|
55
|
-
* key: 'x',
|
|
56
|
-
* projectSlug: 'x',
|
|
57
|
-
* });
|
|
57
|
+
* const link = await client.links.delete('linkId');
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse>;
|
|
61
61
|
}
|
|
62
62
|
export interface Link {
|
|
63
63
|
/**
|
|
@@ -184,6 +184,10 @@ export interface Link {
|
|
|
184
184
|
* Whether the short link uses link cloaking.
|
|
185
185
|
*/
|
|
186
186
|
rewrite: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
189
|
+
*/
|
|
190
|
+
rules: Array<Link.Rule> | null;
|
|
187
191
|
/**
|
|
188
192
|
* The amount of the sale generated by the link.
|
|
189
193
|
*/
|
|
@@ -218,6 +222,10 @@ export interface Link {
|
|
|
218
222
|
* The destination URL of the short link.
|
|
219
223
|
*/
|
|
220
224
|
url: string;
|
|
225
|
+
/**
|
|
226
|
+
* Whether this link should be used as a reusable template.
|
|
227
|
+
*/
|
|
228
|
+
useAsTemplate: boolean;
|
|
221
229
|
/**
|
|
222
230
|
* The ID of the user who created the short link.
|
|
223
231
|
*/
|
|
@@ -265,6 +273,14 @@ export interface Link {
|
|
|
265
273
|
*/
|
|
266
274
|
shortLink?: string;
|
|
267
275
|
}
|
|
276
|
+
export declare namespace Link {
|
|
277
|
+
interface Rule {
|
|
278
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
279
|
+
operator: 'equals' | 'not_equals';
|
|
280
|
+
url: string;
|
|
281
|
+
value: string;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
268
284
|
export type LinkListResponse = Array<Link>;
|
|
269
285
|
export interface LinkDeleteResponse {
|
|
270
286
|
/**
|
|
@@ -384,6 +400,10 @@ export interface LinkCreateParams {
|
|
|
384
400
|
* Whether the short link uses link cloaking.
|
|
385
401
|
*/
|
|
386
402
|
rewrite?: boolean;
|
|
403
|
+
/**
|
|
404
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
405
|
+
*/
|
|
406
|
+
rules?: Array<LinkCreateParams.Rule> | null;
|
|
387
407
|
/**
|
|
388
408
|
* @deprecated The unique ID of the tag assigned to the short link. This field is
|
|
389
409
|
* deprecated – use `tagIds` instead.
|
|
@@ -677,122 +697,144 @@ export declare namespace LinkCreateParams {
|
|
|
677
697
|
ZM?: string;
|
|
678
698
|
ZW?: string;
|
|
679
699
|
}
|
|
700
|
+
interface Rule {
|
|
701
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
702
|
+
operator: 'equals' | 'not_equals';
|
|
703
|
+
url: string;
|
|
704
|
+
value: string;
|
|
705
|
+
}
|
|
680
706
|
}
|
|
681
|
-
export interface
|
|
707
|
+
export interface LinkListParams {
|
|
682
708
|
/**
|
|
683
|
-
* The Android
|
|
709
|
+
* The Android device to filter by.
|
|
684
710
|
*/
|
|
685
|
-
android?: string
|
|
711
|
+
android?: string;
|
|
686
712
|
/**
|
|
687
|
-
*
|
|
713
|
+
* Maximum number of clicks
|
|
688
714
|
*/
|
|
689
|
-
|
|
715
|
+
clicksMax?: number;
|
|
690
716
|
/**
|
|
691
|
-
*
|
|
717
|
+
* Minimum number of clicks
|
|
692
718
|
*/
|
|
693
|
-
|
|
719
|
+
clicksMin?: number;
|
|
694
720
|
/**
|
|
695
|
-
* The
|
|
696
|
-
* be used for custom link preview if `proxy` is true.
|
|
721
|
+
* The comments to filter by.
|
|
697
722
|
*/
|
|
698
|
-
|
|
723
|
+
comments?: string;
|
|
699
724
|
/**
|
|
700
|
-
*
|
|
701
|
-
* provided. Learn more: https://codeqr.link/noindex
|
|
725
|
+
* Created after date (ISO string)
|
|
702
726
|
*/
|
|
703
|
-
|
|
727
|
+
createdAfter?: string;
|
|
704
728
|
/**
|
|
705
|
-
*
|
|
706
|
-
|
|
729
|
+
* Created before date (ISO string)
|
|
730
|
+
*/
|
|
731
|
+
createdBefore?: string;
|
|
732
|
+
/**
|
|
733
|
+
* The domain to filter the links. For example, `ac.me`. If not provided, all links
|
|
734
|
+
* of the project will be returned.
|
|
707
735
|
*/
|
|
708
736
|
domain?: string;
|
|
709
737
|
/**
|
|
710
|
-
*
|
|
738
|
+
* Expires after date (ISO string)
|
|
711
739
|
*/
|
|
712
|
-
|
|
740
|
+
expiresAfter?: string;
|
|
713
741
|
/**
|
|
714
|
-
* The date and time
|
|
715
|
-
*
|
|
742
|
+
* The date and time the short link will expire in ISO-8601 format. Must be in the
|
|
743
|
+
* future.
|
|
716
744
|
*/
|
|
717
745
|
expiresAt?: string | null;
|
|
718
746
|
/**
|
|
719
|
-
*
|
|
720
|
-
* the link in the future. Must be prefixed with `ext_` when passed as a query
|
|
721
|
-
* parameter.
|
|
747
|
+
* Expires before date (ISO string)
|
|
722
748
|
*/
|
|
723
|
-
|
|
749
|
+
expiresBefore?: string;
|
|
724
750
|
/**
|
|
725
|
-
*
|
|
751
|
+
* The folder ID to filter the links by.
|
|
726
752
|
*/
|
|
727
|
-
|
|
753
|
+
folderId?: string;
|
|
728
754
|
/**
|
|
729
|
-
*
|
|
755
|
+
* Geographic segmentation information for the short link in JSON format
|
|
756
|
+
* `{[COUNTRY]: https://example.com }`.
|
|
730
757
|
*/
|
|
731
|
-
|
|
758
|
+
geo?: LinkListParams.Geo | null;
|
|
732
759
|
/**
|
|
733
|
-
*
|
|
734
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
760
|
+
* Filter links that have comments (any comments)
|
|
735
761
|
*/
|
|
736
|
-
|
|
762
|
+
hasComments?: boolean;
|
|
737
763
|
/**
|
|
738
|
-
*
|
|
739
|
-
* for custom link preview if `proxy` is true.
|
|
764
|
+
* Filter links that have custom social media cards
|
|
740
765
|
*/
|
|
741
|
-
|
|
766
|
+
hasCustomSocial?: boolean;
|
|
742
767
|
/**
|
|
743
|
-
*
|
|
768
|
+
* Filter links that have device targeting
|
|
744
769
|
*/
|
|
745
|
-
|
|
770
|
+
hasDevice?: boolean;
|
|
746
771
|
/**
|
|
747
|
-
*
|
|
772
|
+
* Filter links that have expiration date (any expiration)
|
|
748
773
|
*/
|
|
749
|
-
|
|
774
|
+
hasExpiration?: boolean;
|
|
750
775
|
/**
|
|
751
|
-
*
|
|
752
|
-
* generated.
|
|
776
|
+
* Filter links that have geo-targeting
|
|
753
777
|
*/
|
|
754
|
-
|
|
778
|
+
hasGeo?: boolean;
|
|
755
779
|
/**
|
|
756
|
-
*
|
|
780
|
+
* Filter links that have password protection (any password)
|
|
757
781
|
*/
|
|
758
|
-
|
|
782
|
+
hasPassword?: boolean;
|
|
759
783
|
/**
|
|
760
|
-
*
|
|
784
|
+
* Filter links that have tags (any tags)
|
|
761
785
|
*/
|
|
762
|
-
|
|
786
|
+
hasTags?: boolean;
|
|
763
787
|
/**
|
|
764
|
-
*
|
|
788
|
+
* Filter links that have UTM parameters
|
|
765
789
|
*/
|
|
766
|
-
|
|
790
|
+
hasUTM?: boolean;
|
|
767
791
|
/**
|
|
768
|
-
* The
|
|
769
|
-
* the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
|
|
770
|
-
* be ignored if `key` is provided.
|
|
792
|
+
* The iOS device to filter by.
|
|
771
793
|
*/
|
|
772
|
-
|
|
794
|
+
ios?: string;
|
|
773
795
|
/**
|
|
774
|
-
*
|
|
796
|
+
* Link IDs to filter by.
|
|
775
797
|
*/
|
|
776
|
-
|
|
798
|
+
linkIds?: string | Array<string>;
|
|
777
799
|
/**
|
|
778
|
-
*
|
|
800
|
+
* The page number for pagination.
|
|
779
801
|
*/
|
|
780
|
-
|
|
802
|
+
page?: number;
|
|
781
803
|
/**
|
|
782
|
-
*
|
|
804
|
+
* The number of items per page.
|
|
783
805
|
*/
|
|
784
|
-
|
|
806
|
+
pageSize?: number;
|
|
785
807
|
/**
|
|
786
|
-
*
|
|
808
|
+
* The password to filter by.
|
|
787
809
|
*/
|
|
788
|
-
|
|
810
|
+
password?: string;
|
|
789
811
|
/**
|
|
790
|
-
*
|
|
791
|
-
*
|
|
812
|
+
* The slug of the project to which the link belongs. For example, for
|
|
813
|
+
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
792
814
|
*/
|
|
793
|
-
|
|
815
|
+
projectSlug?: string;
|
|
794
816
|
/**
|
|
795
|
-
* The
|
|
817
|
+
* The search term to filter the links. The search term will be matched against the
|
|
818
|
+
* short link slug and the destination URL.
|
|
819
|
+
*/
|
|
820
|
+
search?: string;
|
|
821
|
+
/**
|
|
822
|
+
* If should include archived links in the response. The default is `false` if not
|
|
823
|
+
* provided.
|
|
824
|
+
*/
|
|
825
|
+
showArchived?: boolean;
|
|
826
|
+
/**
|
|
827
|
+
* The field to sort the links by. The default is `createdAt`, and sort order is
|
|
828
|
+
* always descending.
|
|
829
|
+
*/
|
|
830
|
+
sort?: 'createdAt' | 'clicks' | 'lastClicked';
|
|
831
|
+
/**
|
|
832
|
+
* @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
|
|
833
|
+
* assigned to the short link.
|
|
834
|
+
*/
|
|
835
|
+
tagId?: string;
|
|
836
|
+
/**
|
|
837
|
+
* The IDs of the tags to filter the links.
|
|
796
838
|
*/
|
|
797
839
|
tagIds?: string | Array<string>;
|
|
798
840
|
/**
|
|
@@ -800,35 +842,46 @@ export interface LinkUpdateParams {
|
|
|
800
842
|
*/
|
|
801
843
|
tagNames?: string | Array<string>;
|
|
802
844
|
/**
|
|
803
|
-
*
|
|
804
|
-
*
|
|
845
|
+
* If should include links with conversion tracking enabled. The default is `false`
|
|
846
|
+
* if not provided.
|
|
805
847
|
*/
|
|
806
|
-
|
|
848
|
+
trackConversion?: boolean;
|
|
807
849
|
/**
|
|
808
|
-
*
|
|
850
|
+
* Filter links marked as templates.
|
|
809
851
|
*/
|
|
810
|
-
|
|
852
|
+
useAsTemplate?: boolean;
|
|
811
853
|
/**
|
|
812
|
-
* The
|
|
854
|
+
* The ID of the user to filter by.
|
|
813
855
|
*/
|
|
814
|
-
|
|
856
|
+
userId?: string;
|
|
815
857
|
/**
|
|
816
|
-
*
|
|
858
|
+
* Filter by UTM campaign value
|
|
817
859
|
*/
|
|
818
|
-
|
|
860
|
+
utm_campaign?: string;
|
|
819
861
|
/**
|
|
820
|
-
*
|
|
862
|
+
* Filter by UTM content value
|
|
821
863
|
*/
|
|
822
|
-
|
|
864
|
+
utm_content?: string;
|
|
823
865
|
/**
|
|
824
|
-
*
|
|
825
|
-
* receive click event data.
|
|
866
|
+
* Filter by UTM medium value
|
|
826
867
|
*/
|
|
827
|
-
|
|
868
|
+
utm_medium?: string;
|
|
869
|
+
/**
|
|
870
|
+
* Filter by UTM source value
|
|
871
|
+
*/
|
|
872
|
+
utm_source?: string;
|
|
873
|
+
/**
|
|
874
|
+
* Filter by UTM term value
|
|
875
|
+
*/
|
|
876
|
+
utm_term?: string;
|
|
877
|
+
/**
|
|
878
|
+
* If should include tags in the response. The default is `false` if not provided.
|
|
879
|
+
*/
|
|
880
|
+
withTags?: boolean;
|
|
828
881
|
}
|
|
829
|
-
export declare namespace
|
|
882
|
+
export declare namespace LinkListParams {
|
|
830
883
|
/**
|
|
831
|
-
* Geographic
|
|
884
|
+
* Geographic segmentation information for the short link in JSON format
|
|
832
885
|
* `{[COUNTRY]: https://example.com }`.
|
|
833
886
|
*/
|
|
834
887
|
interface Geo {
|
|
@@ -1084,137 +1137,151 @@ export declare namespace LinkUpdateParams {
|
|
|
1084
1137
|
ZW?: string;
|
|
1085
1138
|
}
|
|
1086
1139
|
}
|
|
1087
|
-
export interface
|
|
1140
|
+
export interface LinkRetrieveInfoParams {
|
|
1088
1141
|
/**
|
|
1089
|
-
* The
|
|
1142
|
+
* The domain of the link to be retrieved. For example, for `codeqr.link/github`,
|
|
1143
|
+
* the domain is `codeqr.link`.
|
|
1090
1144
|
*/
|
|
1091
|
-
|
|
1145
|
+
domain: string;
|
|
1092
1146
|
/**
|
|
1093
|
-
*
|
|
1147
|
+
* The key of the link to be retrieved. For example, for `codeqr.link/github`, the
|
|
1148
|
+
* key is `github`.
|
|
1094
1149
|
*/
|
|
1095
|
-
|
|
1150
|
+
key: string;
|
|
1096
1151
|
/**
|
|
1097
|
-
*
|
|
1152
|
+
* The slug of the project to which the link belongs. For example, for
|
|
1153
|
+
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1098
1154
|
*/
|
|
1099
|
-
|
|
1155
|
+
projectSlug: string;
|
|
1100
1156
|
/**
|
|
1101
|
-
*
|
|
1157
|
+
* This is the ID of the link in your database. Must be prefixed with `ext_` when
|
|
1158
|
+
* passed as a query parameter.
|
|
1102
1159
|
*/
|
|
1103
|
-
|
|
1160
|
+
externalId?: string;
|
|
1104
1161
|
/**
|
|
1105
|
-
*
|
|
1162
|
+
* The unique ID of the short link.
|
|
1106
1163
|
*/
|
|
1107
|
-
|
|
1164
|
+
linkId?: string;
|
|
1165
|
+
}
|
|
1166
|
+
export interface LinkUpdateParams {
|
|
1108
1167
|
/**
|
|
1109
|
-
*
|
|
1168
|
+
* The Android destination URL for the short link for Android device targeting.
|
|
1110
1169
|
*/
|
|
1111
|
-
|
|
1170
|
+
android?: string | null;
|
|
1112
1171
|
/**
|
|
1113
|
-
*
|
|
1114
|
-
* of the project will be returned.
|
|
1172
|
+
* Whether the short link is archived.
|
|
1115
1173
|
*/
|
|
1116
|
-
|
|
1174
|
+
archived?: boolean;
|
|
1117
1175
|
/**
|
|
1118
|
-
*
|
|
1176
|
+
* The comments for the short link.
|
|
1119
1177
|
*/
|
|
1120
|
-
|
|
1178
|
+
comments?: string | null;
|
|
1121
1179
|
/**
|
|
1122
|
-
* The
|
|
1123
|
-
*
|
|
1180
|
+
* The description of the short link generated via `api.codeqr.io/metatags`. Will
|
|
1181
|
+
* be used for custom link preview if `proxy` is true.
|
|
1124
1182
|
*/
|
|
1125
|
-
|
|
1183
|
+
description?: string | null;
|
|
1126
1184
|
/**
|
|
1127
|
-
*
|
|
1185
|
+
* Allow search engines to index your short link. Default is `false` if not
|
|
1186
|
+
* provided. Learn more: https://codeqr.link/noindex
|
|
1128
1187
|
*/
|
|
1129
|
-
|
|
1188
|
+
doIndex?: boolean;
|
|
1130
1189
|
/**
|
|
1131
|
-
* The
|
|
1190
|
+
* The domain of the short link. If not provided, the main domain of the project
|
|
1191
|
+
* will be used (or `codeqr.link` if the project has no domains).
|
|
1132
1192
|
*/
|
|
1133
|
-
|
|
1193
|
+
domain?: string;
|
|
1134
1194
|
/**
|
|
1135
|
-
*
|
|
1136
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
1195
|
+
* The URL to redirect to when the short link expires.
|
|
1137
1196
|
*/
|
|
1138
|
-
|
|
1197
|
+
expiredUrl?: string | null;
|
|
1139
1198
|
/**
|
|
1140
|
-
*
|
|
1199
|
+
* The date and time when the short link will expire in ISO-8601 format. Must be in
|
|
1200
|
+
* the future.
|
|
1141
1201
|
*/
|
|
1142
|
-
|
|
1202
|
+
expiresAt?: string | null;
|
|
1143
1203
|
/**
|
|
1144
|
-
*
|
|
1204
|
+
* This is the ID of the link in your database. If set, it can be used to identify
|
|
1205
|
+
* the link in the future. Must be prefixed with `ext_` when passed as a query
|
|
1206
|
+
* parameter.
|
|
1145
1207
|
*/
|
|
1146
|
-
|
|
1208
|
+
externalId?: string | null;
|
|
1147
1209
|
/**
|
|
1148
|
-
*
|
|
1210
|
+
* Whether the short link is flexible.
|
|
1149
1211
|
*/
|
|
1150
|
-
|
|
1212
|
+
flexible?: boolean;
|
|
1151
1213
|
/**
|
|
1152
|
-
*
|
|
1214
|
+
* The unique ID existing folder to assign the short link to.
|
|
1153
1215
|
*/
|
|
1154
|
-
|
|
1216
|
+
folderId?: string | null;
|
|
1155
1217
|
/**
|
|
1156
|
-
*
|
|
1218
|
+
* Geographic targeting information for the short link in JSON format
|
|
1219
|
+
* `{[COUNTRY]: https://example.com }`.
|
|
1157
1220
|
*/
|
|
1158
|
-
|
|
1221
|
+
geo?: LinkUpdateParams.Geo | null;
|
|
1159
1222
|
/**
|
|
1160
|
-
*
|
|
1223
|
+
* The image of the short link generated via `api.codeqr.io/metatags`. Will be used
|
|
1224
|
+
* for custom link preview if `proxy` is true.
|
|
1161
1225
|
*/
|
|
1162
|
-
|
|
1226
|
+
image?: string | null;
|
|
1163
1227
|
/**
|
|
1164
|
-
*
|
|
1228
|
+
* The iOS destination URL for the short link for iOS device targeting.
|
|
1165
1229
|
*/
|
|
1166
|
-
|
|
1230
|
+
ios?: string | null;
|
|
1167
1231
|
/**
|
|
1168
|
-
*
|
|
1232
|
+
* If the form is mandatory for the page.
|
|
1169
1233
|
*/
|
|
1170
|
-
|
|
1234
|
+
isFormMandatory?: boolean;
|
|
1171
1235
|
/**
|
|
1172
|
-
* The
|
|
1236
|
+
* The slug of the short link. If not provided, a random 7-character slug will be
|
|
1237
|
+
* generated.
|
|
1173
1238
|
*/
|
|
1174
|
-
|
|
1239
|
+
key?: string;
|
|
1175
1240
|
/**
|
|
1176
|
-
*
|
|
1241
|
+
* The ID of the page to redirect to before the link destination.
|
|
1177
1242
|
*/
|
|
1178
|
-
|
|
1243
|
+
pageId?: string | null;
|
|
1179
1244
|
/**
|
|
1180
|
-
* The page
|
|
1245
|
+
* The URL of the page to redirect to before the link destination.
|
|
1181
1246
|
*/
|
|
1182
|
-
|
|
1247
|
+
pageUrl?: string | null;
|
|
1183
1248
|
/**
|
|
1184
|
-
* The
|
|
1249
|
+
* The password required to access the short link destination URL.
|
|
1185
1250
|
*/
|
|
1186
|
-
|
|
1251
|
+
password?: string | null;
|
|
1187
1252
|
/**
|
|
1188
|
-
* The
|
|
1253
|
+
* The prefix of the short link slug for randomly generated keys (for example, if
|
|
1254
|
+
* the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
|
|
1255
|
+
* be ignored if `key` is provided.
|
|
1189
1256
|
*/
|
|
1190
|
-
|
|
1257
|
+
prefix?: string;
|
|
1191
1258
|
/**
|
|
1192
|
-
*
|
|
1193
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1259
|
+
* Whether the short link has pre-redirection.
|
|
1194
1260
|
*/
|
|
1195
|
-
|
|
1261
|
+
preRedirection?: boolean;
|
|
1196
1262
|
/**
|
|
1197
|
-
*
|
|
1198
|
-
* short link slug and the destination URL.
|
|
1263
|
+
* Whether the short link uses the custom link preview feature.
|
|
1199
1264
|
*/
|
|
1200
|
-
|
|
1265
|
+
proxy?: boolean;
|
|
1201
1266
|
/**
|
|
1202
|
-
*
|
|
1203
|
-
* provided.
|
|
1267
|
+
* Whether the short link statistics are publicly accessible.
|
|
1204
1268
|
*/
|
|
1205
|
-
|
|
1269
|
+
publicStats?: boolean;
|
|
1206
1270
|
/**
|
|
1207
|
-
*
|
|
1208
|
-
* always descending.
|
|
1271
|
+
* Whether the short link uses link cloaking.
|
|
1209
1272
|
*/
|
|
1210
|
-
|
|
1273
|
+
rewrite?: boolean;
|
|
1211
1274
|
/**
|
|
1212
|
-
*
|
|
1213
|
-
* assigned to the short link.
|
|
1275
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
1214
1276
|
*/
|
|
1215
|
-
|
|
1277
|
+
rules?: Array<LinkUpdateParams.Rule> | null;
|
|
1216
1278
|
/**
|
|
1217
|
-
* The
|
|
1279
|
+
* @deprecated The unique ID of the tag assigned to the short link. This field is
|
|
1280
|
+
* deprecated – use `tagIds` instead.
|
|
1281
|
+
*/
|
|
1282
|
+
tagId?: string | null;
|
|
1283
|
+
/**
|
|
1284
|
+
* The unique IDs of the tags assigned to the short link.
|
|
1218
1285
|
*/
|
|
1219
1286
|
tagIds?: string | Array<string>;
|
|
1220
1287
|
/**
|
|
@@ -1222,26 +1289,35 @@ export interface LinkListParams {
|
|
|
1222
1289
|
*/
|
|
1223
1290
|
tagNames?: string | Array<string>;
|
|
1224
1291
|
/**
|
|
1225
|
-
*
|
|
1226
|
-
* if
|
|
1292
|
+
* The title of the short link generated via `api.codeqr.io/metatags`. Will be used
|
|
1293
|
+
* for custom link preview if `proxy` is true.
|
|
1294
|
+
*/
|
|
1295
|
+
title?: string | null;
|
|
1296
|
+
/**
|
|
1297
|
+
* Whether to track conversions for the short link.
|
|
1227
1298
|
*/
|
|
1228
1299
|
trackConversion?: boolean;
|
|
1229
1300
|
/**
|
|
1230
|
-
*
|
|
1301
|
+
* The destination URL of the short link.
|
|
1302
|
+
*/
|
|
1303
|
+
url?: string;
|
|
1304
|
+
/**
|
|
1305
|
+
* Whether this link should be used as a reusable template.
|
|
1231
1306
|
*/
|
|
1232
1307
|
useAsTemplate?: boolean;
|
|
1233
1308
|
/**
|
|
1234
|
-
* The
|
|
1309
|
+
* The video of the short link.
|
|
1235
1310
|
*/
|
|
1236
|
-
|
|
1311
|
+
video?: string | null;
|
|
1237
1312
|
/**
|
|
1238
|
-
*
|
|
1313
|
+
* An array of webhook IDs to trigger when the link is clicked. These webhooks will
|
|
1314
|
+
* receive click event data.
|
|
1239
1315
|
*/
|
|
1240
|
-
|
|
1316
|
+
webhookIds?: Array<string> | null;
|
|
1241
1317
|
}
|
|
1242
|
-
export declare namespace
|
|
1318
|
+
export declare namespace LinkUpdateParams {
|
|
1243
1319
|
/**
|
|
1244
|
-
* Geographic
|
|
1320
|
+
* Geographic targeting information for the short link in JSON format
|
|
1245
1321
|
* `{[COUNTRY]: https://example.com }`.
|
|
1246
1322
|
*/
|
|
1247
1323
|
interface Geo {
|
|
@@ -1496,35 +1572,15 @@ export declare namespace LinkListParams {
|
|
|
1496
1572
|
ZM?: string;
|
|
1497
1573
|
ZW?: string;
|
|
1498
1574
|
}
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
domain: string;
|
|
1506
|
-
/**
|
|
1507
|
-
* The key of the link to be retrieved. For example, for `codeqr.link/github`, the
|
|
1508
|
-
* key is `github`.
|
|
1509
|
-
*/
|
|
1510
|
-
key: string;
|
|
1511
|
-
/**
|
|
1512
|
-
* The slug of the project to which the link belongs. For example, for
|
|
1513
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1514
|
-
*/
|
|
1515
|
-
projectSlug: string;
|
|
1516
|
-
/**
|
|
1517
|
-
* This is the ID of the link in your database. Must be prefixed with `ext_` when
|
|
1518
|
-
* passed as a query parameter.
|
|
1519
|
-
*/
|
|
1520
|
-
externalId?: string;
|
|
1521
|
-
/**
|
|
1522
|
-
* The unique ID of the short link.
|
|
1523
|
-
*/
|
|
1524
|
-
linkId?: string;
|
|
1575
|
+
interface Rule {
|
|
1576
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
1577
|
+
operator: 'equals' | 'not_equals';
|
|
1578
|
+
url: string;
|
|
1579
|
+
value: string;
|
|
1580
|
+
}
|
|
1525
1581
|
}
|
|
1526
1582
|
export declare namespace Links {
|
|
1527
|
-
export { type Link as Link, type LinkListResponse as LinkListResponse, type LinkDeleteResponse as LinkDeleteResponse, type LinkCreateParams as LinkCreateParams, type
|
|
1583
|
+
export { type Link as Link, type LinkListResponse as LinkListResponse, type LinkDeleteResponse as LinkDeleteResponse, type LinkCreateParams as LinkCreateParams, type LinkListParams as LinkListParams, type LinkRetrieveInfoParams as LinkRetrieveInfoParams, type LinkUpdateParams as LinkUpdateParams, };
|
|
1528
1584
|
export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkCreateParams as BulkCreateParams, };
|
|
1529
1585
|
}
|
|
1530
1586
|
//# sourceMappingURL=links.d.ts.map
|