diff --git a/.fern/metadata.json b/.fern/metadata.json index a4f544f..fc438ba 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "4.43.1", + "cliVersion": "4.65.2", "generatorName": "fernapi/fern-typescript-sdk", - "generatorVersion": "3.59.4", + "generatorVersion": "3.63.3", "generatorConfig": { "generateWireTests": true, "namespaceExport": "Brevo", @@ -15,6 +15,6 @@ } } }, - "originGitCommit": "7d08ac3fbe2aa66ba3d56077e8582739d530298b", - "sdkVersion": "5.0.3" + "originGitCommit": "d2e18d0bd27160206c8251e11269b139a3b4ea10", + "sdkVersion": "5.0.4" } diff --git a/biome.json b/biome.json index 5084b70..6b89164 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.4.3/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.10/schema.json", "root": true, "vcs": { "enabled": false diff --git a/package.json b/package.json index 08a3db8..a3986f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@getbrevo/brevo", - "version": "5.0.3", + "version": "5.0.4", "private": false, "repository": { "type": "git", @@ -398,13 +398,13 @@ }, "dependencies": {}, "devDependencies": { - "webpack": "^5.97.1", - "ts-loader": "^9.5.1", - "vitest": "^3.2.4", + "webpack": "^5.105.4", + "ts-loader": "^9.5.4", + "vitest": "^4.1.1", "msw": "2.11.2", "@types/node": "^18.19.70", - "typescript": "~5.7.2", - "@biomejs/biome": "2.4.3" + "typescript": "~5.9.3", + "@biomejs/biome": "2.4.10" }, "browser": { "fs": false, @@ -413,7 +413,7 @@ "stream": false, "crypto": false }, - "packageManager": "pnpm@10.20.0", + "packageManager": "pnpm@10.33.0", "engines": { "node": ">=18.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 410054a..255bd14 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,78 +9,82 @@ importers: .: devDependencies: '@biomejs/biome': - specifier: 2.4.3 - version: 2.4.3 + specifier: 2.4.10 + version: 2.4.10 '@types/node': specifier: ^18.19.70 version: 18.19.130 msw: specifier: 2.11.2 - version: 2.11.2(@types/node@18.19.130)(typescript@5.7.3) + version: 2.11.2(@types/node@18.19.130)(typescript@5.9.3) ts-loader: - specifier: ^9.5.1 - version: 9.5.4(typescript@5.7.3)(webpack@5.105.4) + specifier: ^9.5.4 + version: 9.5.7(typescript@5.9.3)(webpack@5.106.0) typescript: - specifier: ~5.7.2 - version: 5.7.3 + specifier: ~5.9.3 + version: 5.9.3 vitest: - specifier: ^3.2.4 - version: 3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.46.1) + specifier: ^4.1.1 + version: 4.1.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.9.3))(vite@8.0.8(@types/node@18.19.130)(terser@5.46.1)) webpack: - specifier: ^5.97.1 - version: 5.105.4 + specifier: ^5.105.4 + version: 5.106.0 packages: - '@biomejs/biome@2.4.3': - resolution: {integrity: sha512-cBrjf6PNF6yfL8+kcNl85AjiK2YHNsbU0EvDOwiZjBPbMbQ5QcgVGFpjD0O52p8nec5O8NYw7PKw3xUR7fPAkQ==} + '@biomejs/biome@2.4.10': + resolution: {integrity: sha512-xxA3AphFQ1geij4JTHXv4EeSTda1IFn22ye9LdyVPoJU19fNVl0uzfEuhsfQ4Yue/0FaLs2/ccVi4UDiE7R30w==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.4.3': - resolution: {integrity: sha512-eOafSFlI/CF4id2tlwq9CVHgeEqvTL5SrhWff6ZORp6S3NL65zdsR3ugybItkgF8Pf4D9GSgtbB6sE3UNgOM9w==} + '@biomejs/cli-darwin-arm64@2.4.10': + resolution: {integrity: sha512-vuzzI1cWqDVzOMIkYyHbKqp+AkQq4K7k+UCXWpkYcY/HDn1UxdsbsfgtVpa40shem8Kax4TLDLlx8kMAecgqiw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.4.3': - resolution: {integrity: sha512-V2+av4ilbWcBMNufTtMMXVW00nPwyIjI5qf7n9wSvUaZ+tt0EvMGk46g9sAFDJBEDOzSyoRXiSP6pCvKTOEbPA==} + '@biomejs/cli-darwin-x64@2.4.10': + resolution: {integrity: sha512-14fzASRo+BPotwp7nWULy2W5xeUyFnTaq1V13Etrrxkrih+ez/2QfgFm5Ehtf5vSjtgx/IJycMMpn5kPd5ZNaA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.4.3': - resolution: {integrity: sha512-QuFzvsGo8BA4Xm7jGX5idkw6BqFblcCPySMTvq0AhGYnhUej5VJIDJbmTKfHqwjHepZiC4fA+T5i6wmiZolZNw==} + '@biomejs/cli-linux-arm64-musl@2.4.10': + resolution: {integrity: sha512-WrJY6UuiSD/Dh+nwK2qOTu8kdMDlLV3dLMmychIghHPAysWFq1/DGC1pVZx8POE3ZkzKR3PUUnVrtZfMfaJjyQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] + libc: [musl] - '@biomejs/cli-linux-arm64@2.4.3': - resolution: {integrity: sha512-0m+O0x9FgK99FAwDK+fiDtjs2wnqq7bvfj17KJVeCkTwT/liI+Q9njJG7lwXK0iSJVXeFNRIxukpVI3SifMYAA==} + '@biomejs/cli-linux-arm64@2.4.10': + resolution: {integrity: sha512-7MH1CMW5uuxQ/s7FLST63qF8B3Hgu2HRdZ7tA1X1+mk+St4JOuIrqdhIBnnyqeyWJNI+Bww7Es5QZ0wIc1Cmkw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] + libc: [glibc] - '@biomejs/cli-linux-x64-musl@2.4.3': - resolution: {integrity: sha512-qEc0OCpj/uytruQ4wLM0yWNJLZy0Up8H1Er5MW3SrstqM6J2d4XqdNA86xzCy8MQCHpoVZ3lFye3GBlIL4/ljw==} + '@biomejs/cli-linux-x64-musl@2.4.10': + resolution: {integrity: sha512-kDTi3pI6PBN6CiczsWYOyP2zk0IJI08EWEQyDMQWW221rPaaEz6FvjLhnU07KMzLv8q3qSuoB93ua6inSQ55Tw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] + libc: [musl] - '@biomejs/cli-linux-x64@2.4.3': - resolution: {integrity: sha512-NVqh0saIU0u5OfOp/0jFdlKRE59+XyMvWmtx0f6Nm/2OpdxBl04coRIftBbY9d1gfu+23JVv4CItAqPYrjYh5w==} + '@biomejs/cli-linux-x64@2.4.10': + resolution: {integrity: sha512-tZLvEEi2u9Xu1zAqRjTcpIDGVtldigVvzug2fTuPG0ME/g8/mXpRPcNgLB22bGn6FvLJpHHnqLnwliOu8xjYrg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] + libc: [glibc] - '@biomejs/cli-win32-arm64@2.4.3': - resolution: {integrity: sha512-gRO96vrIARilv/Cp2ZnmNNL5LSZg3RO75GPp13hsLO3N4YVpE7saaMDp2bcyV48y2N2Pbit1brkGVGta0yd6VQ==} + '@biomejs/cli-win32-arm64@2.4.10': + resolution: {integrity: sha512-umwQU6qPzH+ISTf/eHyJ/QoQnJs3V9Vpjz2OjZXe9MVBZ7prgGafMy7yYeRGnlmDAn87AKTF3Q6weLoMGpeqdQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.4.3': - resolution: {integrity: sha512-vSm/vOJe06pf14aGHfHl3Ar91Nlx4YYmohElDJ+17UbRwe99n987S/MhAlQOkONqf1utJor04ChkCPmKb8SWdw==} + '@biomejs/cli-win32-x64@2.4.10': + resolution: {integrity: sha512-aW/JU5GuyH4uxMrNYpoC2kjaHlyJGLgIa3XkhPEZI0uKhZhJZU8BuEyJmvgzSPQNGozBwWjC972RaNdcJ9KyJg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -91,161 +95,14 @@ packages: '@bundled-es-modules/statuses@1.0.1': resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} - '@esbuild/aix-ppc64@0.27.4': - resolution: {integrity: sha512-cQPwL2mp2nSmHHJlCyoXgHGhbEPMrEEU5xhkcy3Hs/O7nGZqEpZ2sUtLaL9MORLtDfRvVl2/3PAuEkYZH0Ty8Q==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - - '@esbuild/android-arm64@0.27.4': - resolution: {integrity: sha512-gdLscB7v75wRfu7QSm/zg6Rx29VLdy9eTr2t44sfTW7CxwAtQghZ4ZnqHk3/ogz7xao0QAgrkradbBzcqFPasw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm@0.27.4': - resolution: {integrity: sha512-X9bUgvxiC8CHAGKYufLIHGXPJWnr0OCdR0anD2e21vdvgCI8lIfqFbnoeOz7lBjdrAGUhqLZLcQo6MLhTO2DKQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.27.4': - resolution: {integrity: sha512-PzPFnBNVF292sfpfhiyiXCGSn9HZg5BcAz+ivBuSsl6Rk4ga1oEXAamhOXRFyMcjwr2DVtm40G65N3GLeH1Lvw==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.27.4': - resolution: {integrity: sha512-b7xaGIwdJlht8ZFCvMkpDN6uiSmnxxK56N2GDTMYPr2/gzvfdQN8rTfBsvVKmIVY/X7EM+/hJKEIbbHs9oA4tQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.27.4': - resolution: {integrity: sha512-sR+OiKLwd15nmCdqpXMnuJ9W2kpy0KigzqScqHI3Hqwr7IXxBp3Yva+yJwoqh7rE8V77tdoheRYataNKL4QrPw==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] + '@emnapi/core@1.9.2': + resolution: {integrity: sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==} - '@esbuild/freebsd-arm64@0.27.4': - resolution: {integrity: sha512-jnfpKe+p79tCnm4GVav68A7tUFeKQwQyLgESwEAUzyxk/TJr4QdGog9sqWNcUbr/bZt/O/HXouspuQDd9JxFSw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] + '@emnapi/runtime@1.9.2': + resolution: {integrity: sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==} - '@esbuild/freebsd-x64@0.27.4': - resolution: {integrity: sha512-2kb4ceA/CpfUrIcTUl1wrP/9ad9Atrp5J94Lq69w7UwOMolPIGrfLSvAKJp0RTvkPPyn6CIWrNy13kyLikZRZQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.27.4': - resolution: {integrity: sha512-7nQOttdzVGth1iz57kxg9uCz57dxQLHWxopL6mYuYthohPKEK0vU0C3O21CcBK6KDlkYVcnDXY099HcCDXd9dA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.27.4': - resolution: {integrity: sha512-aBYgcIxX/wd5n2ys0yESGeYMGF+pv6g0DhZr3G1ZG4jMfruU9Tl1i2Z+Wnj9/KjGz1lTLCcorqE2viePZqj4Eg==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.27.4': - resolution: {integrity: sha512-oPtixtAIzgvzYcKBQM/qZ3R+9TEUd1aNJQu0HhGyqtx6oS7qTpvjheIWBbes4+qu1bNlo2V4cbkISr8q6gRBFA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.27.4': - resolution: {integrity: sha512-8mL/vh8qeCoRcFH2nM8wm5uJP+ZcVYGGayMavi8GmRJjuI3g1v6Z7Ni0JJKAJW+m0EtUuARb6Lmp4hMjzCBWzA==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.27.4': - resolution: {integrity: sha512-1RdrWFFiiLIW7LQq9Q2NES+HiD4NyT8Itj9AUeCl0IVCA459WnPhREKgwrpaIfTOe+/2rdntisegiPWn/r/aAw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.27.4': - resolution: {integrity: sha512-tLCwNG47l3sd9lpfyx9LAGEGItCUeRCWeAx6x2Jmbav65nAwoPXfewtAdtbtit/pJFLUWOhpv0FpS6GQAmPrHA==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.27.4': - resolution: {integrity: sha512-BnASypppbUWyqjd1KIpU4AUBiIhVr6YlHx/cnPgqEkNoVOhHg+YiSVxM1RLfiy4t9cAulbRGTNCKOcqHrEQLIw==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.27.4': - resolution: {integrity: sha512-+eUqgb/Z7vxVLezG8bVB9SfBie89gMueS+I0xYh2tJdw3vqA/0ImZJ2ROeWwVJN59ihBeZ7Tu92dF/5dy5FttA==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.27.4': - resolution: {integrity: sha512-S5qOXrKV8BQEzJPVxAwnryi2+Iq5pB40gTEIT69BQONqR7JH1EPIcQ/Uiv9mCnn05jff9umq/5nqzxlqTOg9NA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-arm64@0.27.4': - resolution: {integrity: sha512-xHT8X4sb0GS8qTqiwzHqpY00C95DPAq7nAwX35Ie/s+LO9830hrMd3oX0ZMKLvy7vsonee73x0lmcdOVXFzd6Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.27.4': - resolution: {integrity: sha512-RugOvOdXfdyi5Tyv40kgQnI0byv66BFgAqjdgtAKqHoZTbTF2QqfQrFwa7cHEORJf6X2ht+l9ABLMP0dnKYsgg==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-arm64@0.27.4': - resolution: {integrity: sha512-2MyL3IAaTX+1/qP0O1SwskwcwCoOI4kV2IBX1xYnDDqthmq5ArrW94qSIKCAuRraMgPOmG0RDTA74mzYNQA9ow==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.27.4': - resolution: {integrity: sha512-u8fg/jQ5aQDfsnIV6+KwLOf1CmJnfu1ShpwqdwC0uA7ZPwFws55Ngc12vBdeUdnuWoQYx/SOQLGDcdlfXhYmXQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/openharmony-arm64@0.27.4': - resolution: {integrity: sha512-JkTZrl6VbyO8lDQO3yv26nNr2RM2yZzNrNHEsj9bm6dOwwu9OYN28CjzZkH57bh4w0I2F7IodpQvUAEd1mbWXg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] - - '@esbuild/sunos-x64@0.27.4': - resolution: {integrity: sha512-/gOzgaewZJfeJTlsWhvUEmUG4tWEY2Spp5M20INYRg2ZKl9QPO3QEEgPeRtLjEWSW8FilRNacPOg8R1uaYkA6g==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.27.4': - resolution: {integrity: sha512-Z9SExBg2y32smoDQdf1HRwHRt6vAHLXcxD2uGgO/v2jK7Y718Ix4ndsbNMU/+1Qiem9OiOdaqitioZwxivhXYg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.27.4': - resolution: {integrity: sha512-DAyGLS0Jz5G5iixEbMHi5KdiApqHBWMGzTtMiJ72ZOLhbu/bzxgAe8Ue8CTS3n3HbIUHQz/L51yMdGMeoxXNJw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.27.4': - resolution: {integrity: sha512-+knoa0BDoeXgkNvvV1vvbZX4+hizelrkwmGJBdT17t8FNPwG2lKemmuMZlmaNQ3ws3DKKCxpb4zRZEIp3UxFCg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} '@inquirer/ansi@1.0.2': resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} @@ -302,6 +159,12 @@ packages: resolution: {integrity: sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA==} engines: {node: '>=18'} + '@napi-rs/wasm-runtime@1.1.3': + resolution: {integrity: sha512-xK9sGVbJWYb08+mTJt3/YV24WxvxpXcXtP6B172paPZ+Ts69Re9dAr7lKwJoeIx8OoeuimEiRZ7umkiUVClmmQ==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@open-draft/deferred-promise@2.2.0': resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} @@ -311,130 +174,112 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@rollup/rollup-android-arm-eabi@4.60.0': - resolution: {integrity: sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==} - cpu: [arm] - os: [android] + '@oxc-project/types@0.124.0': + resolution: {integrity: sha512-VBFWMTBvHxS11Z5Lvlr3IWgrwhMTXV+Md+EQF0Xf60+wAdsGFTBx7X7K/hP4pi8N7dcm1RvcHwDxZ16Qx8keUg==} - '@rollup/rollup-android-arm64@4.60.0': - resolution: {integrity: sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==} + '@rolldown/binding-android-arm64@1.0.0-rc.15': + resolution: {integrity: sha512-YYe6aWruPZDtHNpwu7+qAHEMbQ/yRl6atqb/AhznLTnD3UY99Q1jE7ihLSahNWkF4EqRPVC4SiR4O0UkLK02tA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.60.0': - resolution: {integrity: sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==} + '@rolldown/binding-darwin-arm64@1.0.0-rc.15': + resolution: {integrity: sha512-oArR/ig8wNTPYsXL+Mzhs0oxhxfuHRfG7Ikw7jXsw8mYOtk71W0OkF2VEVh699pdmzjPQsTjlD1JIOoHkLP1Fg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.60.0': - resolution: {integrity: sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==} + '@rolldown/binding-darwin-x64@1.0.0-rc.15': + resolution: {integrity: sha512-YzeVqOqjPYvUbJSWJ4EDL8ahbmsIXQpgL3JVipmN+MX0XnXMeWomLN3Fb+nwCmP/jfyqte5I3XRSm7OfQrbyxw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.60.0': - resolution: {integrity: sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==} - cpu: [arm64] - os: [freebsd] - - '@rollup/rollup-freebsd-x64@4.60.0': - resolution: {integrity: sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==} + '@rolldown/binding-freebsd-x64@1.0.0-rc.15': + resolution: {integrity: sha512-9Erhx956jeQ0nNTyif1+QWAXDRD38ZNjr//bSHrt6wDwB+QkAfl2q6Mn1k6OBPerznjRmbM10lgRb1Pli4xZPw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.60.0': - resolution: {integrity: sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.60.0': - resolution: {integrity: sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.15': + resolution: {integrity: sha512-cVwk0w8QbZJGTnP/AHQBs5yNwmpgGYStL88t4UIaqcvYJWBfS0s3oqVLZPwsPU6M0zlW4GqjP0Zq5MnAGwFeGA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.60.0': - resolution: {integrity: sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==} + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.15': + resolution: {integrity: sha512-eBZ/u8iAK9SoHGanqe/jrPnY0JvBN6iXbVOsbO38mbz+ZJsaobExAm1Iu+rxa4S1l2FjG0qEZn4Rc6X8n+9M+w==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.60.0': - resolution: {integrity: sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==} + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.15': + resolution: {integrity: sha512-ZvRYMGrAklV9PEkgt4LQM6MjQX2P58HPAuecwYObY2DhS2t35R0I810bKi0wmaYORt6m/2Sm+Z+nFgb0WhXNcQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] - '@rollup/rollup-linux-loong64-gnu@4.60.0': - resolution: {integrity: sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==} - cpu: [loong64] - os: [linux] - - '@rollup/rollup-linux-loong64-musl@4.60.0': - resolution: {integrity: sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==} - cpu: [loong64] - os: [linux] - - '@rollup/rollup-linux-ppc64-gnu@4.60.0': - resolution: {integrity: sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==} - cpu: [ppc64] - os: [linux] - - '@rollup/rollup-linux-ppc64-musl@4.60.0': - resolution: {integrity: sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==} + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.15': + resolution: {integrity: sha512-VDpgGBzgfg5hLg+uBpCLoFG5kVvEyafmfxGUV0UHLcL5irxAK7PKNeC2MwClgk6ZAiNhmo9FLhRYgvMmedLtnQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.60.0': - resolution: {integrity: sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==} - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-riscv64-musl@4.60.0': - resolution: {integrity: sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==} - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.60.0': - resolution: {integrity: sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==} + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.15': + resolution: {integrity: sha512-y1uXY3qQWCzcPgRJATPSOUP4tCemh4uBdY7e3EZbVwCJTY3gLJWnQABgeUetvED+bt1FQ01OeZwvhLS2bpNrAQ==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.60.0': - resolution: {integrity: sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==} + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.15': + resolution: {integrity: sha512-023bTPBod7J3Y/4fzAN6QtpkSABR0rigtrwaP+qSEabUh5zf6ELr9Nc7GujaROuPY3uwdSIXWrvhn1KxOvurWA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.60.0': - resolution: {integrity: sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==} + '@rolldown/binding-linux-x64-musl@1.0.0-rc.15': + resolution: {integrity: sha512-witB2O0/hU4CgfOOKUoeFgQ4GktPi1eEbAhaLAIpgD6+ZnhcPkUtPsoKKHRzmOoWPZue46IThdSgdo4XneOLYw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] - '@rollup/rollup-openbsd-x64@4.60.0': - resolution: {integrity: sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==} - cpu: [x64] - os: [openbsd] - - '@rollup/rollup-openharmony-arm64@4.60.0': - resolution: {integrity: sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==} + '@rolldown/binding-openharmony-arm64@1.0.0-rc.15': + resolution: {integrity: sha512-UCL68NJ0Ud5zRipXZE9dF5PmirzJE4E4BCIOOssEnM7wLDsxjc6Qb0sGDxTNRTP53I6MZpygyCpY8Aa8sPfKPg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.60.0': - resolution: {integrity: sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==} - cpu: [arm64] - os: [win32] + '@rolldown/binding-wasm32-wasi@1.0.0-rc.15': + resolution: {integrity: sha512-ApLruZq/ig+nhaE7OJm4lDjayUnOHVUa77zGeqnqZ9pn0ovdVbbNPerVibLXDmWeUZXjIYIT8V3xkT58Rm9u5Q==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] - '@rollup/rollup-win32-ia32-msvc@4.60.0': - resolution: {integrity: sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==} - cpu: [ia32] + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.15': + resolution: {integrity: sha512-KmoUoU7HnN+Si5YWJigfTws1jz1bKBYDQKdbLspz0UaqjjFkddHsqorgiW1mxcAj88lYUE6NC/zJNwT+SloqtA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.60.0': - resolution: {integrity: sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==} + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.15': + resolution: {integrity: sha512-3P2A8L+x75qavWLe/Dll3EYBJLQmtkJN8rfh+U/eR3MqMgL/h98PhYI+JFfXuDPgPeCB7iZAKiqii5vqOvnA0g==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.60.0': - resolution: {integrity: sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==} - cpu: [x64] - os: [win32] + '@rolldown/pluginutils@1.0.0-rc.15': + resolution: {integrity: sha512-UromN0peaE53IaBRe9W7CjrZgXl90fqGpK+mIZbA3qSTeYqg3pqpROBdIPvOG3F5ereDHNwoHBI2e50n1BDr1g==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} @@ -463,34 +308,34 @@ packages: '@types/statuses@2.0.6': resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} - '@vitest/expect@3.2.4': - resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} + '@vitest/expect@4.1.4': + resolution: {integrity: sha512-iPBpra+VDuXmBFI3FMKHSFXp3Gx5HfmSCE8X67Dn+bwephCnQCaB7qWK2ldHa+8ncN8hJU8VTMcxjPpyMkUjww==} - '@vitest/mocker@3.2.4': - resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} + '@vitest/mocker@4.1.4': + resolution: {integrity: sha512-R9HTZBhW6yCSGbGQnDnH3QHfJxokKN4KB+Yvk9Q1le7eQNYwiCyKxmLmurSpFy6BzJanSLuEUDrD+j97Q+ZLPg==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@3.2.4': - resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} + '@vitest/pretty-format@4.1.4': + resolution: {integrity: sha512-ddmDHU0gjEUyEVLxtZa7xamrpIefdEETu3nZjWtHeZX4QxqJ7tRxSteHVXJOcr8jhiLoGAhkK4WJ3WqBpjx42A==} - '@vitest/runner@3.2.4': - resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} + '@vitest/runner@4.1.4': + resolution: {integrity: sha512-xTp7VZ5aXP5ZJrn15UtJUWlx6qXLnGtF6jNxHepdPHpMfz/aVPx+htHtgcAL2mDXJgKhpoo2e9/hVJsIeFbytQ==} - '@vitest/snapshot@3.2.4': - resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} + '@vitest/snapshot@4.1.4': + resolution: {integrity: sha512-MCjCFgaS8aZz+m5nTcEcgk/xhWv0rEH4Yl53PPlMXOZ1/Ka2VcZU6CJ+MgYCZbcJvzGhQRjVrGQNZqkGPttIKw==} - '@vitest/spy@3.2.4': - resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} + '@vitest/spy@4.1.4': + resolution: {integrity: sha512-XxNdAsKW7C+FLydqFJLb5KhJtl3PGCMmYwFRfhvIgxJvLSXhhVI1zM8f1qD3Zg7RCjTSzDVyct6sghs9UEgBEQ==} - '@vitest/utils@3.2.4': - resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} + '@vitest/utils@4.1.4': + resolution: {integrity: sha512-13QMT+eysM5uVGa1rG4kegGYNp6cnQcsTc67ELFbhNLQO+vgsygtYJx2khvdt4gVQqSSpC/KT5FZZxUpP3Oatw==} '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -582,8 +427,8 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - baseline-browser-mapping@2.10.10: - resolution: {integrity: sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==} + baseline-browser-mapping@2.10.17: + resolution: {integrity: sha512-HdrkN8eVG2CXxeifv/VdJ4A4RSra1DTW8dc/hdxzhGHN8QePs6gKaWM9pHPcpCoxYZJuOZ8drHmbdpLHjCYjLA==} engines: {node: '>=6.0.0'} hasBin: true @@ -591,33 +436,25 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.28.1: - resolution: {integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==} + browserslist@4.28.2: + resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - - caniuse-lite@1.0.30001781: - resolution: {integrity: sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw==} + caniuse-lite@1.0.30001787: + resolution: {integrity: sha512-mNcrMN9KeI68u7muanUpEejSLghOKlVhRqS/Za2IeyGllJ9I9otGpR9g3nsw7n4W378TE/LyIteA0+/FOZm4Kg==} - chai@5.3.3: - resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - check-error@2.1.3: - resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} - engines: {node: '>= 16'} - chrome-trace-event@1.0.4: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} @@ -640,25 +477,19 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - deep-eql@5.0.2: - resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} - engines: {node: '>=6'} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} - electron-to-chromium@1.5.321: - resolution: {integrity: sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ==} + electron-to-chromium@1.5.334: + resolution: {integrity: sha512-mgjZAz7Jyx1SRCwEpy9wefDS7GvNPazLthHg8eQMJ76wBdGQQDW33TCrUTvQ4wzpmOrv2zrFoD3oNufMdyMpog==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -667,17 +498,9 @@ packages: resolution: {integrity: sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==} engines: {node: '>=10.13.0'} - es-module-lexer@1.7.0: - resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - es-module-lexer@2.0.0: resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} - esbuild@0.27.4: - resolution: {integrity: sha512-Rq4vbHnYkK5fws5NF7MYTU68FPRE1ajX7heQ/8QXXWqNgqqJ/GkmmyxIzUnf2Sr/bakf8l54716CcMGHYhMrrQ==} - engines: {node: '>=18'} - hasBin: true - escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -743,8 +566,8 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphql@16.13.1: - resolution: {integrity: sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==} + graphql@16.13.2: + resolution: {integrity: sha512-5bJ+nf/UCpAjHM8i06fl7eLyVC9iuNAjm9qzkiu2ZGhM0VscSvS6WDPfAwkdkBuoXGM9FJSbKl6wylMwP9Ktig==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} has-flag@4.0.0: @@ -769,22 +592,90 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} - js-tokens@9.0.1: - resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} - json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + loader-runner@4.3.1: resolution: {integrity: sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==} engines: {node: '>=6.11.5'} - loupe@3.2.1: - resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} - magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} @@ -803,9 +694,6 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.11.2: resolution: {integrity: sha512-MI54hLCsrMwiflkcqlgYYNJJddY5/+S0SnONvhv1owOplvqohKSQyGejpNdUGyCwgs4IH7PqaNbPw/sKOEze9Q==} engines: {node: '>=18'} @@ -828,8 +716,11 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - node-releases@2.0.36: - resolution: {integrity: sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==} + node-releases@2.0.37: + resolution: {integrity: sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==} + + obug@2.1.1: + resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} @@ -840,10 +731,6 @@ packages: pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - pathval@2.0.1: - resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} - engines: {node: '>= 14.16'} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -855,8 +742,8 @@ packages: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} - postcss@8.5.8: - resolution: {integrity: sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==} + postcss@8.5.9: + resolution: {integrity: sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==} engines: {node: ^10 || ^12 || >=14} require-directory@2.1.1: @@ -870,9 +757,9 @@ packages: rettime@0.7.0: resolution: {integrity: sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw==} - rollup@4.60.0: - resolution: {integrity: sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} + rolldown@1.0.0-rc.15: + resolution: {integrity: sha512-Ff31guA5zT6WjnGp0SXw76X6hzGRk/OQq2hE+1lcDe+lJdHSgnSX6nK3erbONHyCbpSj9a9E+uX/OvytZoWp2g==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true schema-utils@4.3.3: @@ -913,8 +800,8 @@ packages: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} - std-env@3.10.0: - resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + std-env@4.0.0: + resolution: {integrity: sha512-zUMPtQ/HBY3/50VbpkupYHbRroTRZJPRLvreamgErJVys0ceuzMkD44J/QjqhHjOzK42GQ3QZIeFG1OYfOtKqQ==} strict-event-emitter@0.5.1: resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} @@ -927,9 +814,6 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-literal@3.1.0: - resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -938,8 +822,8 @@ packages: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} - tapable@2.3.1: - resolution: {integrity: sha512-b+u3CEM6FjDHru+nhUSjDofpWSBp2rINziJWgApm72wwGasQ/wKXftZe4tI2Y5HPv6OpzXSZHOFq87H4vfsgsw==} + tapable@2.3.2: + resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==} engines: {node: '>=6'} terser-webpack-plugin@5.4.0: @@ -966,30 +850,23 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.2: - resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.1.1: + resolution: {integrity: sha512-VKS/ZaQhhkKFMANmAOhhXVoIfBXblQxGX1myCQ2faQrfmobMftXeJPcZGp0gS07ocvGJWDLZGyOZDadDBqYIJg==} + engines: {node: '>=18'} - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} - tinypool@1.1.1: - resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} - engines: {node: ^18.0.0 || >=20.0.0} - - tinyrainbow@2.0.0: - resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} - engines: {node: '>=14.0.0'} - - tinyspy@4.0.4: - resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==} + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} - tldts-core@7.0.27: - resolution: {integrity: sha512-YQ7uPjgWUibIK6DW5lrKujGwUKhLevU4hcGbP5O6TcIUb+oTjJYJVWPS4nZsIHrEEEG6myk/oqAJUEQmpZrHsg==} + tldts-core@7.0.28: + resolution: {integrity: sha512-7W5Efjhsc3chVdFhqtaU0KtK32J37Zcr9RKtID54nG+tIpcY79CQK/veYPODxtD/LJ4Lue66jvrQzIX2Z2/pUQ==} - tldts@7.0.27: - resolution: {integrity: sha512-I4FZcVFcqCRuT0ph6dCDpPuO4Xgzvh+spkcTr1gK7peIvxWauoloVO0vuy1FQnijT63ss6AsHB6+OIM4aXHbPg==} + tldts@7.0.28: + resolution: {integrity: sha512-+Zg3vWhRUv8B1maGSTFdev9mjoo8Etn2Ayfs4cnjlD3CsGkxXX4QyW3j2WJ0wdjYcYmy7Lx2RDsZMhgCWafKIw==} hasBin: true to-regex-range@5.0.1: @@ -1000,19 +877,22 @@ packages: resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==} engines: {node: '>=16'} - ts-loader@9.5.4: - resolution: {integrity: sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==} + ts-loader@9.5.7: + resolution: {integrity: sha512-/ZNrKgA3K3PtpMYOC71EeMWIloGw3IYEa5/t1cyz2r5/PyUwTXGzYJvcD3kfUvmhlfpz1rhV8B2O6IVTQ0avsg==} engines: {node: '>=12.0.0'} peerDependencies: typescript: '*' webpack: ^5.0.0 + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-fest@4.41.0: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - typescript@5.7.3: - resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} hasBin: true @@ -1025,20 +905,16 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - vite-node@3.2.4: - resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - - vite@7.3.1: - resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==} + vite@8.0.8: + resolution: {integrity: sha512-dbU7/iLVa8KZALJyLOBOQ88nOXtNG8vxKuOT4I2mD+Ya70KPceF4IAmDsmU0h1Qsn5bPrvsY9HJstCRh3hG6Uw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.1.0 + esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 - lightningcss: ^1.21.0 sass: ^1.70.0 sass-embedded: ^1.70.0 stylus: '>=0.54.8' @@ -1049,12 +925,14 @@ packages: peerDependenciesMeta: '@types/node': optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true jiti: optional: true less: optional: true - lightningcss: - optional: true sass: optional: true sass-embedded: @@ -1070,26 +948,39 @@ packages: yaml: optional: true - vitest@3.2.4: - resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vitest@4.1.4: + resolution: {integrity: sha512-tFuJqTxKb8AvfyqMfnavXdzfy3h3sWZRWwfluGbkeR7n0HUev+FmNgZ8SDrRBTVrVCjgH5cA21qGbCffMNtWvg==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/debug': ^4.1.12 - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.2.4 - '@vitest/ui': 3.2.4 + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.4 + '@vitest/browser-preview': 4.1.4 + '@vitest/browser-webdriverio': 4.1.4 + '@vitest/coverage-istanbul': 4.1.4 + '@vitest/coverage-v8': 4.1.4 + '@vitest/ui': 4.1.4 happy-dom: '*' jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: '@edge-runtime/vm': optional: true - '@types/debug': + '@opentelemetry/api': optional: true '@types/node': optional: true - '@vitest/browser': + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': optional: true '@vitest/ui': optional: true @@ -1106,8 +997,8 @@ packages: resolution: {integrity: sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==} engines: {node: '>=10.13.0'} - webpack@5.105.4: - resolution: {integrity: sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==} + webpack@5.106.0: + resolution: {integrity: sha512-Pkx5joZ9RrdgO5LBkyX1L2ZAJeK/Taz3vqZ9CbcP0wS5LEMx5QkKsEwLl29QJfihZ+DKRBFldzy1O30pJ1MDpA==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -1147,39 +1038,39 @@ packages: snapshots: - '@biomejs/biome@2.4.3': + '@biomejs/biome@2.4.10': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.4.3 - '@biomejs/cli-darwin-x64': 2.4.3 - '@biomejs/cli-linux-arm64': 2.4.3 - '@biomejs/cli-linux-arm64-musl': 2.4.3 - '@biomejs/cli-linux-x64': 2.4.3 - '@biomejs/cli-linux-x64-musl': 2.4.3 - '@biomejs/cli-win32-arm64': 2.4.3 - '@biomejs/cli-win32-x64': 2.4.3 - - '@biomejs/cli-darwin-arm64@2.4.3': + '@biomejs/cli-darwin-arm64': 2.4.10 + '@biomejs/cli-darwin-x64': 2.4.10 + '@biomejs/cli-linux-arm64': 2.4.10 + '@biomejs/cli-linux-arm64-musl': 2.4.10 + '@biomejs/cli-linux-x64': 2.4.10 + '@biomejs/cli-linux-x64-musl': 2.4.10 + '@biomejs/cli-win32-arm64': 2.4.10 + '@biomejs/cli-win32-x64': 2.4.10 + + '@biomejs/cli-darwin-arm64@2.4.10': optional: true - '@biomejs/cli-darwin-x64@2.4.3': + '@biomejs/cli-darwin-x64@2.4.10': optional: true - '@biomejs/cli-linux-arm64-musl@2.4.3': + '@biomejs/cli-linux-arm64-musl@2.4.10': optional: true - '@biomejs/cli-linux-arm64@2.4.3': + '@biomejs/cli-linux-arm64@2.4.10': optional: true - '@biomejs/cli-linux-x64-musl@2.4.3': + '@biomejs/cli-linux-x64-musl@2.4.10': optional: true - '@biomejs/cli-linux-x64@2.4.3': + '@biomejs/cli-linux-x64@2.4.10': optional: true - '@biomejs/cli-win32-arm64@2.4.3': + '@biomejs/cli-win32-arm64@2.4.10': optional: true - '@biomejs/cli-win32-x64@2.4.3': + '@biomejs/cli-win32-x64@2.4.10': optional: true '@bundled-es-modules/cookie@2.0.1': @@ -1190,82 +1081,20 @@ snapshots: dependencies: statuses: 2.0.2 - '@esbuild/aix-ppc64@0.27.4': - optional: true - - '@esbuild/android-arm64@0.27.4': - optional: true - - '@esbuild/android-arm@0.27.4': - optional: true - - '@esbuild/android-x64@0.27.4': - optional: true - - '@esbuild/darwin-arm64@0.27.4': - optional: true - - '@esbuild/darwin-x64@0.27.4': - optional: true - - '@esbuild/freebsd-arm64@0.27.4': - optional: true - - '@esbuild/freebsd-x64@0.27.4': - optional: true - - '@esbuild/linux-arm64@0.27.4': - optional: true - - '@esbuild/linux-arm@0.27.4': - optional: true - - '@esbuild/linux-ia32@0.27.4': - optional: true - - '@esbuild/linux-loong64@0.27.4': - optional: true - - '@esbuild/linux-mips64el@0.27.4': - optional: true - - '@esbuild/linux-ppc64@0.27.4': - optional: true - - '@esbuild/linux-riscv64@0.27.4': - optional: true - - '@esbuild/linux-s390x@0.27.4': - optional: true - - '@esbuild/linux-x64@0.27.4': - optional: true - - '@esbuild/netbsd-arm64@0.27.4': - optional: true - - '@esbuild/netbsd-x64@0.27.4': - optional: true - - '@esbuild/openbsd-arm64@0.27.4': - optional: true - - '@esbuild/openbsd-x64@0.27.4': - optional: true - - '@esbuild/openharmony-arm64@0.27.4': - optional: true - - '@esbuild/sunos-x64@0.27.4': - optional: true - - '@esbuild/win32-arm64@0.27.4': + '@emnapi/core@1.9.2': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 optional: true - '@esbuild/win32-ia32@0.27.4': + '@emnapi/runtime@1.9.2': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/win32-x64@0.27.4': + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 optional: true '@inquirer/ansi@1.0.2': {} @@ -1324,6 +1153,13 @@ snapshots: outvariant: 1.4.3 strict-event-emitter: 0.5.1 + '@napi-rs/wasm-runtime@1.1.3(@emnapi/core@1.9.2)(@emnapi/runtime@1.9.2)': + dependencies: + '@emnapi/core': 1.9.2 + '@emnapi/runtime': 1.9.2 + '@tybys/wasm-util': 0.10.1 + optional: true + '@open-draft/deferred-promise@2.2.0': {} '@open-draft/logger@0.3.0': @@ -1333,79 +1169,64 @@ snapshots: '@open-draft/until@2.1.0': {} - '@rollup/rollup-android-arm-eabi@4.60.0': - optional: true - - '@rollup/rollup-android-arm64@4.60.0': - optional: true - - '@rollup/rollup-darwin-arm64@4.60.0': - optional: true - - '@rollup/rollup-darwin-x64@4.60.0': - optional: true - - '@rollup/rollup-freebsd-arm64@4.60.0': - optional: true - - '@rollup/rollup-freebsd-x64@4.60.0': - optional: true + '@oxc-project/types@0.124.0': {} - '@rollup/rollup-linux-arm-gnueabihf@4.60.0': + '@rolldown/binding-android-arm64@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.60.0': + '@rolldown/binding-darwin-arm64@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-arm64-gnu@4.60.0': + '@rolldown/binding-darwin-x64@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-arm64-musl@4.60.0': + '@rolldown/binding-freebsd-x64@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-loong64-gnu@4.60.0': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-loong64-musl@4.60.0': + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.60.0': + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-ppc64-musl@4.60.0': + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.60.0': + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-riscv64-musl@4.60.0': + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-s390x-gnu@4.60.0': + '@rolldown/binding-linux-x64-musl@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-x64-gnu@4.60.0': + '@rolldown/binding-openharmony-arm64@1.0.0-rc.15': optional: true - '@rollup/rollup-linux-x64-musl@4.60.0': + '@rolldown/binding-wasm32-wasi@1.0.0-rc.15': + dependencies: + '@emnapi/core': 1.9.2 + '@emnapi/runtime': 1.9.2 + '@napi-rs/wasm-runtime': 1.1.3(@emnapi/core@1.9.2)(@emnapi/runtime@1.9.2) optional: true - '@rollup/rollup-openbsd-x64@4.60.0': + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.15': optional: true - '@rollup/rollup-openharmony-arm64@4.60.0': + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.15': optional: true - '@rollup/rollup-win32-arm64-msvc@4.60.0': - optional: true + '@rolldown/pluginutils@1.0.0-rc.15': {} - '@rollup/rollup-win32-ia32-msvc@4.60.0': - optional: true - - '@rollup/rollup-win32-x64-gnu@4.60.0': - optional: true + '@standard-schema/spec@1.1.0': {} - '@rollup/rollup-win32-x64-msvc@4.60.0': + '@tybys/wasm-util@0.10.1': + dependencies: + tslib: 2.8.1 optional: true '@types/chai@5.2.3': @@ -1437,48 +1258,47 @@ snapshots: '@types/statuses@2.0.6': {} - '@vitest/expect@3.2.4': + '@vitest/expect@4.1.4': dependencies: + '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.3.3 - tinyrainbow: 2.0.0 + '@vitest/spy': 4.1.4 + '@vitest/utils': 4.1.4 + chai: 6.2.2 + tinyrainbow: 3.1.0 - '@vitest/mocker@3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.3.1(@types/node@18.19.130)(terser@5.46.1))': + '@vitest/mocker@4.1.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.9.3))(vite@8.0.8(@types/node@18.19.130)(terser@5.46.1))': dependencies: - '@vitest/spy': 3.2.4 + '@vitest/spy': 4.1.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.11.2(@types/node@18.19.130)(typescript@5.7.3) - vite: 7.3.1(@types/node@18.19.130)(terser@5.46.1) + msw: 2.11.2(@types/node@18.19.130)(typescript@5.9.3) + vite: 8.0.8(@types/node@18.19.130)(terser@5.46.1) - '@vitest/pretty-format@3.2.4': + '@vitest/pretty-format@4.1.4': dependencies: - tinyrainbow: 2.0.0 + tinyrainbow: 3.1.0 - '@vitest/runner@3.2.4': + '@vitest/runner@4.1.4': dependencies: - '@vitest/utils': 3.2.4 + '@vitest/utils': 4.1.4 pathe: 2.0.3 - strip-literal: 3.1.0 - '@vitest/snapshot@3.2.4': + '@vitest/snapshot@4.1.4': dependencies: - '@vitest/pretty-format': 3.2.4 + '@vitest/pretty-format': 4.1.4 + '@vitest/utils': 4.1.4 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@3.2.4': - dependencies: - tinyspy: 4.0.4 + '@vitest/spy@4.1.4': {} - '@vitest/utils@3.2.4': + '@vitest/utils@4.1.4': dependencies: - '@vitest/pretty-format': 3.2.4 - loupe: 3.2.1 - tinyrainbow: 2.0.0 + '@vitest/pretty-format': 4.1.4 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.0 '@webassemblyjs/ast@1.14.1': dependencies: @@ -1590,41 +1410,31 @@ snapshots: assertion-error@2.0.1: {} - baseline-browser-mapping@2.10.10: {} + baseline-browser-mapping@2.10.17: {} braces@3.0.3: dependencies: fill-range: 7.1.1 - browserslist@4.28.1: + browserslist@4.28.2: dependencies: - baseline-browser-mapping: 2.10.10 - caniuse-lite: 1.0.30001781 - electron-to-chromium: 1.5.321 - node-releases: 2.0.36 - update-browserslist-db: 1.2.3(browserslist@4.28.1) + baseline-browser-mapping: 2.10.17 + caniuse-lite: 1.0.30001787 + electron-to-chromium: 1.5.334 + node-releases: 2.0.37 + update-browserslist-db: 1.2.3(browserslist@4.28.2) buffer-from@1.1.2: {} - cac@6.7.14: {} - - caniuse-lite@1.0.30001781: {} + caniuse-lite@1.0.30001787: {} - chai@5.3.3: - dependencies: - assertion-error: 2.0.1 - check-error: 2.1.3 - deep-eql: 5.0.2 - loupe: 3.2.1 - pathval: 2.0.1 + chai@6.2.2: {} chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - check-error@2.1.3: {} - chrome-trace-event@1.0.4: {} cli-width@4.1.0: {} @@ -1643,56 +1453,23 @@ snapshots: commander@2.20.3: {} - cookie@0.7.2: {} + convert-source-map@2.0.0: {} - debug@4.4.3: - dependencies: - ms: 2.1.3 + cookie@0.7.2: {} - deep-eql@5.0.2: {} + detect-libc@2.1.2: {} - electron-to-chromium@1.5.321: {} + electron-to-chromium@1.5.334: {} emoji-regex@8.0.0: {} enhanced-resolve@5.20.1: dependencies: graceful-fs: 4.2.11 - tapable: 2.3.1 - - es-module-lexer@1.7.0: {} + tapable: 2.3.2 es-module-lexer@2.0.0: {} - esbuild@0.27.4: - optionalDependencies: - '@esbuild/aix-ppc64': 0.27.4 - '@esbuild/android-arm': 0.27.4 - '@esbuild/android-arm64': 0.27.4 - '@esbuild/android-x64': 0.27.4 - '@esbuild/darwin-arm64': 0.27.4 - '@esbuild/darwin-x64': 0.27.4 - '@esbuild/freebsd-arm64': 0.27.4 - '@esbuild/freebsd-x64': 0.27.4 - '@esbuild/linux-arm': 0.27.4 - '@esbuild/linux-arm64': 0.27.4 - '@esbuild/linux-ia32': 0.27.4 - '@esbuild/linux-loong64': 0.27.4 - '@esbuild/linux-mips64el': 0.27.4 - '@esbuild/linux-ppc64': 0.27.4 - '@esbuild/linux-riscv64': 0.27.4 - '@esbuild/linux-s390x': 0.27.4 - '@esbuild/linux-x64': 0.27.4 - '@esbuild/netbsd-arm64': 0.27.4 - '@esbuild/netbsd-x64': 0.27.4 - '@esbuild/openbsd-arm64': 0.27.4 - '@esbuild/openbsd-x64': 0.27.4 - '@esbuild/openharmony-arm64': 0.27.4 - '@esbuild/sunos-x64': 0.27.4 - '@esbuild/win32-arm64': 0.27.4 - '@esbuild/win32-ia32': 0.27.4 - '@esbuild/win32-x64': 0.27.4 - escalade@3.2.0: {} eslint-scope@5.1.1: @@ -1737,7 +1514,7 @@ snapshots: graceful-fs@4.2.11: {} - graphql@16.13.1: {} + graphql@16.13.2: {} has-flag@4.0.0: {} @@ -1755,15 +1532,60 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - js-tokens@9.0.1: {} - json-parse-even-better-errors@2.3.1: {} json-schema-traverse@1.0.0: {} - loader-runner@4.3.1: {} + lightningcss-android-arm64@1.32.0: + optional: true - loupe@3.2.1: {} + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + loader-runner@4.3.1: {} magic-string@0.30.21: dependencies: @@ -1782,9 +1604,7 @@ snapshots: dependencies: mime-db: 1.52.0 - ms@2.1.3: {} - - msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3): + msw@2.11.2(@types/node@18.19.130)(typescript@5.9.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 @@ -1794,7 +1614,7 @@ snapshots: '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 '@types/statuses': 2.0.6 - graphql: 16.13.1 + graphql: 16.13.2 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 @@ -1806,7 +1626,7 @@ snapshots: type-fest: 4.41.0 yargs: 17.7.2 optionalDependencies: - typescript: 5.7.3 + typescript: 5.9.3 transitivePeerDependencies: - '@types/node' @@ -1816,7 +1636,9 @@ snapshots: neo-async@2.6.2: {} - node-releases@2.0.36: {} + node-releases@2.0.37: {} + + obug@2.1.1: {} outvariant@1.4.3: {} @@ -1824,15 +1646,13 @@ snapshots: pathe@2.0.3: {} - pathval@2.0.1: {} - picocolors@1.1.1: {} picomatch@2.3.2: {} picomatch@4.0.4: {} - postcss@8.5.8: + postcss@8.5.9: dependencies: nanoid: 3.3.11 picocolors: 1.1.1 @@ -1844,36 +1664,26 @@ snapshots: rettime@0.7.0: {} - rollup@4.60.0: + rolldown@1.0.0-rc.15: dependencies: - '@types/estree': 1.0.8 + '@oxc-project/types': 0.124.0 + '@rolldown/pluginutils': 1.0.0-rc.15 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.60.0 - '@rollup/rollup-android-arm64': 4.60.0 - '@rollup/rollup-darwin-arm64': 4.60.0 - '@rollup/rollup-darwin-x64': 4.60.0 - '@rollup/rollup-freebsd-arm64': 4.60.0 - '@rollup/rollup-freebsd-x64': 4.60.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.60.0 - '@rollup/rollup-linux-arm-musleabihf': 4.60.0 - '@rollup/rollup-linux-arm64-gnu': 4.60.0 - '@rollup/rollup-linux-arm64-musl': 4.60.0 - '@rollup/rollup-linux-loong64-gnu': 4.60.0 - '@rollup/rollup-linux-loong64-musl': 4.60.0 - '@rollup/rollup-linux-ppc64-gnu': 4.60.0 - '@rollup/rollup-linux-ppc64-musl': 4.60.0 - '@rollup/rollup-linux-riscv64-gnu': 4.60.0 - '@rollup/rollup-linux-riscv64-musl': 4.60.0 - '@rollup/rollup-linux-s390x-gnu': 4.60.0 - '@rollup/rollup-linux-x64-gnu': 4.60.0 - '@rollup/rollup-linux-x64-musl': 4.60.0 - '@rollup/rollup-openbsd-x64': 4.60.0 - '@rollup/rollup-openharmony-arm64': 4.60.0 - '@rollup/rollup-win32-arm64-msvc': 4.60.0 - '@rollup/rollup-win32-ia32-msvc': 4.60.0 - '@rollup/rollup-win32-x64-gnu': 4.60.0 - '@rollup/rollup-win32-x64-msvc': 4.60.0 - fsevents: 2.3.3 + '@rolldown/binding-android-arm64': 1.0.0-rc.15 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.15 + '@rolldown/binding-darwin-x64': 1.0.0-rc.15 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.15 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.15 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.15 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.15 + '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.15 + '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.15 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.15 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.15 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.15 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.15 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.15 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.15 schema-utils@4.3.3: dependencies: @@ -1903,7 +1713,7 @@ snapshots: statuses@2.0.2: {} - std-env@3.10.0: {} + std-env@4.0.0: {} strict-event-emitter@0.5.1: {} @@ -1917,10 +1727,6 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-literal@3.1.0: - dependencies: - js-tokens: 9.0.1 - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -1929,15 +1735,15 @@ snapshots: dependencies: has-flag: 4.0.0 - tapable@2.3.1: {} + tapable@2.3.2: {} - terser-webpack-plugin@5.4.0(webpack@5.105.4): + terser-webpack-plugin@5.4.0(webpack@5.106.0): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.46.1 - webpack: 5.105.4 + webpack: 5.106.0 terser@5.46.1: dependencies: @@ -1948,24 +1754,20 @@ snapshots: tinybench@2.9.0: {} - tinyexec@0.3.2: {} + tinyexec@1.1.1: {} - tinyglobby@0.2.15: + tinyglobby@0.2.16: dependencies: fdir: 6.5.0(picomatch@4.0.4) picomatch: 4.0.4 - tinypool@1.1.1: {} + tinyrainbow@3.1.0: {} - tinyrainbow@2.0.0: {} + tldts-core@7.0.28: {} - tinyspy@4.0.4: {} - - tldts-core@7.0.27: {} - - tldts@7.0.27: + tldts@7.0.28: dependencies: - tldts-core: 7.0.27 + tldts-core: 7.0.28 to-regex-range@5.0.1: dependencies: @@ -1973,104 +1775,71 @@ snapshots: tough-cookie@6.0.1: dependencies: - tldts: 7.0.27 + tldts: 7.0.28 - ts-loader@9.5.4(typescript@5.7.3)(webpack@5.105.4): + ts-loader@9.5.7(typescript@5.9.3)(webpack@5.106.0): dependencies: chalk: 4.1.2 enhanced-resolve: 5.20.1 micromatch: 4.0.8 semver: 7.7.4 source-map: 0.7.6 - typescript: 5.7.3 - webpack: 5.105.4 + typescript: 5.9.3 + webpack: 5.106.0 + + tslib@2.8.1: + optional: true type-fest@4.41.0: {} - typescript@5.7.3: {} + typescript@5.9.3: {} undici-types@5.26.5: {} - update-browserslist-db@1.2.3(browserslist@4.28.1): + update-browserslist-db@1.2.3(browserslist@4.28.2): dependencies: - browserslist: 4.28.1 + browserslist: 4.28.2 escalade: 3.2.0 picocolors: 1.1.1 - vite-node@3.2.4(@types/node@18.19.130)(terser@5.46.1): + vite@8.0.8(@types/node@18.19.130)(terser@5.46.1): dependencies: - cac: 6.7.14 - debug: 4.4.3 - es-module-lexer: 1.7.0 - pathe: 2.0.3 - vite: 7.3.1(@types/node@18.19.130)(terser@5.46.1) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vite@7.3.1(@types/node@18.19.130)(terser@5.46.1): - dependencies: - esbuild: 0.27.4 - fdir: 6.5.0(picomatch@4.0.4) + lightningcss: 1.32.0 picomatch: 4.0.4 - postcss: 8.5.8 - rollup: 4.60.0 - tinyglobby: 0.2.15 + postcss: 8.5.9 + rolldown: 1.0.0-rc.15 + tinyglobby: 0.2.16 optionalDependencies: '@types/node': 18.19.130 fsevents: 2.3.3 terser: 5.46.1 - vitest@3.2.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(terser@5.46.1): + vitest@4.1.4(@types/node@18.19.130)(msw@2.11.2(@types/node@18.19.130)(typescript@5.9.3))(vite@8.0.8(@types/node@18.19.130)(terser@5.46.1)): dependencies: - '@types/chai': 5.2.3 - '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.7.3))(vite@7.3.1(@types/node@18.19.130)(terser@5.46.1)) - '@vitest/pretty-format': 3.2.4 - '@vitest/runner': 3.2.4 - '@vitest/snapshot': 3.2.4 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.3.3 - debug: 4.4.3 + '@vitest/expect': 4.1.4 + '@vitest/mocker': 4.1.4(msw@2.11.2(@types/node@18.19.130)(typescript@5.9.3))(vite@8.0.8(@types/node@18.19.130)(terser@5.46.1)) + '@vitest/pretty-format': 4.1.4 + '@vitest/runner': 4.1.4 + '@vitest/snapshot': 4.1.4 + '@vitest/spy': 4.1.4 + '@vitest/utils': 4.1.4 + es-module-lexer: 2.0.0 expect-type: 1.3.0 magic-string: 0.30.21 + obug: 2.1.1 pathe: 2.0.3 picomatch: 4.0.4 - std-env: 3.10.0 + std-env: 4.0.0 tinybench: 2.9.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.15 - tinypool: 1.1.1 - tinyrainbow: 2.0.0 - vite: 7.3.1(@types/node@18.19.130)(terser@5.46.1) - vite-node: 3.2.4(@types/node@18.19.130)(terser@5.46.1) + tinyexec: 1.1.1 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vite: 8.0.8(@types/node@18.19.130)(terser@5.46.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 18.19.130 transitivePeerDependencies: - - jiti - - less - - lightningcss - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml watchpack@2.5.1: dependencies: @@ -2079,7 +1848,7 @@ snapshots: webpack-sources@3.3.4: {} - webpack@5.105.4: + webpack@5.106.0: dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -2089,7 +1858,7 @@ snapshots: '@webassemblyjs/wasm-parser': 1.14.1 acorn: 8.16.0 acorn-import-phases: 1.0.4(acorn@8.16.0) - browserslist: 4.28.1 + browserslist: 4.28.2 chrome-trace-event: 1.0.4 enhanced-resolve: 5.20.1 es-module-lexer: 2.0.0 @@ -2102,8 +1871,8 @@ snapshots: mime-types: 2.1.35 neo-async: 2.6.2 schema-utils: 4.3.3 - tapable: 2.3.1 - terser-webpack-plugin: 5.4.0(webpack@5.105.4) + tapable: 2.3.2 + terser-webpack-plugin: 5.4.0(webpack@5.106.0) watchpack: 2.5.1 webpack-sources: 3.3.4 transitivePeerDependencies: diff --git a/reference.md b/reference.md index afdc72f..0932e24 100644 --- a/reference.md +++ b/reference.md @@ -4637,7 +4637,7 @@ await client.contacts.getContacts(); -
client.contacts.createContact({ ...params }) -> Brevo.CreateContactResponse +
client.contacts.createContact({ ...params }) -> Brevo.CreateContactResponse | undefined
@@ -6915,7 +6915,7 @@ await client.ecommerce.getCategories();
-
client.ecommerce.createUpdateCategory({ ...params }) -> Brevo.CreateUpdateCategoryResponse +
client.ecommerce.createUpdateCategory({ ...params }) -> Brevo.CreateUpdateCategoryResponse | undefined
@@ -7633,7 +7633,7 @@ await client.ecommerce.getProducts();
-
client.ecommerce.createUpdateProduct({ ...params }) -> Brevo.CreateUpdateProductResponse +
client.ecommerce.createUpdateProduct({ ...params }) -> Brevo.CreateUpdateProductResponse | undefined
diff --git a/src/BaseClient.ts b/src/BaseClient.ts index f8e7177..00b1d03 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -51,8 +51,8 @@ export function normalizeClientOptions { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__createContact(request, requestOptions)); } private async __createContact( request: Brevo.CreateContactRequest = {}, requestOptions?: ContactsClient.RequestOptions, - ): Promise> { + ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -152,7 +152,10 @@ export class ContactsClient { logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Brevo.CreateContactResponse, rawResponse: _response.rawResponse }; + return { + data: _response.body as Brevo.CreateContactResponse | undefined, + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/contacts/client/requests/CreateContactRequest.ts b/src/api/resources/contacts/client/requests/CreateContactRequest.ts index c9ca9e7..85077ff 100644 --- a/src/api/resources/contacts/client/requests/CreateContactRequest.ts +++ b/src/api/resources/contacts/client/requests/CreateContactRequest.ts @@ -25,6 +25,6 @@ export interface CreateContactRequest { export namespace CreateContactRequest { export namespace Attributes { - export type Value = number | string | boolean | string[]; + export type Value = number | number | string | boolean | string[]; } } diff --git a/src/api/resources/contacts/client/requests/UpdateContactRequest.ts b/src/api/resources/contacts/client/requests/UpdateContactRequest.ts index 3ef5221..c67887b 100644 --- a/src/api/resources/contacts/client/requests/UpdateContactRequest.ts +++ b/src/api/resources/contacts/client/requests/UpdateContactRequest.ts @@ -31,6 +31,6 @@ export interface UpdateContactRequest { export namespace UpdateContactRequest { export namespace Attributes { - export type Value = number | string | boolean | string[]; + export type Value = number | number | string | boolean | string[]; } } diff --git a/src/api/resources/ecommerce/client/Client.ts b/src/api/resources/ecommerce/client/Client.ts index b85d222..1a92a4c 100644 --- a/src/api/resources/ecommerce/client/Client.ts +++ b/src/api/resources/ecommerce/client/Client.ts @@ -109,14 +109,14 @@ export class EcommerceClient { public createUpdateCategory( request: Brevo.CreateUpdateCategoryRequest, requestOptions?: EcommerceClient.RequestOptions, - ): core.HttpResponsePromise { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__createUpdateCategory(request, requestOptions)); } private async __createUpdateCategory( request: Brevo.CreateUpdateCategoryRequest, requestOptions?: EcommerceClient.RequestOptions, - ): Promise> { + ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -143,7 +143,10 @@ export class EcommerceClient { logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Brevo.CreateUpdateCategoryResponse, rawResponse: _response.rawResponse }; + return { + data: _response.body as Brevo.CreateUpdateCategoryResponse | undefined, + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -1108,14 +1111,14 @@ export class EcommerceClient { public createUpdateProduct( request: Brevo.CreateUpdateProductRequest, requestOptions?: EcommerceClient.RequestOptions, - ): core.HttpResponsePromise { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__createUpdateProduct(request, requestOptions)); } private async __createUpdateProduct( request: Brevo.CreateUpdateProductRequest, requestOptions?: EcommerceClient.RequestOptions, - ): Promise> { + ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1142,7 +1145,10 @@ export class EcommerceClient { logging: this._options.logging, }); if (_response.ok) { - return { data: _response.body as Brevo.CreateUpdateProductResponse, rawResponse: _response.rawResponse }; + return { + data: _response.body as Brevo.CreateUpdateProductResponse | undefined, + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/event/client/requests/CreateEventRequest.ts b/src/api/resources/event/client/requests/CreateEventRequest.ts index 78a6315..5729e3e 100644 --- a/src/api/resources/event/client/requests/CreateEventRequest.ts +++ b/src/api/resources/event/client/requests/CreateEventRequest.ts @@ -24,11 +24,11 @@ export interface CreateEventRequest { export namespace CreateEventRequest { export namespace ContactProperties { - export type Value = string | number; + export type Value = string | number | boolean; } export namespace EventProperties { - export type Value = string | number | Record | unknown[]; + export type Value = string | number | boolean | Record | unknown[]; } /** diff --git a/src/api/resources/event/types/CreateBatchEventsRequestItem.ts b/src/api/resources/event/types/CreateBatchEventsRequestItem.ts index 2ccc0ac..88da2d1 100644 --- a/src/api/resources/event/types/CreateBatchEventsRequestItem.ts +++ b/src/api/resources/event/types/CreateBatchEventsRequestItem.ts @@ -17,11 +17,11 @@ export interface CreateBatchEventsRequestItem { export namespace CreateBatchEventsRequestItem { export namespace ContactProperties { - export type Value = string | number; + export type Value = string | number | boolean; } export namespace EventProperties { - export type Value = string | number | Record | unknown[]; + export type Value = string | number | boolean | Record | unknown[]; } /** diff --git a/src/api/resources/process/types/GetProcessResponse.ts b/src/api/resources/process/types/GetProcessResponse.ts index 75de873..8ce6ad6 100644 --- a/src/api/resources/process/types/GetProcessResponse.ts +++ b/src/api/resources/process/types/GetProcessResponse.ts @@ -34,6 +34,7 @@ export namespace GetProcessResponse { /** Current status of the process */ export const Status = { Queued: "queued", + InProcess: "in_process", Processing: "processing", Completed: "completed", Failed: "failed", @@ -62,8 +63,8 @@ export namespace GetProcessResponse { duplicate_contact_id?: (number | null) | undefined; /** Number of duplicate external IDs */ duplicate_ext_id?: (number | null) | undefined; - /** Number of duplicate email IDs */ - duplicate_email_id?: (number | null) | undefined; + /** URL to CSV file containing duplicate email IDs, or null if none */ + duplicate_email_id?: (string | null) | undefined; /** Number of duplicate phone numbers */ duplicate_phone_id?: (number | null) | undefined; /** Number of duplicate WhatsApp numbers */ diff --git a/src/api/resources/process/types/GetProcessesResponse.ts b/src/api/resources/process/types/GetProcessesResponse.ts index b034580..7187111 100644 --- a/src/api/resources/process/types/GetProcessesResponse.ts +++ b/src/api/resources/process/types/GetProcessesResponse.ts @@ -45,6 +45,7 @@ export namespace GetProcessesResponse { /** Current status of the process */ export const Status = { Queued: "queued", + InProcess: "in_process", Processing: "processing", Completed: "completed", Failed: "failed", @@ -73,8 +74,8 @@ export namespace GetProcessesResponse { duplicate_contact_id?: (number | null) | undefined; /** Number of duplicate external IDs */ duplicate_ext_id?: (number | null) | undefined; - /** Number of duplicate email IDs */ - duplicate_email_id?: (number | null) | undefined; + /** URL to CSV file containing duplicate email IDs, or null if none */ + duplicate_email_id?: (string | null) | undefined; /** Number of duplicate phone numbers */ duplicate_phone_id?: (number | null) | undefined; /** Number of duplicate WhatsApp numbers */ diff --git a/src/core/auth/BasicAuth.ts b/src/core/auth/BasicAuth.ts index a642359..f34fca5 100644 --- a/src/core/auth/BasicAuth.ts +++ b/src/core/auth/BasicAuth.ts @@ -1,8 +1,8 @@ import { base64Decode, base64Encode } from "../base64.js"; export interface BasicAuth { - username: string; - password: string; + username?: string; + password?: string; } const BASIC_AUTH_HEADER_PREFIX = /^Basic /i; @@ -12,7 +12,12 @@ export const BasicAuth = { if (basicAuth == null) { return undefined; } - const token = base64Encode(`${basicAuth.username}:${basicAuth.password}`); + const username = basicAuth.username ?? ""; + const password = basicAuth.password ?? ""; + if (username === "" && password === "") { + return undefined; + } + const token = base64Encode(`${username}:${password}`); return `Basic ${token}`; }, fromAuthorizationHeader: (header: string): BasicAuth => { diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index 764d2e1..928dfea 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -56,11 +56,13 @@ export declare namespace Fetcher { export interface TimeoutError { reason: "timeout"; + cause?: unknown; } export interface UnknownError { reason: "unknown"; errorMessage: string; + cause?: unknown; } } @@ -338,6 +340,7 @@ export async function fetcherImpl(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise(args: Fetcher.Args): Promise { try { const fs = await import("fs"); - if (!fs || !fs.promises || !fs.promises.stat) { + if (!fs?.promises?.stat) { return undefined; } const fileStat = await fs.promises.stat(path); diff --git a/src/core/form-data-utils/FormDataWrapper.ts b/src/core/form-data-utils/FormDataWrapper.ts index bea0cf8..c4ae3f4 100644 --- a/src/core/form-data-utils/FormDataWrapper.ts +++ b/src/core/form-data-utils/FormDataWrapper.ts @@ -109,7 +109,7 @@ async function streamToBuffer(stream: unknown): Promise { async function convertToBlob(value: unknown, contentType?: string): Promise { if (isStreamLike(value) || isReadableStream(value)) { const buffer = await streamToBuffer(value); - return new Blob([buffer], { type: contentType }); + return new Blob([buffer as BlobPart], { type: contentType }); } if (value instanceof Blob) { @@ -117,7 +117,7 @@ async function convertToBlob(value: unknown, contentType?: string): Promise { interface ToHeaderTestCase { description: string; - input: { username: string; password: string }; - expected: string; + input: { username?: string; password?: string }; + expected: string | undefined; } interface FromHeaderTestCase { @@ -22,10 +22,30 @@ describe("BasicAuth", () => { describe("toAuthorizationHeader", () => { const toHeaderTests: ToHeaderTestCase[] = [ { - description: "correctly converts to header", + description: "correctly converts to header with both username and password", input: { username: "username", password: "password" }, expected: "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", }, + { + description: "encodes username only with trailing colon", + input: { username: "username" }, + expected: "Basic dXNlcm5hbWU6", + }, + { + description: "encodes password only with leading colon", + input: { password: "password" }, + expected: "Basic OnBhc3N3b3Jk", + }, + { + description: "returns undefined when neither provided", + input: {}, + expected: undefined, + }, + { + description: "returns undefined when both are empty strings", + input: { username: "", password: "" }, + expected: undefined, + }, ]; toHeaderTests.forEach(({ description, input, expected }) => { diff --git a/tests/wire/account.test.ts b/tests/wire/account.test.ts index 6902f7d..130fc50 100644 --- a/tests/wire/account.test.ts +++ b/tests/wire/account.test.ts @@ -71,95 +71,7 @@ describe("AccountClient", () => { server.mockEndpoint().get("/account").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.account.getAccount(); - expect(response).toEqual({ - organization_id: "5fa2b8c123456789abcdef01", - user_id: 1234567, - enterprise: false, - companyName: "Acme Marketing Corp", - email: "michael.davis@example.com", - firstName: "Michael", - lastName: "Davis", - address: { - city: "New York", - country: "United States", - street: "456 Business Ave", - zipCode: "10001", - }, - dateTimePreferences: { - timezone: "America/New_York", - timeFormat: "12", - dateFormat: "mm-dd-yyyy", - }, - marketingAutomation: { - enabled: true, - key: "ma8k2x9v4h7p3d6f1c5e8b2a", - }, - plan: [ - { - credits: 250, - creditsType: "sendLimit", - endDate: "1753826567", - startDate: "1751234567", - type: "free", - }, - { - credits: 15, - creditsType: "sendLimit", - endDate: "1753826567", - startDate: "1751234567", - type: "sms", - }, - ], - planVerticals: [ - { - planCategory: "Marketing", - planType: "free", - name: "Free", - status: "active", - startDate: "1751234567", - endDate: "1753826567", - users: { - purchasedSeats: "1", - usedSeats: "1", - }, - credits: "250", - }, - { - planCategory: "Chat", - planType: "free", - name: "Free", - status: "active", - startDate: "1735678901", - endDate: "1767214901", - users: { - purchasedSeats: "1", - usedSeats: "1", - }, - credits: "250", - }, - { - planCategory: "CRM", - planType: "free", - name: "Free", - status: "active", - startDate: "1735678900", - endDate: "1767214900", - users: { - purchasedSeats: "1", - usedSeats: "1", - }, - credits: "250", - }, - ], - relay: { - data: { - port: 587, - relay: "smtp-relay.brevo.com", - userName: "michael.davis@example.com", - }, - enabled: true, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getAccountActivity (1)", async () => { @@ -194,24 +106,7 @@ describe("AccountClient", () => { .build(); const response = await client.account.getAccountActivity(); - expect(response).toEqual({ - logs: [ - { - action: "login-success", - date: "2023-03-16T16:49:23+05:30", - user_agent: "Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)", - user_email: "test@mycompany.com", - user_ip: "192.158.1.34", - }, - { - action: "update-profile", - date: "2023-03-15T16:49:23+05:30", - user_agent: "Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)", - user_email: "test@myexample.com", - user_ip: "192.158.1.38", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAccountActivity (2)", async () => { diff --git a/tests/wire/balance.test.ts b/tests/wire/balance.test.ts index 7acf454..e7649d2 100644 --- a/tests/wire/balance.test.ts +++ b/tests/wire/balance.test.ts @@ -35,18 +35,7 @@ describe("BalanceClient", () => { contact_id: 1, balance_definition_id: "balance_definition_id", }); - expect(response).toEqual({ - balanceDefinitionId: "balanceDefinitionId", - constraintType: "constraintType", - createdAt: "createdAt", - durationUnit: "durationUnit", - durationValue: 1, - id: "id", - slidingSchedule: true, - transactionType: "transactionType", - updatedAt: "updatedAt", - value: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("getActiveBalancesApi (2)", async () => { @@ -206,34 +195,7 @@ describe("BalanceClient", () => { const response = await client.balance.getBalanceDefinitionList({ pid: "pid", }); - expect(response).toEqual({ - items: [ - { - balanceAvailabilityDurationModifier: "startOfPeriod", - balanceAvailabilityDurationUnit: "balanceAvailabilityDurationUnit", - balanceAvailabilityDurationValue: 1, - balanceExpirationDate: "2024-01-15T09:30:00Z", - balanceOptionAmountOvertakingStrategy: "balanceOptionAmountOvertakingStrategy", - balanceOptionCreditRounding: "balanceOptionCreditRounding", - balanceOptionDebitRounding: "balanceOptionDebitRounding", - createdAt: "2024-01-15T09:30:00Z", - deletedAt: "deletedAt", - description: "description", - id: "id", - imageRef: "imageRef", - maxAmount: 1.1, - maxCreditAmountLimit: 1.1, - maxDebitAmountLimit: 1.1, - meta: { - key: "value", - }, - minAmount: 1.1, - name: "name", - unit: "unit", - updatedAt: "updatedAt", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getBalanceDefinitionList (2)", async () => { @@ -361,30 +323,7 @@ describe("BalanceClient", () => { name: "name", unit: "POINTS", }); - expect(response).toEqual({ - balanceAvailabilityDurationModifier: "startOfPeriod", - balanceAvailabilityDurationUnit: "balanceAvailabilityDurationUnit", - balanceAvailabilityDurationValue: 1, - balanceExpirationDate: "2024-01-15T09:30:00Z", - balanceOptionAmountOvertakingStrategy: "balanceOptionAmountOvertakingStrategy", - balanceOptionCreditRounding: "balanceOptionCreditRounding", - balanceOptionDebitRounding: "balanceOptionDebitRounding", - createdAt: "2024-01-15T09:30:00Z", - deletedAt: "deletedAt", - description: "description", - id: "id", - imageRef: "imageRef", - maxAmount: 1.1, - maxCreditAmountLimit: 1.1, - maxDebitAmountLimit: 1.1, - meta: { - key: "value", - }, - minAmount: 1.1, - name: "name", - unit: "unit", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("createBalanceDefinition (2)", async () => { @@ -546,30 +485,7 @@ describe("BalanceClient", () => { pid: "pid", bdid: "bdid", }); - expect(response).toEqual({ - balanceAvailabilityDurationModifier: "startOfPeriod", - balanceAvailabilityDurationUnit: "balanceAvailabilityDurationUnit", - balanceAvailabilityDurationValue: 1, - balanceExpirationDate: "2024-01-15T09:30:00Z", - balanceOptionAmountOvertakingStrategy: "balanceOptionAmountOvertakingStrategy", - balanceOptionCreditRounding: "balanceOptionCreditRounding", - balanceOptionDebitRounding: "balanceOptionDebitRounding", - createdAt: "2024-01-15T09:30:00Z", - deletedAt: "deletedAt", - description: "description", - id: "id", - imageRef: "imageRef", - maxAmount: 1.1, - maxCreditAmountLimit: 1.1, - maxDebitAmountLimit: 1.1, - meta: { - key: "value", - }, - minAmount: 1.1, - name: "name", - unit: "unit", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("getBalanceDefinition (2)", async () => { @@ -724,30 +640,7 @@ describe("BalanceClient", () => { name: "name", unit: "POINTS", }); - expect(response).toEqual({ - balanceAvailabilityDurationModifier: "startOfPeriod", - balanceAvailabilityDurationUnit: "balanceAvailabilityDurationUnit", - balanceAvailabilityDurationValue: 1, - balanceExpirationDate: "2024-01-15T09:30:00Z", - balanceOptionAmountOvertakingStrategy: "balanceOptionAmountOvertakingStrategy", - balanceOptionCreditRounding: "balanceOptionCreditRounding", - balanceOptionDebitRounding: "balanceOptionDebitRounding", - createdAt: "2024-01-15T09:30:00Z", - deletedAt: "deletedAt", - description: "description", - id: "id", - imageRef: "imageRef", - maxAmount: 1.1, - maxCreditAmountLimit: 1.1, - maxDebitAmountLimit: 1.1, - meta: { - key: "value", - }, - minAmount: 1.1, - name: "name", - unit: "unit", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("updateBalanceDefinition (2)", async () => { @@ -1069,18 +962,7 @@ describe("BalanceClient", () => { transactionType: "credit", value: 1, }); - expect(response).toEqual({ - balanceDefinitionId: "balanceDefinitionId", - constraintType: "constraintType", - createdAt: "createdAt", - durationUnit: "durationUnit", - durationValue: 1, - id: "id", - slidingSchedule: true, - transactionType: "transactionType", - updatedAt: "updatedAt", - value: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("createBalanceLimit (2)", async () => { @@ -1283,18 +1165,7 @@ describe("BalanceClient", () => { bdid: "bdid", blid: "blid", }); - expect(response).toEqual({ - balanceDefinitionId: "balanceDefinitionId", - constraintType: "constraintType", - createdAt: "createdAt", - durationUnit: "durationUnit", - durationValue: 1, - id: "id", - slidingSchedule: true, - transactionType: "transactionType", - updatedAt: "updatedAt", - value: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("getBalanceLimit (2)", async () => { @@ -1454,18 +1325,7 @@ describe("BalanceClient", () => { transactionType: "credit", value: 1, }); - expect(response).toEqual({ - balanceDefinitionId: "balanceDefinitionId", - constraintType: "constraintType", - createdAt: "createdAt", - durationUnit: "durationUnit", - durationValue: 1, - id: "id", - slidingSchedule: true, - transactionType: "transactionType", - updatedAt: "updatedAt", - value: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("updateBalanceLimit (2)", async () => { @@ -1801,19 +1661,7 @@ describe("BalanceClient", () => { const response = await client.balance.getContactBalances({ pid: "pid", }); - expect(response).toEqual({ - balanceDefinitionId: "balanceDefinitionId", - balances: [ - { - contactId: 1, - loyaltySubscriptionId: "loyaltySubscriptionId", - updatedAt: "updatedAt", - value: 1.1, - }, - ], - count: 1, - loyaltyProgramId: "loyaltyProgramId", - }); + expect(response).toEqual(rawResponseBody); }); test("getContactBalances (2)", async () => { @@ -1963,22 +1811,7 @@ describe("BalanceClient", () => { dueAt: "dueAt", source: "source", }); - expect(response).toEqual({ - amount: 1.1, - balanceDefinitionId: "balanceDefinitionId", - contactId: 1, - createdAt: "createdAt", - dueAt: "dueAt", - expiresAt: "expiresAt", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - processedAt: "processedAt", - transactionid: "transactionid", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("createBalanceOrder (2)", async () => { @@ -2131,14 +1964,7 @@ describe("BalanceClient", () => { pid: "pid", cid: "cid", }); - expect(response).toEqual({ - balance: [ - { - balanceDefinitionId: "balanceDefinitionId", - value: 1.1, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSubscriptionBalances (2)", async () => { @@ -2281,17 +2107,7 @@ describe("BalanceClient", () => { cid: "cid", balanceDefinitionId: "balanceDefinitionId", }); - expect(response).toEqual({ - amount: 1.1, - balanceDefinitionId: "balanceDefinitionId", - consumedAt: "consumedAt", - contactId: 1, - createdAt: "createdAt", - expiresAt: "expiresAt", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - organizationId: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("createSubscriptionBalances (2)", async () => { @@ -2452,28 +2268,7 @@ describe("BalanceClient", () => { contactId: 1, balanceDefinitionId: "balanceDefinitionId", }); - expect(response).toEqual({ - balanceDefinitionId: "balanceDefinitionId", - contactId: 1, - count: 1, - loyaltyProgramId: "loyaltyProgramId", - transactionHistory: [ - { - amount: 1.1, - balanceExpirationDate: "balanceExpirationDate", - cancelledAt: "cancelledAt", - completedAt: "completedAt", - createdAt: "createdAt", - id: "id", - meta: { - key: "value", - }, - rejectReason: "rejectReason", - rejectedAt: "rejectedAt", - status: "status", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getTransactionHistoryApi (2)", async () => { @@ -2627,25 +2422,7 @@ describe("BalanceClient", () => { amount: 1.1, balanceDefinitionId: "balanceDefinitionId", }); - expect(response).toEqual({ - amount: 1.1, - balanceDefinitionId: "balanceDefinitionId", - cancelledAt: "cancelledAt", - completedAt: "completedAt", - contactId: 1, - createdAt: "createdAt", - eventTime: "eventTime", - expirationDate: "expirationDate", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rejectReason: "rejectReason", - rejectedAt: "rejectedAt", - status: "status", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("beginTransaction (2)", async () => { @@ -2802,25 +2579,7 @@ describe("BalanceClient", () => { pid: "pid", tid: "tid", }); - expect(response).toEqual({ - amount: 1.1, - balanceDefinitionId: "balanceDefinitionId", - cancelledAt: "cancelledAt", - completedAt: "completedAt", - contactId: 1, - createdAt: "createdAt", - eventTime: "eventTime", - expirationDate: "expirationDate", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rejectReason: "rejectReason", - rejectedAt: "rejectedAt", - status: "status", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("cancelTransaction (2)", async () => { @@ -2967,25 +2726,7 @@ describe("BalanceClient", () => { pid: "pid", tid: "tid", }); - expect(response).toEqual({ - amount: 1.1, - balanceDefinitionId: "balanceDefinitionId", - cancelledAt: "cancelledAt", - completedAt: "completedAt", - contactId: 1, - createdAt: "createdAt", - eventTime: "eventTime", - expirationDate: "expirationDate", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rejectReason: "rejectReason", - rejectedAt: "rejectedAt", - status: "status", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("completeTransaction (2)", async () => { diff --git a/tests/wire/companies.test.ts b/tests/wire/companies.test.ts index ee90cfc..0913181 100644 --- a/tests/wire/companies.test.ts +++ b/tests/wire/companies.test.ts @@ -37,30 +37,7 @@ describe("CompaniesClient", () => { server.mockEndpoint().get("/companies").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.companies.getAllCompanies(); - expect(response).toEqual({ - items: [ - { - attributes: { - created_at: "2022-01-13T19:04:24.376+05:30", - domain: "xyz", - last_updated_at: "2022-04-01T18:47:48.283+05:30", - name: "text", - number_of_contacts: 0, - owner: "62260474111b1101704a9d85", - owner_assign_date: "2022-04-01T18:21:13.379+05:30", - phone_number: 8171844192, - revenue: 10, - }, - id: "629475917295261d9b1f4403", - linkedContactsIds: [1, 2, 3], - linkedDealsIds: [ - "61a5ce58c5d4795761045990", - "61a5ce58c5d4795761045991", - "61a5ce58c5d4795761045992", - ], - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAllCompanies (2)", async () => { @@ -94,9 +71,7 @@ describe("CompaniesClient", () => { const response = await client.companies.createACompany({ name: "company", }); - expect(response).toEqual({ - id: "61a5cd07ca1347c82306ad06", - }); + expect(response).toEqual(rawResponseBody); }); test("createACompany (2)", async () => { @@ -188,22 +163,7 @@ describe("CompaniesClient", () => { const response = await client.companies.getACompany({ id: "id", }); - expect(response).toEqual({ - attributes: { - created_at: "2022-01-13T19:04:24.376+05:30", - domain: "xyz", - last_updated_at: "2022-04-01T18:47:48.283+05:30", - name: "text", - number_of_contacts: 0, - owner: "62260474111b1101704a9d85", - owner_assign_date: "2022-04-01T18:21:13.379+05:30", - phone_number: 8171844192, - revenue: 10, - }, - id: "629475917295261d9b1f4403", - linkedContactsIds: [1, 2, 3], - linkedDealsIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - }); + expect(response).toEqual(rawResponseBody); }); test("getACompany (2)", async () => { @@ -311,22 +271,7 @@ describe("CompaniesClient", () => { const response = await client.companies.updateACompany({ id: "id", }); - expect(response).toEqual({ - attributes: { - created_at: "2022-01-13T19:04:24.376+05:30", - domain: "xyz", - last_updated_at: "2022-04-01T18:47:48.283+05:30", - name: "text", - number_of_contacts: 0, - owner: "62260474111b1101704a9d85", - owner_assign_date: "2022-04-01T18:21:13.379+05:30", - phone_number: 8171844192, - revenue: 10, - }, - id: "629475917295261d9b1f4403", - linkedContactsIds: [1, 2, 3], - linkedDealsIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - }); + expect(response).toEqual(rawResponseBody); }); test("updateACompany (2)", async () => { @@ -393,9 +338,7 @@ describe("CompaniesClient", () => { label: "Attribute Label", objectType: "companies", }); - expect(response).toEqual({ - id: "61a5cd07ca1347c82306ad07", - }); + expect(response).toEqual(rawResponseBody); }); test("createACompanyDealAttribute (2)", async () => { @@ -562,19 +505,6 @@ describe("CompaniesClient", () => { .build(); const response = await client.companies.getCompanyAttributes(); - expect(response).toEqual([ - { - attributeOptions: [ - { - key: "custom key", - value: "custom label", - }, - ], - attributeTypeName: "text", - internalName: "name", - isRequired: true, - label: "Company Name", - }, - ]); + expect(response).toEqual(rawResponseBody); }); }); diff --git a/tests/wire/contacts.test.ts b/tests/wire/contacts.test.ts index 3a16f97..2eb22f7 100644 --- a/tests/wire/contacts.test.ts +++ b/tests/wire/contacts.test.ts @@ -40,33 +40,7 @@ describe("ContactsClient", () => { server.mockEndpoint().get("/contacts").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.contacts.getContacts(); - expect(response).toEqual({ - contacts: [ - { - attributes: {}, - createdAt: "2017-05-01T17:05:03Z", - email: "contact1@example.com", - emailBlacklisted: true, - id: 247, - listIds: [43, 58], - listUnsubscribed: [1000000], - modifiedAt: "2017-05-01T17:05:03Z", - smsBlacklisted: true, - }, - { - attributes: {}, - createdAt: "2017-05-01T17:05:03Z", - email: "33058407248@mailin-sms.com", - emailBlacklisted: true, - id: 245, - listIds: [43, 61, 58], - listUnsubscribed: [1000000], - modifiedAt: "2017-05-01T17:05:03Z", - smsBlacklisted: false, - }, - ], - count: 3, - }); + expect(response).toEqual(rawResponseBody); }); test("getContacts (2)", async () => { @@ -111,9 +85,7 @@ describe("ContactsClient", () => { .build(); const response = await client.contacts.createContact(); - expect(response).toEqual({ - id: 21, - }); + expect(response).toEqual(rawResponseBody); }); test("createContact (2)", async () => { @@ -226,96 +198,7 @@ describe("ContactsClient", () => { .build(); const response = await client.contacts.getAttributes(); - expect(response).toEqual({ - attributes: [ - { - calculatedValue: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", - category: "normal", - enumeration: [ - { - label: "Women", - value: 1, - }, - ], - multiCategoryOptions: ["USA"], - name: "LASTNAME", - type: "text", - }, - { - calculatedValue: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", - category: "normal", - enumeration: [ - { - label: "Women", - value: 1, - }, - ], - multiCategoryOptions: ["USA"], - name: "FIRSTNAME", - type: "text", - }, - { - calculatedValue: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", - category: "normal", - enumeration: [ - { - label: "Women", - value: 1, - }, - ], - multiCategoryOptions: ["USA"], - name: "DOB", - type: "date", - }, - { - calculatedValue: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", - category: "category", - enumeration: [ - { - label: "Men", - value: 1, - }, - { - label: "Women", - value: 2, - }, - { - label: "Kid", - value: 3, - }, - ], - multiCategoryOptions: ["USA"], - name: "GENDER", - type: "text", - }, - { - calculatedValue: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", - category: "normal", - enumeration: [ - { - label: "Women", - value: 1, - }, - ], - multiCategoryOptions: ["USA"], - name: "BDO", - type: "user", - }, - { - calculatedValue: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", - category: "normal", - enumeration: [ - { - label: "Women", - value: 1, - }, - ], - multiCategoryOptions: ["USA", "India", "France"], - name: "COUNTRY", - type: "multiple-choice", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("createAttribute (1)", async () => { @@ -655,9 +538,7 @@ describe("ContactsClient", () => { const response = await client.contacts.requestContactExport({ customContactFilter: {}, }); - expect(response).toEqual({ - processId: 78, - }); + expect(response).toEqual(rawResponseBody); }); test("requestContactExport (2)", async () => { @@ -719,25 +600,7 @@ describe("ContactsClient", () => { server.mockEndpoint().get("/contacts/folders").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.contacts.getFolders(); - expect(response).toEqual({ - count: 2, - folders: [ - { - id: 42, - name: "Ninja_Form", - totalBlacklisted: 98, - totalSubscribers: 4567, - uniqueSubscribers: 4665, - }, - { - id: 29, - name: "Prestashop", - totalBlacklisted: 10, - totalSubscribers: 6543, - uniqueSubscribers: 6553, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getFolders (2)", async () => { @@ -769,9 +632,7 @@ describe("ContactsClient", () => { .build(); const response = await client.contacts.createFolder({}); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createFolder (2)", async () => { @@ -817,13 +678,7 @@ describe("ContactsClient", () => { const response = await client.contacts.getFolder({ folderId: 1000000, }); - expect(response).toEqual({ - id: 1, - name: "Client_Folder", - totalBlacklisted: 987, - totalSubscribers: 16778, - uniqueSubscribers: 17765, - }); + expect(response).toEqual(rawResponseBody); }); test("getFolder (2)", async () => { @@ -1012,32 +867,7 @@ describe("ContactsClient", () => { const response = await client.contacts.getFolderLists({ folderId: 1000000, }); - expect(response).toEqual({ - count: 3, - lists: [ - { - id: 46, - name: "Reactiv", - totalBlacklisted: 0, - totalSubscribers: 7655, - uniqueSubscribers: 7655, - }, - { - id: 41, - name: "NY_Area", - totalBlacklisted: 23, - totalSubscribers: 3654, - uniqueSubscribers: 3677, - }, - { - id: 22, - name: "VIP_Customer", - totalBlacklisted: 72, - totalSubscribers: 8753, - uniqueSubscribers: 8826, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getFolderLists (2)", async () => { @@ -1098,9 +928,7 @@ describe("ContactsClient", () => { .build(); const response = await client.contacts.importContacts(); - expect(response).toEqual({ - processId: 78, - }); + expect(response).toEqual(rawResponseBody); }); test("importContacts (2)", async () => { @@ -1152,27 +980,7 @@ describe("ContactsClient", () => { server.mockEndpoint().get("/contacts/lists").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.contacts.getLists(); - expect(response).toEqual({ - count: 2, - lists: [ - { - id: 53, - name: "Spanish_Speakers", - totalBlacklisted: 65, - totalSubscribers: 5432, - uniqueSubscribers: 5497, - folderId: 1, - }, - { - id: 50, - name: "Other", - totalBlacklisted: 765, - totalSubscribers: 10976, - uniqueSubscribers: 11741, - folderId: 2, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getLists (2)", async () => { @@ -1207,9 +1015,7 @@ describe("ContactsClient", () => { folderId: 2, name: "Magento Customer - ES", }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createList (2)", async () => { @@ -1309,64 +1115,7 @@ describe("ContactsClient", () => { const response = await client.contacts.getList({ listId: 1000000, }); - expect(response).toEqual({ - id: 12, - name: "Newsletter_Weekly", - totalBlacklisted: 63, - totalSubscribers: 6533, - uniqueSubscribers: 6596, - campaignStats: [ - { - campaignId: 15, - stats: { - appleMppOpens: 10, - clickers: 789, - complaints: 0, - deferred: 0, - delivered: 6632, - estimatedViews: 560, - hardBounces: 4, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 6645, - softBounces: 34, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 701, - uniqueViews: 3442, - unsubscriptions: 4, - viewed: 4322, - }, - }, - { - campaignId: 45, - stats: { - appleMppOpens: 10, - clickers: 788, - complaints: 1, - deferred: 0, - delivered: 4078, - estimatedViews: 560, - hardBounces: 2, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 4334, - softBounces: 18, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 654, - uniqueViews: 987, - unsubscriptions: 4, - viewed: 1555, - }, - }, - ], - createdAt: "2016-02-26T11:56:08Z", - dynamicList: false, - folderId: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("getList (2)", async () => { @@ -1582,44 +1331,7 @@ describe("ContactsClient", () => { const response = await client.contacts.getContactsFromList({ listId: 1000000, }); - expect(response).toEqual({ - contacts: [ - { - attributes: {}, - createdAt: "2017-05-12T12:30:00Z", - email: "alex.pain@example.com", - emailBlacklisted: false, - id: 45, - listIds: [12, 9, 20], - listUnsubscribed: [1, 2], - modifiedAt: "2017-05-12T12:30:00Z", - smsBlacklisted: true, - }, - { - attributes: {}, - createdAt: "2017-05-12T12:30:00Z", - email: "john.smith@example.com", - emailBlacklisted: true, - id: 32, - listIds: [12], - listUnsubscribed: [1], - modifiedAt: "2017-05-12T12:30:00Z", - smsBlacklisted: false, - }, - { - attributes: {}, - createdAt: "2017-05-12T12:30:00Z", - email: "helen.rose@example.com", - emailBlacklisted: true, - id: 65, - listIds: [12, 9, 20], - listUnsubscribed: [1], - modifiedAt: "2017-05-12T12:30:00Z", - smsBlacklisted: false, - }, - ], - count: 17655, - }); + expect(response).toEqual(rawResponseBody); }); test("getContactsFromList (2)", async () => { @@ -1692,14 +1404,7 @@ describe("ContactsClient", () => { emails: ["jeff32@example.com", "jim56@example.com"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("addContactToList (2)", async () => { @@ -1730,14 +1435,7 @@ describe("ContactsClient", () => { extIds: ["ext234", "ext456"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("addContactToList (3)", async () => { @@ -1768,14 +1466,7 @@ describe("ContactsClient", () => { ids: [1, 2], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("addContactToList (4)", async () => { @@ -1806,14 +1497,7 @@ describe("ContactsClient", () => { emails: ["jeff32@example.com", "jim56@example.com"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("addContactToList (5)", async () => { @@ -1844,14 +1528,7 @@ describe("ContactsClient", () => { emails: ["jeff32@example.com", "jim56@example.com"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("addContactToList (6)", async () => { @@ -1882,14 +1559,7 @@ describe("ContactsClient", () => { emails: ["jeff32@example.com", "jim56@example.com"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("addContactToList (7)", async () => { @@ -1966,14 +1636,7 @@ describe("ContactsClient", () => { all: true, }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (2)", async () => { @@ -2004,14 +1667,7 @@ describe("ContactsClient", () => { emails: ["jeff32@example.com", "jim56@example.com"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (3)", async () => { @@ -2042,14 +1698,7 @@ describe("ContactsClient", () => { extIds: ["ext234", "ext456"], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (4)", async () => { @@ -2080,14 +1729,7 @@ describe("ContactsClient", () => { ids: [1, 2], }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (5)", async () => { @@ -2118,14 +1760,7 @@ describe("ContactsClient", () => { all: true, }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (6)", async () => { @@ -2156,14 +1791,7 @@ describe("ContactsClient", () => { all: true, }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (7)", async () => { @@ -2194,14 +1822,7 @@ describe("ContactsClient", () => { all: true, }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (8)", async () => { @@ -2232,14 +1853,7 @@ describe("ContactsClient", () => { all: true, }, }); - expect(response).toEqual({ - contacts: { - failure: ["jeff32@example.com, jim56@example.com"], - processId: 78, - success: ["success"], - total: 27, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("removeContactFromList (9)", async () => { @@ -2303,23 +1917,7 @@ describe("ContactsClient", () => { server.mockEndpoint().get("/contacts/segments").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.contacts.getSegments(); - expect(response).toEqual({ - count: 2, - segments: [ - { - categoryName: "Name1", - id: 53, - segmentName: "Segment1", - updatedAt: "2017-03-12T12:30:00Z", - }, - { - categoryName: "Name2", - id: 50, - segmentName: "Segment2", - updatedAt: "2017-03-12T12:30:00Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSegments (2)", async () => { @@ -2394,96 +1992,7 @@ describe("ContactsClient", () => { const response = await client.contacts.getContactInfo({ identifier: "identifier", }); - expect(response).toEqual({ - attributes: {}, - createdAt: "2017-05-02T16:40:31Z", - email: "peggy.rain@example.com", - emailBlacklisted: false, - id: 42, - listIds: [40], - listUnsubscribed: [1000000], - modifiedAt: "2017-05-02T16:40:31Z", - smsBlacklisted: false, - statistics: { - clicked: [ - { - campaignId: 21, - links: [ - { - count: 2, - eventTime: "2016-05-03T21:25:01Z", - ip: "66.249.93.118", - url: "https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email", - }, - ], - }, - ], - complaints: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - }, - ], - delivered: [ - { - campaignId: 21, - eventTime: "2016-05-03T21:24:56Z", - }, - ], - hardBounces: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - }, - ], - messagesSent: [ - { - campaignId: 21, - eventTime: "2016-05-03T20:15:13Z", - }, - { - campaignId: 42, - eventTime: "2016-10-17T10:30:01Z", - }, - ], - opened: [ - { - campaignId: 21, - count: 2, - eventTime: "2016-05-03T21:24:56Z", - ip: "66.249.93.118", - }, - { - campaignId: 68, - count: 1, - eventTime: "2017-01-30T13:56:40Z", - ip: "66.249.93.217", - }, - ], - softBounces: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - }, - ], - transacAttributes: [{}], - unsubscriptions: { - adminUnsubscription: [ - { - eventTime: "2017-03-12T20:15:13Z", - ip: "165.87.3.15", - }, - ], - userUnsubscription: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - ip: "165.87.3.15", - }, - ], - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getContactInfo (2)", async () => { @@ -2737,95 +2246,7 @@ describe("ContactsClient", () => { const response = await client.contacts.getContactStats({ identifier: "identifier", }); - expect(response).toEqual({ - clicked: [ - { - campaignId: 21, - links: [ - { - count: 2, - eventTime: "2016-05-03T21:25:01Z", - ip: "66.249.93.118", - url: "https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email", - }, - ], - }, - ], - complaints: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - }, - ], - delivered: [ - { - campaignId: 21, - eventTime: "2016-05-03T21:24:56Z", - }, - ], - hardBounces: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - }, - ], - messagesSent: [ - { - campaignId: 21, - eventTime: "2016-05-03T20:15:13Z", - }, - { - campaignId: 42, - eventTime: "2016-10-17T10:30:01Z", - }, - { - campaignId: 45, - eventTime: "2016-11-09T11:45:02Z", - }, - ], - opened: [ - { - campaignId: 21, - count: 2, - eventTime: "2016-05-03T21:24:56Z", - ip: "66.249.93.118", - }, - { - campaignId: 45, - count: 1, - eventTime: "2017-01-30T13:56:40Z", - ip: "66.249.93.217", - }, - ], - softBounces: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - }, - ], - transacAttributes: [ - { - orderDate: "2017-03-12", - orderId: 248, - orderPrice: 24.99, - }, - ], - unsubscriptions: { - adminUnsubscription: [ - { - eventTime: "2017-03-12T20:15:13Z", - ip: "165.87.3.15", - }, - ], - userUnsubscription: [ - { - campaignId: 3, - eventTime: "2017-03-12T20:15:13Z", - ip: "165.87.3.15", - }, - ], - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getContactStats (2)", async () => { diff --git a/tests/wire/conversations.test.ts b/tests/wire/conversations.test.ts index cba337d..964985e 100644 --- a/tests/wire/conversations.test.ts +++ b/tests/wire/conversations.test.ts @@ -141,81 +141,7 @@ describe("ConversationsClient", () => { text: "Hello! How can I help you?", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1482512803740, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Hello! How can I help you?", - id: "eYBEm3gq3zc5ayE2g", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: false, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Hello! How can I help you?", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("sendAMessageAsAnAgent (2)", async () => { @@ -294,81 +220,7 @@ describe("ConversationsClient", () => { text: "Hello! How can I help you?", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1482512803740, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Hello! How can I help you?", - id: "eYBEm3gq3zc5ayE2g", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: false, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Hello! How can I help you?", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("sendAMessageAsAnAgent (3)", async () => { @@ -445,81 +297,7 @@ describe("ConversationsClient", () => { text: "Hello! How can I help you?", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1482512803740, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Hello! How can I help you?", - id: "eYBEm3gq3zc5ayE2g", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: false, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Hello! How can I help you?", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("sendAMessageAsAnAgent (4)", async () => { @@ -614,81 +392,7 @@ describe("ConversationsClient", () => { const response = await client.conversations.getAMessage({ id: "id", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1482512803740, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Hello! How can I help you?", - id: "eYBEm3gq3zc5ayE2g", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: false, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Hello! How can I help you?", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("getAMessage (2)", async () => { @@ -800,81 +504,7 @@ describe("ConversationsClient", () => { id: "id", text: "Good morning! How can I help you?", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1482512803740, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Hello! How can I help you?", - id: "eYBEm3gq3zc5ayE2g", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: false, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Hello! How can I help you?", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("updateAMessageSentByAnAgent (2)", async () => { @@ -982,74 +612,10 @@ describe("ConversationsClient", () => { const client = new BrevoClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { groupId: "PjRBMhWGen6aRHjif", - text: "Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }; - const rawResponseBody = { - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [{ email: "email", name: "name" }], - cc: [{ email: "email", name: "name" }], - createdAt: 1470222622433, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { error: "error", isSuccess: true }, - from: { email: "email", name: "name" }, - html: "Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", - id: "AXCR3k9bpSY7bpuh7", - integrations: { key: "value" }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: true, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { email: "email", name: "name" }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", - to: [{ email: "email", name: "name" }], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }; - - server - .mockEndpoint() - .post("/conversations/pushedMessages") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.conversations.sendAnAutomatedMessageToAVisitor({ - groupId: "PjRBMhWGen6aRHjif", - text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", + text: "Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); - expect(response).toEqual({ + }; + const rawResponseBody = { agentId: "d9nKoegKSjmCtyK78", agentName: "Liz", agentUserpic: "https://www.brevo.com/", @@ -1063,18 +629,8 @@ describe("ConversationsClient", () => { url: "url", }, ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], + bcc: [{ email: "email", name: "name" }], + cc: [{ email: "email", name: "name" }], createdAt: 1470222622433, file: { filename: "conversations.png", @@ -1088,19 +644,11 @@ describe("ConversationsClient", () => { size: 15538, url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", + forwardedToSourceStatus: { error: "error", isSuccess: true }, + from: { email: "email", name: "name" }, + html: "Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", id: "AXCR3k9bpSY7bpuh7", - integrations: { - key: "value", - }, + integrations: { key: "value" }, isBot: true, isMissed: false, isMissedByVisitor: false, @@ -1108,22 +656,30 @@ describe("ConversationsClient", () => { isTrigger: false, rawUnsafeHtml: "Good morning!
How can I help you?", receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, + replyTo: { email: "email", name: "name" }, sourceMessageId: "sourceMessageId", subject: "Invitation to a meeting", - text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - to: [ - { - email: "email", - name: "name", - }, - ], + text: "Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88", + to: [{ email: "email", name: "name" }], type: "agent", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", + }; + + server + .mockEndpoint() + .post("/conversations/pushedMessages") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.conversations.sendAnAutomatedMessageToAVisitor({ + groupId: "PjRBMhWGen6aRHjif", + text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", + visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", }); + expect(response).toEqual(rawResponseBody); }); test("sendAnAutomatedMessageToAVisitor (2)", async () => { @@ -1196,81 +752,7 @@ describe("ConversationsClient", () => { text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1470222622433, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - id: "AXCR3k9bpSY7bpuh7", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: true, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("sendAnAutomatedMessageToAVisitor (3)", async () => { @@ -1345,81 +827,7 @@ describe("ConversationsClient", () => { text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1470222622433, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - id: "AXCR3k9bpSY7bpuh7", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: true, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("sendAnAutomatedMessageToAVisitor (4)", async () => { @@ -1514,81 +922,7 @@ describe("ConversationsClient", () => { const response = await client.conversations.getAnAutomatedMessage({ id: "id", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1470222622433, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - id: "AXCR3k9bpSY7bpuh7", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: true, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 3325 9667 4328 88", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("getAnAutomatedMessage (2)", async () => { @@ -1702,81 +1036,7 @@ describe("ConversationsClient", () => { id: "id", text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 4668 7775 9233 54", }); - expect(response).toEqual({ - agentId: "d9nKoegKSjmCtyK78", - agentName: "Liz", - agentUserpic: "https://www.brevo.com/", - attachments: [ - { - fileName: "fileName", - inlineId: "inlineId", - isImage: true, - isInline: "isInline", - size: 1000000, - url: "url", - }, - ], - bcc: [ - { - email: "email", - name: "name", - }, - ], - cc: [ - { - email: "email", - name: "name", - }, - ], - createdAt: 1470222622433, - file: { - filename: "conversations.png", - imageInfo: { - height: 525, - previewUrl: - "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/", - width: 1129, - }, - isImage: true, - size: 15538, - url: "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/", - }, - forwardedToSourceStatus: { - error: "error", - isSuccess: true, - }, - from: { - email: "email", - name: "name", - }, - html: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 4668 7775 9233 54", - id: "AXCR3k9bpSY7bpuh7", - integrations: { - key: "value", - }, - isBot: true, - isMissed: false, - isMissedByVisitor: false, - isPushed: true, - isTrigger: false, - rawUnsafeHtml: "Good morning!
How can I help you?", - receivedFrom: "SuperAwesomeHelpdesk", - replyTo: { - email: "email", - name: "name", - }, - sourceMessageId: "sourceMessageId", - subject: "Invitation to a meeting", - text: "Your order has shipped! Here\u2019s your tracking number: 9114 5847 4668 7775 9233 54", - to: [ - { - email: "email", - name: "name", - }, - ], - type: "agent", - visitorId: "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg", - }); + expect(response).toEqual(rawResponseBody); }); test("updateAnAutomatedMessage (2)", async () => { @@ -1897,10 +1157,7 @@ describe("ConversationsClient", () => { const response = await client.conversations.setVisitorGroupAssignment({ groupId: "PjRBMhWGen6aRHjif", }); - expect(response).toEqual({ - groupId: "PjRBMhWGen6aRHjif", - visitorId: "AXCR3k9bpSY7bpuh7", - }); + expect(response).toEqual(rawResponseBody); }); test("setVisitorGroupAssignment (2)", async () => { diff --git a/tests/wire/coupons.test.ts b/tests/wire/coupons.test.ts index 09de542..2451260 100644 --- a/tests/wire/coupons.test.ts +++ b/tests/wire/coupons.test.ts @@ -24,17 +24,7 @@ describe("CouponsClient", () => { server.mockEndpoint().get("/couponCollections").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.coupons.getCouponCollections(); - expect(response).toEqual({ - createdAt: "2023-01-06T05:03:47Z", - defaultCoupon: "10 OFF", - expirationDate: "2024-01-01T00:00:00Z", - id: "23befbae-1505-47a8-bd27-e30ef739f32c", - name: "SummerPromotions", - remainingCoupons: 5000, - remainingCouponsAlert: 5, - remainingDaysAlert: 5, - totalCoupons: 10000, - }); + expect(response).toEqual(rawResponseBody); }); test("getCouponCollections (2)", async () => { @@ -82,9 +72,7 @@ describe("CouponsClient", () => { defaultCoupon: "Winter", name: "10%OFF", }); - expect(response).toEqual({ - id: "23befbae-1505-47a8-bd27-e30ef739f32c", - }); + expect(response).toEqual(rawResponseBody); }); test("createCouponCollection (2)", async () => { @@ -160,17 +148,7 @@ describe("CouponsClient", () => { const response = await client.coupons.getCouponCollection({ id: "id", }); - expect(response).toEqual({ - createdAt: "2023-01-06T05:03:47Z", - defaultCoupon: "10 OFF", - expirationDate: "2024-01-01T00:00:00Z", - id: "23befbae-1505-47a8-bd27-e30ef739f32c", - name: "SummerPromotions", - remainingCoupons: 5000, - remainingCouponsAlert: 5, - remainingDaysAlert: 5, - totalCoupons: 10000, - }); + expect(response).toEqual(rawResponseBody); }); test("getCouponCollection (2)", async () => { @@ -258,11 +236,7 @@ describe("CouponsClient", () => { const response = await client.coupons.updateCouponCollection({ id: "id", }); - expect(response).toEqual({ - defaultCoupon: "10 OFF", - id: "23befbae-1505-47a8-bd27-e30ef739f32c", - name: "SummerPromotions", - }); + expect(response).toEqual(rawResponseBody); }); test("updateCouponCollection (2)", async () => { diff --git a/tests/wire/customObjects.test.ts b/tests/wire/customObjects.test.ts index e4342da..6a6779b 100644 --- a/tests/wire/customObjects.test.ts +++ b/tests/wire/customObjects.test.ts @@ -24,10 +24,7 @@ describe("CustomObjectsClient", () => { object_type: "vehicle", records: [{}], }); - expect(response).toEqual({ - message: "Batch object records are being processed", - processId: 21, - }); + expect(response).toEqual(rawResponseBody); }); test("upsertrecords (2)", async () => { @@ -152,38 +149,7 @@ describe("CustomObjectsClient", () => { limit: 1000000, page_num: 1000000, }); - expect(response).toEqual({ - count: 350, - records: [ - { - associations: [ - { - object_type: "garage", - records: [ - { - identifiers: { - id: 12345, - }, - }, - ], - }, - ], - attributes: { - color: "Black", - engine_type: "Hybrid", - make: "Toyoto", - model: "Corolla", - year: 2020, - }, - createdAt: "2025-07-22T10:20:30Z", - identifiers: { - ext_id: "507f1f77bc", - id: 16789, - }, - updatedAt: "2025-07-22T10:20:30Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getrecords (2)", async () => { @@ -299,10 +265,7 @@ describe("CustomObjectsClient", () => { ext_ids: ["ext-001", "ext-002"], }, }); - expect(response).toEqual({ - processId: 21, - message: "Batch object records are being processed for deletion.", - }); + expect(response).toEqual(rawResponseBody); }); test("batchDeleteObjectRecords (2)", async () => { diff --git a/tests/wire/deals.test.ts b/tests/wire/deals.test.ts index 2c98dfc..a22f7fb 100644 --- a/tests/wire/deals.test.ts +++ b/tests/wire/deals.test.ts @@ -28,20 +28,7 @@ describe("DealsClient", () => { .build(); const response = await client.deals.getDealAttributes(); - expect(response).toEqual([ - { - attributeOptions: [ - { - key: "custom key", - value: "custom label", - }, - ], - attributeTypeName: "text", - internalName: "deal_name", - isRequired: true, - label: "Deal Name", - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getAllDeals (1)", async () => { @@ -78,32 +65,7 @@ describe("DealsClient", () => { server.mockEndpoint().get("/crm/deals").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.deals.getAllDeals(); - expect(response).toEqual({ - items: [ - { - attributes: { - amount: 12, - created_at: "2022-05-30T07:42:05.671Z", - deal_name: "testname", - deal_owner: "6093d2425a9b436e9519d034", - deal_stage: "9e577ff7-8e42-4ab3-be26-2b5e01b42518", - last_activity_date: "2022-06-06T08:38:36.000Z", - last_updated_date: "2022-06-06T08:38:36.761Z", - number_of_activities: 0, - number_of_contacts: 1, - pipeline: "6093d296ad1e9c5cf2140a58", - stage_updated_at: "2022-05-30T07:42:05.671Z", - }, - id: "629475917295261d9b1f4403", - linkedCompaniesIds: [ - "61a5ce58c5d4795761045990", - "61a5ce58c5d4795761045991", - "61a5ce58c5d4795761045992", - ], - linkedContactsIds: [1, 2, 3], - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAllDeals (2)", async () => { @@ -137,9 +99,7 @@ describe("DealsClient", () => { const response = await client.deals.createADeal({ name: "Deal: Connect with company", }); - expect(response).toEqual({ - id: "61a5cd07ca1347c82306ad06", - }); + expect(response).toEqual(rawResponseBody); }); test("createADeal (2)", async () => { @@ -234,27 +194,7 @@ describe("DealsClient", () => { const response = await client.deals.getADeal({ id: "id", }); - expect(response).toEqual({ - attributes: { - amount: 12, - created_at: "2022-05-30T07:42:05.671Z", - deal_name: "testname", - deal_owner: "6093d2425a9b436e9519d034", - deal_stage: "9e577ff7-8e42-4ab3-be26-2b5e01b42518", - last_activity_date: "2022-06-06T08:38:36.000Z", - last_updated_date: "2022-06-06T08:38:36.761Z", - next_activity_date: { - key: "value", - }, - number_of_activities: 0, - number_of_contacts: 1, - pipeline: "6093d296ad1e9c5cf2140a58", - stage_updated_at: "2022-05-30T07:42:05.671Z", - }, - id: "629475917295261d9b1f4403", - linkedCompaniesIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - linkedContactsIds: [1, 2, 3], - }); + expect(response).toEqual(rawResponseBody); }); test("getADeal (2)", async () => { @@ -405,16 +345,7 @@ describe("DealsClient", () => { .build(); const response = await client.deals.getPipelineStages(); - expect(response).toEqual({ - pipeline: "5ea675e3da0dd085acaea610", - pipeline_name: "Sales Pipeline", - stages: [ - { - id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518", - name: "New", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAllPipelines (1)", async () => { @@ -438,18 +369,7 @@ describe("DealsClient", () => { .build(); const response = await client.deals.getAllPipelines(); - expect(response).toEqual([ - { - pipeline: "5ea675e3da0dd085acaea610", - pipeline_name: "Sales Pipeline", - stages: [ - { - id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518", - name: "New", - }, - ], - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getAllPipelines (2)", async () => { @@ -494,18 +414,7 @@ describe("DealsClient", () => { const response = await client.deals.getAPipeline({ pipelineID: "pipelineID", }); - expect(response).toEqual([ - { - pipeline: "5ea675e3da0dd085acaea610", - pipeline_name: "Sales Pipeline", - stages: [ - { - id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518", - name: "New", - }, - ], - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getAPipeline (2)", async () => { diff --git a/tests/wire/domains.test.ts b/tests/wire/domains.test.ts index fe2911e..1a563e7 100644 --- a/tests/wire/domains.test.ts +++ b/tests/wire/domains.test.ts @@ -57,50 +57,7 @@ describe("DomainsClient", () => { server.mockEndpoint().get("/senders/domains").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.domains.getDomains(); - expect(response).toEqual({ - domains: [ - { - id: "67e57b40130375f045064c45", - domain_name: "mycompany.com", - authenticated: true, - verified: true, - ip: "192.168.1.100", - provider: "Cloudflare", - creator: { - id: "62e4fce597550d0b0177cb0c", - email: "admin@mycompany.com", - creationDate: "2025-03-27T16:22:24Z", - }, - }, - { - id: "67f778570dd65f97c70910ed", - domain_name: "newsletter.mycompany.com", - authenticated: false, - verified: true, - provider: "GoDaddy", - creator: { - id: "62e4fce597550d0b0177cb0c", - email: "admin@mycompany.com", - creationDate: "2025-04-10T07:50:47Z", - }, - }, - { - id: "688cd306d8893504e50ea615", - domain_name: "test.example.com", - authenticated: false, - verified: false, - provider: "Other", - creator: { - id: "62e4fce597550d0b0177cb0c", - email: "admin@mycompany.com", - creationDate: "2025-08-01T14:45:26Z", - }, - }, - ], - count: 3, - current_page: 1, - total_pages: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("getDomains (2)", async () => { @@ -154,32 +111,7 @@ describe("DomainsClient", () => { const response = await client.domains.createDomain({ name: "mycompany.com", }); - expect(response).toEqual({ - id: 5, - domain_name: "mycompany.com", - domain_provider: "Cloudflare", - message: "Domain added successfully. To authenticate it, add following DNS records", - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=abc123def456", - status: false, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: false, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com", - status: false, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("createDomain (2)", async () => { @@ -220,32 +152,7 @@ describe("DomainsClient", () => { const response = await client.domains.createDomain({ name: "newsletter.mycompany.com", }); - expect(response).toEqual({ - id: 5, - domain_name: "mycompany.com", - domain_provider: "Cloudflare", - message: "Domain added successfully. To authenticate it, add following DNS records", - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=abc123def456", - status: false, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: false, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com", - status: false, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("createDomain (3)", async () => { @@ -286,32 +193,7 @@ describe("DomainsClient", () => { const response = await client.domains.createDomain({ name: "test.example.com", }); - expect(response).toEqual({ - id: 5, - domain_name: "mycompany.com", - domain_provider: "Cloudflare", - message: "Domain added successfully. To authenticate it, add following DNS records", - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=abc123def456", - status: false, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: false, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com", - status: false, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("createDomain (4)", async () => { @@ -352,32 +234,7 @@ describe("DomainsClient", () => { const response = await client.domains.createDomain({ name: "mycompany.com", }); - expect(response).toEqual({ - id: 5, - domain_name: "mycompany.com", - domain_provider: "Cloudflare", - message: "Domain added successfully. To authenticate it, add following DNS records", - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=abc123def456", - status: false, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: false, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com", - status: false, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("createDomain (5)", async () => { @@ -418,32 +275,7 @@ describe("DomainsClient", () => { const response = await client.domains.createDomain({ name: "mycompany.com", }); - expect(response).toEqual({ - id: 6, - domain_name: "example.com", - domain_provider: "GoDaddy", - message: "Domain added successfully. To authenticate it, add following DNS records", - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=xyz789abc123", - status: false, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: false, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com", - status: false, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("createDomain (6)", async () => { @@ -504,31 +336,7 @@ describe("DomainsClient", () => { const response = await client.domains.getDomainConfiguration({ domainName: "domainName", }); - expect(response).toEqual({ - domain: "mycompany.com", - verified: true, - authenticated: true, - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=abc123def456", - status: true, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: true, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=quarantine; rua=mailto:dmarc@mycompany.com", - status: true, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getDomainConfiguration (2)", async () => { @@ -567,31 +375,7 @@ describe("DomainsClient", () => { const response = await client.domains.getDomainConfiguration({ domainName: "domainName", }); - expect(response).toEqual({ - domain: "test.example.com", - verified: false, - authenticated: false, - dns_records: { - brevo_code: { - host_name: "@", - type: "TXT", - value: "brevo-code=xyz789abc123", - status: false, - }, - dkim_record: { - host_name: "mail._domainkey", - type: "TXT", - value: "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...", - status: true, - }, - dmarc_record: { - host_name: "_dmarc", - type: "TXT", - value: "v=DMARC1; p=none; rua=mailto:dmarc@example.com", - status: false, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getDomainConfiguration (3)", async () => { @@ -710,10 +494,7 @@ describe("DomainsClient", () => { const response = await client.domains.authenticateDomain({ domainName: "domainName", }); - expect(response).toEqual({ - domain_name: "mycompany.com", - message: "Domain has been authenticated successfully.", - }); + expect(response).toEqual(rawResponseBody); }); test("authenticateDomain (2)", async () => { @@ -736,10 +517,7 @@ describe("DomainsClient", () => { const response = await client.domains.authenticateDomain({ domainName: "domainName", }); - expect(response).toEqual({ - domain_name: "newsletter.example.com", - message: "Domain authentication completed. Your domain is now ready for sending.", - }); + expect(response).toEqual(rawResponseBody); }); test("authenticateDomain (3)", async () => { diff --git a/tests/wire/ecommerce.test.ts b/tests/wire/ecommerce.test.ts index 83a27c3..0235741 100644 --- a/tests/wire/ecommerce.test.ts +++ b/tests/wire/ecommerce.test.ts @@ -34,27 +34,7 @@ describe("EcommerceClient", () => { server.mockEndpoint().get("/categories").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.ecommerce.getCategories(); - expect(response).toEqual({ - categories: [ - { - createdAt: "2021-12-31T11:42:35.638Z", - id: "C19", - isDeleted: true, - modifiedAt: "2022-03-03T14:48:31.867Z", - name: "Food", - url: "http://mydomain.com/category/food", - }, - { - createdAt: "2021-12-31T11:42:35.638Z", - id: "C20", - isDeleted: true, - modifiedAt: "2022-03-03T14:48:31.867Z", - name: "clothing", - url: "http://mydomain.com/category/clothing", - }, - ], - count: 2, - }); + expect(response).toEqual(rawResponseBody); }); test("getCategories (2)", async () => { @@ -88,9 +68,7 @@ describe("EcommerceClient", () => { const response = await client.ecommerce.createUpdateCategory({ id: "CAT123", }); - expect(response).toEqual({ - id: 21, - }); + expect(response).toEqual(rawResponseBody); }); test("createUpdateCategory (2)", async () => { @@ -137,10 +115,7 @@ describe("EcommerceClient", () => { }, ], }); - expect(response).toEqual({ - createdCount: 2, - updatedCount: 7, - }); + expect(response).toEqual(rawResponseBody); }); test("createUpdateBatchCategory (2)", async () => { @@ -190,14 +165,7 @@ describe("EcommerceClient", () => { const response = await client.ecommerce.getCategoryInfo({ id: "id", }); - expect(response).toEqual({ - createdAt: "2017-05-12T12:30:00Z", - id: "C11", - isDeleted: true, - modifiedAt: "2017-05-12T12:30:00Z", - name: "Electronics", - url: "http://mydomain.com/category/clothing", - }); + expect(response).toEqual(rawResponseBody); }); test("getCategoryInfo (2)", async () => { @@ -302,29 +270,7 @@ describe("EcommerceClient", () => { periodFrom: "2022-01-02T00:00:00Z", periodTo: "2022-01-03T00:00:00Z", }); - expect(response).toEqual({ - results: [ - { - averageBasket: 3, - conversionSource: "email_campaign", - id: 1.1, - ordersCount: 300, - revenue: 900, - }, - { - averageBasket: 4, - conversionSource: "email_campaign", - id: 1.1, - ordersCount: 200, - revenue: 800, - }, - ], - totals: { - averageBasket: 3.4, - ordersCount: 500, - revenue: 1700, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getAttributionMetricsForOneOrMoreBrevoCampaignsOrWorkflows (2)", async () => { @@ -371,14 +317,7 @@ describe("EcommerceClient", () => { conversionSource: "email_campaign", conversionSourceId: "sale", }); - expect(response).toEqual({ - averageBasket: 1.1, - conversionSource: "email_campaign", - id: 1.1, - ordersCount: 1.1, - revenue: 1.1, - newCustomersCount: 1.1, - }); + expect(response).toEqual(rawResponseBody); }); test("getDetailedAttributionMetricsForASingleBrevoCampaignOrWorkflow (2)", async () => { @@ -434,20 +373,7 @@ describe("EcommerceClient", () => { conversionSource: "email_campaign", conversionSourceId: "sale", }); - expect(response).toEqual({ - products: [ - { - id: "1", - imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg", - name: "Milky Way Galaxy", - ordersCount: 200, - price: 1000, - revenue: 999.99, - sku: "sku-1", - url: "https://mydomain.com/products/alpina-panoma-classic", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAttributedProductSalesForASingleBrevoCampaignOrWorkflow (2)", async () => { @@ -487,9 +413,7 @@ describe("EcommerceClient", () => { .build(); const response = await client.ecommerce.getTheIso4217CompliantDisplayCurrencyCodeForYourBrevoAccount(); - expect(response).toEqual({ - code: "EUR", - }); + expect(response).toEqual(rawResponseBody); }); test("getTheIso4217CompliantDisplayCurrencyCodeForYourBrevoAccount (2)", async () => { @@ -567,9 +491,7 @@ describe("EcommerceClient", () => { const response = await client.ecommerce.setConfigDisplayCurrency({ code: "EUR", }); - expect(response).toEqual({ - code: "EUR", - }); + expect(response).toEqual(rawResponseBody); }); test("setConfigDisplayCurrency (2)", async () => { @@ -699,52 +621,7 @@ describe("EcommerceClient", () => { server.mockEndpoint().get("/orders").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.ecommerce.getOrders(); - expect(response).toEqual({ - count: 1, - orders: [ - { - amount: 2000, - billing: { - address: "Sec 62, Noida", - city: "Noida", - country: "India", - countryCode: "IN", - paymentMethod: "Net banking", - phone: 9238283982, - postCode: 110001, - region: "North India", - }, - contact_id: 2, - coupons: ["flat50", "flat40"], - createdAt: "2021-12-31T11:42:35.638Z", - email: "testvisitor@sendinblue.com", - id: "order1803", - identifiers: { - ext_id: "ab12", - loyalty_subscription_id: "1234", - }, - products: [ - { - price: 100, - productId: 21, - quantity: 2, - quantityFloat: 0, - variantId: "P100", - }, - { - price: 100, - productId: 21, - quantity: 0, - quantityFloat: 2.52, - variantId: "P15756", - }, - ], - status: "complete", - storeId: "123", - updatedAt: "2022-03-03T14:48:31.867Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getOrders (2)", async () => { @@ -879,10 +756,7 @@ describe("EcommerceClient", () => { }, ], }); - expect(response).toEqual({ - batchId: 1.1, - count: 17655, - }); + expect(response).toEqual(rawResponseBody); }); test("createBatchOrder (2)", async () => { @@ -1020,57 +894,7 @@ describe("EcommerceClient", () => { server.mockEndpoint().get("/products").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.ecommerce.getProducts(); - expect(response).toEqual({ - count: 2, - products: [ - { - brand: "Adidas", - categories: ["279638835374", "279502848174"], - createdAt: "2022-06-30T10:29:16.078Z", - description: "Shoes for sports", - id: "P11", - imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg", - isDeleted: true, - metaInfo: { - brand: "addidas", - description: "Shoes for sports", - }, - modifiedAt: "2022-06-30T10:29:16.078Z", - name: "Alpina Panoma Classic", - parentId: "parentId", - price: 49.95, - s3Original: "https://img-ecom.mailinblue.com/path-to-original/img.jpg", - s3ThumbAnalytics: "https://img-ecom.mailinblue.com/path-to-analytics/img.jpg", - s3ThumbEditor: "https://img-ecom.mailinblue.com/path-to-editor/img.jpg", - sku: "186622-9", - stock: 100, - url: "https://mydomain.com/products/alpina-panoma-classic", - }, - { - brand: "Adidas", - categories: ["2d79638835374", "27d9502848174"], - createdAt: "2022-06-30T10:29:16.078Z", - description: "Shoes for sports", - id: "P11", - imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg", - isDeleted: true, - metaInfo: { - brand: "addidas", - description: "Shoes for sports", - }, - modifiedAt: "2022-06-30T10:29:16.078Z", - name: "Alpina Panoma Classic2", - parentId: "parentId", - price: 49.95, - s3Original: "https://img-ecom.mailinblue.com/path-to-original/img.jpg", - s3ThumbAnalytics: "https://img-ecom.mailinblue.com/path-to-analytics/img.jpg", - s3ThumbEditor: "https://img-ecom.mailinblue.com/path-to-editor/img.jpg", - sku: "186622-9", - stock: 350, - url: "https://mydomain.com/products/alpina-panoma-classic2", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getProducts (2)", async () => { @@ -1105,9 +929,7 @@ describe("EcommerceClient", () => { id: "P11", name: "Iphone 11", }); - expect(response).toEqual({ - id: 21, - }); + expect(response).toEqual(rawResponseBody); }); test("createUpdateProduct (2)", async () => { @@ -1156,10 +978,7 @@ describe("EcommerceClient", () => { }, ], }); - expect(response).toEqual({ - createdCount: 2, - updatedCount: 7, - }); + expect(response).toEqual(rawResponseBody); }); test("createUpdateBatchProducts (2)", async () => { @@ -1228,29 +1047,7 @@ describe("EcommerceClient", () => { const response = await client.ecommerce.getProductInfo({ id: "id", }); - expect(response).toEqual({ - brand: "Adidas", - categories: ["categories"], - createdAt: "2017-05-12T12:30:00Z", - description: "Shoes for sports", - id: "P11", - imageUrl: "http://mydomain.com/product-absoulte-url/img.jpeg", - isDeleted: true, - metaInfo: { - brand: "addidas", - description: "Shoes for sports", - }, - modifiedAt: "2017-05-12T12:30:00Z", - name: "Iphone 11", - parentId: "parentId", - price: 1.1, - s3Original: "s3Original", - s3ThumbAnalytics: "s3ThumbAnalytics", - s3ThumbEditor: "s3ThumbEditor", - sku: "sku", - stock: 100, - url: "http://mydomain.com/product/electronics/product1", - }); + expect(response).toEqual(rawResponseBody); }); test("getProductInfo (2)", async () => { diff --git a/tests/wire/emailCampaigns.test.ts b/tests/wire/emailCampaigns.test.ts index fe1ffa4..2571a78 100644 --- a/tests/wire/emailCampaigns.test.ts +++ b/tests/wire/emailCampaigns.test.ts @@ -282,299 +282,7 @@ describe("EmailCampaignsClient", () => { server.mockEndpoint().get("/emailCampaigns").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.emailCampaigns.getEmailCampaigns(); - expect(response).toEqual({ - campaigns: [ - { - attachmentFile: "http://mydomain.com/campaign/attachment/file.pdf", - abTesting: true, - id: 12, - name: "EN - Sales Summer 2017", - previewText: "Don't miss the sale!", - scheduledAt: "2017-06-01T12:30:00Z", - sendAtBestTime: true, - splitRule: 25, - status: "sent", - subject: "20% OFF for 2017 Summer Sales", - subjectA: "Discover the New Collection!", - subjectB: "Want to discover the New Collection?", - type: "classic", - winnerCriteria: "open", - winnerDelay: 50, - createdAt: "2017-05-01T12:30:00Z", - footer: "[DEFAULT_FOOTER]", - header: "[DEFAULT_HEADER]", - htmlContent: "This is my HTML Content", - inlineImageActivation: true, - mirrorActive: true, - modifiedAt: "2017-05-01T12:30:00Z", - recurring: false, - replyTo: "replyto@domain.com", - returnBounce: 5, - sender: { - email: "marketing@mycompany.com", - id: 26, - name: "Marketing", - }, - sentDate: "2018-12-01T16:30:00Z", - shareLink: "http://example.com/fhsgccc.html?t=9865448900", - tag: "Newsletter", - tags: ["tag1", "tag2"], - testSent: true, - toField: "{FNAME} {LNAME}", - utmCampaignValue: "myutm", - utmIDActive: true, - utmMedium: "EMAIL", - utmSource: "Brevo", - recipients: { - exclusionLists: [13], - lists: [5], - }, - statistics: { - campaignStats: [ - { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 5, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - ], - globalStats: { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - linksStats: {}, - mirrorClick: 120, - remaining: 1000, - statsByBrowser: { - key: { - clickers: 2665, - uniqueClicks: 2300, - uniqueViews: 7779, - viewed: 8999, - }, - }, - statsByDevice: {}, - statsByDomain: { - "hotmail.co.uk": { - appleMppOpens: 10, - clickers: 2720, - complaints: 5, - deferred: 30, - delivered: 117056, - estimatedViews: 560, - hardBounces: 0, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 117055, - softBounces: 111, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 1970, - uniqueViews: 21111, - unsubscriptions: 105, - viewed: 35251, - }, - "yahoo.com": { - appleMppOpens: 10, - clickers: 533, - complaints: 0, - deferred: 30, - delivered: 25596, - estimatedViews: 560, - hardBounces: 0, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 25601, - softBounces: 5, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 298, - uniqueViews: 3527, - unsubscriptions: 17, - viewed: 5255, - }, - }, - }, - }, - { - attachmentFile: "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}", - abTesting: true, - id: 22, - name: "Weekly - 1", - previewText: "your weekly newsletter!", - scheduledAt: "", - sendAtBestTime: true, - splitRule: 25, - status: "draft", - subject: "Week 1 - Newsletter", - subjectA: "Discover the New Collection!", - subjectB: "Want to discover the New Collection?", - type: "classic", - winnerCriteria: "open", - winnerDelay: 50, - createdAt: "2017-05-01T12:30:00Z", - footer: "[DEFAULT_FOOTER]", - header: "[DEFAULT_HEADER]", - htmlContent: "This is my HTML Content", - inlineImageActivation: true, - mirrorActive: true, - modifiedAt: "2017-05-01T12:30:00Z", - recurring: false, - replyTo: "replyto@domain.com", - returnBounce: 5, - sender: { - email: "newsletter@mycompany.com", - id: 26, - name: "Newsletter", - }, - sentDate: "2018-12-01T16:30:00Z", - shareLink: "http://example.com/fhsgccc.html?t=9865448900", - tag: "Newsletter", - tags: ["Newsletter", "Weekly"], - testSent: false, - toField: "{FNAME} {LNAME}", - utmCampaignValue: "myutm", - utmIDActive: true, - utmMedium: "EMAIL", - utmSource: "Brevo", - recipients: { - exclusionLists: [45], - lists: [10], - }, - statistics: { - campaignStats: [ - { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 10, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - ], - globalStats: { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 2, - opensRate: 29.42, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - linksStats: {}, - mirrorClick: 120, - remaining: 1000, - statsByBrowser: { - key: { - clickers: 2665, - uniqueClicks: 2300, - uniqueViews: 7779, - viewed: 8999, - }, - }, - statsByDevice: {}, - statsByDomain: { - aol: { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - gmail: { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - }, - }, - }, - ], - count: 2, - }); + expect(response).toEqual(rawResponseBody); }); test("getEmailCampaigns (2)", async () => { @@ -609,9 +317,7 @@ describe("EmailCampaignsClient", () => { name: "Newsletter - May 2017", sender: {}, }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createEmailCampaign (2)", async () => { @@ -657,9 +363,7 @@ describe("EmailCampaignsClient", () => { const response = await client.emailCampaigns.uploadImageToGallery({ imageUrl: "https://somedomain.com/image1.jpg", }); - expect(response).toEqual({ - url: "https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg", - }); + expect(response).toEqual(rawResponseBody); }); test("uploadImageToGallery (2)", async () => { @@ -822,181 +526,7 @@ describe("EmailCampaignsClient", () => { const response = await client.emailCampaigns.getEmailCampaign({ campaignId: 1000000, }); - expect(response).toEqual({ - attachmentFile: "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}", - abTesting: true, - id: 22, - name: "Weekly - 1", - previewText: "your weekly newsletter", - scheduledAt: "2017-09-22T12:30:00Z", - sendAtBestTime: true, - splitRule: 25, - status: "draft", - subject: "Week 1 - Newsletter", - subjectA: "Discover the New Collection!", - subjectB: "Want to discover the New Collection?", - type: "classic", - winnerCriteria: "open", - winnerDelay: 50, - createdAt: "2017-05-01T12:30:00Z", - footer: "[DEFAULT_FOOTER]", - header: "[DEFAULT_HEADER]", - htmlContent: "This is my HTML Content", - inlineImageActivation: true, - mirrorActive: true, - modifiedAt: "2017-05-01T12:30:00Z", - recurring: false, - replyTo: "replyto@domain.com", - returnBounce: 5, - sender: { - email: "newsletter@mycompany.com", - id: 26, - name: "Newsletter", - }, - sentDate: "2018-12-01T16:30:00Z", - shareLink: "http://dhh.brevo.com/fhsgccc.html?t=9865448900", - tag: "Newsletter", - tags: ["Newsletter", "Weekly"], - testSent: false, - toField: "{FNAME} {LNAME}", - utmCampaignValue: "myutm", - utmIDActive: true, - utmMedium: "EMAIL", - utmSource: "Brevo", - recipients: { - exclusionLists: [45], - lists: [22], - }, - statistics: { - campaignStats: [ - { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 22, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - ], - globalStats: { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 2, - opensRate: 24.59, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - linksStats: {}, - mirrorClick: 120, - remaining: 1000, - statsByBrowser: { - internetExplorer: { - clickers: 0, - uniqueClicks: 0, - uniqueViews: 0, - viewed: 1, - }, - safari: { - clickers: 1, - uniqueClicks: 0, - uniqueViews: 0, - viewed: 1, - }, - thunderbird: { - clickers: 1, - uniqueClicks: 0, - uniqueViews: 0, - viewed: 1, - }, - }, - statsByDevice: { - desktop: { - mac: { - clickers: 1, - uniqueClicks: 0, - uniqueViews: 1, - viewed: 2, - }, - }, - mobile: { - androidMobile: { - clickers: 1, - uniqueClicks: 0, - uniqueViews: 0, - viewed: 1, - }, - iPhone: { - clickers: 1, - uniqueClicks: 0, - uniqueViews: 0, - viewed: 2, - }, - }, - tablet: { - key: { - clickers: 2665, - uniqueClicks: 2300, - uniqueViews: 7779, - viewed: 8999, - }, - }, - unknown: { - key: { - clickers: 2665, - uniqueClicks: 2300, - uniqueViews: 7779, - viewed: 8999, - }, - }, - }, - statsByDomain: { - gmail: { - appleMppOpens: 10, - clickers: 2665, - complaints: 1, - deferred: 30, - delivered: 19765, - estimatedViews: 560, - hardBounces: 87, - listId: 2, - opensRate: 29.54, - returnBounce: 5, - sent: 19887, - softBounces: 100, - trackableViews: 5661, - trackableViewsRate: 23.45, - uniqueClicks: 2300, - uniqueViews: 7779, - unsubscriptions: 2, - viewed: 8999, - }, - }, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getEmailCampaign (2)", async () => { @@ -1200,66 +730,7 @@ describe("EmailCampaignsClient", () => { const response = await client.emailCampaigns.getAbTestCampaignResult({ campaignId: 1000000, }); - expect(response).toEqual({ - clickRate: "50%", - clickedLinks: { - "Version A": [ - { - clickRate: "0%", - clicksCount: 0, - link: "https://google.com", - }, - { - clickRate: "0%", - clicksCount: 0, - link: "https://youtube.com", - }, - ], - "Version B": [ - { - clickRate: "40%", - clicksCount: 2, - link: "http://www.github.com", - }, - { - clickRate: "60%", - clicksCount: 3, - link: "http://www.stackoverflow.com", - }, - ], - }, - openRate: "100%", - statistics: { - clicks: { - "Version A": "0%", - "Version B": "50%", - }, - complaints: { - "Version A": "0%", - "Version B": "0%", - }, - hardBounces: { - "Version A": "0%", - "Version B": "0%", - }, - openers: { - "Version A": "20%", - "Version B": "100%", - }, - softBounces: { - "Version A": "0%", - "Version B": "0%", - }, - unsubscribed: { - "Version A": "20%", - "Version B": "0%", - }, - }, - winningCriteria: "Click", - winningSubjectLine: "Subject Line A", - winningVersion: "B", - winningVersionRate: "0%", - }); + expect(response).toEqual(rawResponseBody); }); test("getAbTestCampaignResult (2)", async () => { @@ -1323,9 +794,7 @@ describe("EmailCampaignsClient", () => { campaignId: 1000000, recipientsType: "all", }); - expect(response).toEqual({ - processId: 78, - }); + expect(response).toEqual(rawResponseBody); }); test("emailExportRecipients (2)", async () => { @@ -1620,9 +1089,7 @@ describe("EmailCampaignsClient", () => { const response = await client.emailCampaigns.getSharedTemplateUrl({ campaignId: 1000000, }); - expect(response).toEqual({ - sharedUrl: "https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-", - }); + expect(response).toEqual(rawResponseBody); }); test("getSharedTemplateUrl (2)", async () => { diff --git a/tests/wire/event.test.ts b/tests/wire/event.test.ts index 0cc7b84..7718d19 100644 --- a/tests/wire/event.test.ts +++ b/tests/wire/event.test.ts @@ -28,27 +28,7 @@ describe("EventClient", () => { server.mockEndpoint().get("/events").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.event.getEvents(); - expect(response).toEqual({ - events: [ - { - contact_id: 211, - event_date: "2024-02-06T20:59:23Z", - event_name: "order_created", - event_filter_id: "abc123", - source: "api", - object_type: "subscription", - event_properties: { - duration: 142, - video_title: "Brevo \u2014 The most approachable CRM suite", - }, - contact_properties: { - AGE: 32, - GENDER: "FEMALE", - }, - }, - ], - count: 2, - }); + expect(response).toEqual(rawResponseBody); }); test("getEvents (2)", async () => { @@ -174,10 +154,7 @@ describe("EventClient", () => { identifiers: {}, }, ]); - expect(response).toEqual({ - message: "Batch accepted. Valid events have been added to the processing queue.", - count: 7, - }); + expect(response).toEqual(rawResponseBody); }); test("createBatchEvents (2)", async () => { diff --git a/tests/wire/externalFeeds.test.ts b/tests/wire/externalFeeds.test.ts index 810d814..b89e271 100644 --- a/tests/wire/externalFeeds.test.ts +++ b/tests/wire/externalFeeds.test.ts @@ -70,74 +70,7 @@ describe("ExternalFeedsClient", () => { startDate: "2024-01-01", endDate: "2024-01-31", }); - expect(response).toEqual({ - count: 18, - feeds: [ - { - id: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", - name: "Product Catalog Feed", - alias: "product_catalog_feed", - url: "https://api.example.com/products", - authType: "noAuth", - username: "apiuser", - password: "apipass", - token: "abc123token456", - maxRetries: 3, - cache: true, - isInternal: false, - headers: [ - { - name: "Authorization", - value: "Bearer xyz789", - }, - ], - createdAt: "2025-09-18T13:29:27Z", - modifiedAt: "2025-09-18T13:29:27Z", - }, - { - id: "c2d3e4f5-a6b7-48c9-90d1-e2f3a4b5c6d7", - name: "Blog News Feed", - alias: "blog_news_feed", - url: "https://blog.example.com/api/posts", - authType: "noAuth", - username: "apiuser", - password: "apipass", - token: "abc123token456", - maxRetries: 3, - cache: true, - isInternal: true, - headers: [ - { - name: "Authorization", - value: "Bearer xyz789", - }, - ], - createdAt: "2025-09-17T16:03:25Z", - modifiedAt: "2025-09-17T16:03:25Z", - }, - { - id: "d3e4f5a6-b7c8-49d0-91e2-f3a4b5c6d7e8", - name: "Public Data Feed", - alias: "public_data_feed", - url: "https://jsonplaceholder.typicode.com/posts", - authType: "noAuth", - username: "apiuser", - password: "apipass", - token: "abc123token456", - maxRetries: 3, - cache: true, - isInternal: true, - headers: [ - { - name: "Authorization", - value: "Bearer xyz789", - }, - ], - createdAt: "2025-09-05T09:06:42Z", - modifiedAt: "2025-09-05T09:06:42Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAllExternalFeeds (2)", async () => { @@ -194,9 +127,7 @@ describe("ExternalFeedsClient", () => { maxRetries: 3, cache: true, }); - expect(response).toEqual({ - id: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", - }); + expect(response).toEqual(rawResponseBody); }); test("createExternalFeed (2)", async () => { @@ -227,9 +158,7 @@ describe("ExternalFeedsClient", () => { maxRetries: 3, cache: true, }); - expect(response).toEqual({ - id: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", - }); + expect(response).toEqual(rawResponseBody); }); test("createExternalFeed (3)", async () => { @@ -260,9 +189,7 @@ describe("ExternalFeedsClient", () => { maxRetries: 3, cache: true, }); - expect(response).toEqual({ - id: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", - }); + expect(response).toEqual(rawResponseBody); }); test("createExternalFeed (4)", async () => { @@ -317,19 +244,7 @@ describe("ExternalFeedsClient", () => { const response = await client.externalFeeds.getExternalFeedByUuid({ uuid: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", }); - expect(response).toEqual({ - id: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", - name: "Product Catalog Feed", - url: "https://api.example.com/products", - authType: "noAuth", - personalization: false, - defaultAttr: "", - defaultContact: "", - maxRetries: 0, - cache: false, - createdAt: "2025-09-18T13:29:27Z", - modifiedAt: "2025-09-18T13:29:27Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getExternalFeedByUUID (2)", async () => { @@ -361,19 +276,7 @@ describe("ExternalFeedsClient", () => { const response = await client.externalFeeds.getExternalFeedByUuid({ uuid: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", }); - expect(response).toEqual({ - id: "c2d3e4f5-a6b7-48c9-90d1-e2f3a4b5c6d7", - name: "Internal Blog Feed", - url: "https://blog.example.com/api/posts", - authType: "noAuth", - personalization: false, - defaultAttr: "", - defaultContact: "", - maxRetries: 0, - cache: false, - createdAt: "2025-09-17T16:03:25Z", - modifiedAt: "2025-09-17T16:03:25Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getExternalFeedByUUID (3)", async () => { @@ -405,19 +308,7 @@ describe("ExternalFeedsClient", () => { const response = await client.externalFeeds.getExternalFeedByUuid({ uuid: "b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6", }); - expect(response).toEqual({ - id: "d3e4f5a6-b7c8-49d0-91e2-f3a4b5c6d7e8", - name: "Public Data Feed", - url: "https://jsonplaceholder.typicode.com/posts", - authType: "noAuth", - personalization: false, - defaultAttr: "", - defaultContact: "", - maxRetries: 0, - cache: false, - createdAt: "2025-09-05T09:06:42Z", - modifiedAt: "2025-09-05T09:06:42Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getExternalFeedByUUID (4)", async () => { diff --git a/tests/wire/files.test.ts b/tests/wire/files.test.ts index dff749e..36bdc74 100644 --- a/tests/wire/files.test.ts +++ b/tests/wire/files.test.ts @@ -24,17 +24,7 @@ describe("FilesClient", () => { server.mockEndpoint().get("/crm/files").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.files.getAllFiles(); - expect(response).toEqual([ - { - authorId: "61a5ce58y5d4795761045991", - companyId: "61a5ce58c5d4795761045991", - contactId: 1, - createdAt: "2017-05-01T17:05:03Z", - dealId: "61a5ce58c5d4795761045991", - name: "example.png", - size: 10, - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getAllFiles (2)", async () => { @@ -61,9 +51,7 @@ describe("FilesClient", () => { const response = await client.files.downloadAFile({ id: "id", }); - expect(response).toEqual({ - fileUrl: "https://storage.googleapis.com/brevo-app-crm.......-sample.pdf", - }); + expect(response).toEqual(rawResponseBody); }); test("downloadAFile (2)", async () => { @@ -157,15 +145,7 @@ describe("FilesClient", () => { const response = await client.files.getFileDetails({ id: "id", }); - expect(response).toEqual({ - authorId: "61a5ce58y5d4795761045991", - companyId: "61a5ce58c5d4795761045991", - contactId: 1, - createdAt: "2017-05-01T17:05:03Z", - dealId: "61a5ce58c5d4795761045991", - name: "example.png", - size: 10, - }); + expect(response).toEqual(rawResponseBody); }); test("getFileDetails (2)", async () => { diff --git a/tests/wire/inboundParsing.test.ts b/tests/wire/inboundParsing.test.ts index aeb985f..71a3e14 100644 --- a/tests/wire/inboundParsing.test.ts +++ b/tests/wire/inboundParsing.test.ts @@ -29,22 +29,7 @@ describe("InboundParsingClient", () => { server.mockEndpoint().get("/inbound/events").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.inboundParsing.getInboundEmailEvents(); - expect(response).toEqual({ - events: [ - { - date: "2017-03-11T12:30:00Z", - recipient: "alexa@example.com", - sender: "john@example.com", - uuid: "1a825d56-029b-4a41-b8e4-1a825d56", - }, - { - date: "2017-03-12T12:30:00Z", - recipient: "bob@example.com", - sender: "alice@example.com", - uuid: "1a825d56-029b-4a41-b8e4-61670463431b", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getInboundEmailEvents (2)", async () => { @@ -90,35 +75,7 @@ describe("InboundParsingClient", () => { const response = await client.inboundParsing.getInboundEmailEventsByUuid({ uuid: "uuid", }); - expect(response).toEqual({ - attachments: [ - { - contentLength: 12345, - contentType: "application/pdf", - name: "invoice.pdf", - }, - ], - deliveredAt: "2017-03-12T12:31:00Z", - logs: [ - { - date: "2017-03-12T12:30:00Z", - type: "received", - }, - { - date: "2017-03-12T12:30:04Z", - type: "webhookFailed", - }, - { - date: "2017-03-12T12:31:04Z", - type: "webhookDelivered", - }, - ], - messageId: "", - receivedAt: "2017-03-12T12:30:00Z", - recipient: "bob@example.com", - sender: "alice@example.com", - subject: "Re: Question about your API", - }); + expect(response).toEqual(rawResponseBody); }); test("getInboundEmailEventsByUuid (2)", async () => { diff --git a/tests/wire/masterAccount.test.ts b/tests/wire/masterAccount.test.ts index 770a3c8..799cec6 100644 --- a/tests/wire/masterAccount.test.ts +++ b/tests/wire/masterAccount.test.ts @@ -23,9 +23,7 @@ describe("MasterAccountClient", () => { const response = await client.masterAccount.createANewGroupOfSubAccounts({ groupName: "My group", }); - expect(response).toEqual({ - id: "659xxxxxxxxxxxxxxxx6ef9c8", - }); + expect(response).toEqual(rawResponseBody); }); test("createANewGroupOfSubAccounts (2)", async () => { @@ -120,37 +118,7 @@ describe("MasterAccountClient", () => { const response = await client.masterAccount.getAGroupDetails({ id: "id", }); - expect(response).toEqual({ - group: { - createdAt: "2024-02-09T06:14:40+00:00", - groupName: "My group", - id: "5f926dba72a405440a4efc97", - }, - "sub-accounts": [ - { - companyName: "My sub organization", - createdAt: "2024-02-09T06:14:40+00:00", - id: 7866556, - }, - { - companyName: "Your sub organization", - createdAt: "2024-01-05T03:11:40+00:00", - id: 6563051, - }, - ], - users: [ - { - email: "my-user@my-org.com", - firstName: "John", - lastName: "Smith", - }, - { - email: "your-user@your-org.com", - firstName: "firstName", - lastName: "lastName", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("updateAGroupOfSubAccounts (1)", async () => { @@ -234,20 +202,7 @@ describe("MasterAccountClient", () => { server.mockEndpoint().get("/corporate/groups").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.masterAccount.getSubAccountGroups(); - expect(response).toEqual([ - { - groupName: "My group 1", - id: "d3b142c709d6ed67ef1cd903", - }, - { - groupName: "My group 2", - id: "a5b192a709d6ed67ef8fd922", - }, - { - groupName: "My group 3", - id: "bbb142c709d6ed67ef1cd910", - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getCorporateInvitedUsersList", async () => { @@ -300,48 +255,7 @@ describe("MasterAccountClient", () => { .build(); const response = await client.masterAccount.getCorporateInvitedUsersList(); - expect(response).toEqual({ - users: [ - { - email: "master-user2@company.com", - feature_access: { - analytics: ["download_data", "create_alerts", "my_looks", "explore_create"], - api_keys: ["all"], - apps_management: ["none"], - create_sub_organizations: ["all"], - manage_sub_organizations: ["all"], - my_plan: ["all", "all"], - sub_organization_groups: ["create", "edit_delete"], - user_management: ["none"], - }, - groups: { - id: "a5c4f22c08d9ed37ef1ca342", - name: "My group", - }, - is_owner: "is_owner", - status: "active", - }, - { - email: "master-user3@company.com", - feature_access: { - analytics: ["create_alerts", "my_looks"], - api_keys: ["none"], - apps_management: ["all"], - create_sub_organizations: ["all"], - manage_sub_organizations: ["all"], - my_plan: ["none", "none"], - sub_organization_groups: ["edit_delete"], - user_management: ["all"], - }, - groups: { - id: "a5c4f22c08d9ed37ef1ca342", - name: "My group", - }, - is_owner: "is_owner", - status: "active", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("listOfAllIPs", async () => { @@ -356,18 +270,7 @@ describe("MasterAccountClient", () => { server.mockEndpoint().get("/corporate/ip").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.masterAccount.listOfAllIPs(); - expect(response).toEqual([ - { - domain: "example.com", - ip: "192.168.1.1", - transactional: true, - }, - { - domain: "example.com", - ip: "192.168.1.2", - transactional: false, - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getTheDetailsOfRequestedMasterAccount (1)", async () => { @@ -417,72 +320,7 @@ describe("MasterAccountClient", () => { .build(); const response = await client.masterAccount.getTheDetailsOfRequestedMasterAccount(); - expect(response).toEqual({ - billingInfo: { - address: { - countryCode: "IN", - locality: "Pandav Nagar, New Delhi", - postalCode: "560048", - stateCode: "UP", - streetAddress: "C-92", - }, - companyName: "Corp Sample 1-1", - email: "sample@example.com", - name: { - familyName: "Pandit", - givenName: "Uday", - }, - }, - companyName: "Corp Sample 1-1", - currencyCode: "INR", - email: "sample@example.com", - id: 1003286, - planInfo: { - currencyCode: "INR", - features: [ - { - name: "MULTI_USER", - quantity: 10, - remaining: 0, - unitValue: "unitValue", - used: 15, - }, - { - name: "ADVANCED_REPORTING", - quantity: 12, - remaining: 11, - unitValue: "unitValue", - used: 1, - }, - { - name: "INBOX", - quantity: 10, - remaining: 0, - unitValue: "unitValue", - used: 10, - }, - { - name: "LANDING_PAGE", - quantity: 10, - remaining: 0, - unitValue: "unitValue", - used: 11, - }, - { - name: "RECURRING_CREDITS", - quantity: 500, - remaining: 499, - unitValue: "unitValue", - used: 1, - }, - ], - nextBillingAt: 1637739295, - planPeriod: "month", - price: 2100, - subAccounts: 15, - }, - timezone: "Europe/Paris", - }); + expect(response).toEqual(rawResponseBody); }); test("getTheDetailsOfRequestedMasterAccount (2)", async () => { @@ -522,9 +360,7 @@ describe("MasterAccountClient", () => { const response = await client.masterAccount.generateSsoTokenToAccessAdminAccount({ email: "vipin+ent-user@brevo.com", }); - expect(response).toEqual({ - token: "5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0", - }); + expect(response).toEqual(rawResponseBody); }); test("generateSsoTokenToAccessAdminAccount (2)", async () => { @@ -605,41 +441,7 @@ describe("MasterAccountClient", () => { offset: 1, limit: 1, }); - expect(response).toEqual({ - count: 3, - subAccounts: [ - { - active: true, - companyName: "Company1", - createdAt: 1631523176, - groups: [ - { - id: "5f8f8c3b5f56a02d4433b3a8", - name: "Group 1", - }, - { - id: "4fbf3c3b1f56a02ac465b1a0", - name: "Group 2", - }, - ], - id: 4043629, - }, - { - active: true, - companyName: "Company2", - createdAt: 1629439311, - groups: [{}], - id: 3984002, - }, - { - active: true, - companyName: "Company3", - createdAt: 1614713641, - groups: [{}], - id: 3524191, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getTheListOfAllTheSubAccountsOfTheMasterAccount (2)", async () => { @@ -692,9 +494,7 @@ describe("MasterAccountClient", () => { language: "fr", timezone: "Europe/Paris", }); - expect(response).toEqual({ - id: 4109344, - }); + expect(response).toEqual(rawResponseBody); }); test("createANewSubAccountUnderAMasterAccount (2)", async () => { @@ -739,9 +539,7 @@ describe("MasterAccountClient", () => { ids: [234322, 325553, 893432], ip: "103.11.32.88", }); - expect(response).toEqual({ - key: "value", - }); + expect(response).toEqual(rawResponseBody); }); test("associateAnIpToSubAccounts (2)", async () => { @@ -829,10 +627,7 @@ describe("MasterAccountClient", () => { id: 3232323, name: "My Api Key", }); - expect(response).toEqual({ - key: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z", - status: "success", - }); + expect(response).toEqual(rawResponseBody); }); test("createAnApiKeyForASubAccount (2)", async () => { @@ -876,9 +671,7 @@ describe("MasterAccountClient", () => { const response = await client.masterAccount.generateSsoTokenToAccessSubAccount({ id: 3232323, }); - expect(response).toEqual({ - token: "5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0", - }); + expect(response).toEqual(rawResponseBody); }); test("generateSsoTokenToAccessSubAccount (2)", async () => { @@ -966,64 +759,7 @@ describe("MasterAccountClient", () => { const response = await client.masterAccount.getSubAccountDetails({ id: 1000000, }); - expect(response).toEqual({ - companyName: "API-Sub-26thOct21-4", - email: "uday+1@brevo.com", - groups: [ - { - id: "5f8f8c3b5f56a02d4433b3a7", - name: "Group 1", - }, - { - id: "5f8f8c3b5f56a02d4433b3a8", - name: "Group 2", - }, - ], - name: "Uday Pandit", - planInfo: { - credits: { - emails: { - quantity: 2000, - remaining: 1955, - }, - externalFeeds: { - quantity: 1, - remaining: 1, - }, - sms: { - quantity: 2000, - remaining: 1955, - }, - whatsapp: { - quantity: 100, - remaining: 50, - }, - wpSubscribers: { - quantity: 2000, - remaining: 1955, - }, - }, - features: { - inbox: { - quantity: 20, - remaining: 12, - }, - landingPage: { - quantity: 25, - remaining: 14, - }, - salesUsers: { - quantity: 30, - remaining: 14, - }, - users: { - quantity: 30, - remaining: 14, - }, - }, - planType: "paid", - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getSubAccountDetails (2)", async () => { @@ -1349,9 +1085,7 @@ describe("MasterAccountClient", () => { email: "inviteuser@example.com", privileges: [{}], }); - expect(response).toEqual({ - id: "659xxxxxxxxxxxxxxxx6ef9c8", - }); + expect(response).toEqual(rawResponseBody); }); test("inviteAdminUser (2)", async () => { @@ -1396,9 +1130,7 @@ describe("MasterAccountClient", () => { action: "resend", email: "email", }); - expect(response).toEqual({ - message: "Invitation resent successfully", - }); + expect(response).toEqual(rawResponseBody); }); test("resendCancelAdminUserInvitation (2)", async () => { @@ -1490,30 +1222,7 @@ describe("MasterAccountClient", () => { const response = await client.masterAccount.getCorporateUserPermission({ email: "email", }); - expect(response).toEqual({ - email: "invitedUser@company.com", - feature_access: { - analytics: ["download_data", "create_alerts", "my_looks", "explore_create"], - api_keys: ["all"], - apps_management: ["all"], - create_sub_organizations: ["all"], - manage_sub_organizations: ["all"], - my_plan: ["all", "all"], - sub_organization_groups: ["create", "edit_delete"], - user_management: ["none"], - }, - groups: [ - { - id: "6543ab3667ffbb00142e4486", - name: "Support", - }, - { - id: "174bab366732bbce142e4412", - name: "Technical", - }, - ], - status: "active", - }); + expect(response).toEqual(rawResponseBody); }); test("getCorporateUserPermission (2)", async () => { diff --git a/tests/wire/notes.test.ts b/tests/wire/notes.test.ts index 419d88f..a6c59fb 100644 --- a/tests/wire/notes.test.ts +++ b/tests/wire/notes.test.ts @@ -30,25 +30,7 @@ describe("NotesClient", () => { server.mockEndpoint().get("/crm/notes").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.notes.getAllNotes(); - expect(response).toEqual([ - { - authorId: { - email: "johndoe@example.com", - id: "61a5ce58y5d4795761045991", - locale: "en_GB", - name: { - fullName: "John Doe", - }, - timezone: "Asia/Kolkata", - }, - contactIds: [247, 1, 2], - createdAt: "2017-05-01T17:05:03Z", - dealIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991"], - id: "61a5cd07ca1347c82306ad09", - text: "In communication with client_dev for resolution of queries.", - updatedAt: "2017-05-01T17:05:03Z", - }, - ]); + expect(response).toEqual(rawResponseBody); }); test("getAllNotes (2)", async () => { @@ -82,9 +64,7 @@ describe("NotesClient", () => { const response = await client.notes.createANote({ text: "In communication with client_dev for resolution of queries.", }); - expect(response).toEqual({ - id: "61a5cd07ca1347c82306ad09", - }); + expect(response).toEqual(rawResponseBody); }); test("createANote (2)", async () => { @@ -156,23 +136,7 @@ describe("NotesClient", () => { const response = await client.notes.getANote({ id: "id", }); - expect(response).toEqual({ - authorId: { - email: "johndoe@example.com", - id: "61a5ce58y5d4795761045991", - locale: "en_GB", - name: { - fullName: "John Doe", - }, - timezone: "Asia/Kolkata", - }, - contactIds: [247, 1, 2], - createdAt: "2017-05-01T17:05:03Z", - dealIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991"], - id: "61a5cd07ca1347c82306ad09", - text: "In communication with client_dev for resolution of queries.", - updatedAt: "2017-05-01T17:05:03Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getANote (2)", async () => { diff --git a/tests/wire/payments.test.ts b/tests/wire/payments.test.ts index 8ca42e3..8b15a38 100644 --- a/tests/wire/payments.test.ts +++ b/tests/wire/payments.test.ts @@ -32,10 +32,7 @@ describe("PaymentsClient", () => { contactId: 43, reference: "Invoice #INV0001", }); - expect(response).toEqual({ - id: 122, - url: "https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve", - }); + expect(response).toEqual(rawResponseBody); }); test("createPaymentRequest (2)", async () => { @@ -156,23 +153,7 @@ describe("PaymentsClient", () => { const response = await client.payments.getPaymentRequest({ id: "050db7b0-9bb7-4c1e-9c68-5a8dace8c1dc", }); - expect(response).toEqual({ - cart: { - currency: "EUR", - specificAmount: 1200, - }, - configuration: { - customSuccessUrl: "https://my-company.com/payment-success", - }, - contactId: 43, - notification: { - channel: "email", - text: "Please pay for your yoga class.", - }, - numberOfRemindersSent: 5, - reference: "Invoice #INV0001\n", - status: "paid", - }); + expect(response).toEqual(rawResponseBody); }); test("getPaymentRequest (2)", async () => { diff --git a/tests/wire/process.test.ts b/tests/wire/process.test.ts index 141be90..24a7ae6 100644 --- a/tests/wire/process.test.ts +++ b/tests/wire/process.test.ts @@ -45,38 +45,7 @@ describe("ProcessClient", () => { server.mockEndpoint().get("/processes").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.process.getProcesses(); - expect(response).toEqual({ - count: 198, - processes: [ - { - id: 217, - name: "IMPORTUSER", - status: "completed", - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:35:00Z", - }, - { - id: 213, - name: "SEARCH_EXPORT_USERS", - status: "completed", - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:35:00Z", - }, - { - id: 212, - name: "IMPORTUSER", - status: "queued", - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:35:00Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getProcesses (2)", async () => { @@ -105,7 +74,7 @@ describe("ProcessClient", () => { invalid_emails: 2, duplicate_contact_id: 0, duplicate_ext_id: 1, - duplicate_email_id: 5, + duplicate_email_id: "duplicate_email_id", duplicate_phone_id: 1, duplicate_whatsapp_id: 1, duplicate_landline_number_id: 1, @@ -123,30 +92,7 @@ describe("ProcessClient", () => { const response = await client.process.getProcess({ processId: 1000000, }); - expect(response).toEqual({ - id: 217, - name: "IMPORTUSER", - status: "queued", - info: { - import: { - invalid_emails: 2, - duplicate_contact_id: 0, - duplicate_ext_id: 1, - duplicate_email_id: 5, - duplicate_phone_id: 1, - duplicate_whatsapp_id: 1, - duplicate_landline_number_id: 1, - }, - export: { - total_records: 1250, - file_size: 102400, - }, - }, - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded after 30 minutes", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:32:15Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getProcess (2)", async () => { @@ -169,21 +115,7 @@ describe("ProcessClient", () => { const response = await client.process.getProcess({ processId: 1000000, }); - expect(response).toEqual({ - id: 217, - name: "IMPORTUSER", - status: "completed", - info: { - export: { - total_records: 1250, - file_size: 102400, - }, - }, - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded after 30 minutes", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:32:15Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getProcess (3)", async () => { @@ -199,7 +131,7 @@ describe("ProcessClient", () => { invalid_emails: 2, duplicate_contact_id: 0, duplicate_ext_id: 1, - duplicate_email_id: 5, + duplicate_email_id: "duplicate_email_id", duplicate_phone_id: 1, duplicate_whatsapp_id: 1, duplicate_landline_number_id: 1, @@ -217,30 +149,7 @@ describe("ProcessClient", () => { const response = await client.process.getProcess({ processId: 1000000, }); - expect(response).toEqual({ - id: 213, - name: "SEARCH_EXPORT_USERS", - status: "completed", - info: { - import: { - invalid_emails: 2, - duplicate_contact_id: 0, - duplicate_ext_id: 1, - duplicate_email_id: 5, - duplicate_phone_id: 1, - duplicate_whatsapp_id: 1, - duplicate_landline_number_id: 1, - }, - export: { - total_records: 1250, - file_size: 102400, - }, - }, - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded after 30 minutes", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:32:15Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getProcess (4)", async () => { @@ -256,7 +165,7 @@ describe("ProcessClient", () => { invalid_emails: 2, duplicate_contact_id: 0, duplicate_ext_id: 1, - duplicate_email_id: 5, + duplicate_email_id: "duplicate_email_id", duplicate_phone_id: 1, duplicate_whatsapp_id: 1, duplicate_landline_number_id: 1, @@ -274,30 +183,7 @@ describe("ProcessClient", () => { const response = await client.process.getProcess({ processId: 1000000, }); - expect(response).toEqual({ - id: 189, - name: "TRANS-GLOBAL-CALC", - status: "failed", - info: { - import: { - invalid_emails: 2, - duplicate_contact_id: 0, - duplicate_ext_id: 1, - duplicate_email_id: 5, - duplicate_phone_id: 1, - duplicate_whatsapp_id: 1, - duplicate_landline_number_id: 1, - }, - export: { - total_records: 1250, - file_size: 102400, - }, - }, - export_url: "https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv", - error: "Processing timeout exceeded after 30 minutes", - created_at: "2024-01-15T10:30:00Z", - completed_at: "2024-01-15T10:32:15Z", - }); + expect(response).toEqual(rawResponseBody); }); test("getProcess (5)", async () => { diff --git a/tests/wire/program.test.ts b/tests/wire/program.test.ts index fe78dfd..0f222d5 100644 --- a/tests/wire/program.test.ts +++ b/tests/wire/program.test.ts @@ -37,26 +37,7 @@ describe("ProgramClient", () => { .build(); const response = await client.program.getLpList(); - expect(response).toEqual({ - items: [ - { - codeCount: 1, - createdAt: "createdAt", - description: "description", - documentId: "documentId", - id: "id", - meta: { - key: "value", - }, - name: "name", - pattern: "pattern", - state: "inactive", - subscriptionGeneratorId: "subscriptionGeneratorId", - subscriptionPoolId: "subscriptionPoolId", - updatedAt: "updatedAt", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getLPList (2)", async () => { @@ -204,22 +185,7 @@ describe("ProgramClient", () => { const response = await client.program.createNewLp({ name: "name", }); - expect(response).toEqual({ - codeCount: 1, - createdAt: "createdAt", - description: "description", - documentId: "documentId", - id: "id", - meta: { - key: "value", - }, - name: "name", - pattern: "pattern", - state: "inactive", - subscriptionGeneratorId: "subscriptionGeneratorId", - subscriptionPoolId: "subscriptionPoolId", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("createNewLP (2)", async () => { @@ -362,22 +328,7 @@ describe("ProgramClient", () => { const response = await client.program.getLoyaltyProgramInfo({ pid: "pid", }); - expect(response).toEqual({ - codeCount: 1, - createdAt: "createdAt", - description: "description", - documentId: "documentId", - id: "id", - meta: { - key: "value", - }, - name: "name", - pattern: "pattern", - state: "inactive", - subscriptionGeneratorId: "subscriptionGeneratorId", - subscriptionPoolId: "subscriptionPoolId", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("getLoyaltyProgramInfo (2)", async () => { @@ -517,22 +468,7 @@ describe("ProgramClient", () => { pid: "pid", name: "name", }); - expect(response).toEqual({ - codeCount: 1, - createdAt: "createdAt", - description: "description", - documentId: "documentId", - id: "id", - meta: { - key: "value", - }, - name: "name", - pattern: "pattern", - state: "inactive", - subscriptionGeneratorId: "subscriptionGeneratorId", - subscriptionPoolId: "subscriptionPoolId", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("updateLoyaltyProgram (2)", async () => { @@ -821,22 +757,7 @@ describe("ProgramClient", () => { const response = await client.program.partiallyUpdateLoyaltyProgram({ pid: "pid", }); - expect(response).toEqual({ - codeCount: 1, - createdAt: "createdAt", - description: "description", - documentId: "documentId", - id: "id", - meta: { - key: "value", - }, - name: "name", - pattern: "pattern", - state: "inactive", - subscriptionGeneratorId: "subscriptionGeneratorId", - subscriptionPoolId: "subscriptionPoolId", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("partiallyUpdateLoyaltyProgram (2)", async () => { @@ -1015,48 +936,7 @@ describe("ProgramClient", () => { const response = await client.program.getParameterSubscriptionInfo({ pid: "pid", }); - expect(response).toEqual({ - balance: { - balances: [{}], - contactId: 1, - loyaltyProgramId: "loyaltyProgramId", - }, - members: [ - { - createdAt: "createdAt", - memberContactId: 1, - updatedAt: "updatedAt", - }, - ], - reward: [ - { - code: "code", - contactId: 1, - createdAt: "createdAt", - expirationDate: "expirationDate", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rewardId: "rewardId", - updatedAt: "updatedAt", - }, - ], - tier: [ - { - contactId: 1, - createdAt: "createdAt", - groupId: "groupId", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - tierId: "tierId", - updatedAt: "updatedAt", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getParameterSubscriptionInfo (2)", async () => { @@ -1451,13 +1331,7 @@ describe("ProgramClient", () => { pid: "pid", memberContactIds: [1], }); - expect(response).toEqual({ - createdAt: "createdAt", - memberContactIds: [1], - organizationId: 1, - ownerContactId: 1, - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("subscribeMemberToASubscription (2)", async () => { @@ -1775,15 +1649,7 @@ describe("ProgramClient", () => { pid: "pid", contactId: 1, }); - expect(response).toEqual({ - contactId: 1, - createdAt: "createdAt", - loyaltyProgramId: "loyaltyProgramId", - loyaltySubscriptionId: "loyaltySubscriptionId", - organizationId: 1, - updatedAt: "updatedAt", - versionId: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("subscribeToLoyaltyProgram (2)", async () => { diff --git a/tests/wire/reward.test.ts b/tests/wire/reward.test.ts index 476fc18..053a4f1 100644 --- a/tests/wire/reward.test.ts +++ b/tests/wire/reward.test.ts @@ -23,9 +23,7 @@ describe("RewardClient", () => { pid: "pid", cpid: "cpid", }); - expect(response).toEqual({ - count: 1000000, - }); + expect(response).toEqual(rawResponseBody); }); test("getCodeCount (2)", async () => { @@ -170,22 +168,7 @@ describe("RewardClient", () => { const response = await client.reward.getRewardPageApi({ pid: "pid", }); - expect(response).toEqual({ - items: [ - { - createdAt: "2024-01-15T09:30:00Z", - endDate: "2024-01-15T09:30:00Z", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - publicImage: "publicImage", - startDate: "2024-01-15T09:30:00Z", - state: "state", - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - totalCount: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("getRewardPageApi (2)", async () => { @@ -342,16 +325,7 @@ describe("RewardClient", () => { pid: "pid", name: "name", }); - expect(response).toEqual({ - createdAt: "2024-01-15T09:30:00Z", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - publicDescription: "publicDescription", - publicImage: "publicImage", - publicName: "publicName", - updatedAt: "updatedAt", - }); + expect(response).toEqual(rawResponseBody); }); test("createReward (2)", async () => { @@ -477,21 +451,7 @@ describe("RewardClient", () => { pid: "pid", rewardId: "rewardId", }); - expect(response).toEqual({ - code: "code", - consumedAt: "consumedAt", - contactId: 1000000, - createdAt: "2024-01-15T09:30:00Z", - expirationDate: "2024-01-15T09:30:00Z", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rewardId: "rewardId", - updatedAt: "2024-01-15T09:30:00Z", - value: 1.1, - }); + expect(response).toEqual(rawResponseBody); }); test("createVoucher (2)", async () => { @@ -665,24 +625,7 @@ describe("RewardClient", () => { const response = await client.reward.redeemVoucher({ pid: "pid", }); - expect(response).toEqual({ - cancelledAt: "2024-01-15T09:30:00Z", - completedAt: "2024-01-15T09:30:00Z", - contactId: 1000000, - createdAt: "2024-01-15T09:30:00Z", - debitTransactionId: "debitTransactionId", - expiresAt: "2024-01-15T09:30:00Z", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rejectReason: "rejectReason", - rejectedAt: "2024-01-15T09:30:00Z", - rewardAttributionId: "rewardAttributionId", - status: "status", - updatedAt: "2024-01-15T09:30:00Z", - }); + expect(response).toEqual(rawResponseBody); }); test("redeemVoucher (2)", async () => { @@ -894,24 +837,7 @@ describe("RewardClient", () => { pid: "pid", tid: "tid", }); - expect(response).toEqual({ - cancelledAt: "2024-01-15T09:30:00Z", - completedAt: "2024-01-15T09:30:00Z", - contactId: 1000000, - createdAt: "2024-01-15T09:30:00Z", - debitTransactionId: "debitTransactionId", - expiresAt: "2024-01-15T09:30:00Z", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - rejectReason: "rejectReason", - rejectedAt: "2024-01-15T09:30:00Z", - rewardAttributionId: "rewardAttributionId", - status: "status", - updatedAt: "2024-01-15T09:30:00Z", - }); + expect(response).toEqual(rawResponseBody); }); test("completeRedeemTransaction (2)", async () => { @@ -1167,9 +1093,7 @@ describe("RewardClient", () => { const response = await client.reward.validateReward({ pid: "pid", }); - expect(response).toEqual({ - authorize: true, - }); + expect(response).toEqual(rawResponseBody); }); test("validateReward (2)", async () => { @@ -1395,100 +1319,7 @@ describe("RewardClient", () => { pid: "pid", rid: "rid", }); - expect(response).toEqual({ - attributionPerConsumer: 1, - balanceDefinitionId: "balanceDefinitionId", - code: "code", - codeCount: 1000000, - codeGeneratorId: "codeGeneratorId", - codePoolId: "codePoolId", - config: "config", - createdAt: "2024-01-15T09:30:00Z", - disabledAt: "2024-01-15T09:30:00Z", - endDate: "2024-01-15T09:30:00Z", - expirationDate: "2024-01-15T09:30:00Z", - expirationModifier: "startOfPeriod", - expirationUnit: "expirationUnit", - expirationValue: 1, - generator: { - createdAt: "createdAt", - description: "description", - id: "id", - name: "name", - pattern: "pattern", - updatedAt: "2024-01-15T09:30:00Z", - }, - id: "id", - limits: [ - { - createdAt: "2024-01-15T09:30:00Z", - durationUnit: "durationUnit", - durationValue: 1, - limitValue: 1, - rewardLimitId: "rewardLimitId", - slidingSchedule: true, - type: "type", - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - name: "name", - products: [ - { - createdAt: "createdAt", - imageRef: "imageRef", - productId: "productId", - value: "value", - }, - ], - publicDescription: "publicDescription", - publicImage: "publicImage", - publicName: "publicName", - redeemPerConsumer: 1, - redeemRules: ["redeemRules"], - rewardConfigs: { - attribution: "attribution", - code: "code", - value: "value", - }, - rule: { - condition: { - op: "op", - }, - createdAt: "createdAt", - description: "description", - event: { - name: "name", - source: "source", - }, - isInternal: true, - loyaltyProgramId: "loyaltyProgramId", - loyaltyVersionId: 1, - meta: { - key: "value", - }, - name: "name", - results: [{}], - ruleId: "ruleId", - ruleType: "ruleType", - updatedAt: "updatedAt", - }, - startDate: "2024-01-15T09:30:00Z", - subtractBalanceDefinitionId: "subtractBalanceDefinitionId", - subtractBalanceStrategy: "subtractBalanceStrategy", - subtractBalanceValue: 1, - subtractTotalBalance: true, - totalAttribution: 1, - totalRedeem: 1, - triggerId: "triggerId", - unit: "unit", - updatedAt: "updatedAt", - value: 1.1, - valueType: "valueType", - }); + expect(response).toEqual(rawResponseBody); }); test("getRewardInformation (2)", async () => { @@ -1660,28 +1491,7 @@ describe("RewardClient", () => { pid: "pid", contactId: 1, }); - expect(response).toEqual({ - contactId: 1000000, - contactRewards: [ - { - code: "code", - consumedAt: "consumedAt", - createdAt: "createdAt", - expirationDate: "expirationDate", - id: "id", - meta: { - key: "value", - }, - rewardId: "rewardId", - unit: "unit", - updatedAt: "updatedAt", - value: 1.1, - }, - ], - count: 1, - loyaltyProgramId: "loyaltyProgramId", - loyaltySubscriptionId: "loyaltySubscriptionId", - }); + expect(response).toEqual(rawResponseBody); }); test("getVoucherForAContact (2)", async () => { diff --git a/tests/wire/senders.test.ts b/tests/wire/senders.test.ts index f463646..cb39ccd 100644 --- a/tests/wire/senders.test.ts +++ b/tests/wire/senders.test.ts @@ -38,49 +38,7 @@ describe("SendersClient", () => { server.mockEndpoint().get("/senders").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.senders.getSenders(); - expect(response).toEqual({ - senders: [ - { - active: true, - email: "support@example.com", - id: 1, - ips: [ - { - domain: "example.com", - ip: "203.0.113.100", - weight: 50, - }, - ], - name: "Support Team", - }, - { - active: false, - email: "hello@example.com", - id: 3, - ips: [ - { - domain: "example.com", - ip: "203.0.113.100", - weight: 50, - }, - ], - name: "Customer Service", - }, - { - active: false, - email: "marketing@testcompany.com", - id: 5, - ips: [ - { - domain: "example.com", - ip: "203.0.113.100", - weight: 50, - }, - ], - name: "Marketing Team", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSenders (2)", async () => { @@ -112,41 +70,7 @@ describe("SendersClient", () => { server.mockEndpoint().get("/senders").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.senders.getSenders(); - expect(response).toEqual({ - senders: [ - { - active: true, - email: "marketing@example.com", - id: 10, - ips: [ - { - domain: "example.com", - ip: "203.0.113.100", - weight: 100, - }, - ], - name: "Marketing", - }, - { - active: false, - email: "newsletter@example.com", - id: 11, - ips: [ - { - domain: "example.com", - ip: "203.0.113.100", - weight: 50, - }, - { - domain: "news.example.com", - ip: "203.0.113.101", - weight: 50, - }, - ], - name: "Newsletter", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSenders (3)", async () => { @@ -181,11 +105,7 @@ describe("SendersClient", () => { email: "support@example.com", name: "Support Team", }); - expect(response).toEqual({ - dkimError: false, - id: 15, - spfError: false, - }); + expect(response).toEqual(rawResponseBody); }); test("createSender (2)", async () => { @@ -218,11 +138,7 @@ describe("SendersClient", () => { ], name: "Marketing Team", }); - expect(response).toEqual({ - dkimError: false, - id: 15, - spfError: false, - }); + expect(response).toEqual(rawResponseBody); }); test("createSender (3)", async () => { @@ -263,11 +179,7 @@ describe("SendersClient", () => { ], name: "Newsletter", }); - expect(response).toEqual({ - dkimError: false, - id: 15, - spfError: false, - }); + expect(response).toEqual(rawResponseBody); }); test("createSender (4)", async () => { @@ -289,11 +201,7 @@ describe("SendersClient", () => { email: "support@example.com", name: "Support Team", }); - expect(response).toEqual({ - dkimError: false, - id: 15, - spfError: false, - }); + expect(response).toEqual(rawResponseBody); }); test("createSender (5)", async () => { @@ -315,11 +223,7 @@ describe("SendersClient", () => { email: "support@example.com", name: "Support Team", }); - expect(response).toEqual({ - dkimError: true, - id: 16, - spfError: false, - }); + expect(response).toEqual(rawResponseBody); }); test("createSender (6)", async () => { @@ -356,16 +260,7 @@ describe("SendersClient", () => { server.mockEndpoint().get("/senders/ips").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.senders.getIps(); - expect(response).toEqual({ - ips: [ - { - active: true, - domain: "mailing.enterprise.com", - id: 3, - ip: "192.168.1.100", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getIps (2)", async () => { @@ -383,28 +278,7 @@ describe("SendersClient", () => { server.mockEndpoint().get("/senders/ips").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.senders.getIps(); - expect(response).toEqual({ - ips: [ - { - active: true, - domain: "mailing.enterprise.com", - id: 3, - ip: "192.168.1.100", - }, - { - active: true, - domain: "newsletter.enterprise.com", - id: 5, - ip: "192.168.1.101", - }, - { - active: false, - domain: "notifications.enterprise.com", - id: 6, - ip: "192.168.1.102", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getIps (3)", async () => { @@ -638,16 +512,7 @@ describe("SendersClient", () => { const response = await client.senders.getIpsFromSender({ senderId: 1000000, }); - expect(response).toEqual({ - ips: [ - { - domain: "mailing.enterprise.com", - id: 3, - ip: "192.168.1.100", - weight: 75, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getIpsFromSender (2)", async () => { @@ -672,22 +537,7 @@ describe("SendersClient", () => { const response = await client.senders.getIpsFromSender({ senderId: 1000000, }); - expect(response).toEqual({ - ips: [ - { - domain: "mailing.enterprise.com", - id: 3, - ip: "192.168.1.100", - weight: 40, - }, - { - domain: "newsletter.enterprise.com", - id: 5, - ip: "192.168.1.101", - weight: 60, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getIpsFromSender (3)", async () => { diff --git a/tests/wire/smsCampaigns.test.ts b/tests/wire/smsCampaigns.test.ts index 6298783..6d6a40c 100644 --- a/tests/wire/smsCampaigns.test.ts +++ b/tests/wire/smsCampaigns.test.ts @@ -58,57 +58,7 @@ describe("SmsCampaignsClient", () => { server.mockEndpoint().get("/smsCampaigns").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.smsCampaigns.getSmsCampaigns(); - expect(response).toEqual({ - campaigns: [ - { - content: "Visit our Store and get some discount !", - createdAt: "2017-06-01T12:30:00Z", - id: 2, - modifiedAt: "2017-05-01T12:30:00Z", - name: "PROMO CODE", - scheduledAt: "2017-06-01T12:30:00Z", - sender: "MyCompany", - status: "sent", - recipients: { - exclusionLists: [13], - lists: [21], - }, - statistics: { - answered: 2, - delivered: 2987, - hardBounces: 1, - processing: 0, - sent: 3000, - softBounces: 3, - unsubscriptions: 3, - }, - }, - { - content: "Summer Sale is starting tomorrow. Get extra 10% with this code:SUM17", - createdAt: "2017-06-01T12:30:00Z", - id: 10, - modifiedAt: "2017-05-01T12:30:00Z", - name: "SUMMER SALE", - scheduledAt: "2017-08-04T12:30:00Z", - sender: "MyCompany", - status: "draft", - recipients: { - exclusionLists: [13], - lists: [21], - }, - statistics: { - answered: 2, - delivered: 2987, - hardBounces: 1, - processing: 0, - sent: 3000, - softBounces: 3, - unsubscriptions: 3, - }, - }, - ], - count: 12, - }); + expect(response).toEqual(rawResponseBody); }); test("getSmsCampaigns (2)", async () => { @@ -148,9 +98,7 @@ describe("SmsCampaignsClient", () => { name: "Spring Promo Code", sender: "MyShop", }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createSmsCampaign (2)", async () => { @@ -213,29 +161,7 @@ describe("SmsCampaignsClient", () => { const response = await client.smsCampaigns.getSmsCampaign({ campaignId: 1000000, }); - expect(response).toEqual({ - content: "Visit our Store and get some discount !", - createdAt: "2017-06-01T12:30:00Z", - id: 2, - modifiedAt: "2017-05-01T12:30:00Z", - name: "PROMO CODE", - scheduledAt: "2017-06-01T12:30:00Z", - sender: "MyCompany", - status: "sent", - recipients: { - exclusionLists: [13], - lists: [21], - }, - statistics: { - answered: 2, - delivered: 2987, - hardBounces: 1, - processing: 0, - sent: 3000, - softBounces: 3, - unsubscriptions: 3, - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getSmsCampaign (2)", async () => { @@ -416,9 +342,7 @@ describe("SmsCampaignsClient", () => { campaignId: 1000000, recipientsType: "all", }); - expect(response).toEqual({ - processId: 78, - }); + expect(response).toEqual(rawResponseBody); }); test("requestSmsRecipientExport (2)", async () => { diff --git a/tests/wire/smsTemplates.test.ts b/tests/wire/smsTemplates.test.ts index 7338e8b..1b51c42 100644 --- a/tests/wire/smsTemplates.test.ts +++ b/tests/wire/smsTemplates.test.ts @@ -39,30 +39,7 @@ describe("SmsTemplatesClient", () => { .build(); const response = await client.smsTemplates.getSmsTemplates(); - expect(response).toEqual({ - count: 1, - templates: [ - { - id: 4, - name: "Order Confirmation - EN", - short_url_enabled: false, - message: "Thanks for your order !", - compliance: { - compliance_toggle: true, - organisation_prefix: "BREVO", - stop_keyword: "STOP", - }, - encryption: true, - unicode_sms: true, - media_file: "brv-logo.png", - media_file_size: "media_file_size", - media_url: - "https://img-st2.mailinblue.com/1232/images/content_library/original/69282fe28f55fd22de6e0cf9.png", - createdAt: "2025-05-01T12:30:00Z", - updatedAt: "2025-05-01T12:30:00Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSMSTemplates (2)", async () => { diff --git a/tests/wire/tasks.test.ts b/tests/wire/tasks.test.ts index 1f74b0b..9c2f9e8 100644 --- a/tests/wire/tasks.test.ts +++ b/tests/wire/tasks.test.ts @@ -27,18 +27,7 @@ describe("TasksClient", () => { const response = await client.tasks.getAllTasks({ sortBy: "name", }); - expect(response).toEqual({ - items: [ - { - companiesIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - contactsIds: [1, 2, 3], - dealsIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - id: "61a5cd07ca1347c82306ad06", - name: "Task: Connect with client_dev", - taskTypeId: "61a5cd07ca1347c82306ad09", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getAllTasks (2)", async () => { @@ -78,9 +67,7 @@ describe("TasksClient", () => { name: "Task: Connect with client_dev", taskTypeId: "61a5cd07ca1347c82306ad09", }); - expect(response).toEqual({ - id: "61a5cd07ca1347c82306ad06", - }); + expect(response).toEqual(rawResponseBody); }); test("createATask (2)", async () => { @@ -125,14 +112,7 @@ describe("TasksClient", () => { const response = await client.tasks.getATask({ id: "id", }); - expect(response).toEqual({ - companiesIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - contactsIds: [1, 2, 3], - dealsIds: ["61a5ce58c5d4795761045990", "61a5ce58c5d4795761045991", "61a5ce58c5d4795761045992"], - id: "61a5cd07ca1347c82306ad06", - name: "Task: Connect with client_dev", - taskTypeId: "61a5cd07ca1347c82306ad09", - }); + expect(response).toEqual(rawResponseBody); }); test("getATask (2)", async () => { @@ -273,9 +253,6 @@ describe("TasksClient", () => { server.mockEndpoint().get("/crm/tasktypes").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.tasks.getAllTaskTypes(); - expect(response).toEqual({ - id: "61a88a2eb7a574180261234", - title: "Email", - }); + expect(response).toEqual(rawResponseBody); }); }); diff --git a/tests/wire/tier.test.ts b/tests/wire/tier.test.ts index e14d4ff..0bca4c0 100644 --- a/tests/wire/tier.test.ts +++ b/tests/wire/tier.test.ts @@ -32,17 +32,7 @@ describe("TierClient", () => { cid: "cid", tid: "tid", }); - expect(response).toEqual({ - contactId: 1, - createdAt: "2024-01-15T09:30:00Z", - groupId: "groupId", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - meta: { - key: "value", - }, - updatedAt: "2024-01-15T09:30:00Z", - }); + expect(response).toEqual(rawResponseBody); }); test("addSubscriptionToTier (2)", async () => { @@ -236,20 +226,7 @@ describe("TierClient", () => { const response = await client.tier.getListOfTierGroups({ pid: "pid", }); - expect(response).toEqual({ - items: [ - { - createdAt: "2024-01-15T09:30:00Z", - downgradeStrategy: "real_time", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierOrder: ["tierOrder"], - updatedAt: "2024-01-15T09:30:00Z", - upgradeStrategy: "real_time", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getListOfTierGroups (2)", async () => { @@ -385,16 +362,7 @@ describe("TierClient", () => { pid: "pid", name: "name", }); - expect(response).toEqual({ - createdAt: "2024-01-15T09:30:00Z", - downgradeStrategy: "real_time", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierOrder: ["tierOrder"], - updatedAt: "2024-01-15T09:30:00Z", - upgradeStrategy: "real_time", - }); + expect(response).toEqual(rawResponseBody); }); test("createTierGroup (2)", async () => { @@ -562,16 +530,7 @@ describe("TierClient", () => { pid: "pid", gid: "gid", }); - expect(response).toEqual({ - createdAt: "2024-01-15T09:30:00Z", - downgradeStrategy: "real_time", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierOrder: ["tierOrder"], - updatedAt: "2024-01-15T09:30:00Z", - upgradeStrategy: "real_time", - }); + expect(response).toEqual(rawResponseBody); }); test("getTierGroup (2)", async () => { @@ -721,16 +680,7 @@ describe("TierClient", () => { tierOrder: ["tierOrder"], upgradeStrategy: "real_time", }); - expect(response).toEqual({ - createdAt: "2024-01-15T09:30:00Z", - downgradeStrategy: "real_time", - id: "id", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierOrder: ["tierOrder"], - updatedAt: "2024-01-15T09:30:00Z", - upgradeStrategy: "real_time", - }); + expect(response).toEqual(rawResponseBody); }); test("updateTierGroup (2)", async () => { @@ -1083,30 +1033,7 @@ describe("TierClient", () => { accessConditions: [{}], name: "name", }); - expect(response).toEqual({ - accessConditions: [ - { - balanceDefinitionId: "balanceDefinitionId", - createdAt: "2024-01-15T09:30:00Z", - minimumValue: 1, - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - createdAt: "2024-01-15T09:30:00Z", - groupId: "groupId", - imageRef: "imageRef", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierId: "tierId", - tierRewards: [ - { - createdAt: "2024-01-15T09:30:00Z", - rewardId: "rewardId", - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - updatedAt: "2024-01-15T09:30:00Z", - }); + expect(response).toEqual(rawResponseBody); }); test("createTierForTierGroup (2)", async () => { @@ -1265,21 +1192,7 @@ describe("TierClient", () => { const response = await client.tier.getLoyaltyProgramTier({ pid: "pid", }); - expect(response).toEqual({ - items: [ - { - accessConditions: [{}], - createdAt: "2024-01-15T09:30:00Z", - groupId: "groupId", - imageRef: "imageRef", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierId: "tierId", - tierRewards: [{}], - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getLoyaltyProgramTier (2)", async () => { @@ -1428,30 +1341,7 @@ describe("TierClient", () => { name: "name", tierRewards: [{}], }); - expect(response).toEqual({ - accessConditions: [ - { - balanceDefinitionId: "balanceDefinitionId", - createdAt: "2024-01-15T09:30:00Z", - minimumValue: 1, - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - createdAt: "2024-01-15T09:30:00Z", - groupId: "groupId", - imageRef: "imageRef", - loyaltyProgramId: "loyaltyProgramId", - name: "name", - tierId: "tierId", - tierRewards: [ - { - createdAt: "2024-01-15T09:30:00Z", - rewardId: "rewardId", - updatedAt: "2024-01-15T09:30:00Z", - }, - ], - updatedAt: "2024-01-15T09:30:00Z", - }); + expect(response).toEqual(rawResponseBody); }); test("updateTier (2)", async () => { diff --git a/tests/wire/transactionalEmails.test.ts b/tests/wire/transactionalEmails.test.ts index fa2f407..682b720 100644 --- a/tests/wire/transactionalEmails.test.ts +++ b/tests/wire/transactionalEmails.test.ts @@ -30,20 +30,7 @@ describe("TransactionalEmailsClient", () => { .build(); const response = await client.transactionalEmails.getTransacBlockedContacts(); - expect(response).toEqual({ - contacts: [ - { - blockedAt: "2017-05-01T12:30:00Z", - email: "abc@xyz.com", - reason: { - code: "adminBlocked", - message: "Admin blocked", - }, - senderEmail: "ez312@gmal.com", - }, - ], - count: 1, - }); + expect(response).toEqual(rawResponseBody); }); test("getTransacBlockedContacts (2)", async () => { @@ -134,9 +121,7 @@ describe("TransactionalEmailsClient", () => { .build(); const response = await client.transactionalEmails.getBlockedDomains(); - expect(response).toEqual({ - domains: ["example.com", "testdomain.com"], - }); + expect(response).toEqual(rawResponseBody); }); test("blockNewDomain (1)", async () => { @@ -307,10 +292,7 @@ describe("TransactionalEmailsClient", () => { }, ], }); - expect(response).toEqual({ - messageId: "<201798300811.5787683@relay.domain.com>", - messageIds: ["messageIds"], - }); + expect(response).toEqual(rawResponseBody); }); test("sendTransacEmail (2)", async () => { @@ -354,10 +336,7 @@ describe("TransactionalEmailsClient", () => { }, ], }); - expect(response).toEqual({ - messageId: "<201798300811.5787683@relay.domain.com>", - messageIds: ["messageIds"], - }); + expect(response).toEqual(rawResponseBody); }); test("sendTransacEmail (3)", async () => { @@ -465,26 +444,7 @@ describe("TransactionalEmailsClient", () => { startDate: "2022-02-02", endDate: "2022-03-02", }); - expect(response).toEqual({ - batches: [ - { - createdAt: "2022-02-26T11:36:43Z", - scheduledAt: "2022-02-28T11:36:43Z", - status: "queued", - }, - { - createdAt: "2022-02-24T11:36:43Z", - scheduledAt: "2022-02-25T11:36:43Z", - status: "processed", - }, - { - createdAt: "2022-02-25T11:36:43Z", - scheduledAt: "2022-02-26T11:36:43Z", - status: "inProgress", - }, - ], - count: 3, - }); + expect(response).toEqual(rawResponseBody); }); test("getScheduledEmailById (2)", async () => { @@ -510,11 +470,7 @@ describe("TransactionalEmailsClient", () => { startDate: "2022-02-02", endDate: "2022-03-02", }); - expect(response).toEqual({ - createdAt: "2022-02-26T11:36:43Z", - scheduledAt: "2022-02-28T11:36:43Z", - status: "queued", - }); + expect(response).toEqual(rawResponseBody); }); test("getScheduledEmailById (3)", async () => { @@ -592,31 +548,7 @@ describe("TransactionalEmailsClient", () => { server.mockEndpoint().get("/smtp/emails").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.transactionalEmails.getTransacEmailsList(); - expect(response).toEqual({ - count: 120, - transactionalEmails: [ - { - date: "2019-05-25T11:53:26Z", - email: "abc@xyz.com", - from: "diana.doe@example.com", - messageId: "<201798300811.5787683@relay.domain.com>", - subject: "summer camp", - tags: ["tag1"], - templateId: 15, - uuid: "5a78c-209ok98262910-std2341", - }, - { - date: "2019-05-25T07:28:11Z", - email: "test@test.com", - from: "diana.doe@example.com", - messageId: "<201798300811.5700093@relay.domain.com>", - subject: "details verification", - tags: ["tag1"], - templateId: 15, - uuid: "5a78c-209ok98262910-s99a341", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getTransacEmailsList (2)", async () => { @@ -655,28 +587,7 @@ describe("TransactionalEmailsClient", () => { const response = await client.transactionalEmails.getTransacEmailContent({ uuid: "uuid", }); - expect(response).toEqual({ - attachmentCount: 2, - body: "

Greetings from the team

This is the actual html content sent

", - date: "2016-02-25T11:53:26Z", - email: "abc@example.com", - events: [ - { - name: "sent", - time: "2016-02-25T11:53:26Z", - }, - { - name: "delivered", - time: "2016-02-25T11:55:26Z", - }, - { - name: "opened", - time: "2016-02-26T09:53:26Z", - }, - ], - subject: "Summer Camps", - templateId: 12, - }); + expect(response).toEqual(rawResponseBody); }); test("deleteAnSmtpTransactionalLog (1)", async () => { @@ -762,21 +673,7 @@ describe("TransactionalEmailsClient", () => { .build(); const response = await client.transactionalEmails.getAggregatedSmtpReport(); - expect(response).toEqual({ - blocked: 2, - clicks: 9987, - delivered: 18996, - hardBounces: 234, - invalid: 0, - opens: 17654, - range: "2016-09-08|2017-04-28", - requests: 19887, - softBounces: 1533, - spamReports: 1, - uniqueClicks: 8766, - uniqueOpens: 13688, - unsubscribed: 2, - }); + expect(response).toEqual(rawResponseBody); }); test("getAggregatedSmtpReport (2)", async () => { @@ -842,36 +739,7 @@ describe("TransactionalEmailsClient", () => { .build(); const response = await client.transactionalEmails.getEmailEventReport(); - expect(response).toEqual({ - events: [ - { - date: "2017-03-12T12:30:00Z", - email: "john.smith@example.com", - event: "deferred", - from: "john@example.com", - ip: "165.87.3.15", - link: "https://www.someexamplelink.com", - messageId: "<201798300811.5787683@example.domain.com>", - reason: "Error connection timeout", - subject: "Sib client_dev test", - tag: "OrderConfirmation", - templateId: 4, - }, - { - date: "2017-03-13T16:30:00Z", - email: "john.smith@example.com", - event: "delivered", - from: "john@example.com", - ip: "165.87.3.15", - link: "https://www.someexamplelink.com", - messageId: "<201798300811.5787683@example.domain.com>", - reason: "Error connection timeout", - subject: "Sib client_dev test", - tag: "OrderConfirmation", - templateId: 5, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getEmailEventReport (2)", async () => { @@ -941,40 +809,7 @@ describe("TransactionalEmailsClient", () => { .build(); const response = await client.transactionalEmails.getSmtpReport(); - expect(response).toEqual({ - reports: [ - { - blocked: 519, - clicks: 1026, - date: "2017-04-30", - delivered: 10103, - hardBounces: 21, - invalid: 1, - opens: 5091, - requests: 10756, - softBounces: 137, - spamReports: 0, - uniqueClicks: 720, - uniqueOpens: 2318, - unsubscribed: 0, - }, - { - blocked: 920, - clicks: 1514, - date: "2017-05-01", - delivered: 17499, - hardBounces: 34, - invalid: 2, - opens: 10089, - requests: 18812, - softBounces: 254, - spamReports: 0, - uniqueClicks: 1090, - uniqueOpens: 4393, - unsubscribed: 3, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSmtpReport (2)", async () => { @@ -1021,14 +856,7 @@ describe("TransactionalEmailsClient", () => { const response = await client.transactionalEmails.postPreviewSmtpEmailTemplates({ key: "value", }); - expect(response).toEqual({ - fromEmail: "fromEmail", - fromName: "fromName", - html: "html", - previewText: "previewText", - subject: "subject", - usedFeedNames: ["usedFeedNames", "usedFeedNames"], - }); + expect(response).toEqual(rawResponseBody); }); test("postPreviewSmtpEmailTemplates (2)", async () => { @@ -1096,49 +924,7 @@ describe("TransactionalEmailsClient", () => { server.mockEndpoint().get("/smtp/templates").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.transactionalEmails.getSmtpTemplates(); - expect(response).toEqual({ - count: 2, - templates: [ - { - createdAt: "2016-02-24T14:44:24Z", - doiTemplate: false, - htmlContent: "HTML CONTENT 1", - id: 5, - isActive: false, - modifiedAt: "2016-02-24T15:37:11Z", - name: "ChristomasTimeTemplate", - replyTo: "replyto@domain.com", - sender: { - email: "john.smith@example.com", - id: "43", - name: "John", - }, - subject: "Merry Christmas", - tag: "Festival", - testSent: false, - toField: "", - }, - { - createdAt: "2016-02-25T11:53:26Z", - doiTemplate: false, - htmlContent: "HTML CONTENT 2", - id: 12, - isActive: true, - modifiedAt: "2016-02-25T11:53:26Z", - name: "SummerSales2017Template", - replyTo: "replyto@domain.com", - sender: { - email: "john.smith@example.com", - id: "43", - name: "John", - }, - subject: "Enjoy our summer Sales !", - tag: "Summer", - testSent: false, - toField: "", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSmtpTemplates (2)", async () => { @@ -1178,9 +964,7 @@ describe("TransactionalEmailsClient", () => { subject: "Thanks for your purchase !", templateName: "Order Confirmation - EN", }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createSmtpTemplate (2)", async () => { @@ -1238,25 +1022,7 @@ describe("TransactionalEmailsClient", () => { const response = await client.transactionalEmails.getSmtpTemplate({ templateId: 1000000, }); - expect(response).toEqual({ - createdAt: "2016-02-25T11:53:26Z", - doiTemplate: false, - htmlContent: "HTML CONTENT 4", - id: 33, - isActive: true, - modifiedAt: "2016-02-25T11:53:26Z", - name: "OrderConfirmation", - replyTo: "replyto@domain.com", - sender: { - email: "john.smith@example.com", - id: "43", - name: "John", - }, - subject: "Order Confirmation : Thanks for your Purchase !", - tag: "", - testSent: false, - toField: "", - }); + expect(response).toEqual(rawResponseBody); }); test("getSmtpTemplate (2)", async () => { diff --git a/tests/wire/transactionalSms.test.ts b/tests/wire/transactionalSms.test.ts index d0c301b..5d6adfe 100644 --- a/tests/wire/transactionalSms.test.ts +++ b/tests/wire/transactionalSms.test.ts @@ -24,9 +24,7 @@ describe("TransactionalSmsClient", () => { recipient: "33689965433", sender: "MyShop", }); - expect(response).toEqual({ - messageId: 1511882900176220, - }); + expect(response).toEqual(rawResponseBody); }); test("sendAsyncTransactionalSms (2)", async () => { @@ -77,13 +75,7 @@ describe("TransactionalSmsClient", () => { recipient: "33689965433", sender: "MyShop", }); - expect(response).toEqual({ - messageId: 1511882900176220, - reference: "ab1cde2fgh3i4jklmno", - remainingCredits: 82.85, - smsCount: 2, - usedCredits: 0.7, - }); + expect(response).toEqual(rawResponseBody); }); test("sendTransacSms (2)", async () => { @@ -159,19 +151,7 @@ describe("TransactionalSmsClient", () => { .build(); const response = await client.transactionalSms.getTransacAggregatedSmsReport(); - expect(response).toEqual({ - accepted: 6, - blocked: 4, - delivered: 16, - hardBounces: 5, - range: "2015-05-22|2017-11-29", - rejected: 14, - replied: 8, - requests: 54, - skipped: 1, - softBounces: 26, - unsubscribed: 10, - }); + expect(response).toEqual(rawResponseBody); }); test("getTransacAggregatedSmsReport (2)", async () => { @@ -229,28 +209,7 @@ describe("TransactionalSmsClient", () => { .build(); const response = await client.transactionalSms.getSmsEvents(); - expect(response).toEqual({ - events: [ - { - date: "2015-05-20T12:30:00Z", - event: "sent", - messageId: "1473139351170140", - phoneNumber: "phoneNumber", - reason: "Recipient is currently unreachable", - reply: "reply", - tag: "cabWaiting", - }, - { - date: "2015-05-20T16:30:00Z", - event: "delivered", - messageId: "1473139351170140", - phoneNumber: "phoneNumber", - reason: "Recipient is currently unreachable", - reply: "reply", - tag: "cabRequest", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getSmsEvents (2)", async () => { @@ -329,49 +288,7 @@ describe("TransactionalSmsClient", () => { .build(); const response = await client.transactionalSms.getTransacSmsReport(); - expect(response).toEqual({ - reports: [ - { - accepted: 2318, - blocked: 1026, - date: "2017-04-30", - delivered: 10103, - hardBounces: 21, - rejected: 0, - replied: 5091, - requests: 10756, - skipped: 1, - softBounces: 137, - unsubscribed: 720, - }, - { - accepted: 4393, - blocked: 1514, - date: "2017-05-01", - delivered: 17499, - hardBounces: 34, - rejected: 0, - replied: 10089, - requests: 18812, - skipped: 0, - softBounces: 254, - unsubscribed: 1090, - }, - { - accepted: 4689, - blocked: 1646, - date: "2017-05-02", - delivered: 13427, - hardBounces: 16, - rejected: 0, - replied: 11563, - requests: 14321, - skipped: 1, - softBounces: 176, - unsubscribed: 1170, - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getTransacSmsReport (2)", async () => { diff --git a/tests/wire/transactionalWhatsApp.test.ts b/tests/wire/transactionalWhatsApp.test.ts index f286603..d1455ee 100644 --- a/tests/wire/transactionalWhatsApp.test.ts +++ b/tests/wire/transactionalWhatsApp.test.ts @@ -25,9 +25,7 @@ describe("TransactionalWhatsAppClient", () => { senderNumber: "senderNumber", templateId: 123, }); - expect(response).toEqual({ - messageId: "23befbae-1505-47a8-bd27-e30ef739f32c", - }); + expect(response).toEqual(rawResponseBody); }); test("sendWhatsappMessage (2)", async () => { @@ -116,50 +114,7 @@ describe("TransactionalWhatsAppClient", () => { .build(); const response = await client.transactionalWhatsApp.getWhatsappEventReport(); - expect(response).toEqual({ - events: [ - { - body: "Hi! I am a reply", - contactNumber: "contactNumber", - date: "2017-03-12T12:30:00Z", - event: "sent", - mediaUrl: "https://example.com/media.png", - messageId: "23befbae-1505-47a8-bd27-e30ef739f32c", - reason: "23befbae-1505-47a8-bd27-e30ef739f32c", - senderNumber: "senderNumber", - }, - { - body: "Hi! I am a reply", - contactNumber: "contactNumber", - date: "2017-03-12T12:30:00Z", - event: "error", - mediaUrl: "https://example.com/media.png", - messageId: "23befbae-1505-47a8-bd27-e30ef739f32c", - reason: "error reason", - senderNumber: "senderNumber", - }, - { - body: "Hi! I am a reply", - contactNumber: "contactNumber", - date: "2017-03-12T12:30:00Z", - event: "soft-bounce", - mediaUrl: "https://example.com/media.png", - messageId: "23befbae-1505-47a8-bd27-e30ef739f32c", - reason: "invalid whatsapp contact", - senderNumber: "senderNumber", - }, - { - body: "body only in case of text reply & url will be empty", - contactNumber: "contactNumber", - date: "2017-03-12T12:30:00Z", - event: "reply", - mediaUrl: "media url only in case media reply & body will be empty", - messageId: "23befbae-1505-47a8-bd27-e30ef739f32c", - reason: "23befbae-1505-47a8-bd27-e30ef739f32c", - senderNumber: "senderNumber", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getWhatsappEventReport (2)", async () => { diff --git a/tests/wire/user.test.ts b/tests/wire/user.test.ts index 32928ab..0da9032 100644 --- a/tests/wire/user.test.ts +++ b/tests/wire/user.test.ts @@ -41,40 +41,7 @@ describe("UserClient", () => { .build(); const response = await client.user.getInvitedUsersList(); - expect(response).toEqual({ - users: [ - { - email: "owner@company.com", - feature_access: { - conversations: "owner", - crm: "owner", - marketing: "owner", - }, - is_owner: "is_owner", - status: "active", - }, - { - email: "pendingInvitedUser@company.com", - feature_access: { - conversations: "none", - crm: "full", - marketing: "custom", - }, - is_owner: "is_owner", - status: "pending", - }, - { - email: "connectedInvitedUser@company.com", - feature_access: { - conversations: "full", - crm: "none", - marketing: "none", - }, - is_owner: "is_owner", - status: "active", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getInvitedUsersList (2)", async () => { @@ -113,10 +80,7 @@ describe("UserClient", () => { const response = await client.user.putRevokeUserPermission({ email: "email", }); - expect(response).toEqual({ - credit_notes: ["TEST-123"], - status: "OK", - }); + expect(response).toEqual(rawResponseBody); }); test("putRevokeUserPermission (2)", async () => { @@ -160,10 +124,7 @@ describe("UserClient", () => { email: "inviteuser@example.com", privileges: [{}], }); - expect(response).toEqual({ - invoice_id: "invoice_id", - status: "OK", - }); + expect(response).toEqual(rawResponseBody); }); test("inviteuser (2)", async () => { @@ -208,10 +169,7 @@ describe("UserClient", () => { action: "resend", email: "email", }); - expect(response).toEqual({ - credit_notes: ["TEST-123"], - status: "OK", - }); + expect(response).toEqual(rawResponseBody); }); test("putresendcancelinvitation (2)", async () => { @@ -256,11 +214,7 @@ describe("UserClient", () => { email: "inviteuser@example.com", privileges: [{}], }); - expect(response).toEqual({ - credit_notes: ["TEST-123"], - invoice_id: "invoice_id", - status: "OK", - }); + expect(response).toEqual(rawResponseBody); }); test("EditUserPermission (2)", async () => { @@ -341,77 +295,7 @@ describe("UserClient", () => { const response = await client.user.getUserPermission({ email: "email", }); - expect(response).toEqual({ - email: "invitedUser@company.com", - privileges: [ - { - feature: "Email campaign", - permissions: ["Create / edit / delete", "Send / schedule / suspend"], - }, - { - feature: "Templates", - permissions: ["Create / edit / delete", "Activate / deactivate"], - }, - { - feature: "SMS campaign", - permissions: ["Create / edit / delete", "Send / schedule / suspend"], - }, - { - feature: "Facebook Ads", - permissions: ["Schedule / pause"], - }, - { - feature: "Landing pages", - permissions: ["All"], - }, - { - feature: "Workflows", - permissions: ["Create / edit / delete", "Activate / deactivate / Pause"], - }, - { - feature: "Contacts", - permissions: ["View", "Contact forms"], - }, - { - feature: "SMTP & API", - permissions: ["SMTP", "API Keys", "Authorized IPs"], - }, - { - feature: "User management", - permissions: ["None"], - }, - { - feature: "Sales Platform", - permissions: [ - "Create / edit / delete owned deals and tasks", - "Manage deals and tasks from other users", - "Reports", - "Settings", - ], - }, - { - feature: "Conversations", - permissions: ["None"], - }, - { - feature: "Senders, Domains & Dedicated IPs", - permissions: ["Senders management", "Domains management", "Dedicated IPs management"], - }, - { - feature: "Push", - permissions: ["View", "Create / edit / delete", "Send", "Settings"], - }, - { - feature: "Companies", - permissions: [ - "Create / edit / delete owned companies", - "Manage companies from other users", - "Settings", - ], - }, - ], - status: "active", - }); + expect(response).toEqual(rawResponseBody); }); test("getUserPermission (2)", async () => { diff --git a/tests/wire/webhooks.test.ts b/tests/wire/webhooks.test.ts index 207ac1a..9d3e4ec 100644 --- a/tests/wire/webhooks.test.ts +++ b/tests/wire/webhooks.test.ts @@ -43,52 +43,7 @@ describe("WebhooksClient", () => { server.mockEndpoint().get("/webhooks").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.webhooks.getWebhooks(); - expect(response).toEqual({ - webhooks: [ - { - auth: { - token: "test-auth-token1234", - type: "bearer", - }, - batched: true, - channel: "email", - createdAt: "2016-07-18T12:30:09Z", - description: "Webhook triggered on campaign openings", - events: ["opened"], - headers: [ - { - key: "cf-secret", - value: "test-header-value", - }, - ], - id: 9864, - modifiedAt: "2016-07-18T16:00:50Z", - type: "transactional", - url: "https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1", - }, - { - auth: { - token: "test-auth-token1234", - type: "bearer", - }, - batched: true, - channel: "sms", - createdAt: "2017-02-20T14:30:00Z", - description: "Webhook triggered on campaign hard bounces", - events: ["hardBounces"], - headers: [ - { - key: "cf-secret", - value: "test-header-value", - }, - ], - id: 22770, - modifiedAt: "2017-02-20T19:00:00Z", - type: "marketing", - url: "http://exmaple.domain.com/15kxxxxxn1", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getWebhooks (2)", async () => { @@ -123,9 +78,7 @@ describe("WebhooksClient", () => { events: ["sent"], url: "http://requestb.in/173lyyx1", }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createWebhook (2)", async () => { @@ -171,9 +124,7 @@ describe("WebhooksClient", () => { notifyURL: "https://brevo.com", type: "transactional", }); - expect(response).toEqual({ - processId: 78, - }); + expect(response).toEqual(rawResponseBody); }); test("exportWebhooksHistory (2)", async () => { @@ -223,27 +174,7 @@ describe("WebhooksClient", () => { const response = await client.webhooks.getWebhook({ webhookId: 1000000, }); - expect(response).toEqual({ - auth: { - token: "test-auth-token1234", - type: "bearer", - }, - batched: true, - channel: "sms", - createdAt: "2016-06-07T09:10:10Z", - description: "Webhook triggered on campaign openings and addition of lists", - events: ["listAdditions", "opened"], - headers: [ - { - key: "cf-secret", - value: "test-header-value", - }, - ], - id: 7287, - modifiedAt: "2016-06-08T11:30:00Z", - type: "marketing", - url: "http://example.domain.com/1brxxxxxx5p1", - }); + expect(response).toEqual(rawResponseBody); }); test("getWebhook (2)", async () => { diff --git a/tests/wire/whatsAppCampaigns.test.ts b/tests/wire/whatsAppCampaigns.test.ts index 0e9a43a..bf2f877 100644 --- a/tests/wire/whatsAppCampaigns.test.ts +++ b/tests/wire/whatsAppCampaigns.test.ts @@ -31,30 +31,7 @@ describe("WhatsAppCampaignsClient", () => { server.mockEndpoint().get("/whatsappCampaigns").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.whatsAppCampaigns.getWhatsAppCampaigns(); - expect(response).toEqual({ - campaigns: [ - { - campaignName: "campaign_22", - campaignStatus: "sent", - createdAt: "2017-05-01T12:30:00Z", - errorReason: "NONE", - id: 1672035851100690, - invalidatedContacts: 0, - modifiedAt: "2017-05-01T12:30:00Z", - readPercentage: 28.57, - scheduledAt: "2022-12-27T09:50:00Z", - stats: { - delivered: 3, - notSent: 4, - read: 2, - sent: 3, - unsubscribe: 0, - }, - templateId: "templateId", - }, - ], - count: 23, - }); + expect(response).toEqual(rawResponseBody); }); test("getWhatsAppCampaigns (2)", async () => { @@ -96,9 +73,7 @@ describe("WhatsAppCampaignsClient", () => { scheduledAt: "2017-06-01T12:30:00+02:00", templateId: 19, }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createWhatsAppCampaign (2)", async () => { @@ -148,14 +123,7 @@ describe("WhatsAppCampaignsClient", () => { .build(); const response = await client.whatsAppCampaigns.getWhatsAppConfig(); - expect(response).toEqual({ - businessStatus: "verified", - phoneNumberNameStatus: "APPROVED", - phoneNumberQuality: "GREEN", - sendingLimit: "TIER_1K", - whatsappBusinessAccountId: "whatsappBusinessAccountId", - whatsappBusinessAccountStatus: "APPROVED", - }); + expect(response).toEqual(rawResponseBody); }); test("getWhatsAppConfig (2)", async () => { @@ -203,9 +171,7 @@ describe("WhatsAppCampaignsClient", () => { language: "en", name: "Test template", }); - expect(response).toEqual({ - id: 5, - }); + expect(response).toEqual(rawResponseBody); }); test("createWhatsAppTemplate (2)", async () => { @@ -272,31 +238,7 @@ describe("WhatsAppCampaignsClient", () => { .build(); const response = await client.whatsAppCampaigns.getWhatsAppTemplates(); - expect(response).toEqual({ - count: 2, - templates: [ - { - category: "MARKETING", - createdAt: "2017-05-01T12:30:00Z", - errorReason: "NONE", - id: 235, - language: "en", - modifiedAt: "2017-05-01T12:30:00Z", - name: "campaign_22", - status: "approved", - }, - { - category: "MARKETING", - createdAt: "2017-0", - errorReason: "NONE", - id: 124, - language: "", - modifiedAt: "2017-05-01T12:30:00Z", - name: "test-template", - status: "draft", - }, - ], - }); + expect(response).toEqual(rawResponseBody); }); test("getWhatsAppTemplates (2)", async () => { @@ -398,56 +340,7 @@ describe("WhatsAppCampaignsClient", () => { const response = await client.whatsAppCampaigns.getWhatsAppCampaign({ campaignId: 1000000, }); - expect(response).toEqual({ - campaignName: "Test WhatsApp Campaign", - campaignStatus: "sent", - createdAt: "2022-12-26T06:50:00Z", - id: 1672035851100690, - modifiedAt: "2022-12-26T08:50:00Z", - scheduledAt: "2022-12-27T09:50:00Z", - senderNumber: "senderNumber", - stats: { - delivered: 3, - notSent: 4, - read: 2, - sent: 3, - unsubscribe: 0, - }, - template: { - body_variables: [ - { - datatype: "text", - default: "INVALID_HEADER", - name: "FIRSTNAME", - }, - ], - button_type: "CALL_TO_ACTION", - category: "MARKETING", - components: [ - { - text: "making it look like readable English.", - type: "BODY", - }, - { - text: "Life is a long lesson in humility", - type: "BUTTONS", - }, - ], - contains_button: true, - display_header: false, - header_type: "text", - header_variables: [ - { - datatype: "text", - default: "INVALID HEADER", - name: "FIRSTNAME", - }, - ], - hide_footer: true, - language: "en", - name: "official_campaign8", - }, - }); + expect(response).toEqual(rawResponseBody); }); test("getWhatsAppCampaign (2)", async () => {