@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.
Files changed (114) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.cjs +3 -0
  3. package/README.md +50 -0
  4. package/dist/index.js +412 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/test/domain/createDomain.js +5 -0
  7. package/dist/test/domain/createDomain.js.map +1 -0
  8. package/dist/test/domain/getDomains.js +5 -0
  9. package/dist/test/domain/getDomains.js.map +1 -0
  10. package/dist/test/getLinks.js +5 -0
  11. package/dist/test/getLinks.js.map +1 -0
  12. package/dist/test/link/archiveLink.js +5 -0
  13. package/dist/test/link/archiveLink.js.map +1 -0
  14. package/dist/test/link/createLink.js +5 -0
  15. package/dist/test/link/createLink.js.map +1 -0
  16. package/dist/test/link/createLinkBulk.js +14 -0
  17. package/dist/test/link/createLinkBulk.js.map +1 -0
  18. package/dist/test/link/createLinkCountry.js +8 -0
  19. package/dist/test/link/createLinkCountry.js.map +1 -0
  20. package/dist/test/link/createLinkPublic.js +5 -0
  21. package/dist/test/link/createLinkPublic.js.map +1 -0
  22. package/dist/test/link/createLinkRegions.js +9 -0
  23. package/dist/test/link/createLinkRegions.js.map +1 -0
  24. package/dist/test/link/deleteLink.js +5 -0
  25. package/dist/test/link/deleteLink.js.map +1 -0
  26. package/dist/test/link/deleteLinkCountry.js +5 -0
  27. package/dist/test/link/deleteLinkCountry.js.map +1 -0
  28. package/dist/test/link/deleteLinkRegion.js +8 -0
  29. package/dist/test/link/deleteLinkRegion.js.map +1 -0
  30. package/dist/test/link/getLinkCountry.js +5 -0
  31. package/dist/test/link/getLinkCountry.js.map +1 -0
  32. package/dist/test/link/getLinkInfoByOriginalURL.js +5 -0
  33. package/dist/test/link/getLinkInfoByOriginalURL.js.map +1 -0
  34. package/dist/test/link/getLinkInfoByPath.js +5 -0
  35. package/dist/test/link/getLinkInfoByPath.js.map +1 -0
  36. package/dist/test/link/getLinkQRCode.js +5 -0
  37. package/dist/test/link/getLinkQRCode.js.map +1 -0
  38. package/dist/test/link/getLinkRegions.js +5 -0
  39. package/dist/test/link/getLinkRegions.js.map +1 -0
  40. package/dist/test/link/getLinks.js +5 -0
  41. package/dist/test/link/getLinks.js.map +1 -0
  42. package/dist/test/link/getOpenGraph.js +5 -0
  43. package/dist/test/link/getOpenGraph.js.map +1 -0
  44. package/dist/test/link/updateLink.js +8 -0
  45. package/dist/test/link/updateLink.js.map +1 -0
  46. package/dist/test/link/updateOpenGraph.js +5 -0
  47. package/dist/test/link/updateOpenGraph.js.map +1 -0
  48. package/dist/test/statistics/clear.js +5 -0
  49. package/dist/test/statistics/clear.js.map +1 -0
  50. package/dist/test/statistics/getByDomain.js +7 -0
  51. package/dist/test/statistics/getByDomain.js.map +1 -0
  52. package/dist/test/statistics/getByDomainPost.js +10 -0
  53. package/dist/test/statistics/getByDomainPost.js.map +1 -0
  54. package/dist/test/statistics/getByLink.js +7 -0
  55. package/dist/test/statistics/getByLink.js.map +1 -0
  56. package/dist/test/statistics/getByLinkPost.js +7 -0
  57. package/dist/test/statistics/getByLinkPost.js.map +1 -0
  58. package/dist/test/statistics/getLastClicks.js +8 -0
  59. package/dist/test/statistics/getLastClicks.js.map +1 -0
  60. package/dist/test/statistics/getLinkClicks.js +7 -0
  61. package/dist/test/statistics/getLinkClicks.js.map +1 -0
  62. package/dist/test/statistics/getLinkClicksByPathDates.js +13 -0
  63. package/dist/test/statistics/getLinkClicksByPathDates.js.map +1 -0
  64. package/dist/test/statistics/getTopByColumn.js +8 -0
  65. package/dist/test/statistics/getTopByColumn.js.map +1 -0
  66. package/dist/test/statistics/getTopByInterval.js +8 -0
  67. package/dist/test/statistics/getTopByInterval.js.map +1 -0
  68. package/dist/types/common.js +2 -0
  69. package/dist/types/common.js.map +1 -0
  70. package/dist/types/domain.js +2 -0
  71. package/dist/types/domain.js.map +1 -0
  72. package/dist/types/link.js +2 -0
  73. package/dist/types/link.js.map +1 -0
  74. package/dist/types/statistics.js +2 -0
  75. package/dist/types/statistics.js.map +1 -0
  76. package/dist/types.js +2 -0
  77. package/dist/types.js.map +1 -0
  78. package/package.json +35 -0
  79. package/src/index.ts +774 -0
  80. package/src/test/domain/createDomain.ts +5 -0
  81. package/src/test/domain/getDomains.ts +5 -0
  82. package/src/test/link/archiveLink.ts +5 -0
  83. package/src/test/link/createLink.ts +5 -0
  84. package/src/test/link/createLinkBulk.ts +18 -0
  85. package/src/test/link/createLinkCountry.ts +8 -0
  86. package/src/test/link/createLinkPublic.ts +9 -0
  87. package/src/test/link/createLinkRegions.ts +9 -0
  88. package/src/test/link/deleteLink.ts +5 -0
  89. package/src/test/link/deleteLinkCountry.ts +5 -0
  90. package/src/test/link/deleteLinkRegion.ts +8 -0
  91. package/src/test/link/getLinkCountry.ts +5 -0
  92. package/src/test/link/getLinkInfoByOriginalURL.ts +5 -0
  93. package/src/test/link/getLinkInfoByPath.ts +5 -0
  94. package/src/test/link/getLinkQRCode.ts +5 -0
  95. package/src/test/link/getLinkRegions.ts +5 -0
  96. package/src/test/link/getLinks.ts +5 -0
  97. package/src/test/link/getOpenGraph.ts +5 -0
  98. package/src/test/link/updateLink.ts +8 -0
  99. package/src/test/link/updateOpenGraph.ts +5 -0
  100. package/src/test/statistics/clear.ts +5 -0
  101. package/src/test/statistics/getByDomain.ts +7 -0
  102. package/src/test/statistics/getByDomainPost.ts +10 -0
  103. package/src/test/statistics/getByLink.ts +7 -0
  104. package/src/test/statistics/getByLinkPost.ts +7 -0
  105. package/src/test/statistics/getLastClicks.ts +8 -0
  106. package/src/test/statistics/getLinkClicks.ts +7 -0
  107. package/src/test/statistics/getLinkClicksByPathDates.ts +17 -0
  108. package/src/test/statistics/getTopByColumn.ts +8 -0
  109. package/src/test/statistics/getTopByInterval.ts +8 -0
  110. package/src/types/common.ts +11 -0
  111. package/src/types/domain.ts +44 -0
  112. package/src/types/link.ts +159 -0
  113. package/src/types/statistics.ts +242 -0
  114. package/tsconfig.json +19 -0
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,5 @@
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
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const res = await shortio.link.delete("lnk_1eru_9dCPkohgosE");
4
+ console.log("file: deleteLink.ts:5 ::: res:", res);
5
+ //# sourceMappingURL=deleteLink.js.map
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,5 @@
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
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,8 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkRegionRes = await shortio.linkRegion.delete("lnk_1eru_9dCPkogORqv", {
4
+ country: "US",
5
+ region: "CA",
6
+ });
7
+ console.log("file: getLinkRegions.ts:5 ::: linkRegionRes:", linkRegionRes);
8
+ //# sourceMappingURL=deleteLinkRegion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteLinkRegion.js","sourceRoot":"","sources":["../../../src/test/link/deleteLinkRegion.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;CACf,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.delete(\"lnk_1eru_9dCPkogORqv\", {\n country: \"US\",\n region: \"CA\",\n});\nconsole.log(\"file: getLinkRegions.ts:5 ::: linkRegionRes:\", linkRegionRes);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkCountryRes = await shortio.linkCountry.list("lnk_1eru_9dCPkogORqv");
4
+ console.log("file: linkCountryRes.ts:5 ::: linkCountryRes:", linkCountryRes);
5
+ //# sourceMappingURL=getLinkCountry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkCountry.js","sourceRoot":"","sources":["../../../src/test/link/getLinkCountry.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,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC9E,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.list(\"lnk_1eru_9dCPkogORqv\");\nconsole.log(\"file: linkCountryRes.ts:5 ::: linkCountryRes:\", linkCountryRes);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkInfo = await shortio.link.getByOriginalURL("rybak.link", "https://github.com/RemyJeancolas/docker-aliases");
4
+ console.log("file: getLinkInfo.ts:5 ::: linkInfo:", linkInfo);
5
+ //# sourceMappingURL=getLinkInfoByOriginalURL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkInfoByOriginalURL.js","sourceRoot":"","sources":["../../../src/test/link/getLinkInfoByOriginalURL.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,gBAAgB,CAAC,YAAY,EAAE,iDAAiD,CAAC,CAAC;AACtH,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkInfo = await shortio.link.getByOriginalURL(\"rybak.link\", \"https://github.com/RemyJeancolas/docker-aliases\");\nconsole.log(\"file: getLinkInfo.ts:5 ::: linkInfo:\", linkInfo);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkInfo = await shortio.link.getByPath("rybak.link", "360cam");
4
+ console.log("file: getLinkInfo.ts:5 ::: linkInfo:", linkInfo);
5
+ //# sourceMappingURL=getLinkInfoByPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkInfoByPath.js","sourceRoot":"","sources":["../../../src/test/link/getLinkInfoByPath.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,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACtE,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkInfo = await shortio.link.getByPath(\"rybak.link\", \"360cam\");\nconsole.log(\"file: getLinkInfo.ts:5 ::: linkInfo:\", linkInfo);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const qrCode = await shortio.link.generateQRCode("lnk_1eru_9dCPkogORqv");
4
+ console.log("file: getLinkQRCode.ts:5 ::: qrCode:", qrCode);
5
+ //# sourceMappingURL=getLinkQRCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkQRCode.js","sourceRoot":"","sources":["../../../src/test/link/getLinkQRCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC;AACzE,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,MAAM,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst qrCode = await shortio.link.generateQRCode(\"lnk_1eru_9dCPkogORqv\");\nconsole.log(\"file: getLinkQRCode.ts:5 ::: qrCode:\", qrCode);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkRegionRes = await shortio.linkRegion.list("lnk_1eru_9dCPkogORqv");
4
+ console.log("file: getLinkRegions.ts:5 ::: linkRegionRes:", linkRegionRes);
5
+ //# sourceMappingURL=getLinkRegions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkRegions.js","sourceRoot":"","sources":["../../../src/test/link/getLinkRegions.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,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC5E,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.list(\"lnk_1eru_9dCPkogORqv\");\nconsole.log(\"file: getLinkRegions.ts:5 ::: linkRegionRes:\", linkRegionRes);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const links = await shortio.link.list(293848);
4
+ console.log("file: getLinks.ts:5 ::: links:", links);
5
+ //# sourceMappingURL=getLinks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinks.js","sourceRoot":"","sources":["../../../src/test/link/getLinks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9C,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst links = await shortio.link.list(293848);\nconsole.log(\"file: getLinks.ts:5 ::: links:\", links);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const openGraphRes = await shortio.link.getOpenGraph(293848, "lnk_1eru_9dCPkogORqv");
4
+ console.log("file: getOpenGraph.ts:5 ::: openGraphRes:", openGraphRes);
5
+ //# sourceMappingURL=getOpenGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOpenGraph.js","sourceRoot":"","sources":["../../../src/test/link/getOpenGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AACrF,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst openGraphRes = await shortio.link.getOpenGraph(293848, \"lnk_1eru_9dCPkogORqv\");\nconsole.log(\"file: getOpenGraph.ts:5 ::: openGraphRes:\", openGraphRes);\n"]}
@@ -0,0 +1,8 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const updateRes = await shortio.link.update("lnk_1eru_9dCPkohgosF", {
4
+ originalURL: "https://example.com?q=test",
5
+ path: "new-path",
6
+ });
7
+ console.log("file: updateLink.ts:5 ::: updateRes:", updateRes);
8
+ //# sourceMappingURL=updateLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateLink.js","sourceRoot":"","sources":["../../../src/test/link/updateLink.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,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE;IAChE,WAAW,EAAE,4BAA4B;IACzC,IAAI,EAAE,UAAU;CACnB,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst updateRes = await shortio.link.update(\"lnk_1eru_9dCPkohgosF\", {\n originalURL: \"https://example.com?q=test\",\n path: \"new-path\",\n});\nconsole.log(\"file: updateLink.ts:5 ::: updateRes:\", updateRes);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const openGraphRes = await shortio.link.updateOpenGraph(293848, "lnk_1eru_9dCPkogORqv", [["title", "new title"]]);
4
+ console.log("file: getOpenGraph.ts:5 ::: openGraphRes:", openGraphRes);
5
+ //# sourceMappingURL=updateOpenGraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateOpenGraph.js","sourceRoot":"","sources":["../../../src/test/link/updateOpenGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AAClH,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst openGraphRes = await shortio.link.updateOpenGraph(293848, \"lnk_1eru_9dCPkogORqv\", [[\"title\", \"new title\"]]);\nconsole.log(\"file: getOpenGraph.ts:5 ::: openGraphRes:\", openGraphRes);\n"]}
@@ -0,0 +1,5 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const clearStatRes = await shortio.statistics.clear(362793);
4
+ console.log("file: clear.ts:5 ::: clearStatRes:", clearStatRes);
5
+ //# sourceMappingURL=clear.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear.js","sourceRoot":"","sources":["../../../src/test/statistics/clear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC5D,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst clearStatRes = await shortio.statistics.clear(362793);\nconsole.log(\"file: clear.ts:5 ::: clearStatRes:\", clearStatRes);\n"]}
@@ -0,0 +1,7 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const domainStat = await shortio.statistics.getByDomain(293848, {
4
+ period: "week",
5
+ });
6
+ console.log("file: getByDomain.ts:7 ::: domainStat:", domainStat);
7
+ //# sourceMappingURL=getByDomain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getByDomain.js","sourceRoot":"","sources":["../../../src/test/statistics/getByDomain.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,UAAU,CAAC,WAAW,CAAC,MAAM,EAAE;IAC5D,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst domainStat = await shortio.statistics.getByDomain(293848, {\n period: \"week\",\n});\nconsole.log(\"file: getByDomain.ts:7 ::: domainStat:\", domainStat);\n"]}
@@ -0,0 +1,10 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const domainStat = await shortio.statistics.getByDomainPost(293848, {
4
+ period: "week",
5
+ include: {
6
+ browsers: ["Chrome"],
7
+ },
8
+ });
9
+ console.log("file: getByDomain.ts:7 ::: domainStat:", domainStat);
10
+ //# sourceMappingURL=getByDomainPost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getByDomainPost.js","sourceRoot":"","sources":["../../../src/test/statistics/getByDomainPost.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,UAAU,CAAC,eAAe,CAAC,MAAM,EAAE;IAChE,MAAM,EAAE,MAAM;IACd,OAAO,EAAE;QACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACvB;CACJ,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst domainStat = await shortio.statistics.getByDomainPost(293848, {\n period: \"week\",\n include: {\n browsers: [\"Chrome\"],\n },\n});\nconsole.log(\"file: getByDomain.ts:7 ::: domainStat:\", domainStat);\n"]}
@@ -0,0 +1,7 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkStat = await shortio.statistics.getByLink("lnk_1eru_9dCBlsuLCCO", {
4
+ period: "week",
5
+ });
6
+ console.log("file: getByLink.ts:5 ::: linkStat:", linkStat);
7
+ //# sourceMappingURL=getByLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getByLink.js","sourceRoot":"","sources":["../../../src/test/statistics/getByLink.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,UAAU,CAAC,SAAS,CAAC,sBAAsB,EAAE;IACxE,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkStat = await shortio.statistics.getByLink(\"lnk_1eru_9dCBlsuLCCO\", {\n period: \"week\",\n});\nconsole.log(\"file: getByLink.ts:5 ::: linkStat:\", linkStat);\n"]}
@@ -0,0 +1,7 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkStat = await shortio.statistics.getByLinkPost("lnk_1eru_9dCBlsuLCCO", {
4
+ period: "month",
5
+ });
6
+ console.log("file: getByLink.ts:5 ::: linkStat:", linkStat);
7
+ //# sourceMappingURL=getByLinkPost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getByLinkPost.js","sourceRoot":"","sources":["../../../src/test/statistics/getByLinkPost.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,UAAU,CAAC,aAAa,CAAC,sBAAsB,EAAE;IAC5E,MAAM,EAAE,OAAO;CAClB,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkStat = await shortio.statistics.getByLinkPost(\"lnk_1eru_9dCBlsuLCCO\", {\n period: \"month\",\n});\nconsole.log(\"file: getByLink.ts:5 ::: linkStat:\", linkStat);\n"]}
@@ -0,0 +1,8 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const lastClicksRes = await shortio.statistics.getLastClicks(293848, {
4
+ startDate: "2022-10-01T14:08:04.418Z",
5
+ endDate: "2022-10-30T14:08:04.418Z",
6
+ });
7
+ console.log("file: getLastClicks.ts:8 ::: lastClicksRes:", lastClicksRes);
8
+ //# sourceMappingURL=getLastClicks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLastClicks.js","sourceRoot":"","sources":["../../../src/test/statistics/getLastClicks.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,aAAa,CAAC,MAAM,EAAE;IACjE,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,0BAA0B;CACtC,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,6CAA6C,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst lastClicksRes = await shortio.statistics.getLastClicks(293848, {\n startDate: \"2022-10-01T14:08:04.418Z\",\n endDate: \"2022-10-30T14:08:04.418Z\",\n});\nconsole.log(\"file: getLastClicks.ts:8 ::: lastClicksRes:\", lastClicksRes);\n"]}
@@ -0,0 +1,7 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkClicks = await shortio.statistics.getLinkClicks(293848, {
4
+ ids: "lnk_1eru_9dCBlsuLCCO,lnk_1eru_9dCBlsu4fHY",
5
+ });
6
+ console.log("file: getByLinkClicks.ts:7 ::: linkClicks:", linkClicks);
7
+ //# sourceMappingURL=getLinkClicks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkClicks.js","sourceRoot":"","sources":["../../../src/test/statistics/getLinkClicks.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,UAAU,CAAC,aAAa,CAAC,MAAM,EAAE;IAC9D,GAAG,EAAE,2CAA2C;CACnD,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkClicks = await shortio.statistics.getLinkClicks(293848, {\n ids: \"lnk_1eru_9dCBlsuLCCO,lnk_1eru_9dCBlsu4fHY\",\n});\nconsole.log(\"file: getByLinkClicks.ts:7 ::: linkClicks:\", linkClicks);\n"]}
@@ -0,0 +1,13 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const linkClicks = await shortio.statistics.getLinkClicksByPathDates(293848, [
4
+ {
5
+ path: "dYWvQ2",
6
+ createdAt: "023-02-23T14:08:04.418Z",
7
+ },
8
+ ], {
9
+ startDate: "2022-10-01T14:08:04.418Z",
10
+ endDate: "2022-10-30T14:08:04.418Z",
11
+ });
12
+ console.log("file: getByLinkClicks.ts:7 ::: linkClicks:", linkClicks);
13
+ //# sourceMappingURL=getLinkClicksByPathDates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkClicksByPathDates.js","sourceRoot":"","sources":["../../../src/test/statistics/getLinkClicksByPathDates.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,UAAU,CAAC,wBAAwB,CAChE,MAAM,EACN;IACI;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,yBAAyB;KACvC;CACJ,EACD;IACI,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,0BAA0B;CACtC,CACJ,CAAC;AACF,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst linkClicks = await shortio.statistics.getLinkClicksByPathDates(\n 293848,\n [\n {\n path: \"dYWvQ2\",\n createdAt: \"023-02-23T14:08:04.418Z\",\n },\n ],\n {\n startDate: \"2022-10-01T14:08:04.418Z\",\n endDate: \"2022-10-30T14:08:04.418Z\",\n },\n);\nconsole.log(\"file: getByLinkClicks.ts:7 ::: linkClicks:\", linkClicks);\n"]}
@@ -0,0 +1,8 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const topByColumnRes = await shortio.statistics.getTopByColumn(293848, "browser", {
4
+ startDate: "2022-10-01T14:08:04.418Z",
5
+ endDate: "2022-10-30T14:08:04.418Z",
6
+ });
7
+ console.log("file: getTopByColumn.ts:12 ::: topByColumnRes:", topByColumnRes);
8
+ //# sourceMappingURL=getTopByColumn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTopByColumn.js","sourceRoot":"","sources":["../../../src/test/statistics/getTopByColumn.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,UAAU,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE;IAC9E,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,0BAA0B;CACtC,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,gDAAgD,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst topByColumnRes = await shortio.statistics.getTopByColumn(293848, \"browser\", {\n startDate: \"2022-10-01T14:08:04.418Z\",\n endDate: \"2022-10-30T14:08:04.418Z\",\n});\nconsole.log(\"file: getTopByColumn.ts:12 ::: topByColumnRes:\", topByColumnRes);\n"]}
@@ -0,0 +1,8 @@
1
+ import { Shortio } from "../../index.js";
2
+ const shortio = new Shortio("sk_Kd5g7v8CEsgoH2oE");
3
+ const topByIntervalRes = await shortio.statistics.getTopByInterval(293848, "browser", {
4
+ startDate: "2022-10-01T14:08:04.418Z",
5
+ endDate: "2022-10-30T14:08:04.418Z",
6
+ });
7
+ console.log("file: getTopByInterval.ts:8 ::: topByColumnIntervalRes:", topByIntervalRes);
8
+ //# sourceMappingURL=getTopByInterval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTopByInterval.js","sourceRoot":"","sources":["../../../src/test/statistics/getTopByInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACnD,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE;IAClF,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,0BAA0B;CACtC,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,yDAAyD,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { Shortio } from \"../../index.js\";\n\nconst shortio = new Shortio(\"sk_Kd5g7v8CEsgoH2oE\");\nconst topByIntervalRes = await shortio.statistics.getTopByInterval(293848, \"browser\", {\n startDate: \"2022-10-01T14:08:04.418Z\",\n endDate: \"2022-10-30T14:08:04.418Z\",\n});\nconsole.log(\"file: getTopByInterval.ts:8 ::: topByColumnIntervalRes:\", topByIntervalRes);\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"","sourcesContent":["export interface SuccessResBody {\n success: boolean;\n}\n\nexport interface ErrorResBody {\n error: string;\n}\n\nexport interface StatusResBody {\n status: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=domain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.js","sourceRoot":"","sources":["../../src/types/domain.ts"],"names":[],"mappings":"","sourcesContent":["type LinkType = \"increment\" | \"random\" | \"secure\" | \"four-char\" | \"eight-char\" | \"ten-char\";\ntype DomainState = \"extra_records\" | \"not_registered\" | \"configured\" | \"not_configured\" | \"registration_pending\";\ntype SetupType = \"dns\" | \"js\";\ntype HttpLevel = \"none\" | \"redirect\" | \"hsts\";\ntype RobotPermission = \"allow\" | \"disallow\" | \"noindex\";\n\nexport interface Domain {\n id: number;\n hostname: string;\n title: string | null;\n unicodeHostname: string;\n isFavorite: boolean;\n faviconURL: string | null;\n segmentKey: string | null;\n hasFavicon: boolean;\n linkType: LinkType;\n state: DomainState;\n redirect404: string;\n hideReferer: boolean;\n hideVisitorIp: boolean;\n caseSensitive: boolean;\n exportEnabled: boolean;\n cloaking: boolean;\n incrementCounter: string;\n setupType: SetupType;\n httpsLinks: boolean;\n integrationGA: string | null;\n integrationFB: string | null;\n integrationAdroll: string | null;\n integrationGTM: string | null;\n webhookURL: string | null;\n httpsLevel: HttpLevel;\n robots: RobotPermission;\n provider: string | null;\n purgeExpiredLinks: boolean;\n lastPurgeDate: string | null;\n createdAt: string;\n updatedAt: string;\n clientStorage?: string;\n TeamId?: number;\n}\n\nexport interface DomainCreateOptions\n extends Partial<Pick<Domain, \"caseSensitive\" | \"hideReferer\" | \"httpsLinks\" | \"linkType\" | \"redirect404\">> {}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/types/link.ts"],"names":[],"mappings":"","sourcesContent":["import { ErrorResBody, SuccessResBody } from \"./common.js\";\nimport { Domain } from \"./domain.js\";\n\nexport interface Link {\n idString: string;\n path: string;\n DomainId: number;\n createdAt: string;\n updatedAt: string | null;\n expiresAt: string | null;\n shortURL: string;\n cloaking: boolean;\n OwnerId: number;\n originalURL: string;\n secureShortURL: string;\n title?: string;\n expiredURL?: string;\n ttl?: string;\n source?: string;\n duplicate?: boolean;\n archived?: boolean;\n redirectType?: string;\n clicksLimit?: number;\n passwordContact?: boolean;\n hasPassword?: true;\n password?: string;\n tags?: string[];\n androidURL?: string;\n iphoneURL?: string;\n utmSource?: string | null;\n utmMedium?: string | null;\n utmCampaign?: string | null;\n utmTerm?: string | null;\n utmContent?: string | null;\n}\n\nexport interface LinkCountry {\n id: string;\n LinkIdString: Link[\"idString\"];\n country: string;\n originalURL: string;\n createdAt: Date;\n}\n\nexport interface LinkRegion {\n id: string;\n LinkIdString: Link[\"idString\"];\n country: string;\n region: string;\n originalURL: string;\n name: string;\n createdAt: Date;\n}\n\nexport interface LinkCreateOptions\n extends Pick<\n Partial<Link>,\n | \"source\"\n | \"cloaking\"\n | \"password\"\n | \"redirectType\"\n | \"expiredURL\"\n | \"title\"\n | \"path\"\n | \"androidURL\"\n | \"iphoneURL\"\n | \"clicksLimit\"\n > {\n tags?: string[];\n allowDuplicates?: boolean;\n folderId?: LinkFolder[\"id\"];\n expiresAt?: number;\n ttl?: string;\n createdAt?: number;\n}\n\nexport interface LinkUpdateOptions extends LinkCreateOptions {\n originalURL?: Link[\"originalURL\"];\n archived?: Link[\"archived\"];\n icon?: string;\n splitURL?: string;\n splitPercent?: number;\n passwordContact?: boolean;\n utmSource?: string | null;\n utmMedium?: string | null;\n utmCampaign?: string | null;\n utmTerm?: string | null;\n utmContent?: string | null;\n}\n\nexport interface LinkBulkCreateOptions extends LinkCreateOptions, Pick<Link, \"originalURL\"> {}\n\nexport interface LinkWithUser extends Link, User {}\n\nexport interface LinksAndCount {\n links: LinkWithUser[];\n count: number;\n nextPageToken: string | null;\n hasMore?: boolean;\n}\n\nexport interface LinkListOptions {\n domain_id: string;\n beforeDate?: string;\n afterDate?: string;\n dateSortOrder?: SortingOrder;\n createdAt?: string;\n idString?: string;\n pageToken?: string;\n folderId?: LinkFolder[\"id\"];\n limit?: number;\n offset?: number;\n}\n\nexport interface UpdateLinkErrorRes extends ErrorResBody {\n field: string;\n}\n\nexport interface DeleteLinkRes extends SuccessResBody, Pick<Link, \"idString\"> {}\n\nexport interface GetLinkQRCodeOptions {\n type?: string;\n size?: number;\n color?: string;\n backgroundColor?: string;\n}\n\nexport type LinkOpenGraphData = [string, string][];\n\nexport interface LinkCountryCreateOptions {\n country: string;\n originalURL: string;\n}\n\nexport interface LinkRegionCreateOptions {\n country: string;\n region: string;\n originalURL: string;\n}\n\nexport interface LinkRegionDeleteOptions {\n country: string;\n region: string;\n}\n\ntype SortingOrder = \"asc\" | \"desc\";\n\ninterface User {\n email: string;\n id: number;\n name: string;\n photoURL: string;\n}\n\ninterface LinkFolder {\n id: string;\n name: string;\n DomainId: Domain[\"id\"];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=statistics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics.js","sourceRoot":"","sources":["../../src/types/statistics.ts"],"names":[],"mappings":"","sourcesContent":["import { Link } from \"./link\";\n\nexport interface GetStatisticsOptions extends StartEndDate {\n period?: Period;\n tzOffset?: number;\n clicksChartInterval?: Interval;\n}\n\nexport interface TopByColumnOptions extends StartEndDate, Pick<LimitOffset, \"limit\">, IncludeExcludeOptions {\n period?: Period;\n tzOffset?: number;\n prefix?: string;\n}\n\nexport interface TopByIntervalOptions extends StartEndDate, Pick<LimitOffset, \"limit\">, IncludeExcludeOptions {\n interval?: Interval;\n period?: Period;\n tzOffset?: number;\n}\n\nexport interface TopByIntervalRes {\n date: string;\n statistics: {\n column: string;\n score: string;\n }[];\n}\n\nexport interface TopByColumnRes {\n name: string;\n}\n\nexport interface GetLastClicksOptions\n extends StartEndDate,\n Pick<LimitOffset, \"limit\">,\n IncludeExcludeOptions,\n BeforeAfterDate {\n tzOffset?: number;\n period?: Period;\n}\n\nexport interface LastClicksRes {\n host: string;\n path: string;\n lcpath: string;\n dt: string;\n method: string;\n url: string;\n st: number;\n ip: string;\n proto: string;\n ref: string;\n ua: string;\n human: boolean;\n browser: string;\n browser_version: string;\n country: string;\n city: string;\n social: string;\n refhost: string;\n os: string;\n utm_source: string;\n utm_medium: string;\n utm_campaign: string;\n goal_completed: boolean | null;\n ab_path: string | null;\n}\n\nexport interface FilterOptions {\n paths?: Set<string>;\n countries?: Set<string>;\n dt?: [Date, Date];\n browsers?: string[];\n human?: boolean;\n socials?: string[];\n browserVersions?: string[];\n statuses?: number[];\n methods?: string[];\n protos?: (\"http\" | \"https\")[];\n refhosts?: string[];\n utmSources?: string[];\n utmMediums?: string[];\n utmCampaigns?: string[];\n}\n\nexport interface IncludeExcludeOptions {\n include?: FilterOptions;\n exclude?: FilterOptions;\n}\n\nexport interface LinkIds {\n ids: string;\n}\n\nexport interface PathDate extends Pick<Link, \"path\" | \"createdAt\"> {}\n\nexport interface PathClicks {\n [path: Link[\"path\"]]: number;\n}\n\nexport interface LinkStatistics {\n totalClicks: number;\n humanClicks: number;\n humanClicksChange: string;\n totalClicksChange: string;\n clickStatistics: {\n datasets: [\n {\n data: DatePoint[];\n },\n ];\n };\n interval: IntervalResponse;\n referer: Referer[];\n social: Social[];\n browser: Browser[];\n os: OS[];\n city: City[];\n country: Country[];\n}\n\nexport interface DomainStatistics {\n country: Country[];\n city: City[];\n clicks: number;\n humanClicks: number;\n links: number;\n linksChange: string;\n linksChangePositive: boolean;\n clicksPerLink: string;\n clicksPerLinkChange: string;\n humanClicksPerLink: string;\n prevClicksChange: string;\n humanClicksChange: string;\n humanClicksChangePositive: boolean;\n interval: IntervalResponse;\n clickStatistics: {\n datasets: [\n {\n data: DatePoint[];\n },\n ];\n };\n referer: Referer[];\n social: Social[];\n browser: Browser[];\n os: OS[];\n utm_medium: ({ utm_medium: string } & ClicksScore)[];\n utm_source: ({ utm_source: string } & ClicksScore)[];\n utm_campaign: ({ utm_campaign: string } & ClicksScore)[];\n}\n\ninterface IntervalResponse {\n startDate: Date | null;\n endDate: Date | null;\n prevStartDate: Date | null;\n prevEndDate: Date | null;\n}\n\ninterface DatePoint {\n x: Date;\n y: number;\n}\n\ninterface City extends ClicksScore {\n city: number;\n name: string;\n}\n\ninterface OS extends ClicksScore {\n os: string;\n}\n\ninterface Social extends ClicksScore {\n social: string;\n socialName?: string;\n}\n\ninterface Browser extends ClicksScore {\n browser: string;\n browserName?: string;\n}\n\ninterface Referer extends ClicksScore {\n referer: string;\n}\n\ninterface Country extends ClicksScore {\n country: string;\n countryName: string;\n}\n\ninterface ClicksScore {\n score: number;\n}\n\ntype Period = \"custom\" | \"today\" | \"yesterday\" | \"total\" | \"week\" | \"month\" | \"lastmonth\" | \"last7\" | \"last30\";\ntype Interval = \"hour\" | \"day\" | \"week\" | \"month\";\n\nexport interface StartEndDate {\n startDate?: string;\n endDate?: string;\n}\n\nexport interface BeforeAfterDate {\n afterDate?: string;\n beforeDate?: string;\n}\n\nexport interface LinkClicks {\n [key: Link[\"idString\"]]: number;\n}\n\nexport interface LimitOffset {\n limit?: number;\n offset?: number;\n}\n\nexport type Column =\n | \"path\"\n | \"method\"\n | \"st\"\n | \"proto\"\n | \"human\"\n | \"browser\"\n | \"browser_version\"\n | \"country\"\n | \"city\"\n | \"social\"\n | \"refhost\"\n | \"os\"\n | \"utm_source\"\n | \"utm_medium\"\n | \"utm_campaign\"\n | \"goal_completed\"\n | \"ab_path\";\n\nexport interface TopColumnRes {\n score: number;\n column: string;\n displayName: string;\n}\n"]}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["type LinkIdString = string & { __linkIdString: never };\n\n\nexport interface Link {\n idString: LinkIdString;\n id?: LinkIdString;\n path: string;\n DomainId: number;\n createdAt: string;\n updatedAt: string | null;\n expiresAt: string | null;\n shortURL: string;\n cloaking: boolean;\n OwnerId: number;\n originalURL: string;\n secureShortURL: string;\n duplicate?: boolean;\n archived?: boolean;\n redirectType?: string;\n clicksLimit?: number;\n passwordContact?: boolean;\n hasPassword?: true;\n tags?: string[];\n ttl?: string;\n}\n\nexport interface User {\n email: string;\n id: number;\n name: string;\n photoURL: string;\n}\n\nexport interface Domain {\n id: number;\n}\n\n\nexport interface LinkFolder {\n id: string;\n name: string;\n DomainId: Domain[\"id\"];\n}\n\nexport interface LinksAndCount {\n links: (Link & User)[];\n count: number;\n nextPageToken: string | null;\n hasMore?: boolean;\n}\n\n\ninterface LimitOffsetQuery {\n limit?: string;\n offset?: string;\n}\n\nexport type SortingOrder = \"asc\" | \"desc\";\n\nexport interface LinksReqQuery extends LimitOffsetQuery {\n domain_id: string;\n beforeDate?: string;\n afterDate?: string;\n dateSortOrder?: SortingOrder;\n createdAt?: string;\n idString?: string;\n pageToken?: string;\n folderId?: LinkFolder[\"id\"];\n}"]}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@short.io/client-node",
3
+ "version": "1.0.1",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "private": false,
8
+ "scripts": {
9
+ "compile": "tsc",
10
+ "format": "eslint --cache --ext .ts . && prettier --write \"src/**/*.ts\"",
11
+ "prepare": "npm run compile",
12
+ "prepublishOnly": "npm run format && npm version patch"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/Short-io/client-node.git"
17
+ },
18
+ "keywords": [
19
+ "short.io",
20
+ "api"
21
+ ],
22
+ "author": "",
23
+ "license": "ISC",
24
+ "bugs": {
25
+ "url": "https://github.com/Short-io/client-node/issues"
26
+ },
27
+ "homepage": "https://github.com/Short-io/client-node#readme",
28
+ "prettier": "@short.io/eslint-config/prettier",
29
+ "devDependencies": {
30
+ "@short.io/eslint-config": "npm:@short.io/style-guide@^1.5.0",
31
+ "@types/node": "^18.14.0",
32
+ "eslint": "^8.34.0",
33
+ "typescript": "^4.9.5"
34
+ }
35
+ }