@short.io/client-node 1.0.1 → 1.0.2
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/dist/index.d.ts +54 -0
- package/dist/types/common.d.ts +9 -0
- package/dist/types/domain.d.ts +43 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/link.d.ts +131 -0
- package/dist/types/statistics.d.ts +199 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -1
- package/src/types/index.ts +4 -0
- package/src/types.ts +1 -0
- package/tsconfig.json +2 -1
- package/dist/test/domain/createDomain.js +0 -5
- package/dist/test/domain/createDomain.js.map +0 -1
- package/dist/test/domain/getDomains.js +0 -5
- package/dist/test/domain/getDomains.js.map +0 -1
- package/dist/test/getLinks.js +0 -5
- package/dist/test/getLinks.js.map +0 -1
- package/dist/test/link/archiveLink.js +0 -5
- package/dist/test/link/archiveLink.js.map +0 -1
- package/dist/test/link/createLink.js +0 -5
- package/dist/test/link/createLink.js.map +0 -1
- package/dist/test/link/createLinkBulk.js +0 -14
- package/dist/test/link/createLinkBulk.js.map +0 -1
- package/dist/test/link/createLinkCountry.js +0 -8
- package/dist/test/link/createLinkCountry.js.map +0 -1
- package/dist/test/link/createLinkPublic.js +0 -5
- package/dist/test/link/createLinkPublic.js.map +0 -1
- package/dist/test/link/createLinkRegions.js +0 -9
- package/dist/test/link/createLinkRegions.js.map +0 -1
- package/dist/test/link/deleteLink.js +0 -5
- package/dist/test/link/deleteLink.js.map +0 -1
- package/dist/test/link/deleteLinkCountry.js +0 -5
- package/dist/test/link/deleteLinkCountry.js.map +0 -1
- package/dist/test/link/deleteLinkRegion.js +0 -8
- package/dist/test/link/deleteLinkRegion.js.map +0 -1
- package/dist/test/link/getLinkCountry.js +0 -5
- package/dist/test/link/getLinkCountry.js.map +0 -1
- package/dist/test/link/getLinkInfoByOriginalURL.js +0 -5
- package/dist/test/link/getLinkInfoByOriginalURL.js.map +0 -1
- package/dist/test/link/getLinkInfoByPath.js +0 -5
- package/dist/test/link/getLinkInfoByPath.js.map +0 -1
- package/dist/test/link/getLinkQRCode.js +0 -5
- package/dist/test/link/getLinkQRCode.js.map +0 -1
- package/dist/test/link/getLinkRegions.js +0 -5
- package/dist/test/link/getLinkRegions.js.map +0 -1
- package/dist/test/link/getLinks.js +0 -5
- package/dist/test/link/getLinks.js.map +0 -1
- package/dist/test/link/getOpenGraph.js +0 -5
- package/dist/test/link/getOpenGraph.js.map +0 -1
- package/dist/test/link/updateLink.js +0 -8
- package/dist/test/link/updateLink.js.map +0 -1
- package/dist/test/link/updateOpenGraph.js +0 -5
- package/dist/test/link/updateOpenGraph.js.map +0 -1
- package/dist/test/statistics/clear.js +0 -5
- package/dist/test/statistics/clear.js.map +0 -1
- package/dist/test/statistics/getByDomain.js +0 -7
- package/dist/test/statistics/getByDomain.js.map +0 -1
- package/dist/test/statistics/getByDomainPost.js +0 -10
- package/dist/test/statistics/getByDomainPost.js.map +0 -1
- package/dist/test/statistics/getByLink.js +0 -7
- package/dist/test/statistics/getByLink.js.map +0 -1
- package/dist/test/statistics/getByLinkPost.js +0 -7
- package/dist/test/statistics/getByLinkPost.js.map +0 -1
- package/dist/test/statistics/getLastClicks.js +0 -8
- package/dist/test/statistics/getLastClicks.js.map +0 -1
- package/dist/test/statistics/getLinkClicks.js +0 -7
- package/dist/test/statistics/getLinkClicks.js.map +0 -1
- package/dist/test/statistics/getLinkClicksByPathDates.js +0 -13
- package/dist/test/statistics/getLinkClicksByPathDates.js.map +0 -1
- package/dist/test/statistics/getTopByColumn.js +0 -8
- package/dist/test/statistics/getTopByColumn.js.map +0 -1
- package/dist/test/statistics/getTopByInterval.js +0 -8
- package/dist/test/statistics/getTopByInterval.js.map +0 -1
- package/src/test/domain/createDomain.ts +0 -5
- package/src/test/domain/getDomains.ts +0 -5
- package/src/test/link/archiveLink.ts +0 -5
- package/src/test/link/createLink.ts +0 -5
- package/src/test/link/createLinkBulk.ts +0 -18
- package/src/test/link/createLinkCountry.ts +0 -8
- package/src/test/link/createLinkPublic.ts +0 -9
- package/src/test/link/createLinkRegions.ts +0 -9
- package/src/test/link/deleteLink.ts +0 -5
- package/src/test/link/deleteLinkCountry.ts +0 -5
- package/src/test/link/deleteLinkRegion.ts +0 -8
- package/src/test/link/getLinkCountry.ts +0 -5
- package/src/test/link/getLinkInfoByOriginalURL.ts +0 -5
- package/src/test/link/getLinkInfoByPath.ts +0 -5
- package/src/test/link/getLinkQRCode.ts +0 -5
- package/src/test/link/getLinkRegions.ts +0 -5
- package/src/test/link/getLinks.ts +0 -5
- package/src/test/link/getOpenGraph.ts +0 -5
- package/src/test/link/updateLink.ts +0 -8
- package/src/test/link/updateOpenGraph.ts +0 -5
- package/src/test/statistics/clear.ts +0 -5
- package/src/test/statistics/getByDomain.ts +0 -7
- package/src/test/statistics/getByDomainPost.ts +0 -10
- package/src/test/statistics/getByLink.ts +0 -7
- package/src/test/statistics/getByLinkPost.ts +0 -7
- package/src/test/statistics/getLastClicks.ts +0 -8
- package/src/test/statistics/getLinkClicks.ts +0 -7
- package/src/test/statistics/getLinkClicksByPathDates.ts +0 -17
- package/src/test/statistics/getTopByColumn.ts +0 -8
- package/src/test/statistics/getTopByInterval.ts +0 -8
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ErrorResBody, StatusResBody, SuccessResBody } from "./types/common.js";
|
|
3
|
+
import { Domain, DomainCreateOptions } from "./types/domain.js";
|
|
4
|
+
import { DeleteLinkRes, GetLinkQRCodeOptions, Link, LinkBulkCreateOptions, LinkCountry, LinkCountryCreateOptions, LinkCreateOptions, LinkListOptions, LinkOpenGraphData, LinkRegion, LinkRegionCreateOptions, LinkRegionDeleteOptions, LinksAndCount, LinkUpdateOptions, LinkWithUser, UpdateLinkErrorRes } from "./types/link.js";
|
|
5
|
+
import { Column, DomainStatistics, FilterOptions, GetLastClicksOptions, GetStatisticsOptions, IncludeExcludeOptions, LastClicksRes, LinkClicks, LinkIds, LinkStatistics, PathClicks, PathDate, StartEndDate, TopByColumnOptions, TopByIntervalOptions, TopByIntervalRes, TopColumnRes } from "./types/statistics.js";
|
|
6
|
+
export declare class Shortio {
|
|
7
|
+
private readonly apiKey;
|
|
8
|
+
private readonly baseApiUrl;
|
|
9
|
+
private readonly baseStatisticsUrl;
|
|
10
|
+
constructor(apiKey: string);
|
|
11
|
+
readonly link: {
|
|
12
|
+
list: (domainId: Domain["id"], options?: LinkListOptions) => Promise<LinksAndCount | ErrorResBody>;
|
|
13
|
+
getByPath: (hostname: Domain["hostname"], path: Link["path"]) => Promise<Link | ErrorResBody>;
|
|
14
|
+
getByOriginalURL: (hostname: Domain["hostname"], originalURL: Link["originalURL"]) => Promise<Link | ErrorResBody>;
|
|
15
|
+
create: (hostname: Domain["hostname"], originalURL: Link["originalURL"], options?: LinkCreateOptions) => Promise<Link | ErrorResBody>;
|
|
16
|
+
createPublic: (hostname: Domain["hostname"], originalURL: Link["originalURL"], publicAPIKey: string, options?: LinkCreateOptions) => Promise<Link | (SuccessResBody & ErrorResBody)>;
|
|
17
|
+
bulkCreate: (hostname: Domain["hostname"], links: LinkBulkCreateOptions[], allowDuplicates?: boolean) => Promise<(Link & SuccessResBody)[] | (SuccessResBody & ErrorResBody & StatusResBody)>;
|
|
18
|
+
archive: (linkIdString: Link["idString"]) => Promise<SuccessResBody | ErrorResBody>;
|
|
19
|
+
update: (linkIdString: Link["idString"], options: LinkUpdateOptions) => Promise<LinkWithUser | UpdateLinkErrorRes>;
|
|
20
|
+
delete: (linkIdString: Link["idString"]) => Promise<DeleteLinkRes | ErrorResBody>;
|
|
21
|
+
generateQRCode: (linkIdString: Link["idString"], options?: GetLinkQRCodeOptions) => Promise<ErrorResBody | Buffer>;
|
|
22
|
+
getOpenGraph: (domainId: Domain["id"], linkIdString: Link["idString"]) => Promise<LinkOpenGraphData | ErrorResBody>;
|
|
23
|
+
updateOpenGraph: (domainId: Domain["id"], linkIdString: Link["idString"], newOpenGraphData: LinkOpenGraphData) => Promise<LinkOpenGraphData | ErrorResBody>;
|
|
24
|
+
};
|
|
25
|
+
readonly domain: {
|
|
26
|
+
list: () => Promise<Domain[] | ErrorResBody>;
|
|
27
|
+
create: (hostname: Domain["hostname"], options?: DomainCreateOptions) => Promise<Domain | ErrorResBody>;
|
|
28
|
+
};
|
|
29
|
+
readonly linkCountry: {
|
|
30
|
+
list: (linkIdString: Link["idString"]) => Promise<LinkCountry[] | ErrorResBody>;
|
|
31
|
+
create: (linkIdString: Link["idString"], options: LinkCountryCreateOptions) => Promise<LinkCountry | ErrorResBody>;
|
|
32
|
+
delete: (linkIdString: Link["idString"], country: LinkCountry["country"]) => Promise<SuccessResBody | ErrorResBody>;
|
|
33
|
+
};
|
|
34
|
+
readonly linkRegion: {
|
|
35
|
+
list: (linkIdString: Link["idString"]) => Promise<LinkRegion[] | ErrorResBody>;
|
|
36
|
+
create: (linkIdString: Link["idString"], options: LinkRegionCreateOptions) => Promise<LinkRegion | ErrorResBody>;
|
|
37
|
+
delete: (linkIdString: Link["idString"], options: LinkRegionDeleteOptions) => Promise<SuccessResBody | ErrorResBody>;
|
|
38
|
+
};
|
|
39
|
+
readonly statistics: {
|
|
40
|
+
getByLink: (linkIdString: Link["idString"], options?: GetStatisticsOptions) => Promise<LinkStatistics | ErrorResBody>;
|
|
41
|
+
getByLinkPost: (linkIdString: Link["idString"], options?: GetStatisticsOptions & {
|
|
42
|
+
include?: FilterOptions;
|
|
43
|
+
exclude?: FilterOptions;
|
|
44
|
+
}) => Promise<LinkStatistics | ErrorResBody>;
|
|
45
|
+
getByDomain: (domainId: Domain["id"], options?: GetStatisticsOptions) => Promise<DomainStatistics | ErrorResBody>;
|
|
46
|
+
getByDomainPost: (domainId: Domain["id"], options?: GetStatisticsOptions & IncludeExcludeOptions) => Promise<DomainStatistics | ErrorResBody>;
|
|
47
|
+
getLinkClicks: (domainId: Domain["id"], options: StartEndDate & LinkIds) => Promise<LinkClicks | ErrorResBody>;
|
|
48
|
+
getLinkClicksByPathDates: (domainId: Domain["id"], pathsDates: PathDate[], options?: StartEndDate) => Promise<PathClicks | ErrorResBody>;
|
|
49
|
+
getTopByColumn: (domainId: Domain["id"], column: Column, options?: TopByColumnOptions) => Promise<TopColumnRes[]>;
|
|
50
|
+
getTopByInterval: (domainId: Domain["id"], column: Column, options?: TopByIntervalOptions) => Promise<TopByIntervalRes[] | ErrorResBody>;
|
|
51
|
+
getLastClicks: (domainId: Domain["id"], options?: GetLastClicksOptions) => Promise<LastClicksRes | ErrorResBody>;
|
|
52
|
+
clear: (domainId: Domain["id"]) => Promise<SuccessResBody | ErrorResBody>;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
export interface Domain {
|
|
7
|
+
id: number;
|
|
8
|
+
hostname: string;
|
|
9
|
+
title: string | null;
|
|
10
|
+
unicodeHostname: string;
|
|
11
|
+
isFavorite: boolean;
|
|
12
|
+
faviconURL: string | null;
|
|
13
|
+
segmentKey: string | null;
|
|
14
|
+
hasFavicon: boolean;
|
|
15
|
+
linkType: LinkType;
|
|
16
|
+
state: DomainState;
|
|
17
|
+
redirect404: string;
|
|
18
|
+
hideReferer: boolean;
|
|
19
|
+
hideVisitorIp: boolean;
|
|
20
|
+
caseSensitive: boolean;
|
|
21
|
+
exportEnabled: boolean;
|
|
22
|
+
cloaking: boolean;
|
|
23
|
+
incrementCounter: string;
|
|
24
|
+
setupType: SetupType;
|
|
25
|
+
httpsLinks: boolean;
|
|
26
|
+
integrationGA: string | null;
|
|
27
|
+
integrationFB: string | null;
|
|
28
|
+
integrationAdroll: string | null;
|
|
29
|
+
integrationGTM: string | null;
|
|
30
|
+
webhookURL: string | null;
|
|
31
|
+
httpsLevel: HttpLevel;
|
|
32
|
+
robots: RobotPermission;
|
|
33
|
+
provider: string | null;
|
|
34
|
+
purgeExpiredLinks: boolean;
|
|
35
|
+
lastPurgeDate: string | null;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
clientStorage?: string;
|
|
39
|
+
TeamId?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface DomainCreateOptions extends Partial<Pick<Domain, "caseSensitive" | "hideReferer" | "httpsLinks" | "linkType" | "redirect404">> {
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC","sourcesContent":["export * from \"./common\";\nexport * from \"./domain\";\nexport * from \"./link\";\nexport * from \"./statistics\";\n"]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ErrorResBody, SuccessResBody } from "./common.js";
|
|
2
|
+
import { Domain } from "./domain.js";
|
|
3
|
+
export interface Link {
|
|
4
|
+
idString: string;
|
|
5
|
+
path: string;
|
|
6
|
+
DomainId: number;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string | null;
|
|
9
|
+
expiresAt: string | null;
|
|
10
|
+
shortURL: string;
|
|
11
|
+
cloaking: boolean;
|
|
12
|
+
OwnerId: number;
|
|
13
|
+
originalURL: string;
|
|
14
|
+
secureShortURL: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
expiredURL?: string;
|
|
17
|
+
ttl?: string;
|
|
18
|
+
source?: string;
|
|
19
|
+
duplicate?: boolean;
|
|
20
|
+
archived?: boolean;
|
|
21
|
+
redirectType?: string;
|
|
22
|
+
clicksLimit?: number;
|
|
23
|
+
passwordContact?: boolean;
|
|
24
|
+
hasPassword?: true;
|
|
25
|
+
password?: string;
|
|
26
|
+
tags?: string[];
|
|
27
|
+
androidURL?: string;
|
|
28
|
+
iphoneURL?: string;
|
|
29
|
+
utmSource?: string | null;
|
|
30
|
+
utmMedium?: string | null;
|
|
31
|
+
utmCampaign?: string | null;
|
|
32
|
+
utmTerm?: string | null;
|
|
33
|
+
utmContent?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export interface LinkCountry {
|
|
36
|
+
id: string;
|
|
37
|
+
LinkIdString: Link["idString"];
|
|
38
|
+
country: string;
|
|
39
|
+
originalURL: string;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
}
|
|
42
|
+
export interface LinkRegion {
|
|
43
|
+
id: string;
|
|
44
|
+
LinkIdString: Link["idString"];
|
|
45
|
+
country: string;
|
|
46
|
+
region: string;
|
|
47
|
+
originalURL: string;
|
|
48
|
+
name: string;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
}
|
|
51
|
+
export interface LinkCreateOptions extends Pick<Partial<Link>, "source" | "cloaking" | "password" | "redirectType" | "expiredURL" | "title" | "path" | "androidURL" | "iphoneURL" | "clicksLimit"> {
|
|
52
|
+
tags?: string[];
|
|
53
|
+
allowDuplicates?: boolean;
|
|
54
|
+
folderId?: LinkFolder["id"];
|
|
55
|
+
expiresAt?: number;
|
|
56
|
+
ttl?: string;
|
|
57
|
+
createdAt?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface LinkUpdateOptions extends LinkCreateOptions {
|
|
60
|
+
originalURL?: Link["originalURL"];
|
|
61
|
+
archived?: Link["archived"];
|
|
62
|
+
icon?: string;
|
|
63
|
+
splitURL?: string;
|
|
64
|
+
splitPercent?: number;
|
|
65
|
+
passwordContact?: boolean;
|
|
66
|
+
utmSource?: string | null;
|
|
67
|
+
utmMedium?: string | null;
|
|
68
|
+
utmCampaign?: string | null;
|
|
69
|
+
utmTerm?: string | null;
|
|
70
|
+
utmContent?: string | null;
|
|
71
|
+
}
|
|
72
|
+
export interface LinkBulkCreateOptions extends LinkCreateOptions, Pick<Link, "originalURL"> {
|
|
73
|
+
}
|
|
74
|
+
export interface LinkWithUser extends Link, User {
|
|
75
|
+
}
|
|
76
|
+
export interface LinksAndCount {
|
|
77
|
+
links: LinkWithUser[];
|
|
78
|
+
count: number;
|
|
79
|
+
nextPageToken: string | null;
|
|
80
|
+
hasMore?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface LinkListOptions {
|
|
83
|
+
domain_id: string;
|
|
84
|
+
beforeDate?: string;
|
|
85
|
+
afterDate?: string;
|
|
86
|
+
dateSortOrder?: SortingOrder;
|
|
87
|
+
createdAt?: string;
|
|
88
|
+
idString?: string;
|
|
89
|
+
pageToken?: string;
|
|
90
|
+
folderId?: LinkFolder["id"];
|
|
91
|
+
limit?: number;
|
|
92
|
+
offset?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface UpdateLinkErrorRes extends ErrorResBody {
|
|
95
|
+
field: string;
|
|
96
|
+
}
|
|
97
|
+
export interface DeleteLinkRes extends SuccessResBody, Pick<Link, "idString"> {
|
|
98
|
+
}
|
|
99
|
+
export interface GetLinkQRCodeOptions {
|
|
100
|
+
type?: string;
|
|
101
|
+
size?: number;
|
|
102
|
+
color?: string;
|
|
103
|
+
backgroundColor?: string;
|
|
104
|
+
}
|
|
105
|
+
export type LinkOpenGraphData = [string, string][];
|
|
106
|
+
export interface LinkCountryCreateOptions {
|
|
107
|
+
country: string;
|
|
108
|
+
originalURL: string;
|
|
109
|
+
}
|
|
110
|
+
export interface LinkRegionCreateOptions {
|
|
111
|
+
country: string;
|
|
112
|
+
region: string;
|
|
113
|
+
originalURL: string;
|
|
114
|
+
}
|
|
115
|
+
export interface LinkRegionDeleteOptions {
|
|
116
|
+
country: string;
|
|
117
|
+
region: string;
|
|
118
|
+
}
|
|
119
|
+
type SortingOrder = "asc" | "desc";
|
|
120
|
+
interface User {
|
|
121
|
+
email: string;
|
|
122
|
+
id: number;
|
|
123
|
+
name: string;
|
|
124
|
+
photoURL: string;
|
|
125
|
+
}
|
|
126
|
+
interface LinkFolder {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
DomainId: Domain["id"];
|
|
130
|
+
}
|
|
131
|
+
export {};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Link } from "./link";
|
|
2
|
+
export interface GetStatisticsOptions extends StartEndDate {
|
|
3
|
+
period?: Period;
|
|
4
|
+
tzOffset?: number;
|
|
5
|
+
clicksChartInterval?: Interval;
|
|
6
|
+
}
|
|
7
|
+
export interface TopByColumnOptions extends StartEndDate, Pick<LimitOffset, "limit">, IncludeExcludeOptions {
|
|
8
|
+
period?: Period;
|
|
9
|
+
tzOffset?: number;
|
|
10
|
+
prefix?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TopByIntervalOptions extends StartEndDate, Pick<LimitOffset, "limit">, IncludeExcludeOptions {
|
|
13
|
+
interval?: Interval;
|
|
14
|
+
period?: Period;
|
|
15
|
+
tzOffset?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TopByIntervalRes {
|
|
18
|
+
date: string;
|
|
19
|
+
statistics: {
|
|
20
|
+
column: string;
|
|
21
|
+
score: string;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
export interface TopByColumnRes {
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetLastClicksOptions extends StartEndDate, Pick<LimitOffset, "limit">, IncludeExcludeOptions, BeforeAfterDate {
|
|
28
|
+
tzOffset?: number;
|
|
29
|
+
period?: Period;
|
|
30
|
+
}
|
|
31
|
+
export interface LastClicksRes {
|
|
32
|
+
host: string;
|
|
33
|
+
path: string;
|
|
34
|
+
lcpath: string;
|
|
35
|
+
dt: string;
|
|
36
|
+
method: string;
|
|
37
|
+
url: string;
|
|
38
|
+
st: number;
|
|
39
|
+
ip: string;
|
|
40
|
+
proto: string;
|
|
41
|
+
ref: string;
|
|
42
|
+
ua: string;
|
|
43
|
+
human: boolean;
|
|
44
|
+
browser: string;
|
|
45
|
+
browser_version: string;
|
|
46
|
+
country: string;
|
|
47
|
+
city: string;
|
|
48
|
+
social: string;
|
|
49
|
+
refhost: string;
|
|
50
|
+
os: string;
|
|
51
|
+
utm_source: string;
|
|
52
|
+
utm_medium: string;
|
|
53
|
+
utm_campaign: string;
|
|
54
|
+
goal_completed: boolean | null;
|
|
55
|
+
ab_path: string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface FilterOptions {
|
|
58
|
+
paths?: Set<string>;
|
|
59
|
+
countries?: Set<string>;
|
|
60
|
+
dt?: [Date, Date];
|
|
61
|
+
browsers?: string[];
|
|
62
|
+
human?: boolean;
|
|
63
|
+
socials?: string[];
|
|
64
|
+
browserVersions?: string[];
|
|
65
|
+
statuses?: number[];
|
|
66
|
+
methods?: string[];
|
|
67
|
+
protos?: ("http" | "https")[];
|
|
68
|
+
refhosts?: string[];
|
|
69
|
+
utmSources?: string[];
|
|
70
|
+
utmMediums?: string[];
|
|
71
|
+
utmCampaigns?: string[];
|
|
72
|
+
}
|
|
73
|
+
export interface IncludeExcludeOptions {
|
|
74
|
+
include?: FilterOptions;
|
|
75
|
+
exclude?: FilterOptions;
|
|
76
|
+
}
|
|
77
|
+
export interface LinkIds {
|
|
78
|
+
ids: string;
|
|
79
|
+
}
|
|
80
|
+
export interface PathDate extends Pick<Link, "path" | "createdAt"> {
|
|
81
|
+
}
|
|
82
|
+
export interface PathClicks {
|
|
83
|
+
[path: Link["path"]]: number;
|
|
84
|
+
}
|
|
85
|
+
export interface LinkStatistics {
|
|
86
|
+
totalClicks: number;
|
|
87
|
+
humanClicks: number;
|
|
88
|
+
humanClicksChange: string;
|
|
89
|
+
totalClicksChange: string;
|
|
90
|
+
clickStatistics: {
|
|
91
|
+
datasets: [
|
|
92
|
+
{
|
|
93
|
+
data: DatePoint[];
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
};
|
|
97
|
+
interval: IntervalResponse;
|
|
98
|
+
referer: Referer[];
|
|
99
|
+
social: Social[];
|
|
100
|
+
browser: Browser[];
|
|
101
|
+
os: OS[];
|
|
102
|
+
city: City[];
|
|
103
|
+
country: Country[];
|
|
104
|
+
}
|
|
105
|
+
export interface DomainStatistics {
|
|
106
|
+
country: Country[];
|
|
107
|
+
city: City[];
|
|
108
|
+
clicks: number;
|
|
109
|
+
humanClicks: number;
|
|
110
|
+
links: number;
|
|
111
|
+
linksChange: string;
|
|
112
|
+
linksChangePositive: boolean;
|
|
113
|
+
clicksPerLink: string;
|
|
114
|
+
clicksPerLinkChange: string;
|
|
115
|
+
humanClicksPerLink: string;
|
|
116
|
+
prevClicksChange: string;
|
|
117
|
+
humanClicksChange: string;
|
|
118
|
+
humanClicksChangePositive: boolean;
|
|
119
|
+
interval: IntervalResponse;
|
|
120
|
+
clickStatistics: {
|
|
121
|
+
datasets: [
|
|
122
|
+
{
|
|
123
|
+
data: DatePoint[];
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
};
|
|
127
|
+
referer: Referer[];
|
|
128
|
+
social: Social[];
|
|
129
|
+
browser: Browser[];
|
|
130
|
+
os: OS[];
|
|
131
|
+
utm_medium: ({
|
|
132
|
+
utm_medium: string;
|
|
133
|
+
} & ClicksScore)[];
|
|
134
|
+
utm_source: ({
|
|
135
|
+
utm_source: string;
|
|
136
|
+
} & ClicksScore)[];
|
|
137
|
+
utm_campaign: ({
|
|
138
|
+
utm_campaign: string;
|
|
139
|
+
} & ClicksScore)[];
|
|
140
|
+
}
|
|
141
|
+
interface IntervalResponse {
|
|
142
|
+
startDate: Date | null;
|
|
143
|
+
endDate: Date | null;
|
|
144
|
+
prevStartDate: Date | null;
|
|
145
|
+
prevEndDate: Date | null;
|
|
146
|
+
}
|
|
147
|
+
interface DatePoint {
|
|
148
|
+
x: Date;
|
|
149
|
+
y: number;
|
|
150
|
+
}
|
|
151
|
+
interface City extends ClicksScore {
|
|
152
|
+
city: number;
|
|
153
|
+
name: string;
|
|
154
|
+
}
|
|
155
|
+
interface OS extends ClicksScore {
|
|
156
|
+
os: string;
|
|
157
|
+
}
|
|
158
|
+
interface Social extends ClicksScore {
|
|
159
|
+
social: string;
|
|
160
|
+
socialName?: string;
|
|
161
|
+
}
|
|
162
|
+
interface Browser extends ClicksScore {
|
|
163
|
+
browser: string;
|
|
164
|
+
browserName?: string;
|
|
165
|
+
}
|
|
166
|
+
interface Referer extends ClicksScore {
|
|
167
|
+
referer: string;
|
|
168
|
+
}
|
|
169
|
+
interface Country extends ClicksScore {
|
|
170
|
+
country: string;
|
|
171
|
+
countryName: string;
|
|
172
|
+
}
|
|
173
|
+
interface ClicksScore {
|
|
174
|
+
score: number;
|
|
175
|
+
}
|
|
176
|
+
type Period = "custom" | "today" | "yesterday" | "total" | "week" | "month" | "lastmonth" | "last7" | "last30";
|
|
177
|
+
type Interval = "hour" | "day" | "week" | "month";
|
|
178
|
+
export interface StartEndDate {
|
|
179
|
+
startDate?: string;
|
|
180
|
+
endDate?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface BeforeAfterDate {
|
|
183
|
+
afterDate?: string;
|
|
184
|
+
beforeDate?: string;
|
|
185
|
+
}
|
|
186
|
+
export interface LinkClicks {
|
|
187
|
+
[key: Link["idString"]]: number;
|
|
188
|
+
}
|
|
189
|
+
export interface LimitOffset {
|
|
190
|
+
limit?: number;
|
|
191
|
+
offset?: number;
|
|
192
|
+
}
|
|
193
|
+
export type Column = "path" | "method" | "st" | "proto" | "human" | "browser" | "browser_version" | "country" | "city" | "social" | "refhost" | "os" | "utm_source" | "utm_medium" | "utm_campaign" | "goal_completed" | "ab_path";
|
|
194
|
+
export interface TopColumnRes {
|
|
195
|
+
score: number;
|
|
196
|
+
column: string;
|
|
197
|
+
displayName: string;
|
|
198
|
+
}
|
|
199
|
+
export {};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/index";
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./types/index";
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./types/index\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@short.io/client-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
8
9
|
"scripts": {
|
|
9
10
|
"compile": "tsc",
|
|
10
11
|
"format": "eslint --cache --ext .ts . && prettier --write \"src/**/*.ts\"",
|
package/src/types.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/index";
|
package/tsconfig.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDomain.js","sourceRoot":"","sources":["../../../src/test/domain/createDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAC/D,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst newDomain = await shortio.domain.create(\"test-test.com\");\nconsole.log(\"file: getDomains.ts:5 ::: domains:\", newDomain);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDomains.js","sourceRoot":"","sources":["../../../src/test/domain/getDomains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC5C,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst domains = await shortio.domain.list();\nconsole.log(\"file: getDomains.ts:5 ::: domains:\", domains);\n"]}
|
package/dist/test/getLinks.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLinks.js","sourceRoot":"","sources":["../../src/test/getLinks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACzD,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACnD,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../index.js\";\n\nconst shortIOClient = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst links = await shortIOClient.getLinks(293848);\nconsole.log(\"file: getLinks.ts:5 ::: links:\", links);\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const archiveRes = await shortio.link.archive("lnk_1eru_9dCPkohgosF");
|
|
4
|
-
console.log("file: archiveLink.ts:5 ::: archiveRes:", archiveRes);
|
|
5
|
-
//# sourceMappingURL=archiveLink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archiveLink.js","sourceRoot":"","sources":["../../../src/test/link/archiveLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACtE,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst archiveRes = await shortio.link.archive(\"lnk_1eru_9dCPkohgosF\");\nconsole.log(\"file: archiveLink.ts:5 ::: archiveRes:\", archiveRes);\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const newLink = await shortio.link.create("rybak.link", "https://example.com/long--long--url");
|
|
4
|
-
console.log("file: createLink.ts:5 ::: newLink:", newLink);
|
|
5
|
-
//# sourceMappingURL=createLink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLink.js","sourceRoot":"","sources":["../../../src/test/link/createLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,qCAAqC,CAAC,CAAC;AAC/F,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst newLink = await shortio.link.create(\"rybak.link\", \"https://example.com/long--long--url\");\nconsole.log(\"file: createLink.ts:5 ::: newLink:\", newLink);\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const newLinks = await shortio.link.bulkCreate("rybak.link", [
|
|
4
|
-
{
|
|
5
|
-
originalURL: "https://developers.short.io/reference/linksbulkpost",
|
|
6
|
-
path: "shortio/linkbulkcreate",
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
originalURL: "https://developers.short.io/reference/archivelink",
|
|
10
|
-
path: "shortio/linkarchive",
|
|
11
|
-
},
|
|
12
|
-
]);
|
|
13
|
-
console.log("file: createLinkBulk.ts:14 ::: newLinks:", newLinks);
|
|
14
|
-
//# sourceMappingURL=createLinkBulk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLinkBulk.js","sourceRoot":"","sources":["../../../src/test/link/createLinkBulk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,UAAU,CAC1C,YAAY,EACZ;IACI;QACI,WAAW,EAAE,qDAAqD;QAClE,IAAI,EAAE,wBAAwB;KACjC;IACD;QACI,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,qBAAqB;KAC9B;CACJ,CAEJ,CAAC;AACF,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst newLinks = await shortio.link.bulkCreate(\n \"rybak.link\",\n [\n {\n originalURL: \"https://developers.short.io/reference/linksbulkpost\",\n path: \"shortio/linkbulkcreate\",\n },\n {\n originalURL: \"https://developers.short.io/reference/archivelink\",\n path: \"shortio/linkarchive\",\n },\n ],\n // true,\n);\nconsole.log(\"file: createLinkBulk.ts:14 ::: newLinks:\", newLinks);\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const linkCountryRes = await shortio.linkCountry.create("lnk_1eru_9dCPkogORqv", {
|
|
4
|
-
country: "US",
|
|
5
|
-
originalURL: "https://example3.com",
|
|
6
|
-
});
|
|
7
|
-
console.log("file: linkCountryRes.ts:5 ::: linkCountryRes:", linkCountryRes);
|
|
8
|
-
//# sourceMappingURL=createLinkCountry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLinkCountry.js","sourceRoot":"","sources":["../../../src/test/link/createLinkCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,sBAAsB,EAAE;IAC5E,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,sBAAsB;CACtC,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,+CAA+C,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkCountryRes = await shortio.linkCountry.create(\"lnk_1eru_9dCPkogORqv\", {\n country: \"US\",\n originalURL: \"https://example3.com\",\n});\nconsole.log(\"file: linkCountryRes.ts:5 ::: linkCountryRes:\", linkCountryRes);\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const newLink = await shortio.link.createPublic("rybak.link", "https://example.com/long--long--url", "pk_wO9WCsRU5Q08Gumf");
|
|
4
|
-
console.log("file: createLink.ts:5 ::: newLink:", newLink);
|
|
5
|
-
//# sourceMappingURL=createLinkPublic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLinkPublic.js","sourceRoot":"","sources":["../../../src/test/link/createLinkPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,YAAY,CAC3C,YAAY,EACZ,qCAAqC,EACrC,qBAAqB,CACxB,CAAC;AACF,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst newLink = await shortio.link.createPublic(\n \"rybak.link\",\n \"https://example.com/long--long--url\",\n \"pk_wO9WCsRU5Q08Gumf\",\n);\nconsole.log(\"file: createLink.ts:5 ::: newLink:\", newLink);\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const linkRegionRes = await shortio.linkRegion.create("lnk_1eru_9dCPkogORqv", {
|
|
4
|
-
country: "US",
|
|
5
|
-
region: "CA",
|
|
6
|
-
originalURL: "https://example4.com",
|
|
7
|
-
});
|
|
8
|
-
console.log("file: getLinkRegions.ts:5 ::: linkRegionRes:", linkRegionRes);
|
|
9
|
-
//# sourceMappingURL=createLinkRegions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLinkRegions.js","sourceRoot":"","sources":["../../../src/test/link/createLinkRegions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAsB,EAAE;IAC1E,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,sBAAsB;CACtC,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkRegionRes = await shortio.linkRegion.create(\"lnk_1eru_9dCPkogORqv\", {\n country: \"US\",\n region: \"CA\",\n originalURL: \"https://example4.com\",\n});\nconsole.log(\"file: getLinkRegions.ts:5 ::: linkRegionRes:\", linkRegionRes);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteLink.js","sourceRoot":"","sources":["../../../src/test/link/deleteLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAC9D,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst res = await shortio.link.delete(\"lnk_1eru_9dCPkohgosE\");\nconsole.log(\"file: deleteLink.ts:5 ::: res:\", res);\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Shortio } from "../../index.js";
|
|
2
|
-
const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
|
|
3
|
-
const linkCountryDelRes = await shortio.linkCountry.delete("lnk_1eru_9dCPkogORqv", "US");
|
|
4
|
-
console.log("file: deleteLinkCountry.ts:5 ::: linkCountryDelRes:", linkCountryDelRes);
|
|
5
|
-
//# sourceMappingURL=deleteLinkCountry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteLinkCountry.js","sourceRoot":"","sources":["../../../src/test/link/deleteLinkCountry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;AACzF,OAAO,CAAC,GAAG,CAAC,qDAAqD,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkCountryDelRes = await shortio.linkCountry.delete(\"lnk_1eru_9dCPkogORqv\", \"US\");\nconsole.log(\"file: deleteLinkCountry.ts:5 ::: linkCountryDelRes:\", linkCountryDelRes);\n"]}
|