@agility/content-fetch 2.0.0-rc1 → 2.0.0-rc11
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/.jsdoc.json +28 -28
- package/.yarn/cache/@babel-code-frame-npm-7.22.10-bc14e2ec1b-89a06534ad.zip +0 -0
- package/.yarn/cache/{@babel-core-npm-7.22.9-509b29c82e-7bf069aece.zip → @babel-core-npm-7.22.10-54c0aaa674-cc4efa0920.zip} +0 -0
- package/.yarn/cache/{@babel-generator-npm-7.22.9-d9fccf9328-7c9d2c58b8.zip → @babel-generator-npm-7.22.10-1a9a2f9e75-59a79730ab.zip} +0 -0
- 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
- package/.yarn/cache/{@babel-helpers-npm-7.22.6-8e54464b9e-5c1f33241f.zip → @babel-helpers-npm-7.22.10-83a2c2542a-3b1219e362.zip} +0 -0
- package/.yarn/cache/@babel-highlight-npm-7.22.10-cea13c397b-f714a1e1a7.zip +0 -0
- package/.yarn/cache/@babel-parser-npm-7.22.10-a7c9b29e4f-af51567b7d.zip +0 -0
- package/.yarn/cache/@babel-traverse-npm-7.22.10-9eaf5a4899-9f7b358563.zip +0 -0
- package/.yarn/cache/@dabh-diagnostics-npm-2.0.3-0f2cd64f24-4879600c55.zip +0 -0
- package/.yarn/cache/@esbuild-win32-x64-npm-0.19.2-faf4190546-8.zip +0 -0
- 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
- 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
- package/.yarn/cache/@types-node-npm-18.17.5-e736eb2acc-b8c658a992.zip +0 -0
- package/.yarn/cache/{@types-node-npm-20.4.5-7555fad0d4-36a0304a8d.zip → @types-node-npm-20.5.0-ea170d5dd7-659bc5fc93.zip} +0 -0
- package/.yarn/cache/@types-triple-beam-npm-1.3.2-e1699700a8-dd7b4a563f.zip +0 -0
- package/.yarn/cache/agentkeepalive-npm-4.5.0-f237b580b2-13278cd5b1.zip +0 -0
- package/.yarn/cache/args-npm-5.0.3-ec59f35e6d-ac39e65609.zip +0 -0
- package/.yarn/cache/async-npm-3.2.4-aba13508f9-43d07459a4.zip +0 -0
- package/.yarn/cache/{cacache-npm-17.1.3-f75f768a29-385756781e.zip → cacache-npm-17.1.4-51ef53d0a8-b7751df756.zip} +0 -0
- package/.yarn/cache/camelcase-npm-5.0.0-c808398846-8bfe920e04.zip +0 -0
- package/.yarn/cache/caniuse-lite-npm-1.0.30001520-83db97126d-59991ad8f3.zip +0 -0
- package/.yarn/cache/color-npm-3.2.1-568cf1014f-f81220e8b7.zip +0 -0
- package/.yarn/cache/color-string-npm-1.9.1-dc020e56be-c13fe7cff7.zip +0 -0
- package/.yarn/cache/colorspace-npm-1.1.4-f01655548a-bb3934ef3c.zip +0 -0
- package/.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-ab8c07884e.zip +0 -0
- package/.yarn/cache/detect-file-npm-1.0.0-a22ca7c5b6-1861e41461.zip +0 -0
- package/.yarn/cache/{electron-to-chromium-npm-1.4.481-eaa539b254-52b7e8d7ae.zip → electron-to-chromium-npm-1.4.491-7541a41cd5-8d96c720c8.zip} +0 -0
- package/.yarn/cache/enabled-npm-2.0.0-bf5d96c9d8-9d256d89f4.zip +0 -0
- package/.yarn/cache/esbuild-npm-0.19.2-84addf679d-f9ad8ad4f0.zip +0 -0
- package/.yarn/cache/expand-tilde-npm-2.0.2-a4020a62f5-2efe6ed407.zip +0 -0
- package/.yarn/cache/fecha-npm-4.2.3-75248da3fd-f94e2fb3ac.zip +0 -0
- package/.yarn/cache/find-node-modules-npm-2.1.3-431b2c5604-4b8a194ffd.zip +0 -0
- package/.yarn/cache/findup-sync-npm-4.0.0-3884c677a0-94131e1107.zip +0 -0
- package/.yarn/cache/fn.name-npm-1.1.0-b472333184-e357144f48.zip +0 -0
- package/.yarn/cache/{fs-minipass-npm-3.0.2-a27ef235f5-e9cc0e1f2d.zip → fs-minipass-npm-3.0.3-d148d6ac19-8722a41109.zip} +0 -0
- package/.yarn/cache/global-modules-npm-1.0.0-70c522e57a-10be68796c.zip +0 -0
- package/.yarn/cache/global-prefix-npm-1.0.2-a96996834b-061b43470f.zip +0 -0
- package/.yarn/cache/homedir-polyfill-npm-1.0.3-da1a29ce00-18dd4db870.zip +0 -0
- package/.yarn/cache/ini-npm-1.3.8-fb5040b4c0-dfd98b0ca3.zip +0 -0
- package/.yarn/cache/is-arrayish-npm-0.3.2-f856180f79-977e64f54d.zip +0 -0
- package/.yarn/cache/is-core-module-npm-2.13.0-e444c50225-053ab101fb.zip +0 -0
- package/.yarn/cache/is-extglob-npm-2.1.1-0870ea68b5-df033653d0.zip +0 -0
- package/.yarn/cache/is-glob-npm-4.0.3-cb87bf1bdb-d381c1319f.zip +0 -0
- package/.yarn/cache/is-windows-npm-1.0.2-898cd6f3d7-438b7e5265.zip +0 -0
- package/.yarn/cache/{jackspeak-npm-2.2.2-374ca454fe-7b1468dd91.zip → jackspeak-npm-2.2.3-bcc5afec11-8add557045.zip} +0 -0
- package/.yarn/cache/kuler-npm-2.0.0-19e74c9695-9e10b5a165.zip +0 -0
- package/.yarn/cache/leven-npm-2.1.0-19f0a16606-f7b4a01b15.zip +0 -0
- package/.yarn/cache/logform-npm-2.5.1-06017d630d-08fdf03be5.zip +0 -0
- package/.yarn/cache/lru-cache-npm-10.0.1-0e1abf4c13-06f8d0e1ce.zip +0 -0
- package/.yarn/cache/merge-npm-2.1.1-90e7307c49-9c36b0e25a.zip +0 -0
- package/.yarn/cache/minimist-npm-1.2.8-d7af7b1dce-75a6d645fb.zip +0 -0
- package/.yarn/cache/{minipass-fetch-npm-3.0.3-2c4966d142-af5ab2552a.zip → minipass-fetch-npm-3.0.4-200ac7c66d-af7aad15d5.zip} +0 -0
- package/.yarn/cache/minipass-npm-7.0.3-3b57909ee9-6f1614f5b5.zip +0 -0
- package/.yarn/cache/mri-npm-1.1.4-d22a399f26-e65b9aed3b.zip +0 -0
- package/.yarn/cache/npm-dts-npm-1.3.12-c921cfddec-3897533c49.zip +0 -0
- package/.yarn/cache/npm-path-npm-2.0.4-fda8ca6d1d-3dfe24d9bb.zip +0 -0
- package/.yarn/cache/npm-run-npm-5.0.1-ba4f9faa65-1c6e171bf0.zip +0 -0
- package/.yarn/cache/npm-which-npm-3.0.1-2951392327-fba4864161.zip +0 -0
- package/.yarn/cache/one-time-npm-1.0.0-aeaad5e524-fd008d7e99.zip +0 -0
- package/.yarn/cache/parse-passwd-npm-1.0.0-ace6effa1d-4e55e0231d.zip +0 -0
- package/.yarn/cache/protochain-npm-1.0.5-ca0a4ef353-81f417e4f5.zip +0 -0
- package/.yarn/cache/resolve-dir-npm-1.0.1-0a95903c18-ef736b8ed6.zip +0 -0
- package/.yarn/cache/{resolve-npm-1.22.2-9d9621a4ae-7e5df75796.zip → resolve-npm-1.22.4-faa4f32bdd-23f25174c2.zip} +0 -0
- package/.yarn/cache/{resolve-patch-f4c4056507-66cc788f13.zip → resolve-patch-efbbaf0edd-c45f2545fd.zip} +0 -0
- package/.yarn/cache/rimraf-npm-5.0.1-26fb251a1d-bafce85391.zip +0 -0
- package/.yarn/cache/safe-stable-stringify-npm-2.4.3-d895741b40-3aeb644497.zip +0 -0
- package/.yarn/cache/serializerr-npm-1.0.3-844e49be0c-20fdf7a7e3.zip +0 -0
- package/.yarn/cache/simple-swizzle-npm-0.2.2-8dee37fad1-a7f3f2ab5c.zip +0 -0
- package/.yarn/cache/{ssri-npm-10.0.4-f583dafaf3-fb14da9f8a.zip → ssri-npm-10.0.5-1a7557d04d-0a31b65f21.zip} +0 -0
- package/.yarn/cache/stack-trace-npm-0.0.10-9460b173e1-473036ad32.zip +0 -0
- package/.yarn/cache/text-hex-npm-1.0.0-22389e4d56-1138f68adc.zip +0 -0
- package/.yarn/cache/tmp-npm-0.2.1-a9c8d9c0ca-8b12146541.zip +0 -0
- package/.yarn/cache/triple-beam-npm-1.4.1-d21ba5346a-2e881a3e8e.zip +0 -0
- package/.yarn/cache/which-npm-1.3.1-f0ebb8bdd8-f2e185c624.zip +0 -0
- package/.yarn/cache/winston-npm-3.7.2-5336ad5eff-f1f1a860d2.zip +0 -0
- package/.yarn/cache/winston-transport-npm-4.5.0-e10bfb2169-a56e5678a8.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/LICENSE +21 -21
- package/README.md +108 -108
- package/build.js +26 -0
- package/dist/api-client.d.ts +1 -1
- package/dist/browser.js +2061 -0
- package/dist/index.d.ts +8 -11
- package/dist/node.js +13065 -0
- package/dist/types/ContentZone.d.ts +1 -0
- package/dist/types/Page.d.ts +1 -1
- package/jest.config.js +5 -5
- package/package.json +57 -50
- package/tsconfig.json +14 -14
- package/.nyc_output/713b1ec2-05ec-4b67-8061-b6cad0a45ad5.json +0 -1
- package/.yarn/cache/@babel-code-frame-npm-7.22.5-b36f88d6f9-cfe804f518.zip +0 -0
- package/.yarn/cache/@babel-highlight-npm-7.22.5-3182ccc1fe-f61ae6de6e.zip +0 -0
- package/.yarn/cache/@babel-parser-npm-7.22.7-7fbdf28552-02209ddbd4.zip +0 -0
- package/.yarn/cache/@babel-traverse-npm-7.22.8-98fbaaf7d8-a381369bc3.zip +0 -0
- package/.yarn/cache/@babel-types-npm-7.22.5-d1e4264bef-c13a9c1dc7.zip +0 -0
- package/.yarn/cache/@isaacs-string-locale-compare-npm-1.1.0-3911094464-7287da5d11.zip +0 -0
- package/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.14-f5f0630788-61100637b6.zip +0 -0
- package/.yarn/cache/@npmcli-arborist-npm-6.3.0-9d3adbe1f6-4f59d5408c.zip +0 -0
- package/.yarn/cache/@npmcli-config-npm-6.2.1-4191bac29e-8c8d47f900.zip +0 -0
- package/.yarn/cache/@npmcli-disparity-colors-npm-3.0.0-9fe9301a52-49320c6927.zip +0 -0
- package/.yarn/cache/@npmcli-git-npm-4.1.0-f7322fced9-37efb92659.zip +0 -0
- package/.yarn/cache/@npmcli-installed-package-contents-npm-2.0.2-99564e3824-60789d5ed2.zip +0 -0
- package/.yarn/cache/@npmcli-map-workspaces-npm-3.0.4-b07359726d-99607dbc50.zip +0 -0
- package/.yarn/cache/@npmcli-metavuln-calculator-npm-5.0.1-b28e316793-cd08ad9cc4.zip +0 -0
- package/.yarn/cache/@npmcli-name-from-folder-npm-2.0.0-18e2dba870-fb3ef891aa.zip +0 -0
- package/.yarn/cache/@npmcli-node-gyp-npm-3.0.0-b160a0116c-fe3802b813.zip +0 -0
- package/.yarn/cache/@npmcli-package-json-npm-4.0.1-8fba8ea1a2-699b80a72f.zip +0 -0
- package/.yarn/cache/@npmcli-promise-spawn-npm-6.0.2-c9941b207c-aa725780c1.zip +0 -0
- package/.yarn/cache/@npmcli-query-npm-3.0.0-53c05bcb30-90fca7edd5.zip +0 -0
- package/.yarn/cache/@npmcli-run-script-npm-6.0.2-6a98dec431-7a671d7dbe.zip +0 -0
- package/.yarn/cache/@sigstore-bundle-npm-1.0.0-6224fc68db-9902b9fcd2.zip +0 -0
- package/.yarn/cache/@sigstore-protobuf-specs-npm-0.2.0-93c8e6c759-6b7c5d3612.zip +0 -0
- package/.yarn/cache/@sigstore-tuf-npm-1.0.3-9a2b6b14aa-0a32594b73.zip +0 -0
- package/.yarn/cache/@tufjs-canonical-json-npm-1.0.0-66d27d850f-9ff3bcd129.zip +0 -0
- package/.yarn/cache/@tufjs-models-npm-1.0.4-a1dddaf561-b489baa854.zip +0 -0
- package/.yarn/cache/@types-node-npm-18.11.9-d21dd6ec05-cc0aae109e.zip +0 -0
- package/.yarn/cache/abbrev-npm-2.0.0-0eb38a17e5-0e994ad2aa.zip +0 -0
- package/.yarn/cache/abort-controller-npm-3.0.0-2f3a9a2bcb-170bdba9b4.zip +0 -0
- package/.yarn/cache/agentkeepalive-npm-4.3.0-ac3d8e6807-982453aa44.zip +0 -0
- package/.yarn/cache/archy-npm-1.0.0-7db8bfdc3b-504ae7af65.zip +0 -0
- package/.yarn/cache/are-we-there-yet-npm-4.0.1-734c8e8dce-16871ee259.zip +0 -0
- package/.yarn/cache/axios-cache-adapter-npm-2.7.3-26c357b785-ff44bee6a2.zip +0 -0
- package/.yarn/cache/base64-js-npm-1.5.1-b2f7275641-669632eb37.zip +0 -0
- package/.yarn/cache/bin-links-npm-4.0.2-592819adbc-6f83e73100.zip +0 -0
- package/.yarn/cache/binary-extensions-npm-2.2.0-180c33fec7-ccd267956c.zip +0 -0
- package/.yarn/cache/buffer-npm-6.0.3-cd90dfedfe-5ad23293d9.zip +0 -0
- package/.yarn/cache/builtins-npm-5.0.1-6d4820dd76-66d204657f.zip +0 -0
- package/.yarn/cache/cache-control-esm-npm-1.0.0-ee383a8c40-4f8c8399f2.zip +0 -0
- package/.yarn/cache/caniuse-lite-npm-1.0.30001518-2e4e82df98-1b63272f6e.zip +0 -0
- package/.yarn/cache/chalk-npm-5.3.0-d181999efb-623922e077.zip +0 -0
- package/.yarn/cache/charenc-npm-0.0.2-aca0c2f207-81dcadbe57.zip +0 -0
- package/.yarn/cache/cidr-regex-npm-3.1.1-a5f3c156e7-ef9306d086.zip +0 -0
- package/.yarn/cache/cli-columns-npm-4.0.0-7c43bbe435-fa1a3a7f4e.zip +0 -0
- package/.yarn/cache/cli-table3-npm-0.6.3-1dca7f9152-09897f6846.zip +0 -0
- package/.yarn/cache/clone-npm-1.0.4-a610fcbcf9-d06418b733.zip +0 -0
- package/.yarn/cache/cmd-shim-npm-6.0.1-87ebf774a0-359006b3a5.zip +0 -0
- package/.yarn/cache/columnify-npm-1.6.0-aa925d932b-0d59002361.zip +0 -0
- package/.yarn/cache/common-ancestor-path-npm-1.0.1-27534e68da-1d2e418606.zip +0 -0
- package/.yarn/cache/crypt-npm-0.0.2-033627d94f-baf4c7bbe0.zip +0 -0
- package/.yarn/cache/cssesc-npm-3.0.0-15ec56f86f-f8c4ababff.zip +0 -0
- package/.yarn/cache/defaults-npm-1.0.4-f3fbaf2528-3a88b7a587.zip +0 -0
- package/.yarn/cache/depd-npm-2.0.0-b6c51a4b43-abbe19c768.zip +0 -0
- package/.yarn/cache/diff-npm-5.1.0-d24d222280-c7bf0df7c9.zip +0 -0
- package/.yarn/cache/event-target-shim-npm-5.0.1-cb48709025-1ffe3bb22a.zip +0 -0
- package/.yarn/cache/events-npm-3.3.0-c280bc7e48-f6f487ad21.zip +0 -0
- package/.yarn/cache/fastest-levenshtein-npm-1.0.16-192d328856-a78d44285c.zip +0 -0
- package/.yarn/cache/fsevents-patch-2882183fbf-8.zip +0 -0
- package/.yarn/cache/gauge-npm-5.0.1-69ab73de36-09b1eb8d8c.zip +0 -0
- package/.yarn/cache/hosted-git-info-npm-6.1.1-d57807f6a5-fcd3ca2eaa.zip +0 -0
- package/.yarn/cache/ieee754-npm-1.2.1-fb63b3caeb-5144c0c981.zip +0 -0
- package/.yarn/cache/ignore-walk-npm-6.0.3-ebca6b06c4-d8ba534beb.zip +0 -0
- package/.yarn/cache/ini-npm-4.1.1-01c2cbda7b-0e59095540.zip +0 -0
- package/.yarn/cache/init-package-json-npm-5.0.0-0656c8f580-ad601c717d.zip +0 -0
- package/.yarn/cache/install-npm-0.13.0-53f6b8981f-645bad1253.zip +0 -0
- package/.yarn/cache/ip-regex-npm-4.3.0-4ac12c6be9-7ff904b891.zip +0 -0
- package/.yarn/cache/is-buffer-npm-1.1.6-08199d9ccc-4a186d995d.zip +0 -0
- package/.yarn/cache/is-cidr-npm-4.0.2-74bbb734d3-ee6e670e65.zip +0 -0
- package/.yarn/cache/is-core-module-npm-2.12.1-ce74e89160-f04ea30533.zip +0 -0
- package/.yarn/cache/json-parse-even-better-errors-npm-3.0.0-3675833c0a-f1970b5220.zip +0 -0
- package/.yarn/cache/json-stringify-nice-npm-1.1.4-0b0ddb188b-6ddf781148.zip +0 -0
- package/.yarn/cache/jsonparse-npm-1.3.1-b6fde74828-6514a7be46.zip +0 -0
- package/.yarn/cache/just-diff-apply-npm-5.5.0-04951e29f4-ed6bbd5978.zip +0 -0
- package/.yarn/cache/just-diff-npm-6.0.2-f73771d84e-1a0c7524f6.zip +0 -0
- package/.yarn/cache/libnpmaccess-npm-7.0.2-57b91bfda5-73d49f3939.zip +0 -0
- package/.yarn/cache/libnpmdiff-npm-5.0.19-26809d318b-47835abc81.zip +0 -0
- package/.yarn/cache/libnpmexec-npm-6.0.3-9bfdfc5775-c9c92dc29a.zip +0 -0
- package/.yarn/cache/libnpmfund-npm-4.0.19-742ff1c9b5-77905879f7.zip +0 -0
- package/.yarn/cache/libnpmhook-npm-9.0.3-1ed2368ed2-535ecefa22.zip +0 -0
- package/.yarn/cache/libnpmorg-npm-5.0.4-8ff49f84d5-4e170ba145.zip +0 -0
- package/.yarn/cache/libnpmpack-npm-5.0.19-fad75068a8-d164d61383.zip +0 -0
- package/.yarn/cache/libnpmpublish-npm-7.5.0-e0dfdc81a9-feb99876be.zip +0 -0
- package/.yarn/cache/libnpmsearch-npm-6.0.2-664c687722-7a62e5cb1c.zip +0 -0
- package/.yarn/cache/libnpmteam-npm-5.0.3-1e0a2afab9-a39ccdb4a6.zip +0 -0
- package/.yarn/cache/libnpmversion-npm-4.0.2-257501dd35-4666db4671.zip +0 -0
- package/.yarn/cache/lru-cache-npm-10.0.0-256d74bb20-18f101675f.zip +0 -0
- package/.yarn/cache/md5-npm-2.3.0-86c49d3915-a63cacf401.zip +0 -0
- package/.yarn/cache/minipass-json-stream-npm-1.0.1-96490706d6-791b696a27.zip +0 -0
- package/.yarn/cache/minipass-npm-7.0.2-baa42a5a34-46776de732.zip +0 -0
- package/.yarn/cache/mute-stream-npm-1.0.0-b6e846d471-36fc968b0e.zip +0 -0
- package/.yarn/cache/nopt-npm-7.2.0-dd734b678d-a9c0f57fb8.zip +0 -0
- package/.yarn/cache/normalize-package-data-npm-5.0.0-6327e2af68-a459f05eaf.zip +0 -0
- package/.yarn/cache/npm-audit-report-npm-5.0.0-b0af56272d-a18f16f514.zip +0 -0
- package/.yarn/cache/npm-bundled-npm-3.0.0-0b3c5ee4f3-110859c2d6.zip +0 -0
- package/.yarn/cache/npm-install-checks-npm-6.1.1-e05db36ccf-8fb3ed05cf.zip +0 -0
- package/.yarn/cache/npm-normalize-package-bin-npm-3.0.1-6c120b50f7-de416d720a.zip +0 -0
- package/.yarn/cache/npm-npm-9.8.1-c06ac946c2-d3f12cd0c0.zip +0 -0
- package/.yarn/cache/npm-package-arg-npm-10.1.0-e9f0aaa69d-8fe4b6a742.zip +0 -0
- package/.yarn/cache/npm-packlist-npm-7.0.4-1c0b919056-5ffa1f8f0b.zip +0 -0
- package/.yarn/cache/npm-pick-manifest-npm-8.0.2-ec194cb513-c9f71b5735.zip +0 -0
- package/.yarn/cache/npm-profile-npm-7.0.1-73c58f96b1-c78d2e6394.zip +0 -0
- package/.yarn/cache/npm-registry-fetch-npm-14.0.5-6b3e6c0dd0-c636496429.zip +0 -0
- package/.yarn/cache/npm-user-validate-npm-2.0.0-2fa10ebf8a-52c0c64cb2.zip +0 -0
- package/.yarn/cache/npmlog-npm-7.0.1-a0f355f530-caabeb1f55.zip +0 -0
- package/.yarn/cache/pacote-npm-15.2.0-b9ed3321e9-c731572be2.zip +0 -0
- package/.yarn/cache/parse-conflict-json-npm-3.0.1-9455a1ad04-d8d2656bc0.zip +0 -0
- package/.yarn/cache/postcss-selector-parser-npm-6.0.13-f732d92326-f89163338a.zip +0 -0
- package/.yarn/cache/proc-log-npm-3.0.0-a8c21c2f0f-02b64e1b39.zip +0 -0
- package/.yarn/cache/process-npm-0.11.10-aeb3b641ae-bfcce49814.zip +0 -0
- package/.yarn/cache/promise-all-reject-late-npm-1.0.1-19ba0dce9c-d7d61ac412.zip +0 -0
- package/.yarn/cache/promise-call-limit-npm-1.0.2-2a84fbc485-d0664dd295.zip +0 -0
- package/.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip +0 -0
- package/.yarn/cache/promzard-npm-1.0.0-a0d17e2d53-c069488271.zip +0 -0
- package/.yarn/cache/qrcode-terminal-npm-0.12.0-f81f8a6a67-51638d11d0.zip +0 -0
- package/.yarn/cache/read-cmd-shim-npm-4.0.0-2339b15fb0-2fb5a8a389.zip +0 -0
- package/.yarn/cache/read-npm-2.1.0-0e0cb8a375-e745999138.zip +0 -0
- package/.yarn/cache/read-package-json-fast-npm-3.0.2-1232471a07-8d406869f0.zip +0 -0
- package/.yarn/cache/read-package-json-npm-6.0.4-bf5c705b94-ce40c46712.zip +0 -0
- package/.yarn/cache/readable-stream-npm-4.4.2-ac0d67d9ca-6f4063763d.zip +0 -0
- package/.yarn/cache/sigstore-npm-1.8.0-c7dd60d00a-9886278224.zip +0 -0
- package/.yarn/cache/spdx-correct-npm-3.2.0-ffae008484-e9ae98d22f.zip +0 -0
- package/.yarn/cache/spdx-exceptions-npm-2.3.0-2b68dad75a-cb69a26fa3.zip +0 -0
- package/.yarn/cache/spdx-expression-parse-npm-3.0.1-b718cbb35a-a1c6e104a2.zip +0 -0
- package/.yarn/cache/spdx-license-ids-npm-3.0.13-928dd45e3f-3469d85c65.zip +0 -0
- package/.yarn/cache/supports-color-npm-9.4.0-a415f39758-cb8ff8daea.zip +0 -0
- package/.yarn/cache/text-table-npm-0.2.0-d92a778b59-b6937a38c8.zip +0 -0
- package/.yarn/cache/tiny-relative-date-npm-1.3.0-4737b1ee94-82a1fa2f3b.zip +0 -0
- package/.yarn/cache/treeverse-npm-3.0.0-6c6d119afd-73168d9887.zip +0 -0
- package/.yarn/cache/tuf-js-npm-1.1.7-045f70823d-089fc0dabe.zip +0 -0
- package/.yarn/cache/validate-npm-package-license-npm-3.0.4-7af8adc7a8-35703ac889.zip +0 -0
- package/.yarn/cache/validate-npm-package-name-npm-5.0.0-fc061c1b84-5342a99498.zip +0 -0
- package/.yarn/cache/walk-up-path-npm-3.0.1-67ab100d5d-9ffca02fe3.zip +0 -0
- package/.yarn/cache/wcwidth-npm-1.0.1-05fa596453-814e9d1ddc.zip +0 -0
- package/.yarn/cache/which-npm-3.0.1-b2b0f09ace-adf720fe9d.zip +0 -0
- package/.yarn/cache/write-file-atomic-npm-5.0.1-52283db6ee-8dbb0e2512.zip +0 -0
- package/coverage/base.css +0 -223
- package/coverage/block-navigation.js +0 -79
- package/coverage/index.html +0 -123
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -170
- package/coverage/src/api-client.js.html +0 -549
- package/coverage/src/content-fetch.js.html +0 -336
- package/coverage/src/index.html +0 -123
- package/coverage/src/methods/getContentItem.js.html +0 -285
- package/coverage/src/methods/getContentList.js.html +0 -486
- package/coverage/src/methods/getGallery.js.html +0 -243
- package/coverage/src/methods/getPage.js.html +0 -273
- package/coverage/src/methods/getSitemapFlat.js.html +0 -240
- package/coverage/src/methods/getSitemapNested.js.html +0 -231
- package/coverage/src/methods/getSyncContent.js.html +0 -258
- package/coverage/src/methods/getSyncPages.js.html +0 -258
- package/coverage/src/methods/getUrlRedirections.js.html +0 -339
- package/coverage/src/methods/index.html +0 -201
- package/coverage/src/methods/syncContentItems.js.html +0 -186
- package/coverage/src/methods/syncPageItems.js.html +0 -186
- package/coverage/src/types/FilterLogicOperator.js.html +0 -129
- package/coverage/src/types/FilterOperator.js.html +0 -156
- package/coverage/src/types/SortDirection.js.html +0 -129
- package/coverage/src/types/index.html +0 -123
- package/coverage/src/utils.js.html +0 -330
- package/dist/agility-content-fetch.browser.js +0 -420
- package/dist/agility-content-fetch.node.js +0 -10978
- package/dist/api-client.js +0 -316
- package/dist/index.js +0 -7
- package/dist/methods/getContentItem.js +0 -49
- package/dist/methods/getContentList.js +0 -94
- package/dist/methods/getGallery.js +0 -39
- package/dist/methods/getPage.js +0 -47
- package/dist/methods/getSitemapFlat.js +0 -26
- package/dist/methods/getSitemapNested.js +0 -23
- package/dist/methods/getSyncContent.js +0 -26
- package/dist/methods/getSyncPages.js +0 -26
- package/dist/methods/getUrlRedirections.js +0 -50
- package/dist/types/Client.js +0 -2
- package/dist/types/Config.js +0 -2
- package/dist/types/ContentItem.js +0 -2
- package/dist/types/ContentList.js +0 -9
- package/dist/types/ContentZone.js +0 -2
- package/dist/types/EnvConfig.js +0 -2
- package/dist/types/Filter.js +0 -10
- package/dist/types/FilterLogicOperator.js +0 -13
- package/dist/types/FilterOperator.js +0 -30
- package/dist/types/Gallery.js +0 -12
- package/dist/types/MediaItem.js +0 -13
- package/dist/types/MediaItemMetaData.js +0 -12
- package/dist/types/Page.js +0 -20
- package/dist/types/SEO.js +0 -11
- package/dist/types/SitemapFlat.js +0 -10
- package/dist/types/SitemapFlatItem.js +0 -17
- package/dist/types/SitemapNested.js +0 -7
- package/dist/types/SitemapNestedItem.js +0 -2
- package/dist/types/SitemapVisibility.js +0 -9
- package/dist/types/SortDirection.js +0 -13
- package/dist/types/SyncContent.js +0 -9
- package/dist/types/SyncPages.js +0 -9
- package/dist/types/SystemProperties.js +0 -11
- package/dist/types/UrlRedirection.js +0 -11
- package/dist/types/UrlRedirectionResponse.js +0 -9
- package/dist/types/index.js +0 -10
- package/dist/utils.js +0 -81
- package/test/apiClients.config.ts +0 -50
- package/test/getApi.tests.ts +0 -153
- package/test/getContentItem.tests.ts +0 -103
- package/test/getContentList.tests.ts +0 -251
- package/test/getGallery.tests.ts +0 -22
- package/test/getPage.tests.ts +0 -39
- package/test/getSitemapFlat.tests.ts +0 -30
- package/test/getSitemapNested.tests.ts +0 -30
- package/test/getSyncContentItems.tests.ts +0 -25
- package/test/getSyncPageItems.tests.ts +0 -27
- 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
|
-
|
package/test/getGallery.tests.ts
DELETED
|
@@ -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
|
-
|
package/test/getPage.tests.ts
DELETED
|
@@ -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
|
-
});
|