@short.io/client-node 1.0.1
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/.eslintignore +1 -0
- package/.eslintrc.cjs +3 -0
- package/README.md +50 -0
- package/dist/index.js +412 -0
- package/dist/index.js.map +1 -0
- package/dist/test/domain/createDomain.js +5 -0
- package/dist/test/domain/createDomain.js.map +1 -0
- package/dist/test/domain/getDomains.js +5 -0
- package/dist/test/domain/getDomains.js.map +1 -0
- package/dist/test/getLinks.js +5 -0
- package/dist/test/getLinks.js.map +1 -0
- package/dist/test/link/archiveLink.js +5 -0
- package/dist/test/link/archiveLink.js.map +1 -0
- package/dist/test/link/createLink.js +5 -0
- package/dist/test/link/createLink.js.map +1 -0
- package/dist/test/link/createLinkBulk.js +14 -0
- package/dist/test/link/createLinkBulk.js.map +1 -0
- package/dist/test/link/createLinkCountry.js +8 -0
- package/dist/test/link/createLinkCountry.js.map +1 -0
- package/dist/test/link/createLinkPublic.js +5 -0
- package/dist/test/link/createLinkPublic.js.map +1 -0
- package/dist/test/link/createLinkRegions.js +9 -0
- package/dist/test/link/createLinkRegions.js.map +1 -0
- package/dist/test/link/deleteLink.js +5 -0
- package/dist/test/link/deleteLink.js.map +1 -0
- package/dist/test/link/deleteLinkCountry.js +5 -0
- package/dist/test/link/deleteLinkCountry.js.map +1 -0
- package/dist/test/link/deleteLinkRegion.js +8 -0
- package/dist/test/link/deleteLinkRegion.js.map +1 -0
- package/dist/test/link/getLinkCountry.js +5 -0
- package/dist/test/link/getLinkCountry.js.map +1 -0
- package/dist/test/link/getLinkInfoByOriginalURL.js +5 -0
- package/dist/test/link/getLinkInfoByOriginalURL.js.map +1 -0
- package/dist/test/link/getLinkInfoByPath.js +5 -0
- package/dist/test/link/getLinkInfoByPath.js.map +1 -0
- package/dist/test/link/getLinkQRCode.js +5 -0
- package/dist/test/link/getLinkQRCode.js.map +1 -0
- package/dist/test/link/getLinkRegions.js +5 -0
- package/dist/test/link/getLinkRegions.js.map +1 -0
- package/dist/test/link/getLinks.js +5 -0
- package/dist/test/link/getLinks.js.map +1 -0
- package/dist/test/link/getOpenGraph.js +5 -0
- package/dist/test/link/getOpenGraph.js.map +1 -0
- package/dist/test/link/updateLink.js +8 -0
- package/dist/test/link/updateLink.js.map +1 -0
- package/dist/test/link/updateOpenGraph.js +5 -0
- package/dist/test/link/updateOpenGraph.js.map +1 -0
- package/dist/test/statistics/clear.js +5 -0
- package/dist/test/statistics/clear.js.map +1 -0
- package/dist/test/statistics/getByDomain.js +7 -0
- package/dist/test/statistics/getByDomain.js.map +1 -0
- package/dist/test/statistics/getByDomainPost.js +10 -0
- package/dist/test/statistics/getByDomainPost.js.map +1 -0
- package/dist/test/statistics/getByLink.js +7 -0
- package/dist/test/statistics/getByLink.js.map +1 -0
- package/dist/test/statistics/getByLinkPost.js +7 -0
- package/dist/test/statistics/getByLinkPost.js.map +1 -0
- package/dist/test/statistics/getLastClicks.js +8 -0
- package/dist/test/statistics/getLastClicks.js.map +1 -0
- package/dist/test/statistics/getLinkClicks.js +7 -0
- package/dist/test/statistics/getLinkClicks.js.map +1 -0
- package/dist/test/statistics/getLinkClicksByPathDates.js +13 -0
- package/dist/test/statistics/getLinkClicksByPathDates.js.map +1 -0
- package/dist/test/statistics/getTopByColumn.js +8 -0
- package/dist/test/statistics/getTopByColumn.js.map +1 -0
- package/dist/test/statistics/getTopByInterval.js +8 -0
- package/dist/test/statistics/getTopByInterval.js.map +1 -0
- package/dist/types/common.js +2 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/domain.js +2 -0
- package/dist/types/domain.js.map +1 -0
- package/dist/types/link.js +2 -0
- package/dist/types/link.js.map +1 -0
- package/dist/types/statistics.js +2 -0
- package/dist/types/statistics.js.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +35 -0
- package/src/index.ts +774 -0
- package/src/test/domain/createDomain.ts +5 -0
- package/src/test/domain/getDomains.ts +5 -0
- package/src/test/link/archiveLink.ts +5 -0
- package/src/test/link/createLink.ts +5 -0
- package/src/test/link/createLinkBulk.ts +18 -0
- package/src/test/link/createLinkCountry.ts +8 -0
- package/src/test/link/createLinkPublic.ts +9 -0
- package/src/test/link/createLinkRegions.ts +9 -0
- package/src/test/link/deleteLink.ts +5 -0
- package/src/test/link/deleteLinkCountry.ts +5 -0
- package/src/test/link/deleteLinkRegion.ts +8 -0
- package/src/test/link/getLinkCountry.ts +5 -0
- package/src/test/link/getLinkInfoByOriginalURL.ts +5 -0
- package/src/test/link/getLinkInfoByPath.ts +5 -0
- package/src/test/link/getLinkQRCode.ts +5 -0
- package/src/test/link/getLinkRegions.ts +5 -0
- package/src/test/link/getLinks.ts +5 -0
- package/src/test/link/getOpenGraph.ts +5 -0
- package/src/test/link/updateLink.ts +8 -0
- package/src/test/link/updateOpenGraph.ts +5 -0
- package/src/test/statistics/clear.ts +5 -0
- package/src/test/statistics/getByDomain.ts +7 -0
- package/src/test/statistics/getByDomainPost.ts +10 -0
- package/src/test/statistics/getByLink.ts +7 -0
- package/src/test/statistics/getByLinkPost.ts +7 -0
- package/src/test/statistics/getLastClicks.ts +8 -0
- package/src/test/statistics/getLinkClicks.ts +7 -0
- package/src/test/statistics/getLinkClicksByPathDates.ts +17 -0
- package/src/test/statistics/getTopByColumn.ts +8 -0
- package/src/test/statistics/getTopByInterval.ts +8 -0
- package/src/types/common.ts +11 -0
- package/src/types/domain.ts +44 -0
- package/src/types/link.ts +159 -0
- package/src/types/statistics.ts +242 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const newLinks = await shortio.link.bulkCreate(
|
|
5
|
+
"rybak.link",
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
|
+
originalURL: "https://developers.short.io/reference/linksbulkpost",
|
|
9
|
+
path: "shortio/linkbulkcreate",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
originalURL: "https://developers.short.io/reference/archivelink",
|
|
13
|
+
path: "shortio/linkarchive",
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
// true,
|
|
17
|
+
);
|
|
18
|
+
console.log("file: createLinkBulk.ts:14 ::: newLinks:", newLinks);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkCountryRes = await shortio.linkCountry.create("lnk_1eru_9dCPkogORqv", {
|
|
5
|
+
country: "US",
|
|
6
|
+
originalURL: "https://example3.com",
|
|
7
|
+
});
|
|
8
|
+
console.log("file: linkCountryRes.ts:5 ::: linkCountryRes:", linkCountryRes);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const newLink = await shortio.link.createPublic(
|
|
5
|
+
"rybak.link",
|
|
6
|
+
"https://example.com/long--long--url",
|
|
7
|
+
"pk_wO9WCsRU5Q08Gumf",
|
|
8
|
+
);
|
|
9
|
+
console.log("file: createLink.ts:5 ::: newLink:", newLink);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkRegionRes = await shortio.linkRegion.create("lnk_1eru_9dCPkogORqv", {
|
|
5
|
+
country: "US",
|
|
6
|
+
region: "CA",
|
|
7
|
+
originalURL: "https://example4.com",
|
|
8
|
+
});
|
|
9
|
+
console.log("file: getLinkRegions.ts:5 ::: linkRegionRes:", linkRegionRes);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkCountryDelRes = await shortio.linkCountry.delete("lnk_1eru_9dCPkogORqv", "US");
|
|
5
|
+
console.log("file: deleteLinkCountry.ts:5 ::: linkCountryDelRes:", linkCountryDelRes);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkRegionRes = await shortio.linkRegion.delete("lnk_1eru_9dCPkogORqv", {
|
|
5
|
+
country: "US",
|
|
6
|
+
region: "CA",
|
|
7
|
+
});
|
|
8
|
+
console.log("file: getLinkRegions.ts:5 ::: linkRegionRes:", linkRegionRes);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkInfo = await shortio.link.getByOriginalURL("rybak.link", "https://github.com/RemyJeancolas/docker-aliases");
|
|
5
|
+
console.log("file: getLinkInfo.ts:5 ::: linkInfo:", linkInfo);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const updateRes = await shortio.link.update("lnk_1eru_9dCPkohgosF", {
|
|
5
|
+
originalURL: "https://example.com?q=test",
|
|
6
|
+
path: "new-path",
|
|
7
|
+
});
|
|
8
|
+
console.log("file: updateLink.ts:5 ::: updateRes:", updateRes);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const openGraphRes = await shortio.link.updateOpenGraph(293848, "lnk_1eru_9dCPkogORqv", [["title", "new title"]]);
|
|
5
|
+
console.log("file: getOpenGraph.ts:5 ::: openGraphRes:", openGraphRes);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const domainStat = await shortio.statistics.getByDomainPost(293848, {
|
|
5
|
+
period: "week",
|
|
6
|
+
include: {
|
|
7
|
+
browsers: ["Chrome"],
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
console.log("file: getByDomain.ts:7 ::: domainStat:", domainStat);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkStat = await shortio.statistics.getByLinkPost("lnk_1eru_9dCBlsuLCCO", {
|
|
5
|
+
period: "month",
|
|
6
|
+
});
|
|
7
|
+
console.log("file: getByLink.ts:5 ::: linkStat:", linkStat);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const lastClicksRes = await shortio.statistics.getLastClicks(293848, {
|
|
5
|
+
startDate: "2022-10-01T14:08:04.418Z",
|
|
6
|
+
endDate: "2022-10-30T14:08:04.418Z",
|
|
7
|
+
});
|
|
8
|
+
console.log("file: getLastClicks.ts:8 ::: lastClicksRes:", lastClicksRes);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkClicks = await shortio.statistics.getLinkClicks(293848, {
|
|
5
|
+
ids: "lnk_1eru_9dCBlsuLCCO,lnk_1eru_9dCBlsu4fHY",
|
|
6
|
+
});
|
|
7
|
+
console.log("file: getByLinkClicks.ts:7 ::: linkClicks:", linkClicks);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const linkClicks = await shortio.statistics.getLinkClicksByPathDates(
|
|
5
|
+
293848,
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
|
+
path: "dYWvQ2",
|
|
9
|
+
createdAt: "023-02-23T14:08:04.418Z",
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
startDate: "2022-10-01T14:08:04.418Z",
|
|
14
|
+
endDate: "2022-10-30T14:08:04.418Z",
|
|
15
|
+
},
|
|
16
|
+
);
|
|
17
|
+
console.log("file: getByLinkClicks.ts:7 ::: linkClicks:", linkClicks);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const topByColumnRes = await shortio.statistics.getTopByColumn(293848, "browser", {
|
|
5
|
+
startDate: "2022-10-01T14:08:04.418Z",
|
|
6
|
+
endDate: "2022-10-30T14:08:04.418Z",
|
|
7
|
+
});
|
|
8
|
+
console.log("file: getTopByColumn.ts:12 ::: topByColumnRes:", topByColumnRes);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Shortio } from "../../index.js";
|
|
2
|
+
|
|
3
|
+
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
4
|
+
const topByIntervalRes = await shortio.statistics.getTopByInterval(293848, "browser", {
|
|
5
|
+
startDate: "2022-10-01T14:08:04.418Z",
|
|
6
|
+
endDate: "2022-10-30T14:08:04.418Z",
|
|
7
|
+
});
|
|
8
|
+
console.log("file: getTopByInterval.ts:8 ::: topByColumnIntervalRes:", topByIntervalRes);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
type LinkType = "increment" | "random" | "secure" | "four-char" | "eight-char" | "ten-char";
|
|
2
|
+
type DomainState = "extra_records" | "not_registered" | "configured" | "not_configured" | "registration_pending";
|
|
3
|
+
type SetupType = "dns" | "js";
|
|
4
|
+
type HttpLevel = "none" | "redirect" | "hsts";
|
|
5
|
+
type RobotPermission = "allow" | "disallow" | "noindex";
|
|
6
|
+
|
|
7
|
+
export interface Domain {
|
|
8
|
+
id: number;
|
|
9
|
+
hostname: string;
|
|
10
|
+
title: string | null;
|
|
11
|
+
unicodeHostname: string;
|
|
12
|
+
isFavorite: boolean;
|
|
13
|
+
faviconURL: string | null;
|
|
14
|
+
segmentKey: string | null;
|
|
15
|
+
hasFavicon: boolean;
|
|
16
|
+
linkType: LinkType;
|
|
17
|
+
state: DomainState;
|
|
18
|
+
redirect404: string;
|
|
19
|
+
hideReferer: boolean;
|
|
20
|
+
hideVisitorIp: boolean;
|
|
21
|
+
caseSensitive: boolean;
|
|
22
|
+
exportEnabled: boolean;
|
|
23
|
+
cloaking: boolean;
|
|
24
|
+
incrementCounter: string;
|
|
25
|
+
setupType: SetupType;
|
|
26
|
+
httpsLinks: boolean;
|
|
27
|
+
integrationGA: string | null;
|
|
28
|
+
integrationFB: string | null;
|
|
29
|
+
integrationAdroll: string | null;
|
|
30
|
+
integrationGTM: string | null;
|
|
31
|
+
webhookURL: string | null;
|
|
32
|
+
httpsLevel: HttpLevel;
|
|
33
|
+
robots: RobotPermission;
|
|
34
|
+
provider: string | null;
|
|
35
|
+
purgeExpiredLinks: boolean;
|
|
36
|
+
lastPurgeDate: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
clientStorage?: string;
|
|
40
|
+
TeamId?: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface DomainCreateOptions
|
|
44
|
+
extends Partial<Pick<Domain, "caseSensitive" | "hideReferer" | "httpsLinks" | "linkType" | "redirect404">> {}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { ErrorResBody, SuccessResBody } from "./common.js";
|
|
2
|
+
import { Domain } from "./domain.js";
|
|
3
|
+
|
|
4
|
+
export interface Link {
|
|
5
|
+
idString: string;
|
|
6
|
+
path: string;
|
|
7
|
+
DomainId: number;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string | null;
|
|
10
|
+
expiresAt: string | null;
|
|
11
|
+
shortURL: string;
|
|
12
|
+
cloaking: boolean;
|
|
13
|
+
OwnerId: number;
|
|
14
|
+
originalURL: string;
|
|
15
|
+
secureShortURL: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
expiredURL?: string;
|
|
18
|
+
ttl?: string;
|
|
19
|
+
source?: string;
|
|
20
|
+
duplicate?: boolean;
|
|
21
|
+
archived?: boolean;
|
|
22
|
+
redirectType?: string;
|
|
23
|
+
clicksLimit?: number;
|
|
24
|
+
passwordContact?: boolean;
|
|
25
|
+
hasPassword?: true;
|
|
26
|
+
password?: string;
|
|
27
|
+
tags?: string[];
|
|
28
|
+
androidURL?: string;
|
|
29
|
+
iphoneURL?: string;
|
|
30
|
+
utmSource?: string | null;
|
|
31
|
+
utmMedium?: string | null;
|
|
32
|
+
utmCampaign?: string | null;
|
|
33
|
+
utmTerm?: string | null;
|
|
34
|
+
utmContent?: string | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface LinkCountry {
|
|
38
|
+
id: string;
|
|
39
|
+
LinkIdString: Link["idString"];
|
|
40
|
+
country: string;
|
|
41
|
+
originalURL: string;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface LinkRegion {
|
|
46
|
+
id: string;
|
|
47
|
+
LinkIdString: Link["idString"];
|
|
48
|
+
country: string;
|
|
49
|
+
region: string;
|
|
50
|
+
originalURL: string;
|
|
51
|
+
name: string;
|
|
52
|
+
createdAt: Date;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface LinkCreateOptions
|
|
56
|
+
extends Pick<
|
|
57
|
+
Partial<Link>,
|
|
58
|
+
| "source"
|
|
59
|
+
| "cloaking"
|
|
60
|
+
| "password"
|
|
61
|
+
| "redirectType"
|
|
62
|
+
| "expiredURL"
|
|
63
|
+
| "title"
|
|
64
|
+
| "path"
|
|
65
|
+
| "androidURL"
|
|
66
|
+
| "iphoneURL"
|
|
67
|
+
| "clicksLimit"
|
|
68
|
+
> {
|
|
69
|
+
tags?: string[];
|
|
70
|
+
allowDuplicates?: boolean;
|
|
71
|
+
folderId?: LinkFolder["id"];
|
|
72
|
+
expiresAt?: number;
|
|
73
|
+
ttl?: string;
|
|
74
|
+
createdAt?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface LinkUpdateOptions extends LinkCreateOptions {
|
|
78
|
+
originalURL?: Link["originalURL"];
|
|
79
|
+
archived?: Link["archived"];
|
|
80
|
+
icon?: string;
|
|
81
|
+
splitURL?: string;
|
|
82
|
+
splitPercent?: number;
|
|
83
|
+
passwordContact?: boolean;
|
|
84
|
+
utmSource?: string | null;
|
|
85
|
+
utmMedium?: string | null;
|
|
86
|
+
utmCampaign?: string | null;
|
|
87
|
+
utmTerm?: string | null;
|
|
88
|
+
utmContent?: string | null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface LinkBulkCreateOptions extends LinkCreateOptions, Pick<Link, "originalURL"> {}
|
|
92
|
+
|
|
93
|
+
export interface LinkWithUser extends Link, User {}
|
|
94
|
+
|
|
95
|
+
export interface LinksAndCount {
|
|
96
|
+
links: LinkWithUser[];
|
|
97
|
+
count: number;
|
|
98
|
+
nextPageToken: string | null;
|
|
99
|
+
hasMore?: boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface LinkListOptions {
|
|
103
|
+
domain_id: string;
|
|
104
|
+
beforeDate?: string;
|
|
105
|
+
afterDate?: string;
|
|
106
|
+
dateSortOrder?: SortingOrder;
|
|
107
|
+
createdAt?: string;
|
|
108
|
+
idString?: string;
|
|
109
|
+
pageToken?: string;
|
|
110
|
+
folderId?: LinkFolder["id"];
|
|
111
|
+
limit?: number;
|
|
112
|
+
offset?: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface UpdateLinkErrorRes extends ErrorResBody {
|
|
116
|
+
field: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface DeleteLinkRes extends SuccessResBody, Pick<Link, "idString"> {}
|
|
120
|
+
|
|
121
|
+
export interface GetLinkQRCodeOptions {
|
|
122
|
+
type?: string;
|
|
123
|
+
size?: number;
|
|
124
|
+
color?: string;
|
|
125
|
+
backgroundColor?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type LinkOpenGraphData = [string, string][];
|
|
129
|
+
|
|
130
|
+
export interface LinkCountryCreateOptions {
|
|
131
|
+
country: string;
|
|
132
|
+
originalURL: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface LinkRegionCreateOptions {
|
|
136
|
+
country: string;
|
|
137
|
+
region: string;
|
|
138
|
+
originalURL: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface LinkRegionDeleteOptions {
|
|
142
|
+
country: string;
|
|
143
|
+
region: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
type SortingOrder = "asc" | "desc";
|
|
147
|
+
|
|
148
|
+
interface User {
|
|
149
|
+
email: string;
|
|
150
|
+
id: number;
|
|
151
|
+
name: string;
|
|
152
|
+
photoURL: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
interface LinkFolder {
|
|
156
|
+
id: string;
|
|
157
|
+
name: string;
|
|
158
|
+
DomainId: Domain["id"];
|
|
159
|
+
}
|