@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
|
@@ -26,63 +26,63 @@ export class Links extends APIResource {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* as it is.
|
|
29
|
+
* Retrieve a paginated list of links for the authenticated workspace.
|
|
31
30
|
*
|
|
32
31
|
* @example
|
|
33
32
|
* ```ts
|
|
34
|
-
* const
|
|
33
|
+
* const links = await client.links.list();
|
|
35
34
|
* ```
|
|
36
35
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
body: LinkUpdateParams | null | undefined = {},
|
|
36
|
+
list(
|
|
37
|
+
query: LinkListParams | null | undefined = {},
|
|
40
38
|
options?: RequestOptions,
|
|
41
|
-
): APIPromise<
|
|
42
|
-
return this._client.
|
|
39
|
+
): APIPromise<LinkListResponse> {
|
|
40
|
+
return this._client.get('/links', { query, ...options });
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
/**
|
|
46
|
-
* Retrieve
|
|
44
|
+
* Retrieve the info for a link.
|
|
47
45
|
*
|
|
48
46
|
* @example
|
|
49
47
|
* ```ts
|
|
50
|
-
* const
|
|
48
|
+
* const link = await client.links.retrieveInfo({
|
|
49
|
+
* domain: 'x',
|
|
50
|
+
* key: 'x',
|
|
51
|
+
* projectSlug: 'x',
|
|
52
|
+
* });
|
|
51
53
|
* ```
|
|
52
54
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
options?: RequestOptions,
|
|
56
|
-
): APIPromise<LinkListResponse> {
|
|
57
|
-
return this._client.get('/links', { query, ...options });
|
|
55
|
+
retrieveInfo(query: LinkRetrieveInfoParams, options?: RequestOptions): APIPromise<Link> {
|
|
56
|
+
return this._client.get('/links/info', { query, ...options });
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
|
-
*
|
|
60
|
+
* Update a link for the authenticated workspace. If there's no change, returns it
|
|
61
|
+
* as it is.
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
64
|
* ```ts
|
|
65
|
-
* const link = await client.links.
|
|
65
|
+
* const link = await client.links.update('linkId');
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
update(
|
|
69
|
+
linkID: string,
|
|
70
|
+
body: LinkUpdateParams | null | undefined = {},
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): APIPromise<Link> {
|
|
73
|
+
return this._client.put(path`/links/${linkID}`, { body, ...options });
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
/**
|
|
73
|
-
*
|
|
77
|
+
* Delete a link for the authenticated workspace.
|
|
74
78
|
*
|
|
75
79
|
* @example
|
|
76
80
|
* ```ts
|
|
77
|
-
* const link = await client.links.
|
|
78
|
-
* domain: 'x',
|
|
79
|
-
* key: 'x',
|
|
80
|
-
* projectSlug: 'x',
|
|
81
|
-
* });
|
|
81
|
+
* const link = await client.links.delete('linkId');
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
84
|
-
|
|
85
|
-
return this._client.
|
|
84
|
+
delete(linkID: string, options?: RequestOptions): APIPromise<LinkDeleteResponse> {
|
|
85
|
+
return this._client.delete(path`/links/${linkID}`, options);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -238,6 +238,11 @@ export interface Link {
|
|
|
238
238
|
*/
|
|
239
239
|
rewrite: boolean;
|
|
240
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
243
|
+
*/
|
|
244
|
+
rules: Array<Link.Rule> | null;
|
|
245
|
+
|
|
241
246
|
/**
|
|
242
247
|
* The amount of the sale generated by the link.
|
|
243
248
|
*/
|
|
@@ -280,6 +285,11 @@ export interface Link {
|
|
|
280
285
|
*/
|
|
281
286
|
url: string;
|
|
282
287
|
|
|
288
|
+
/**
|
|
289
|
+
* Whether this link should be used as a reusable template.
|
|
290
|
+
*/
|
|
291
|
+
useAsTemplate: boolean;
|
|
292
|
+
|
|
283
293
|
/**
|
|
284
294
|
* The ID of the user who created the short link.
|
|
285
295
|
*/
|
|
@@ -338,6 +348,18 @@ export interface Link {
|
|
|
338
348
|
shortLink?: string;
|
|
339
349
|
}
|
|
340
350
|
|
|
351
|
+
export namespace Link {
|
|
352
|
+
export interface Rule {
|
|
353
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
354
|
+
|
|
355
|
+
operator: 'equals' | 'not_equals';
|
|
356
|
+
|
|
357
|
+
url: string;
|
|
358
|
+
|
|
359
|
+
value: string;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
341
363
|
export type LinkListResponse = Array<Link>;
|
|
342
364
|
|
|
343
365
|
export interface LinkDeleteResponse {
|
|
@@ -484,6 +506,11 @@ export interface LinkCreateParams {
|
|
|
484
506
|
*/
|
|
485
507
|
rewrite?: boolean;
|
|
486
508
|
|
|
509
|
+
/**
|
|
510
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
511
|
+
*/
|
|
512
|
+
rules?: Array<LinkCreateParams.Rule> | null;
|
|
513
|
+
|
|
487
514
|
/**
|
|
488
515
|
* @deprecated The unique ID of the tag assigned to the short link. This field is
|
|
489
516
|
* deprecated – use `tagIds` instead.
|
|
@@ -1034,148 +1061,179 @@ export namespace LinkCreateParams {
|
|
|
1034
1061
|
|
|
1035
1062
|
ZW?: string;
|
|
1036
1063
|
}
|
|
1064
|
+
|
|
1065
|
+
export interface Rule {
|
|
1066
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
1067
|
+
|
|
1068
|
+
operator: 'equals' | 'not_equals';
|
|
1069
|
+
|
|
1070
|
+
url: string;
|
|
1071
|
+
|
|
1072
|
+
value: string;
|
|
1073
|
+
}
|
|
1037
1074
|
}
|
|
1038
1075
|
|
|
1039
|
-
export interface
|
|
1076
|
+
export interface LinkListParams {
|
|
1040
1077
|
/**
|
|
1041
|
-
* The Android
|
|
1078
|
+
* The Android device to filter by.
|
|
1042
1079
|
*/
|
|
1043
|
-
android?: string
|
|
1080
|
+
android?: string;
|
|
1044
1081
|
|
|
1045
1082
|
/**
|
|
1046
|
-
*
|
|
1083
|
+
* Maximum number of clicks
|
|
1047
1084
|
*/
|
|
1048
|
-
|
|
1085
|
+
clicksMax?: number;
|
|
1049
1086
|
|
|
1050
1087
|
/**
|
|
1051
|
-
*
|
|
1088
|
+
* Minimum number of clicks
|
|
1052
1089
|
*/
|
|
1053
|
-
|
|
1090
|
+
clicksMin?: number;
|
|
1054
1091
|
|
|
1055
1092
|
/**
|
|
1056
|
-
* The
|
|
1057
|
-
* be used for custom link preview if `proxy` is true.
|
|
1093
|
+
* The comments to filter by.
|
|
1058
1094
|
*/
|
|
1059
|
-
|
|
1095
|
+
comments?: string;
|
|
1060
1096
|
|
|
1061
1097
|
/**
|
|
1062
|
-
*
|
|
1063
|
-
* provided. Learn more: https://codeqr.link/noindex
|
|
1098
|
+
* Created after date (ISO string)
|
|
1064
1099
|
*/
|
|
1065
|
-
|
|
1100
|
+
createdAfter?: string;
|
|
1066
1101
|
|
|
1067
1102
|
/**
|
|
1068
|
-
*
|
|
1069
|
-
|
|
1103
|
+
* Created before date (ISO string)
|
|
1104
|
+
*/
|
|
1105
|
+
createdBefore?: string;
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* The domain to filter the links. For example, `ac.me`. If not provided, all links
|
|
1109
|
+
* of the project will be returned.
|
|
1070
1110
|
*/
|
|
1071
1111
|
domain?: string;
|
|
1072
1112
|
|
|
1073
1113
|
/**
|
|
1074
|
-
*
|
|
1114
|
+
* Expires after date (ISO string)
|
|
1075
1115
|
*/
|
|
1076
|
-
|
|
1116
|
+
expiresAfter?: string;
|
|
1077
1117
|
|
|
1078
1118
|
/**
|
|
1079
|
-
* The date and time
|
|
1080
|
-
*
|
|
1119
|
+
* The date and time the short link will expire in ISO-8601 format. Must be in the
|
|
1120
|
+
* future.
|
|
1081
1121
|
*/
|
|
1082
1122
|
expiresAt?: string | null;
|
|
1083
1123
|
|
|
1084
1124
|
/**
|
|
1085
|
-
*
|
|
1086
|
-
* the link in the future. Must be prefixed with `ext_` when passed as a query
|
|
1087
|
-
* parameter.
|
|
1125
|
+
* Expires before date (ISO string)
|
|
1088
1126
|
*/
|
|
1089
|
-
|
|
1127
|
+
expiresBefore?: string;
|
|
1090
1128
|
|
|
1091
1129
|
/**
|
|
1092
|
-
*
|
|
1130
|
+
* The folder ID to filter the links by.
|
|
1093
1131
|
*/
|
|
1094
|
-
|
|
1132
|
+
folderId?: string;
|
|
1095
1133
|
|
|
1096
1134
|
/**
|
|
1097
|
-
*
|
|
1135
|
+
* Geographic segmentation information for the short link in JSON format
|
|
1136
|
+
* `{[COUNTRY]: https://example.com }`.
|
|
1098
1137
|
*/
|
|
1099
|
-
|
|
1138
|
+
geo?: LinkListParams.Geo | null;
|
|
1100
1139
|
|
|
1101
1140
|
/**
|
|
1102
|
-
*
|
|
1103
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
1141
|
+
* Filter links that have comments (any comments)
|
|
1104
1142
|
*/
|
|
1105
|
-
|
|
1143
|
+
hasComments?: boolean;
|
|
1106
1144
|
|
|
1107
1145
|
/**
|
|
1108
|
-
*
|
|
1109
|
-
* for custom link preview if `proxy` is true.
|
|
1146
|
+
* Filter links that have custom social media cards
|
|
1110
1147
|
*/
|
|
1111
|
-
|
|
1148
|
+
hasCustomSocial?: boolean;
|
|
1112
1149
|
|
|
1113
1150
|
/**
|
|
1114
|
-
*
|
|
1151
|
+
* Filter links that have device targeting
|
|
1115
1152
|
*/
|
|
1116
|
-
|
|
1153
|
+
hasDevice?: boolean;
|
|
1117
1154
|
|
|
1118
1155
|
/**
|
|
1119
|
-
*
|
|
1156
|
+
* Filter links that have expiration date (any expiration)
|
|
1120
1157
|
*/
|
|
1121
|
-
|
|
1158
|
+
hasExpiration?: boolean;
|
|
1122
1159
|
|
|
1123
1160
|
/**
|
|
1124
|
-
*
|
|
1125
|
-
* generated.
|
|
1161
|
+
* Filter links that have geo-targeting
|
|
1126
1162
|
*/
|
|
1127
|
-
|
|
1163
|
+
hasGeo?: boolean;
|
|
1128
1164
|
|
|
1129
1165
|
/**
|
|
1130
|
-
*
|
|
1166
|
+
* Filter links that have password protection (any password)
|
|
1131
1167
|
*/
|
|
1132
|
-
|
|
1168
|
+
hasPassword?: boolean;
|
|
1133
1169
|
|
|
1134
1170
|
/**
|
|
1135
|
-
*
|
|
1171
|
+
* Filter links that have tags (any tags)
|
|
1136
1172
|
*/
|
|
1137
|
-
|
|
1173
|
+
hasTags?: boolean;
|
|
1138
1174
|
|
|
1139
1175
|
/**
|
|
1140
|
-
*
|
|
1176
|
+
* Filter links that have UTM parameters
|
|
1141
1177
|
*/
|
|
1142
|
-
|
|
1178
|
+
hasUTM?: boolean;
|
|
1143
1179
|
|
|
1144
1180
|
/**
|
|
1145
|
-
* The
|
|
1146
|
-
* the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
|
|
1147
|
-
* be ignored if `key` is provided.
|
|
1181
|
+
* The iOS device to filter by.
|
|
1148
1182
|
*/
|
|
1149
|
-
|
|
1183
|
+
ios?: string;
|
|
1150
1184
|
|
|
1151
1185
|
/**
|
|
1152
|
-
*
|
|
1186
|
+
* Link IDs to filter by.
|
|
1153
1187
|
*/
|
|
1154
|
-
|
|
1188
|
+
linkIds?: string | Array<string>;
|
|
1155
1189
|
|
|
1156
1190
|
/**
|
|
1157
|
-
*
|
|
1191
|
+
* The page number for pagination.
|
|
1158
1192
|
*/
|
|
1159
|
-
|
|
1193
|
+
page?: number;
|
|
1160
1194
|
|
|
1161
1195
|
/**
|
|
1162
|
-
*
|
|
1196
|
+
* The number of items per page.
|
|
1163
1197
|
*/
|
|
1164
|
-
|
|
1198
|
+
pageSize?: number;
|
|
1165
1199
|
|
|
1166
1200
|
/**
|
|
1167
|
-
*
|
|
1201
|
+
* The password to filter by.
|
|
1168
1202
|
*/
|
|
1169
|
-
|
|
1203
|
+
password?: string;
|
|
1170
1204
|
|
|
1171
1205
|
/**
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1206
|
+
* The slug of the project to which the link belongs. For example, for
|
|
1207
|
+
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1174
1208
|
*/
|
|
1175
|
-
|
|
1209
|
+
projectSlug?: string;
|
|
1176
1210
|
|
|
1177
1211
|
/**
|
|
1178
|
-
* The
|
|
1212
|
+
* The search term to filter the links. The search term will be matched against the
|
|
1213
|
+
* short link slug and the destination URL.
|
|
1214
|
+
*/
|
|
1215
|
+
search?: string;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* If should include archived links in the response. The default is `false` if not
|
|
1219
|
+
* provided.
|
|
1220
|
+
*/
|
|
1221
|
+
showArchived?: boolean;
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* The field to sort the links by. The default is `createdAt`, and sort order is
|
|
1225
|
+
* always descending.
|
|
1226
|
+
*/
|
|
1227
|
+
sort?: 'createdAt' | 'clicks' | 'lastClicked';
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* @deprecated [OBSOLETO (use tagIds em vez disso)]: The unique ID of the tag
|
|
1231
|
+
* assigned to the short link.
|
|
1232
|
+
*/
|
|
1233
|
+
tagId?: string;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* The IDs of the tags to filter the links.
|
|
1179
1237
|
*/
|
|
1180
1238
|
tagIds?: string | Array<string>;
|
|
1181
1239
|
|
|
@@ -1185,41 +1243,55 @@ export interface LinkUpdateParams {
|
|
|
1185
1243
|
tagNames?: string | Array<string>;
|
|
1186
1244
|
|
|
1187
1245
|
/**
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1246
|
+
* If should include links with conversion tracking enabled. The default is `false`
|
|
1247
|
+
* if not provided.
|
|
1190
1248
|
*/
|
|
1191
|
-
|
|
1249
|
+
trackConversion?: boolean;
|
|
1192
1250
|
|
|
1193
1251
|
/**
|
|
1194
|
-
*
|
|
1252
|
+
* Filter links marked as templates.
|
|
1195
1253
|
*/
|
|
1196
|
-
|
|
1254
|
+
useAsTemplate?: boolean;
|
|
1197
1255
|
|
|
1198
1256
|
/**
|
|
1199
|
-
* The
|
|
1257
|
+
* The ID of the user to filter by.
|
|
1200
1258
|
*/
|
|
1201
|
-
|
|
1259
|
+
userId?: string;
|
|
1202
1260
|
|
|
1203
1261
|
/**
|
|
1204
|
-
*
|
|
1262
|
+
* Filter by UTM campaign value
|
|
1205
1263
|
*/
|
|
1206
|
-
|
|
1264
|
+
utm_campaign?: string;
|
|
1207
1265
|
|
|
1208
1266
|
/**
|
|
1209
|
-
*
|
|
1267
|
+
* Filter by UTM content value
|
|
1210
1268
|
*/
|
|
1211
|
-
|
|
1269
|
+
utm_content?: string;
|
|
1212
1270
|
|
|
1213
1271
|
/**
|
|
1214
|
-
*
|
|
1215
|
-
* receive click event data.
|
|
1272
|
+
* Filter by UTM medium value
|
|
1216
1273
|
*/
|
|
1217
|
-
|
|
1274
|
+
utm_medium?: string;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Filter by UTM source value
|
|
1278
|
+
*/
|
|
1279
|
+
utm_source?: string;
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* Filter by UTM term value
|
|
1283
|
+
*/
|
|
1284
|
+
utm_term?: string;
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* If should include tags in the response. The default is `false` if not provided.
|
|
1288
|
+
*/
|
|
1289
|
+
withTags?: boolean;
|
|
1218
1290
|
}
|
|
1219
1291
|
|
|
1220
|
-
export namespace
|
|
1292
|
+
export namespace LinkListParams {
|
|
1221
1293
|
/**
|
|
1222
|
-
* Geographic
|
|
1294
|
+
* Geographic segmentation information for the short link in JSON format
|
|
1223
1295
|
* `{[COUNTRY]: https://example.com }`.
|
|
1224
1296
|
*/
|
|
1225
1297
|
export interface Geo {
|
|
@@ -1725,167 +1797,182 @@ export namespace LinkUpdateParams {
|
|
|
1725
1797
|
}
|
|
1726
1798
|
}
|
|
1727
1799
|
|
|
1728
|
-
export interface
|
|
1800
|
+
export interface LinkRetrieveInfoParams {
|
|
1729
1801
|
/**
|
|
1730
|
-
* The
|
|
1802
|
+
* The domain of the link to be retrieved. For example, for `codeqr.link/github`,
|
|
1803
|
+
* the domain is `codeqr.link`.
|
|
1731
1804
|
*/
|
|
1732
|
-
|
|
1805
|
+
domain: string;
|
|
1733
1806
|
|
|
1734
1807
|
/**
|
|
1735
|
-
*
|
|
1808
|
+
* The key of the link to be retrieved. For example, for `codeqr.link/github`, the
|
|
1809
|
+
* key is `github`.
|
|
1736
1810
|
*/
|
|
1737
|
-
|
|
1811
|
+
key: string;
|
|
1738
1812
|
|
|
1739
1813
|
/**
|
|
1740
|
-
*
|
|
1814
|
+
* The slug of the project to which the link belongs. For example, for
|
|
1815
|
+
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1741
1816
|
*/
|
|
1742
|
-
|
|
1817
|
+
projectSlug: string;
|
|
1743
1818
|
|
|
1744
1819
|
/**
|
|
1745
|
-
*
|
|
1820
|
+
* This is the ID of the link in your database. Must be prefixed with `ext_` when
|
|
1821
|
+
* passed as a query parameter.
|
|
1746
1822
|
*/
|
|
1747
|
-
|
|
1823
|
+
externalId?: string;
|
|
1748
1824
|
|
|
1749
1825
|
/**
|
|
1750
|
-
*
|
|
1826
|
+
* The unique ID of the short link.
|
|
1751
1827
|
*/
|
|
1752
|
-
|
|
1828
|
+
linkId?: string;
|
|
1829
|
+
}
|
|
1753
1830
|
|
|
1831
|
+
export interface LinkUpdateParams {
|
|
1754
1832
|
/**
|
|
1755
|
-
*
|
|
1833
|
+
* The Android destination URL for the short link for Android device targeting.
|
|
1756
1834
|
*/
|
|
1757
|
-
|
|
1835
|
+
android?: string | null;
|
|
1758
1836
|
|
|
1759
1837
|
/**
|
|
1760
|
-
*
|
|
1761
|
-
* of the project will be returned.
|
|
1838
|
+
* Whether the short link is archived.
|
|
1762
1839
|
*/
|
|
1763
|
-
|
|
1840
|
+
archived?: boolean;
|
|
1764
1841
|
|
|
1765
1842
|
/**
|
|
1766
|
-
*
|
|
1843
|
+
* The comments for the short link.
|
|
1767
1844
|
*/
|
|
1768
|
-
|
|
1845
|
+
comments?: string | null;
|
|
1769
1846
|
|
|
1770
1847
|
/**
|
|
1771
|
-
* The
|
|
1772
|
-
*
|
|
1848
|
+
* The description of the short link generated via `api.codeqr.io/metatags`. Will
|
|
1849
|
+
* be used for custom link preview if `proxy` is true.
|
|
1773
1850
|
*/
|
|
1774
|
-
|
|
1851
|
+
description?: string | null;
|
|
1775
1852
|
|
|
1776
1853
|
/**
|
|
1777
|
-
*
|
|
1854
|
+
* Allow search engines to index your short link. Default is `false` if not
|
|
1855
|
+
* provided. Learn more: https://codeqr.link/noindex
|
|
1778
1856
|
*/
|
|
1779
|
-
|
|
1857
|
+
doIndex?: boolean;
|
|
1780
1858
|
|
|
1781
1859
|
/**
|
|
1782
|
-
* The
|
|
1860
|
+
* The domain of the short link. If not provided, the main domain of the project
|
|
1861
|
+
* will be used (or `codeqr.link` if the project has no domains).
|
|
1783
1862
|
*/
|
|
1784
|
-
|
|
1863
|
+
domain?: string;
|
|
1785
1864
|
|
|
1786
1865
|
/**
|
|
1787
|
-
*
|
|
1788
|
-
* `{[COUNTRY]: https://example.com }`.
|
|
1866
|
+
* The URL to redirect to when the short link expires.
|
|
1789
1867
|
*/
|
|
1790
|
-
|
|
1868
|
+
expiredUrl?: string | null;
|
|
1791
1869
|
|
|
1792
1870
|
/**
|
|
1793
|
-
*
|
|
1871
|
+
* The date and time when the short link will expire in ISO-8601 format. Must be in
|
|
1872
|
+
* the future.
|
|
1794
1873
|
*/
|
|
1795
|
-
|
|
1874
|
+
expiresAt?: string | null;
|
|
1796
1875
|
|
|
1797
1876
|
/**
|
|
1798
|
-
*
|
|
1877
|
+
* This is the ID of the link in your database. If set, it can be used to identify
|
|
1878
|
+
* the link in the future. Must be prefixed with `ext_` when passed as a query
|
|
1879
|
+
* parameter.
|
|
1799
1880
|
*/
|
|
1800
|
-
|
|
1881
|
+
externalId?: string | null;
|
|
1801
1882
|
|
|
1802
1883
|
/**
|
|
1803
|
-
*
|
|
1884
|
+
* Whether the short link is flexible.
|
|
1804
1885
|
*/
|
|
1805
|
-
|
|
1886
|
+
flexible?: boolean;
|
|
1806
1887
|
|
|
1807
1888
|
/**
|
|
1808
|
-
*
|
|
1889
|
+
* The unique ID existing folder to assign the short link to.
|
|
1809
1890
|
*/
|
|
1810
|
-
|
|
1891
|
+
folderId?: string | null;
|
|
1811
1892
|
|
|
1812
1893
|
/**
|
|
1813
|
-
*
|
|
1894
|
+
* Geographic targeting information for the short link in JSON format
|
|
1895
|
+
* `{[COUNTRY]: https://example.com }`.
|
|
1814
1896
|
*/
|
|
1815
|
-
|
|
1897
|
+
geo?: LinkUpdateParams.Geo | null;
|
|
1816
1898
|
|
|
1817
1899
|
/**
|
|
1818
|
-
*
|
|
1900
|
+
* The image of the short link generated via `api.codeqr.io/metatags`. Will be used
|
|
1901
|
+
* for custom link preview if `proxy` is true.
|
|
1819
1902
|
*/
|
|
1820
|
-
|
|
1903
|
+
image?: string | null;
|
|
1821
1904
|
|
|
1822
1905
|
/**
|
|
1823
|
-
*
|
|
1906
|
+
* The iOS destination URL for the short link for iOS device targeting.
|
|
1824
1907
|
*/
|
|
1825
|
-
|
|
1908
|
+
ios?: string | null;
|
|
1826
1909
|
|
|
1827
1910
|
/**
|
|
1828
|
-
*
|
|
1911
|
+
* If the form is mandatory for the page.
|
|
1829
1912
|
*/
|
|
1830
|
-
|
|
1913
|
+
isFormMandatory?: boolean;
|
|
1831
1914
|
|
|
1832
1915
|
/**
|
|
1833
|
-
* The
|
|
1916
|
+
* The slug of the short link. If not provided, a random 7-character slug will be
|
|
1917
|
+
* generated.
|
|
1834
1918
|
*/
|
|
1835
|
-
|
|
1919
|
+
key?: string;
|
|
1836
1920
|
|
|
1837
1921
|
/**
|
|
1838
|
-
*
|
|
1922
|
+
* The ID of the page to redirect to before the link destination.
|
|
1839
1923
|
*/
|
|
1840
|
-
|
|
1924
|
+
pageId?: string | null;
|
|
1841
1925
|
|
|
1842
1926
|
/**
|
|
1843
|
-
* The page
|
|
1927
|
+
* The URL of the page to redirect to before the link destination.
|
|
1844
1928
|
*/
|
|
1845
|
-
|
|
1929
|
+
pageUrl?: string | null;
|
|
1846
1930
|
|
|
1847
1931
|
/**
|
|
1848
|
-
* The
|
|
1932
|
+
* The password required to access the short link destination URL.
|
|
1849
1933
|
*/
|
|
1850
|
-
|
|
1934
|
+
password?: string | null;
|
|
1851
1935
|
|
|
1852
1936
|
/**
|
|
1853
|
-
* The
|
|
1937
|
+
* The prefix of the short link slug for randomly generated keys (for example, if
|
|
1938
|
+
* the prefix is `/c/`, the generated keys will be in the format `/c/:key`). Will
|
|
1939
|
+
* be ignored if `key` is provided.
|
|
1854
1940
|
*/
|
|
1855
|
-
|
|
1941
|
+
prefix?: string;
|
|
1856
1942
|
|
|
1857
1943
|
/**
|
|
1858
|
-
*
|
|
1859
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
1944
|
+
* Whether the short link has pre-redirection.
|
|
1860
1945
|
*/
|
|
1861
|
-
|
|
1946
|
+
preRedirection?: boolean;
|
|
1862
1947
|
|
|
1863
1948
|
/**
|
|
1864
|
-
*
|
|
1865
|
-
* short link slug and the destination URL.
|
|
1949
|
+
* Whether the short link uses the custom link preview feature.
|
|
1866
1950
|
*/
|
|
1867
|
-
|
|
1951
|
+
proxy?: boolean;
|
|
1868
1952
|
|
|
1869
1953
|
/**
|
|
1870
|
-
*
|
|
1871
|
-
* provided.
|
|
1954
|
+
* Whether the short link statistics are publicly accessible.
|
|
1872
1955
|
*/
|
|
1873
|
-
|
|
1956
|
+
publicStats?: boolean;
|
|
1874
1957
|
|
|
1875
1958
|
/**
|
|
1876
|
-
*
|
|
1877
|
-
* always descending.
|
|
1959
|
+
* Whether the short link uses link cloaking.
|
|
1878
1960
|
*/
|
|
1879
|
-
|
|
1961
|
+
rewrite?: boolean;
|
|
1880
1962
|
|
|
1881
1963
|
/**
|
|
1882
|
-
*
|
|
1883
|
-
* assigned to the short link.
|
|
1964
|
+
* Smart rules for conditional destination routing by request attribute.
|
|
1884
1965
|
*/
|
|
1885
|
-
|
|
1966
|
+
rules?: Array<LinkUpdateParams.Rule> | null;
|
|
1886
1967
|
|
|
1887
1968
|
/**
|
|
1888
|
-
* The
|
|
1969
|
+
* @deprecated The unique ID of the tag assigned to the short link. This field is
|
|
1970
|
+
* deprecated – use `tagIds` instead.
|
|
1971
|
+
*/
|
|
1972
|
+
tagId?: string | null;
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* The unique IDs of the tags assigned to the short link.
|
|
1889
1976
|
*/
|
|
1890
1977
|
tagIds?: string | Array<string>;
|
|
1891
1978
|
|
|
@@ -1895,30 +1982,41 @@ export interface LinkListParams {
|
|
|
1895
1982
|
tagNames?: string | Array<string>;
|
|
1896
1983
|
|
|
1897
1984
|
/**
|
|
1898
|
-
*
|
|
1899
|
-
* if
|
|
1985
|
+
* The title of the short link generated via `api.codeqr.io/metatags`. Will be used
|
|
1986
|
+
* for custom link preview if `proxy` is true.
|
|
1987
|
+
*/
|
|
1988
|
+
title?: string | null;
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* Whether to track conversions for the short link.
|
|
1900
1992
|
*/
|
|
1901
1993
|
trackConversion?: boolean;
|
|
1902
1994
|
|
|
1903
1995
|
/**
|
|
1904
|
-
*
|
|
1996
|
+
* The destination URL of the short link.
|
|
1997
|
+
*/
|
|
1998
|
+
url?: string;
|
|
1999
|
+
|
|
2000
|
+
/**
|
|
2001
|
+
* Whether this link should be used as a reusable template.
|
|
1905
2002
|
*/
|
|
1906
2003
|
useAsTemplate?: boolean;
|
|
1907
2004
|
|
|
1908
2005
|
/**
|
|
1909
|
-
* The
|
|
2006
|
+
* The video of the short link.
|
|
1910
2007
|
*/
|
|
1911
|
-
|
|
2008
|
+
video?: string | null;
|
|
1912
2009
|
|
|
1913
2010
|
/**
|
|
1914
|
-
*
|
|
2011
|
+
* An array of webhook IDs to trigger when the link is clicked. These webhooks will
|
|
2012
|
+
* receive click event data.
|
|
1915
2013
|
*/
|
|
1916
|
-
|
|
2014
|
+
webhookIds?: Array<string> | null;
|
|
1917
2015
|
}
|
|
1918
2016
|
|
|
1919
|
-
export namespace
|
|
2017
|
+
export namespace LinkUpdateParams {
|
|
1920
2018
|
/**
|
|
1921
|
-
* Geographic
|
|
2019
|
+
* Geographic targeting information for the short link in JSON format
|
|
1922
2020
|
* `{[COUNTRY]: https://example.com }`.
|
|
1923
2021
|
*/
|
|
1924
2022
|
export interface Geo {
|
|
@@ -2422,37 +2520,16 @@ export namespace LinkListParams {
|
|
|
2422
2520
|
|
|
2423
2521
|
ZW?: string;
|
|
2424
2522
|
}
|
|
2425
|
-
}
|
|
2426
2523
|
|
|
2427
|
-
export interface
|
|
2428
|
-
|
|
2429
|
-
* The domain of the link to be retrieved. For example, for `codeqr.link/github`,
|
|
2430
|
-
* the domain is `codeqr.link`.
|
|
2431
|
-
*/
|
|
2432
|
-
domain: string;
|
|
2524
|
+
export interface Rule {
|
|
2525
|
+
attribute: 'device' | 'country' | 'utm_source' | 'utm_medium' | 'utm_campaign' | 'referrer' | 'language';
|
|
2433
2526
|
|
|
2434
|
-
|
|
2435
|
-
* The key of the link to be retrieved. For example, for `codeqr.link/github`, the
|
|
2436
|
-
* key is `github`.
|
|
2437
|
-
*/
|
|
2438
|
-
key: string;
|
|
2527
|
+
operator: 'equals' | 'not_equals';
|
|
2439
2528
|
|
|
2440
|
-
|
|
2441
|
-
* The slug of the project to which the link belongs. For example, for
|
|
2442
|
-
* `app.codeqr.io/acme`, the projectSlug is `acme`.
|
|
2443
|
-
*/
|
|
2444
|
-
projectSlug: string;
|
|
2445
|
-
|
|
2446
|
-
/**
|
|
2447
|
-
* This is the ID of the link in your database. Must be prefixed with `ext_` when
|
|
2448
|
-
* passed as a query parameter.
|
|
2449
|
-
*/
|
|
2450
|
-
externalId?: string;
|
|
2529
|
+
url: string;
|
|
2451
2530
|
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
*/
|
|
2455
|
-
linkId?: string;
|
|
2531
|
+
value: string;
|
|
2532
|
+
}
|
|
2456
2533
|
}
|
|
2457
2534
|
|
|
2458
2535
|
Links.Bulk = Bulk;
|
|
@@ -2463,9 +2540,9 @@ export declare namespace Links {
|
|
|
2463
2540
|
type LinkListResponse as LinkListResponse,
|
|
2464
2541
|
type LinkDeleteResponse as LinkDeleteResponse,
|
|
2465
2542
|
type LinkCreateParams as LinkCreateParams,
|
|
2466
|
-
type LinkUpdateParams as LinkUpdateParams,
|
|
2467
2543
|
type LinkListParams as LinkListParams,
|
|
2468
2544
|
type LinkRetrieveInfoParams as LinkRetrieveInfoParams,
|
|
2545
|
+
type LinkUpdateParams as LinkUpdateParams,
|
|
2469
2546
|
};
|
|
2470
2547
|
|
|
2471
2548
|
export {
|