@agility/content-fetch 2.0.0-rc1 → 2.0.0-rc10

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 (296) hide show
  1. package/.jsdoc.json +28 -28
  2. package/.yarn/cache/@babel-code-frame-npm-7.22.10-bc14e2ec1b-89a06534ad.zip +0 -0
  3. package/.yarn/cache/{@babel-core-npm-7.22.9-509b29c82e-7bf069aece.zip → @babel-core-npm-7.22.10-54c0aaa674-cc4efa0920.zip} +0 -0
  4. package/.yarn/cache/{@babel-generator-npm-7.22.9-d9fccf9328-7c9d2c58b8.zip → @babel-generator-npm-7.22.10-1a9a2f9e75-59a79730ab.zip} +0 -0
  5. package/.yarn/cache/{@babel-helper-compilation-targets-npm-7.22.9-b4473889ca-ea0006c6a9.zip → @babel-helper-compilation-targets-npm-7.22.10-20c2c02a4f-f6f1896816.zip} +0 -0
  6. package/.yarn/cache/{@babel-helpers-npm-7.22.6-8e54464b9e-5c1f33241f.zip → @babel-helpers-npm-7.22.10-83a2c2542a-3b1219e362.zip} +0 -0
  7. package/.yarn/cache/@babel-highlight-npm-7.22.10-cea13c397b-f714a1e1a7.zip +0 -0
  8. package/.yarn/cache/@babel-parser-npm-7.22.10-a7c9b29e4f-af51567b7d.zip +0 -0
  9. package/.yarn/cache/@babel-traverse-npm-7.22.10-9eaf5a4899-9f7b358563.zip +0 -0
  10. package/.yarn/cache/@dabh-diagnostics-npm-2.0.3-0f2cd64f24-4879600c55.zip +0 -0
  11. package/.yarn/cache/@esbuild-win32-x64-npm-0.19.0-2341ee400c-8.zip +0 -0
  12. package/.yarn/cache/{@jridgewell-resolve-uri-npm-3.1.0-6ff2351e61-b5ceaaf9a1.zip → @jridgewell-resolve-uri-npm-3.1.1-aa2de3f210-f5b441fe79.zip} +0 -0
  13. package/.yarn/cache/{@jridgewell-trace-mapping-npm-0.3.18-cd96571385-0572669f85.zip → @jridgewell-trace-mapping-npm-0.3.19-9aa1a7e2fd-956a6f0f6f.zip} +0 -0
  14. package/.yarn/cache/@types-axios-npm-0.14.0-42f41917ea-12a230b940.zip +0 -0
  15. package/.yarn/cache/@types-node-npm-18.17.4-7b6cd3731e-d4c458202d.zip +0 -0
  16. package/.yarn/cache/{@types-node-npm-20.4.5-7555fad0d4-36a0304a8d.zip → @types-node-npm-20.4.9-c55842c502-504e3da962.zip} +0 -0
  17. package/.yarn/cache/@types-triple-beam-npm-1.3.2-e1699700a8-dd7b4a563f.zip +0 -0
  18. package/.yarn/cache/agentkeepalive-npm-4.5.0-f237b580b2-13278cd5b1.zip +0 -0
  19. package/.yarn/cache/args-npm-5.0.3-ec59f35e6d-ac39e65609.zip +0 -0
  20. package/.yarn/cache/async-npm-3.2.4-aba13508f9-43d07459a4.zip +0 -0
  21. package/.yarn/cache/axios-npm-1.4.0-4d7ce8ca3e-7fb6a4313b.zip +0 -0
  22. package/.yarn/cache/camelcase-npm-5.0.0-c808398846-8bfe920e04.zip +0 -0
  23. package/.yarn/cache/caniuse-lite-npm-1.0.30001519-1d6b5bc825-66085133ed.zip +0 -0
  24. package/.yarn/cache/color-npm-3.2.1-568cf1014f-f81220e8b7.zip +0 -0
  25. package/.yarn/cache/color-string-npm-1.9.1-dc020e56be-c13fe7cff7.zip +0 -0
  26. package/.yarn/cache/colorspace-npm-1.1.4-f01655548a-bb3934ef3c.zip +0 -0
  27. package/.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-ab8c07884e.zip +0 -0
  28. package/.yarn/cache/detect-file-npm-1.0.0-a22ca7c5b6-1861e41461.zip +0 -0
  29. package/.yarn/cache/{electron-to-chromium-npm-1.4.481-eaa539b254-52b7e8d7ae.zip → electron-to-chromium-npm-1.4.488-9c254135e9-431c100e01.zip} +0 -0
  30. package/.yarn/cache/enabled-npm-2.0.0-bf5d96c9d8-9d256d89f4.zip +0 -0
  31. package/.yarn/cache/esbuild-npm-0.19.0-1a8543a0f4-77ef2e57a9.zip +0 -0
  32. package/.yarn/cache/expand-tilde-npm-2.0.2-a4020a62f5-2efe6ed407.zip +0 -0
  33. package/.yarn/cache/fecha-npm-4.2.3-75248da3fd-f94e2fb3ac.zip +0 -0
  34. package/.yarn/cache/find-node-modules-npm-2.1.3-431b2c5604-4b8a194ffd.zip +0 -0
  35. package/.yarn/cache/findup-sync-npm-4.0.0-3884c677a0-94131e1107.zip +0 -0
  36. package/.yarn/cache/fn.name-npm-1.1.0-b472333184-e357144f48.zip +0 -0
  37. package/.yarn/cache/global-modules-npm-1.0.0-70c522e57a-10be68796c.zip +0 -0
  38. package/.yarn/cache/global-prefix-npm-1.0.2-a96996834b-061b43470f.zip +0 -0
  39. package/.yarn/cache/homedir-polyfill-npm-1.0.3-da1a29ce00-18dd4db870.zip +0 -0
  40. package/.yarn/cache/ini-npm-1.3.8-fb5040b4c0-dfd98b0ca3.zip +0 -0
  41. package/.yarn/cache/is-arrayish-npm-0.3.2-f856180f79-977e64f54d.zip +0 -0
  42. package/.yarn/cache/is-core-module-npm-2.13.0-e444c50225-053ab101fb.zip +0 -0
  43. package/.yarn/cache/is-extglob-npm-2.1.1-0870ea68b5-df033653d0.zip +0 -0
  44. package/.yarn/cache/is-glob-npm-4.0.3-cb87bf1bdb-d381c1319f.zip +0 -0
  45. package/.yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-438b7e5265.zip +0 -0
  46. package/.yarn/cache/kuler-npm-2.0.0-19e74c9695-9e10b5a165.zip +0 -0
  47. package/.yarn/cache/leven-npm-2.1.0-19f0a16606-f7b4a01b15.zip +0 -0
  48. package/.yarn/cache/logform-npm-2.5.1-06017d630d-08fdf03be5.zip +0 -0
  49. package/.yarn/cache/merge-npm-2.1.1-90e7307c49-9c36b0e25a.zip +0 -0
  50. package/.yarn/cache/minimist-npm-1.2.8-d7af7b1dce-75a6d645fb.zip +0 -0
  51. package/.yarn/cache/mri-npm-1.1.4-d22a399f26-e65b9aed3b.zip +0 -0
  52. package/.yarn/cache/npm-dts-npm-1.3.12-c921cfddec-3897533c49.zip +0 -0
  53. package/.yarn/cache/npm-path-npm-2.0.4-fda8ca6d1d-3dfe24d9bb.zip +0 -0
  54. package/.yarn/cache/npm-run-npm-5.0.1-ba4f9faa65-1c6e171bf0.zip +0 -0
  55. package/.yarn/cache/npm-which-npm-3.0.1-2951392327-fba4864161.zip +0 -0
  56. package/.yarn/cache/one-time-npm-1.0.0-aeaad5e524-fd008d7e99.zip +0 -0
  57. package/.yarn/cache/parse-passwd-npm-1.0.0-ace6effa1d-4e55e0231d.zip +0 -0
  58. package/.yarn/cache/protochain-npm-1.0.5-ca0a4ef353-81f417e4f5.zip +0 -0
  59. package/.yarn/cache/proxy-from-env-npm-1.1.0-c13d07f26b-ed7fcc2ba0.zip +0 -0
  60. package/.yarn/cache/resolve-dir-npm-1.0.1-0a95903c18-ef736b8ed6.zip +0 -0
  61. package/.yarn/cache/{resolve-npm-1.22.2-9d9621a4ae-7e5df75796.zip → resolve-npm-1.22.4-faa4f32bdd-23f25174c2.zip} +0 -0
  62. package/.yarn/cache/{resolve-patch-f4c4056507-66cc788f13.zip → resolve-patch-efbbaf0edd-c45f2545fd.zip} +0 -0
  63. package/.yarn/cache/rimraf-npm-5.0.1-26fb251a1d-bafce85391.zip +0 -0
  64. package/.yarn/cache/safe-stable-stringify-npm-2.4.3-d895741b40-3aeb644497.zip +0 -0
  65. package/.yarn/cache/serializerr-npm-1.0.3-844e49be0c-20fdf7a7e3.zip +0 -0
  66. package/.yarn/cache/simple-swizzle-npm-0.2.2-8dee37fad1-a7f3f2ab5c.zip +0 -0
  67. package/.yarn/cache/stack-trace-npm-0.0.10-9460b173e1-473036ad32.zip +0 -0
  68. package/.yarn/cache/text-hex-npm-1.0.0-22389e4d56-1138f68adc.zip +0 -0
  69. package/.yarn/cache/tmp-npm-0.2.1-a9c8d9c0ca-8b12146541.zip +0 -0
  70. package/.yarn/cache/triple-beam-npm-1.4.1-d21ba5346a-2e881a3e8e.zip +0 -0
  71. package/.yarn/cache/which-npm-1.3.1-f0ebb8bdd8-f2e185c624.zip +0 -0
  72. package/.yarn/cache/winston-npm-3.7.2-5336ad5eff-f1f1a860d2.zip +0 -0
  73. package/.yarn/cache/winston-transport-npm-4.5.0-e10bfb2169-a56e5678a8.zip +0 -0
  74. package/.yarn/install-state.gz +0 -0
  75. package/LICENSE +21 -21
  76. package/README.md +108 -108
  77. package/build.js +26 -0
  78. package/dist/browser.js +2057 -0
  79. package/dist/index.d.ts +7 -10
  80. package/dist/node.js +13061 -0
  81. package/dist/types/ContentZone.d.ts +1 -0
  82. package/dist/types/Page.d.ts +1 -1
  83. package/jest.config.js +5 -5
  84. package/package.json +57 -50
  85. package/tsconfig.json +14 -14
  86. package/.nyc_output/713b1ec2-05ec-4b67-8061-b6cad0a45ad5.json +0 -1
  87. package/.yarn/cache/@babel-code-frame-npm-7.22.5-b36f88d6f9-cfe804f518.zip +0 -0
  88. package/.yarn/cache/@babel-highlight-npm-7.22.5-3182ccc1fe-f61ae6de6e.zip +0 -0
  89. package/.yarn/cache/@babel-parser-npm-7.22.7-7fbdf28552-02209ddbd4.zip +0 -0
  90. package/.yarn/cache/@babel-traverse-npm-7.22.8-98fbaaf7d8-a381369bc3.zip +0 -0
  91. package/.yarn/cache/@babel-types-npm-7.22.5-d1e4264bef-c13a9c1dc7.zip +0 -0
  92. package/.yarn/cache/@isaacs-string-locale-compare-npm-1.1.0-3911094464-7287da5d11.zip +0 -0
  93. package/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.14-f5f0630788-61100637b6.zip +0 -0
  94. package/.yarn/cache/@npmcli-arborist-npm-6.3.0-9d3adbe1f6-4f59d5408c.zip +0 -0
  95. package/.yarn/cache/@npmcli-config-npm-6.2.1-4191bac29e-8c8d47f900.zip +0 -0
  96. package/.yarn/cache/@npmcli-disparity-colors-npm-3.0.0-9fe9301a52-49320c6927.zip +0 -0
  97. package/.yarn/cache/@npmcli-git-npm-4.1.0-f7322fced9-37efb92659.zip +0 -0
  98. package/.yarn/cache/@npmcli-installed-package-contents-npm-2.0.2-99564e3824-60789d5ed2.zip +0 -0
  99. package/.yarn/cache/@npmcli-map-workspaces-npm-3.0.4-b07359726d-99607dbc50.zip +0 -0
  100. package/.yarn/cache/@npmcli-metavuln-calculator-npm-5.0.1-b28e316793-cd08ad9cc4.zip +0 -0
  101. package/.yarn/cache/@npmcli-name-from-folder-npm-2.0.0-18e2dba870-fb3ef891aa.zip +0 -0
  102. package/.yarn/cache/@npmcli-node-gyp-npm-3.0.0-b160a0116c-fe3802b813.zip +0 -0
  103. package/.yarn/cache/@npmcli-package-json-npm-4.0.1-8fba8ea1a2-699b80a72f.zip +0 -0
  104. package/.yarn/cache/@npmcli-promise-spawn-npm-6.0.2-c9941b207c-aa725780c1.zip +0 -0
  105. package/.yarn/cache/@npmcli-query-npm-3.0.0-53c05bcb30-90fca7edd5.zip +0 -0
  106. package/.yarn/cache/@npmcli-run-script-npm-6.0.2-6a98dec431-7a671d7dbe.zip +0 -0
  107. package/.yarn/cache/@sigstore-bundle-npm-1.0.0-6224fc68db-9902b9fcd2.zip +0 -0
  108. package/.yarn/cache/@sigstore-protobuf-specs-npm-0.2.0-93c8e6c759-6b7c5d3612.zip +0 -0
  109. package/.yarn/cache/@sigstore-tuf-npm-1.0.3-9a2b6b14aa-0a32594b73.zip +0 -0
  110. package/.yarn/cache/@tufjs-canonical-json-npm-1.0.0-66d27d850f-9ff3bcd129.zip +0 -0
  111. package/.yarn/cache/@tufjs-models-npm-1.0.4-a1dddaf561-b489baa854.zip +0 -0
  112. package/.yarn/cache/@types-node-npm-18.11.9-d21dd6ec05-cc0aae109e.zip +0 -0
  113. package/.yarn/cache/abbrev-npm-2.0.0-0eb38a17e5-0e994ad2aa.zip +0 -0
  114. package/.yarn/cache/abort-controller-npm-3.0.0-2f3a9a2bcb-170bdba9b4.zip +0 -0
  115. package/.yarn/cache/agentkeepalive-npm-4.3.0-ac3d8e6807-982453aa44.zip +0 -0
  116. package/.yarn/cache/archy-npm-1.0.0-7db8bfdc3b-504ae7af65.zip +0 -0
  117. package/.yarn/cache/are-we-there-yet-npm-4.0.1-734c8e8dce-16871ee259.zip +0 -0
  118. package/.yarn/cache/axios-cache-adapter-npm-2.7.3-26c357b785-ff44bee6a2.zip +0 -0
  119. package/.yarn/cache/base64-js-npm-1.5.1-b2f7275641-669632eb37.zip +0 -0
  120. package/.yarn/cache/bin-links-npm-4.0.2-592819adbc-6f83e73100.zip +0 -0
  121. package/.yarn/cache/binary-extensions-npm-2.2.0-180c33fec7-ccd267956c.zip +0 -0
  122. package/.yarn/cache/buffer-npm-6.0.3-cd90dfedfe-5ad23293d9.zip +0 -0
  123. package/.yarn/cache/builtins-npm-5.0.1-6d4820dd76-66d204657f.zip +0 -0
  124. package/.yarn/cache/cache-control-esm-npm-1.0.0-ee383a8c40-4f8c8399f2.zip +0 -0
  125. package/.yarn/cache/caniuse-lite-npm-1.0.30001518-2e4e82df98-1b63272f6e.zip +0 -0
  126. package/.yarn/cache/chalk-npm-5.3.0-d181999efb-623922e077.zip +0 -0
  127. package/.yarn/cache/charenc-npm-0.0.2-aca0c2f207-81dcadbe57.zip +0 -0
  128. package/.yarn/cache/cidr-regex-npm-3.1.1-a5f3c156e7-ef9306d086.zip +0 -0
  129. package/.yarn/cache/cli-columns-npm-4.0.0-7c43bbe435-fa1a3a7f4e.zip +0 -0
  130. package/.yarn/cache/cli-table3-npm-0.6.3-1dca7f9152-09897f6846.zip +0 -0
  131. package/.yarn/cache/clone-npm-1.0.4-a610fcbcf9-d06418b733.zip +0 -0
  132. package/.yarn/cache/cmd-shim-npm-6.0.1-87ebf774a0-359006b3a5.zip +0 -0
  133. package/.yarn/cache/columnify-npm-1.6.0-aa925d932b-0d59002361.zip +0 -0
  134. package/.yarn/cache/common-ancestor-path-npm-1.0.1-27534e68da-1d2e418606.zip +0 -0
  135. package/.yarn/cache/crypt-npm-0.0.2-033627d94f-baf4c7bbe0.zip +0 -0
  136. package/.yarn/cache/cssesc-npm-3.0.0-15ec56f86f-f8c4ababff.zip +0 -0
  137. package/.yarn/cache/defaults-npm-1.0.4-f3fbaf2528-3a88b7a587.zip +0 -0
  138. package/.yarn/cache/depd-npm-2.0.0-b6c51a4b43-abbe19c768.zip +0 -0
  139. package/.yarn/cache/diff-npm-5.1.0-d24d222280-c7bf0df7c9.zip +0 -0
  140. package/.yarn/cache/event-target-shim-npm-5.0.1-cb48709025-1ffe3bb22a.zip +0 -0
  141. package/.yarn/cache/events-npm-3.3.0-c280bc7e48-f6f487ad21.zip +0 -0
  142. package/.yarn/cache/fastest-levenshtein-npm-1.0.16-192d328856-a78d44285c.zip +0 -0
  143. package/.yarn/cache/fsevents-patch-2882183fbf-8.zip +0 -0
  144. package/.yarn/cache/gauge-npm-5.0.1-69ab73de36-09b1eb8d8c.zip +0 -0
  145. package/.yarn/cache/hosted-git-info-npm-6.1.1-d57807f6a5-fcd3ca2eaa.zip +0 -0
  146. package/.yarn/cache/ieee754-npm-1.2.1-fb63b3caeb-5144c0c981.zip +0 -0
  147. package/.yarn/cache/ignore-walk-npm-6.0.3-ebca6b06c4-d8ba534beb.zip +0 -0
  148. package/.yarn/cache/ini-npm-4.1.1-01c2cbda7b-0e59095540.zip +0 -0
  149. package/.yarn/cache/init-package-json-npm-5.0.0-0656c8f580-ad601c717d.zip +0 -0
  150. package/.yarn/cache/install-npm-0.13.0-53f6b8981f-645bad1253.zip +0 -0
  151. package/.yarn/cache/ip-regex-npm-4.3.0-4ac12c6be9-7ff904b891.zip +0 -0
  152. package/.yarn/cache/is-buffer-npm-1.1.6-08199d9ccc-4a186d995d.zip +0 -0
  153. package/.yarn/cache/is-cidr-npm-4.0.2-74bbb734d3-ee6e670e65.zip +0 -0
  154. package/.yarn/cache/is-core-module-npm-2.12.1-ce74e89160-f04ea30533.zip +0 -0
  155. package/.yarn/cache/json-parse-even-better-errors-npm-3.0.0-3675833c0a-f1970b5220.zip +0 -0
  156. package/.yarn/cache/json-stringify-nice-npm-1.1.4-0b0ddb188b-6ddf781148.zip +0 -0
  157. package/.yarn/cache/jsonparse-npm-1.3.1-b6fde74828-6514a7be46.zip +0 -0
  158. package/.yarn/cache/just-diff-apply-npm-5.5.0-04951e29f4-ed6bbd5978.zip +0 -0
  159. package/.yarn/cache/just-diff-npm-6.0.2-f73771d84e-1a0c7524f6.zip +0 -0
  160. package/.yarn/cache/libnpmaccess-npm-7.0.2-57b91bfda5-73d49f3939.zip +0 -0
  161. package/.yarn/cache/libnpmdiff-npm-5.0.19-26809d318b-47835abc81.zip +0 -0
  162. package/.yarn/cache/libnpmexec-npm-6.0.3-9bfdfc5775-c9c92dc29a.zip +0 -0
  163. package/.yarn/cache/libnpmfund-npm-4.0.19-742ff1c9b5-77905879f7.zip +0 -0
  164. package/.yarn/cache/libnpmhook-npm-9.0.3-1ed2368ed2-535ecefa22.zip +0 -0
  165. package/.yarn/cache/libnpmorg-npm-5.0.4-8ff49f84d5-4e170ba145.zip +0 -0
  166. package/.yarn/cache/libnpmpack-npm-5.0.19-fad75068a8-d164d61383.zip +0 -0
  167. package/.yarn/cache/libnpmpublish-npm-7.5.0-e0dfdc81a9-feb99876be.zip +0 -0
  168. package/.yarn/cache/libnpmsearch-npm-6.0.2-664c687722-7a62e5cb1c.zip +0 -0
  169. package/.yarn/cache/libnpmteam-npm-5.0.3-1e0a2afab9-a39ccdb4a6.zip +0 -0
  170. package/.yarn/cache/libnpmversion-npm-4.0.2-257501dd35-4666db4671.zip +0 -0
  171. package/.yarn/cache/md5-npm-2.3.0-86c49d3915-a63cacf401.zip +0 -0
  172. package/.yarn/cache/minipass-json-stream-npm-1.0.1-96490706d6-791b696a27.zip +0 -0
  173. package/.yarn/cache/mute-stream-npm-1.0.0-b6e846d471-36fc968b0e.zip +0 -0
  174. package/.yarn/cache/nopt-npm-7.2.0-dd734b678d-a9c0f57fb8.zip +0 -0
  175. package/.yarn/cache/normalize-package-data-npm-5.0.0-6327e2af68-a459f05eaf.zip +0 -0
  176. package/.yarn/cache/npm-audit-report-npm-5.0.0-b0af56272d-a18f16f514.zip +0 -0
  177. package/.yarn/cache/npm-bundled-npm-3.0.0-0b3c5ee4f3-110859c2d6.zip +0 -0
  178. package/.yarn/cache/npm-install-checks-npm-6.1.1-e05db36ccf-8fb3ed05cf.zip +0 -0
  179. package/.yarn/cache/npm-normalize-package-bin-npm-3.0.1-6c120b50f7-de416d720a.zip +0 -0
  180. package/.yarn/cache/npm-npm-9.8.1-c06ac946c2-d3f12cd0c0.zip +0 -0
  181. package/.yarn/cache/npm-package-arg-npm-10.1.0-e9f0aaa69d-8fe4b6a742.zip +0 -0
  182. package/.yarn/cache/npm-packlist-npm-7.0.4-1c0b919056-5ffa1f8f0b.zip +0 -0
  183. package/.yarn/cache/npm-pick-manifest-npm-8.0.2-ec194cb513-c9f71b5735.zip +0 -0
  184. package/.yarn/cache/npm-profile-npm-7.0.1-73c58f96b1-c78d2e6394.zip +0 -0
  185. package/.yarn/cache/npm-registry-fetch-npm-14.0.5-6b3e6c0dd0-c636496429.zip +0 -0
  186. package/.yarn/cache/npm-user-validate-npm-2.0.0-2fa10ebf8a-52c0c64cb2.zip +0 -0
  187. package/.yarn/cache/npmlog-npm-7.0.1-a0f355f530-caabeb1f55.zip +0 -0
  188. package/.yarn/cache/pacote-npm-15.2.0-b9ed3321e9-c731572be2.zip +0 -0
  189. package/.yarn/cache/parse-conflict-json-npm-3.0.1-9455a1ad04-d8d2656bc0.zip +0 -0
  190. package/.yarn/cache/postcss-selector-parser-npm-6.0.13-f732d92326-f89163338a.zip +0 -0
  191. package/.yarn/cache/proc-log-npm-3.0.0-a8c21c2f0f-02b64e1b39.zip +0 -0
  192. package/.yarn/cache/process-npm-0.11.10-aeb3b641ae-bfcce49814.zip +0 -0
  193. package/.yarn/cache/promise-all-reject-late-npm-1.0.1-19ba0dce9c-d7d61ac412.zip +0 -0
  194. package/.yarn/cache/promise-call-limit-npm-1.0.2-2a84fbc485-d0664dd295.zip +0 -0
  195. package/.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip +0 -0
  196. package/.yarn/cache/promzard-npm-1.0.0-a0d17e2d53-c069488271.zip +0 -0
  197. package/.yarn/cache/qrcode-terminal-npm-0.12.0-f81f8a6a67-51638d11d0.zip +0 -0
  198. package/.yarn/cache/read-cmd-shim-npm-4.0.0-2339b15fb0-2fb5a8a389.zip +0 -0
  199. package/.yarn/cache/read-npm-2.1.0-0e0cb8a375-e745999138.zip +0 -0
  200. package/.yarn/cache/read-package-json-fast-npm-3.0.2-1232471a07-8d406869f0.zip +0 -0
  201. package/.yarn/cache/read-package-json-npm-6.0.4-bf5c705b94-ce40c46712.zip +0 -0
  202. package/.yarn/cache/readable-stream-npm-4.4.2-ac0d67d9ca-6f4063763d.zip +0 -0
  203. package/.yarn/cache/sigstore-npm-1.8.0-c7dd60d00a-9886278224.zip +0 -0
  204. package/.yarn/cache/spdx-correct-npm-3.2.0-ffae008484-e9ae98d22f.zip +0 -0
  205. package/.yarn/cache/spdx-exceptions-npm-2.3.0-2b68dad75a-cb69a26fa3.zip +0 -0
  206. package/.yarn/cache/spdx-expression-parse-npm-3.0.1-b718cbb35a-a1c6e104a2.zip +0 -0
  207. package/.yarn/cache/spdx-license-ids-npm-3.0.13-928dd45e3f-3469d85c65.zip +0 -0
  208. package/.yarn/cache/supports-color-npm-9.4.0-a415f39758-cb8ff8daea.zip +0 -0
  209. package/.yarn/cache/text-table-npm-0.2.0-d92a778b59-b6937a38c8.zip +0 -0
  210. package/.yarn/cache/tiny-relative-date-npm-1.3.0-4737b1ee94-82a1fa2f3b.zip +0 -0
  211. package/.yarn/cache/treeverse-npm-3.0.0-6c6d119afd-73168d9887.zip +0 -0
  212. package/.yarn/cache/tuf-js-npm-1.1.7-045f70823d-089fc0dabe.zip +0 -0
  213. package/.yarn/cache/validate-npm-package-license-npm-3.0.4-7af8adc7a8-35703ac889.zip +0 -0
  214. package/.yarn/cache/validate-npm-package-name-npm-5.0.0-fc061c1b84-5342a99498.zip +0 -0
  215. package/.yarn/cache/walk-up-path-npm-3.0.1-67ab100d5d-9ffca02fe3.zip +0 -0
  216. package/.yarn/cache/wcwidth-npm-1.0.1-05fa596453-814e9d1ddc.zip +0 -0
  217. package/.yarn/cache/which-npm-3.0.1-b2b0f09ace-adf720fe9d.zip +0 -0
  218. package/.yarn/cache/write-file-atomic-npm-5.0.1-52283db6ee-8dbb0e2512.zip +0 -0
  219. package/coverage/base.css +0 -223
  220. package/coverage/block-navigation.js +0 -79
  221. package/coverage/index.html +0 -123
  222. package/coverage/prettify.css +0 -1
  223. package/coverage/prettify.js +0 -2
  224. package/coverage/sort-arrow-sprite.png +0 -0
  225. package/coverage/sorter.js +0 -170
  226. package/coverage/src/api-client.js.html +0 -549
  227. package/coverage/src/content-fetch.js.html +0 -336
  228. package/coverage/src/index.html +0 -123
  229. package/coverage/src/methods/getContentItem.js.html +0 -285
  230. package/coverage/src/methods/getContentList.js.html +0 -486
  231. package/coverage/src/methods/getGallery.js.html +0 -243
  232. package/coverage/src/methods/getPage.js.html +0 -273
  233. package/coverage/src/methods/getSitemapFlat.js.html +0 -240
  234. package/coverage/src/methods/getSitemapNested.js.html +0 -231
  235. package/coverage/src/methods/getSyncContent.js.html +0 -258
  236. package/coverage/src/methods/getSyncPages.js.html +0 -258
  237. package/coverage/src/methods/getUrlRedirections.js.html +0 -339
  238. package/coverage/src/methods/index.html +0 -201
  239. package/coverage/src/methods/syncContentItems.js.html +0 -186
  240. package/coverage/src/methods/syncPageItems.js.html +0 -186
  241. package/coverage/src/types/FilterLogicOperator.js.html +0 -129
  242. package/coverage/src/types/FilterOperator.js.html +0 -156
  243. package/coverage/src/types/SortDirection.js.html +0 -129
  244. package/coverage/src/types/index.html +0 -123
  245. package/coverage/src/utils.js.html +0 -330
  246. package/dist/agility-content-fetch.browser.js +0 -420
  247. package/dist/agility-content-fetch.node.js +0 -10978
  248. package/dist/api-client.js +0 -316
  249. package/dist/index.js +0 -7
  250. package/dist/methods/getContentItem.js +0 -49
  251. package/dist/methods/getContentList.js +0 -94
  252. package/dist/methods/getGallery.js +0 -39
  253. package/dist/methods/getPage.js +0 -47
  254. package/dist/methods/getSitemapFlat.js +0 -26
  255. package/dist/methods/getSitemapNested.js +0 -23
  256. package/dist/methods/getSyncContent.js +0 -26
  257. package/dist/methods/getSyncPages.js +0 -26
  258. package/dist/methods/getUrlRedirections.js +0 -50
  259. package/dist/types/Client.js +0 -2
  260. package/dist/types/Config.js +0 -2
  261. package/dist/types/ContentItem.js +0 -2
  262. package/dist/types/ContentList.js +0 -9
  263. package/dist/types/ContentZone.js +0 -2
  264. package/dist/types/EnvConfig.js +0 -2
  265. package/dist/types/Filter.js +0 -10
  266. package/dist/types/FilterLogicOperator.js +0 -13
  267. package/dist/types/FilterOperator.js +0 -30
  268. package/dist/types/Gallery.js +0 -12
  269. package/dist/types/MediaItem.js +0 -13
  270. package/dist/types/MediaItemMetaData.js +0 -12
  271. package/dist/types/Page.js +0 -20
  272. package/dist/types/SEO.js +0 -11
  273. package/dist/types/SitemapFlat.js +0 -10
  274. package/dist/types/SitemapFlatItem.js +0 -17
  275. package/dist/types/SitemapNested.js +0 -7
  276. package/dist/types/SitemapNestedItem.js +0 -2
  277. package/dist/types/SitemapVisibility.js +0 -9
  278. package/dist/types/SortDirection.js +0 -13
  279. package/dist/types/SyncContent.js +0 -9
  280. package/dist/types/SyncPages.js +0 -9
  281. package/dist/types/SystemProperties.js +0 -11
  282. package/dist/types/UrlRedirection.js +0 -11
  283. package/dist/types/UrlRedirectionResponse.js +0 -9
  284. package/dist/types/index.js +0 -10
  285. package/dist/utils.js +0 -81
  286. package/test/apiClients.config.ts +0 -50
  287. package/test/getApi.tests.ts +0 -153
  288. package/test/getContentItem.tests.ts +0 -103
  289. package/test/getContentList.tests.ts +0 -251
  290. package/test/getGallery.tests.ts +0 -22
  291. package/test/getPage.tests.ts +0 -39
  292. package/test/getSitemapFlat.tests.ts +0 -30
  293. package/test/getSitemapNested.tests.ts +0 -30
  294. package/test/getSyncContentItems.tests.ts +0 -25
  295. package/test/getSyncPageItems.tests.ts +0 -27
  296. package/test/getUrlRedirections.tests.ts +0 -40
@@ -1,103 +0,0 @@
1
- import {
2
- createApiClient,
3
- createPreviewApiClient,
4
- createCachedApiClient,
5
- createApiClientWithNewCdn
6
- } from './apiClients.config';
7
-
8
- /*
9
- This file contains static references to content from the instance configured in the apiClient.config file.
10
- */
11
-
12
- const ref = {
13
- publishedContentItemID: 15,
14
- updatesMadeToPublishedContentItemID: 15
15
- }
16
-
17
- describe('getContentItem:', () => {
18
- jest.setTimeout(120000);
19
-
20
- it('should retrieve a content item in live/fetch mode and only return published content', async () => {
21
- const api = createApiClient();
22
- const contentItem = await api.getContentItem({
23
- contentID: ref.updatesMadeToPublishedContentItemID,
24
- locale: 'en-us'
25
- });
26
- expect(contentItem.contentID).toBe(ref.updatesMadeToPublishedContentItemID);
27
- expect(contentItem.fields.title).not.toMatch(/\[Staging\]/);
28
- });
29
-
30
- it('should retrieve a content item in preview mode and return the latest staging version', async () => {
31
- const api = createPreviewApiClient();
32
- const contentItem = await api.getContentItem({
33
- contentID: ref.updatesMadeToPublishedContentItemID,
34
- locale: 'en-us'
35
- });
36
- expect(contentItem.contentID).toBe(ref.updatesMadeToPublishedContentItemID);
37
- expect(contentItem.fields.title).toMatch(/\[Staging\]/);
38
- });
39
-
40
- it('should retrieve a content item in live/fetch mode, then subsequent requests are returned from cache (memory)', async () => {
41
- const api = createCachedApiClient();
42
- const contentItem = await api.getContentItem({
43
- contentID: ref.updatesMadeToPublishedContentItemID,
44
- locale: 'en-us'
45
- });
46
-
47
- expect(contentItem.contentID).toBe(ref.updatesMadeToPublishedContentItemID);
48
- expect(contentItem.fromCache).toBeFalsy();
49
-
50
- const contentItem2 = await api.getContentItem({
51
- contentID: ref.updatesMadeToPublishedContentItemID,
52
- locale: 'en-us'
53
- });
54
-
55
- expect(contentItem2.contentID).toBe(ref.updatesMadeToPublishedContentItemID);
56
- expect(contentItem2.fromCache).toBeTruthy();
57
- });
58
-
59
- it('should throw error if locale not passed as argument for getContentItem', async () => {
60
- const api = createApiClient();
61
- await expect(api.getContentItem({
62
- contentID: 22
63
- })).rejects.toThrow(TypeError);
64
- });
65
-
66
- it('should expand all content links when expandContentLinks are set to true', async () => {
67
- const api = createApiClient();
68
- const contentItem = await api.getContentItem({
69
- contentID: 65,
70
- locale: 'en-us',
71
- expandAllContentLinks: true
72
- });
73
- expect(Array.isArray(contentItem.fields.posts)).toBe(true);
74
- });
75
-
76
- it('should NOT expand all content links when expandContentLinks are set to false', async () => {
77
- const api = createApiClient();
78
- const contentItem = await api.getContentItem({
79
- contentID: 65,
80
- locale: 'en-us',
81
- expandAllContentLinks: false
82
- });
83
- expect(Array.isArray(contentItem.fields.posts)).toBe(false);
84
- });
85
-
86
- it('should NOT expand all content links when expandContentLinks is not set', async () => {
87
- const api = createApiClient();
88
- const contentItem = await api.getContentItem({
89
- contentID: 65,
90
- locale: 'en-us'
91
- });
92
- expect(Array.isArray(contentItem.fields.posts)).toBe(false);
93
- });
94
-
95
- it('should be able to fetch an item using global cdn site', async () => {
96
- const api = createApiClientWithNewCdn();
97
- const contentItem = await api.getContentItem({
98
- contentID: 4,
99
- locale: 'en-us'
100
- });
101
- expect(contentItem.fields.title).toBe('JS SDK Item - DO NOT DELETE');
102
- });
103
- });
@@ -1,251 +0,0 @@
1
- const {
2
- createApiClient,
3
- createPreviewApiClient,
4
- createCachedApiClient,
5
- createApiClientWithNewCdn,
6
- } = require('./apiClients.config');
7
-
8
- describe('getContentList:', () => {
9
- jest.setTimeout(120000);
10
-
11
- it('should retrieve a content list in live mode', async () => {
12
- const api = createApiClient();
13
- const contentList = await api.getContentList({
14
- referenceName: 'posts',
15
- locale: 'en-us',
16
- });
17
- expect(contentList.items[0].contentID).toBe(16);
18
- expect(contentList.items[3].contentID).toBe(15);
19
- });
20
-
21
- it('should retrieve a content list in preview mode', async () => {
22
- const api = createPreviewApiClient();
23
- const contentList = await api.getContentList({
24
- referenceName: 'posts',
25
- locale: 'en-us',
26
- });
27
- expect(contentList.items[0].contentID).toBe(15);
28
- expect(contentList.items[1].contentID).toBe(16);
29
- });
30
-
31
- it('should throw error if referenceName not passed as argument for getContentList', async () => {
32
- const api = createApiClient();
33
- await expect(
34
- api.getContentList({
35
- someOtherParam: 'posts',
36
- locale: 'en-us',
37
- })
38
- ).rejects.toThrow(TypeError);
39
- });
40
-
41
- it('should throw error if locale param is missing in getContentList', async () => {
42
- const api = createApiClient();
43
- await expect(
44
- api.getContentList({
45
- referenceName: 'posts',
46
- })
47
- ).rejects.toThrow(TypeError);
48
- });
49
-
50
- it('should throw error if take parameter is NOT a number in getContentList', async () => {
51
- const api = createApiClient();
52
- await expect(
53
- api.getContentList({
54
- referenceName: 'posts',
55
- locale: 'en-us',
56
- take: 'ten',
57
- })
58
- ).rejects.toThrow(TypeError);
59
- });
60
-
61
- it('should throw error if take parameter is a number less than 1 in getContentList', async () => {
62
- const api = createApiClient();
63
- await expect(
64
- api.getContentList({
65
- referenceName: 'posts',
66
- locale: 'en-us',
67
- take: 0,
68
- })
69
- ).rejects.toThrow(TypeError);
70
- });
71
-
72
- it('should throw error if take parameter is a number greater than 250 in getContentList', async () => {
73
- const api = createApiClient();
74
- await expect(
75
- api.getContentList({
76
- referenceName: 'posts',
77
- locale: 'en-us',
78
- take: 251,
79
- })
80
- ).rejects.toThrow(TypeError);
81
- });
82
-
83
- it('should throw error if skip parameter is a number less than 0 in getContentList', async () => {
84
- const api = createApiClient();
85
- await expect(
86
- api.getContentList({
87
- referenceName: 'posts',
88
- locale: 'en-us',
89
- skip: -1,
90
- })
91
- ).rejects.toThrow(TypeError);
92
- });
93
-
94
- it('should throw error if skip parameter is NOT a number in getContentList', async () => {
95
- const api = createApiClient();
96
- await expect(
97
- api.getContentList({
98
- referenceName: 'posts',
99
- locale: 'en-us',
100
- skip: 'ten',
101
- })
102
- ).rejects.toThrow(TypeError);
103
- });
104
-
105
- it('should throw error if direction parameter is NOT "asc" or "desc" in getContentList', async () => {
106
- const api = createApiClient();
107
- await expect(
108
- api.getContentList({
109
- referenceName: 'posts',
110
- locale: 'en-us',
111
- sort: 'fields.title',
112
- direction: 'up',
113
- })
114
- ).rejects.toThrow(TypeError);
115
- });
116
-
117
- it('should sort the content list in live mode', async () => {
118
- const api = createApiClient();
119
- const contentList = await api.getContentList({
120
- referenceName: 'posts',
121
- locale: 'en-us',
122
- sort: 'contentID',
123
- });
124
- expect(contentList.items[0].contentID).toBeLessThan(contentList.items[1].contentID);
125
- });
126
-
127
- it('should validate all filters contain property called \'property\'', async () => {
128
- const api = createApiClient();
129
- await expect(
130
- api.getContentList({
131
- referenceName: 'posts',
132
- locale: 'en-us',
133
- filters: [{ operator: api.types.FilterOperators.EQUAL_TO, value: '40' }],
134
- })
135
- ).rejects.toThrow(TypeError);
136
- });
137
-
138
- it('should validate all filters contain property called \'operator\'', async () => {
139
- const api = createApiClient();
140
- await expect(
141
- api.getContentList({
142
- referenceName: 'posts',
143
- locale: 'en-us',
144
- filters: [{ property: 'properties.versionID', value: '40' }],
145
- })
146
- ).rejects.toThrow(TypeError);
147
- });
148
-
149
- it('should validate all filters contain property called \'value\'', async () => {
150
- const api = createApiClient();
151
- await expect(
152
- api.getContentList({
153
- referenceName: 'posts',
154
- locale: 'en-us',
155
- filters: [{ property: 'properties.versionID', operator: api.types.FilterOperators.EQUAL_TO }],
156
- })
157
- ).rejects.toThrow(TypeError);
158
- });
159
-
160
- it('should validate operator property on all filters', async () => {
161
- const api = createApiClient();
162
- await expect(
163
- api.getContentList({
164
- referenceName: 'posts',
165
- locale: 'en-us',
166
- filters: [{ property: 'properties.versionID', operator: 'xx', value: '40' }],
167
- })
168
- ).rejects.toThrow(TypeError);
169
- });
170
-
171
- it('should validate the filtersLogicOperator to be AND or OR', async () => {
172
- const api = createApiClient();
173
- await expect(
174
- api.getContentList({
175
- referenceName: 'posts',
176
- locale: 'en-us',
177
- filtersLogicOperator: 'SOME',
178
- })
179
- ).rejects.toThrow(TypeError);
180
- });
181
-
182
- it('should filter the content list in live mode with OR operator between filters', async () => {
183
- const api = createApiClient();
184
- const contentList = await api.getContentList({
185
- referenceName: 'posts',
186
- locale: 'en-us',
187
- filters: [
188
- { property: 'contentID', operator: api.types.FilterOperators.EQUAL_TO, value: '15' },
189
- { property: 'properties.referenceName', operator: api.types.FilterOperators.LIKE, value: 'posts' },
190
- ],
191
- filtersLogicOperator: api.types.FilterLogicOperators.OR,
192
- });
193
- expect(contentList.items[0].contentID).toBe(16);
194
- expect(contentList.items[3].contentID).toBe(15);
195
- });
196
-
197
- it('should filter the content list in live mode with AND operator between filters', async () => {
198
- const api = createApiClient();
199
- const contentList = await api.getContentList({
200
- referenceName: 'posts',
201
- locale: 'en-us',
202
- filters: [
203
- { property: 'contentID', operator: api.types.FilterOperators.EQUAL_TO, value: '16' },
204
- { property: 'properties.referenceName', operator: api.types.FilterOperators.LIKE, value: 'posts' },
205
- ],
206
- filtersLogicOperator: api.types.FilterLogicOperators.AND,
207
- });
208
- expect(contentList.items[0].contentID).toBe(16);
209
- expect(contentList.items.length).toBe(1);
210
- });
211
-
212
- it('should expand all content links when expandContentLinks are set to true', async () => {
213
- const api = createApiClient();
214
- const contentList = await api.getContentList({
215
- referenceName: 'listwithnestedcontentlink',
216
- locale: 'en-us',
217
- expandAllContentLinks: true,
218
- });
219
- expect(Array.isArray(contentList.items[0].fields.posts)).toBe(true);
220
- });
221
-
222
- it('should NOT expand all content links when expandContentLinks are set to false', async () => {
223
- const api = createApiClient();
224
- const contentList = await api.getContentList({
225
- referenceName: 'listwithnestedcontentlink',
226
- locale: 'en-us',
227
- expandAllContentLinks: false,
228
- });
229
- expect(Array.isArray(contentList.items[0].fields.posts)).toBe(false);
230
- });
231
-
232
- it('should NOT expand all content links when expandContentLinks is not set at all', async () => {
233
- const api = createApiClient();
234
- const contentList = await api.getContentList({
235
- referenceName: 'listwithnestedcontentlink',
236
- locale: 'en-us',
237
- });
238
- expect(Array.isArray(contentList.items[0].fields.posts)).toBe(false);
239
- });
240
-
241
- it('should be able to fetch a list using global cdn site', async () => {
242
- const api = createApiClientWithNewCdn();
243
- const referenceName = 'jssdklist';
244
- const contentList = await api.getContentList({
245
- referenceName: referenceName,
246
- locale: 'en-us',
247
- });
248
- expect(contentList.items[0].properties.referenceName).toBe(referenceName);
249
- });
250
- });
251
-
@@ -1,22 +0,0 @@
1
- import {
2
- createApiClient,
3
- } from './apiClients.config';
4
-
5
-
6
- /*
7
- This file contains static references to content from the instance configured in the apiClient.config file.
8
- */
9
-
10
- /* GET GALLERY *********************************************************/
11
- describe('getGallery:', () => {
12
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
13
-
14
- it('should retrieve a Gallery in live mode', async () => {
15
- const api = createApiClient();
16
- const gallery = await api.getGallery({
17
- galleryID: 1,
18
- });
19
- expect(gallery.galleryID).toBe(1);
20
- });
21
- });
22
-
@@ -1,39 +0,0 @@
1
- // Assuming you have imported createApiClient, createPreviewApiClient, and the necessary dependencies
2
- import { createApiClient, createPreviewApiClient } from './apiClients.config';
3
-
4
- describe('getPage:', () => {
5
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
6
-
7
- it('should retrieve a page in live mode', async () => {
8
- const api = createApiClient();
9
- const page = await api.getPage({
10
- pageID: 2,
11
- locale: 'en-us',
12
- });
13
- console.log(page, 'check this')
14
- expect(page.pageID).toBe(2);
15
- });
16
-
17
-
18
- it('should retrieve a page in preview mode', async () => {
19
- const api = createPreviewApiClient();
20
- const page = await api.getPage({
21
- pageID: 2,
22
- locale: 'en-us',
23
- });
24
- console.log(page, 'check this')
25
- expect(page.pageID).toBe(2);
26
- });
27
-
28
- it('should retrieve a page and expand all content links when expandAllContentLink is set to true', async () => {
29
- const api = createApiClient();
30
- const page = await api.getPage({
31
- pageID: 2,
32
- locale: 'en-us',
33
- expandAllContentLinks: true,
34
- });
35
- expect(Array.isArray(page.zones.MainContentZone[2].item.fields.posts)).toBe(true);
36
- });
37
-
38
-
39
- });
@@ -1,30 +0,0 @@
1
- import { createApiClient, createPreviewApiClient } from './apiClients.config';
2
-
3
- /*
4
- This file contains static references to content from the instance configured in the apiClient.config file.
5
- */
6
-
7
-
8
- /* GET SITEMAP FLAT ***********************************************/
9
- describe('getSitemapFlat:', () => {
10
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
11
-
12
- it('should retrieve a sitemap in a flat format in live mode', async () => {
13
- const api = createApiClient();
14
- const sitemap = await api.getSitemapFlat({
15
- channelName: 'website',
16
- locale: 'en-us',
17
- });
18
- expect(sitemap['/home'].pageID).toBe(2);
19
- });
20
-
21
- it('should retrieve a sitemap in a flat format in preview mode', async () => {
22
- const api = createPreviewApiClient();
23
- const sitemap = await api.getSitemapFlat({
24
- channelName: 'website',
25
- locale: 'en-us',
26
- });
27
- expect(sitemap['/home'].pageID).toBe(2);
28
- });
29
-
30
- });
@@ -1,30 +0,0 @@
1
- import { createApiClient, createPreviewApiClient } from './apiClients.config';
2
-
3
- /*
4
- This file contains static references to content from the instance configured in the apiClient.config file.
5
- */
6
-
7
-
8
- /* GET SITEMAP NESTED **************************************************/
9
- describe('getSitemapNested:', () => {
10
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
11
-
12
- it('should retrieve a sitemap in a nested format in live mode', async () => {
13
- const api = createApiClient();
14
- const sitemap = await api.getSitemapNested({
15
- channelName: 'website',
16
- locale: 'en-us',
17
- });
18
- expect(sitemap[0].pageID).toBe(2);
19
- });
20
-
21
- it('should retrieve a sitemap in a nested format in preview mode', async () => {
22
- const api = createPreviewApiClient();
23
- const sitemap = await api.getSitemapNested({
24
- channelName: 'website',
25
- locale: 'en-us',
26
- });
27
- expect(sitemap[0].pageID).toBe(2);
28
- });
29
-
30
- });
@@ -1,25 +0,0 @@
1
- import { createApiClient } from './apiClients.config';
2
-
3
- /*
4
- This file contains static references to content from the instance configured in the apiClient.config file.
5
- */
6
- describe('getSyncContent:', () => {
7
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
8
-
9
- it('should retrieve the oldest content items and next sync token', async () => {
10
- const api = createApiClient();
11
-
12
- let syncToken = 0;
13
-
14
- //sync from scratch
15
- const syncRet = await api.getSyncContent({
16
- syncToken: syncToken,
17
- pageSize: 100,
18
- locale: 'en-us',
19
- });
20
-
21
- expect(syncRet.syncToken).toBeGreaterThan(0);
22
- expect(syncRet.items.length).toBeGreaterThan(0);
23
- });
24
- });
25
-
@@ -1,27 +0,0 @@
1
- import { createApiClient } from './apiClients.config';
2
-
3
-
4
- /*
5
- This file contains static references to content from the instance configured in the apiClient.config file.
6
- */
7
-
8
- describe('getSyncPages:', () => {
9
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
10
-
11
- it('should retrieve the oldest page items and syncToken', async () => {
12
- const api = createApiClient();
13
-
14
- let syncToken = 0;
15
-
16
- //sync from scratch
17
- const syncRet = await api.getSyncPages({
18
- syncToken: syncToken,
19
- pageSize: 100,
20
- locale: 'en-us',
21
- });
22
-
23
- expect(syncRet.syncToken).toBeGreaterThan(0);
24
- expect(syncRet.items.length).toBeGreaterThan(0);
25
- });
26
- });
27
-
@@ -1,40 +0,0 @@
1
- import { createApiClient } from './apiClients.config';
2
- /*
3
- This file contains static references to content from the instance configured in the apiClient.config file.
4
- */
5
-
6
- /* GET URL REDIRECTIONS *********************************************************/
7
-
8
-
9
- describe('getUrlRedirections:', () => {
10
- jest.setTimeout(120000); // equivalent to this.timeout('120s')
11
-
12
- let persistedLastAccessDate = null;
13
-
14
- it('should retrieve the list of URL redirections', async () => {
15
- const api = createApiClient();
16
- const { lastAccessDate, isUpToDate, items } = await api.getUrlRedirections({
17
- lastAccessDate: null,
18
- });
19
-
20
- expect(Array.isArray(items)).toBe(true);
21
- expect(isUpToDate).toBe(false);
22
- expect(lastAccessDate).toBeDefined();
23
-
24
- let dt = new Date(lastAccessDate);
25
- expect(dt.getUTCFullYear()).toBeGreaterThan(2000);
26
-
27
- persistedLastAccessDate = lastAccessDate;
28
- });
29
-
30
- it('should retrieve an empty list of URL redirections with saved last access date', async () => {
31
- const api = createApiClient();
32
- const { lastAccessDate, items, isUpToDate } = await api.getUrlRedirections({
33
- lastAccessDate: persistedLastAccessDate,
34
- });
35
-
36
- expect(Array.isArray(items)).toBe(true);
37
- expect(isUpToDate).toBe(true);
38
- expect(items.length).toBe(0);
39
- });
40
- });