diff --git a/.gitignore b/.gitignore index 311605f..ffd2b18 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,6 @@ yarn-error.log* next-env.d.ts -src/generated \ No newline at end of file +src/generated + +coverage-ts \ No newline at end of file diff --git a/drizzle/0001_burly_mister_sinister.sql b/drizzle/0001_burly_mister_sinister.sql new file mode 100644 index 0000000..7448f39 --- /dev/null +++ b/drizzle/0001_burly_mister_sinister.sql @@ -0,0 +1,5 @@ +CREATE TABLE `deal` ( + `id` text PRIMARY KEY NOT NULL, + `title` text, + `description` text +); diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json new file mode 100644 index 0000000..bdae0e7 --- /dev/null +++ b/drizzle/meta/0001_snapshot.json @@ -0,0 +1,67 @@ +{ + "version": "5", + "dialect": "sqlite", + "id": "5ada055f-2a73-4b12-a5cd-8778acb81fd2", + "prevId": "f8921c19-f0a0-4333-b33e-e2a5b21f8d05", + "tables": { + "deal": { + "name": "deal", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 7044a91..bbfb0fc 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -8,6 +8,13 @@ "when": 1703493410904, "tag": "0000_flawless_russian", "breakpoints": true + }, + { + "idx": 1, + "version": "5", + "when": 1704553290895, + "tag": "0001_burly_mister_sinister", + "breakpoints": true } ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e9a2e91..6206531 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,8 @@ "knip": "^3.8.4", "postcss": "^8", "tailwindcss": "^3.3.0", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "typescript-coverage-report": "^0.8.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1575,6 +1576,16 @@ "node": ">=16" } }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -3711,6 +3722,20 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, + "node_modules/@hypnosphi/create-react-context": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz", + "integrity": "sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==", + "dev": true, + "dependencies": { + "gud": "^1.0.0", + "warning": "^4.0.3" + }, + "peerDependencies": { + "prop-types": "^15.0.0", + "react": ">=0.14.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -4591,6 +4616,20 @@ "integrity": "sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==", "dev": true }, + "node_modules/@semantic-ui-react/event-stack": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.3.tgz", + "integrity": "sha512-FdTmJyWvJaYinHrKRsMLDrz4tTMGdFfds299Qory53hBugiDvGC0tEJf+cHsi5igDwWb/CLOgOiChInHwq8URQ==", + "dev": true, + "dependencies": { + "exenv": "^1.2.2", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/@sindresorhus/merge-streams": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz", @@ -6057,6 +6096,12 @@ "validator": "^13.7.0" } }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "dev": true + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -6106,6 +6151,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-table3/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cli-table3/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cli-truncate": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", @@ -6488,6 +6568,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/deep-equal": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "dev": true, + "dependencies": { + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.5.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -7629,6 +7729,12 @@ "es5-ext": "~0.10.14" } }, + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==", + "dev": true + }, "node_modules/exit-hook": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", @@ -8351,6 +8457,12 @@ "graphql": ">=0.11 <=16" } }, + "node_modules/gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", + "dev": true + }, "node_modules/hanji": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/hanji/-/hanji-0.0.5.tgz", @@ -8755,6 +8867,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -9434,6 +9562,12 @@ "node": ">=4.0" } }, + "node_modules/keyboard-key": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", + "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", + "dev": true + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -10225,6 +10359,15 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", + "dev": true, + "bin": { + "ncp": "bin/ncp" + } + }, "node_modules/ndjson": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", @@ -10517,6 +10660,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -11077,6 +11236,17 @@ "node": ">= 6" } }, + "node_modules/popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/postcss": { "version": "8.4.32", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", @@ -11982,6 +12152,12 @@ "sha.js": "bin.js" } }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -12864,6 +13040,27 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -12893,6 +13090,46 @@ "node": ">= 0.8.0" } }, + "node_modules/type-coverage-core": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.27.1.tgz", + "integrity": "sha512-W+PMYbhUsq+UWkrb7UkmyO7zF3zt4qZuQukyDM6eaiCIkMJclcVmR3O02clDk4FKpKPbzHictOmoIu3fYp+53g==", + "dev": true, + "dependencies": { + "fast-glob": "3", + "minimatch": "6 || 7 || 8 || 9", + "normalize-path": "3", + "tslib": "1 || 2", + "tsutils": "3" + }, + "peerDependencies": { + "typescript": "2 || 3 || 4 || 5" + } + }, + "node_modules/type-coverage-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/type-coverage-core/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -13009,6 +13246,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typed-styles": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", + "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", + "dev": true + }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -13022,6 +13265,147 @@ "node": ">=14.17" } }, + "node_modules/typescript-coverage-report": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.8.0.tgz", + "integrity": "sha512-qYUrPt2CISyXTzwwyD7g6lciovvb2qQGMZKC7zHf2TiLg8QJ6cybYKX1/TETB/BzxaSU7+2FVjiIq3q1TG8A0w==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "cli-table3": "^0.6.1", + "commander": "^5.0.0", + "ncp": "^2.0.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "rimraf": "^3.0.2", + "semantic-ui-react": "^0.88.2", + "type-coverage-core": "^2.23.0" + }, + "bin": { + "typescript-coverage-report": "dist/bin/typescript-coverage-report.js" + }, + "peerDependencies": { + "typescript": "2 || 3 || 4 || 5" + } + }, + "node_modules/typescript-coverage-report/node_modules/@stardust-ui/react-component-event-listener": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", + "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^16.8.0", + "react-dom": "^16.8.0" + } + }, + "node_modules/typescript-coverage-report/node_modules/@stardust-ui/react-component-ref": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", + "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.6.3" + }, + "peerDependencies": { + "react": "^16.8.0", + "react-dom": "^16.8.0" + } + }, + "node_modules/typescript-coverage-report/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/typescript-coverage-report/node_modules/react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript-coverage-report/node_modules/react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + }, + "peerDependencies": { + "react": "^16.14.0" + } + }, + "node_modules/typescript-coverage-report/node_modules/react-popper": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.11.tgz", + "integrity": "sha512-VSA/bS+pSndSF2fiasHK/PTEEAyOpX60+H5EPAjoArr8JGm+oihu4UbrqcEBpQibJxBVCpYyjAX7abJ+7DoYVg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.1.2", + "@hypnosphi/create-react-context": "^0.3.1", + "deep-equal": "^1.1.1", + "popper.js": "^1.14.4", + "prop-types": "^15.6.1", + "typed-styles": "^0.0.7", + "warning": "^4.0.2" + }, + "peerDependencies": { + "react": "0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/typescript-coverage-report/node_modules/scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/typescript-coverage-report/node_modules/semantic-ui-react": { + "version": "0.88.2", + "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", + "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.1.2", + "@semantic-ui-react/event-stack": "^3.1.0", + "@stardust-ui/react-component-event-listener": "~0.38.0", + "@stardust-ui/react-component-ref": "~0.38.0", + "classnames": "^2.2.6", + "keyboard-key": "^1.0.4", + "lodash": "^4.17.15", + "prop-types": "^15.7.2", + "react-is": "^16.8.6", + "react-popper": "^1.3.4", + "shallowequal": "^1.1.0" + }, + "peerDependencies": { + "react": "^16.8.0", + "react-dom": "^16.8.0" + } + }, "node_modules/ua-parser-js": { "version": "1.0.37", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", @@ -13297,6 +13681,15 @@ "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", "dev": true }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dev": true, + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", diff --git a/package.json b/package.json index 7d1fddc..89bd920 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,9 @@ "codegen": "graphql-codegen", "drizzle-studio": "drizzle-kit studio", "db-migration": "drizzle-kit generate:sqlite", - "knip": "knip" + "db-push": "drizzle-kit push:sqlite", + "knip": "knip", + "ts-coverage": "typescript-coverage-report" }, "dependencies": { "@apollo/client": "^3.8.8", @@ -44,6 +46,7 @@ "knip": "^3.8.4", "postcss": "^8", "tailwindcss": "^3.3.0", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "typescript-coverage-report": "^0.8.0" } } diff --git a/sqlite.db b/sqlite.db index 8b39bf5..c50aece 100644 Binary files a/sqlite.db and b/sqlite.db differ diff --git a/src/db/schema.ts b/src/db/schema.ts index a4fc569..bd1663c 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -4,3 +4,9 @@ export const users = sqliteTable("users", { id: text("id"), name: text("name"), }); + +export const deals = sqliteTable("deal", { + id: text("id").primaryKey(), + title: text("title"), + description: text("description"), +}); diff --git a/src/graphql/query/getDogs.graphql b/src/graphql/query/getDogs.graphql deleted file mode 100644 index 79f51de..0000000 --- a/src/graphql/query/getDogs.graphql +++ /dev/null @@ -1,13 +0,0 @@ -query getDogs { - dogs { - name - breed - } -} - -query getPaginatedDogs($offset: Int, $limit: Int) { - paginatedDogs(offset: $offset, limit: $limit) { - name - weight - } -} diff --git a/src/graphql/schema/deals/deals.resolver.ts b/src/graphql/schema/deals/deals.resolver.ts new file mode 100644 index 0000000..1cad4f8 --- /dev/null +++ b/src/graphql/schema/deals/deals.resolver.ts @@ -0,0 +1,13 @@ +import { db } from "@/db/db"; +import { deals as dbDeals } from "@/db/schema"; +import { Query, Resolver } from "type-graphql"; +import { Deal } from "./deals"; + +@Resolver(Deal) +export class DealResolver { + @Query(() => [Deal]) + async deals(): Promise { + const deals = db.select().from(dbDeals).all(); + return deals; + } +} diff --git a/src/graphql/schema/deals/deals.ts b/src/graphql/schema/deals/deals.ts new file mode 100644 index 0000000..869bde3 --- /dev/null +++ b/src/graphql/schema/deals/deals.ts @@ -0,0 +1,11 @@ +import { ObjectType, Field, ID } from "type-graphql"; + +@ObjectType({ description: "Deal Object" }) +export class Deal { + @Field() + id: string; + @Field() + title: string; + @Field() + description: string; +} diff --git a/src/graphql/schema/dogs/dogs.json b/src/graphql/schema/dogs/dogs.json deleted file mode 100644 index ca0c22b..0000000 --- a/src/graphql/schema/dogs/dogs.json +++ /dev/null @@ -1,1540 +0,0 @@ -[ - { - "attributes": [ - { - "key": "Location", - "value": "Purple Room" - }, - { - "key": "Kennel", - "value": "3" - }, - { - "key": "Code #", - "value": "268737" - } - ], - "description": [ - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I really enjoy playing with toys! I’ll let you know my favorite when we meet.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137855.jpg", - "name": "Abby", - "ageInWeeks": 76, - "sex": "Female", - "breed": "Alaskan Malamute - Siberian Husky", - "color": "White, Black", - "fee": 400, - "availableDate": "2022-03-25T07:00:00.000Z", - "weight": 58.8 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Blue Pod" - }, - { - "key": "Kennel", - "value": "77" - }, - { - "key": "Code #", - "value": "264642" - } - ], - "description": [ - " Get to know me and watch my video below!", - " I know some basic cues, such as sit, down, stay, and walking on leash nicely.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " I may do best in a home where there is a resident dog for me to play with!", - " I have been working with the Behavior and Training team here at OHS and am looking for a special home.", - " It will take time and patience to get to know me. You’ll need to meet with me multiple times before taking me home.", - " To learn more about my specific needs, please read my What to Expect handout.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " I love to run! I have been on the running team while at OHS and would make a great running buddy!" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/135745.jpg", - "name": "Abra", - "ageInWeeks": 60, - "sex": "Male", - "breed": "Golden Retriever - Labrador", - "color": "Yellow", - "fee": 400, - "availableDate": "2022-03-26T07:00:00.000Z", - "weight": 54.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "41" - }, - { - "key": "Code #", - "value": "267866" - } - ], - "description": [ - " Watch my video below!", - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137320.jpg", - "name": "Ashley", - "ageInWeeks": 36, - "sex": "Female", - "breed": "Siberian Husky - Australian Shepherd", - "color": "White, Black", - "fee": 450, - "availableDate": "2022-03-25T07:00:00.000Z", - "weight": 42.9 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "44" - }, - { - "key": "Code #", - "value": "268540" - } - ], - "description": [ - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137636.jpg", - "name": "Ava", - "ageInWeeks": 156, - "sex": "Female", - "breed": "Siberian Husky - Shepherd", - "color": "Brown, Black", - "fee": 300, - "availableDate": "2022-03-12T08:00:00.000Z", - "weight": 63.1 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "21" - }, - { - "key": "Code #", - "value": "268884" - } - ], - "description": [ - " I have a lot of energy and will thrive with an active lifestyle! I would love to get up and go adventure with you.", - " I really enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Taking a training class will help us bond and help me become a model canine citizen. I pull like a tractor, so this is strongly (pun!) recommended.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137792.jpg", - "name": "Bennett", - "ageInWeeks": 64, - "sex": "Male", - "breed": "Labrador - American Staffordshire Terrier", - "color": "White, Tan", - "fee": 400, - "availableDate": "2022-03-22T07:00:00.000Z", - "weight": 84 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "13" - }, - { - "key": "Code #", - "value": "269330" - } - ], - "description": [ - " I enjoy the company of my human friends.", - " I have been diagnosed with dental disease which means I may need dental cleanings or extractions in the future." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137946.jpg", - "name": "Bug", - "ageInWeeks": 156, - "sex": "Male", - "breed": "Cardigan Welsh Corgi - Retriever", - "color": "Black", - "fee": 300, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 40 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "12" - }, - { - "key": "Code #", - "value": "269082" - } - ], - "description": [ - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137882.jpg", - "name": "Cappadonna", - "ageInWeeks": 104, - "sex": "Female", - "breed": "Siberian Husky", - "color": "White, Red", - "fee": 400, - "availableDate": "2022-03-26T07:00:00.000Z", - "weight": 49 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "59" - }, - { - "key": "Code #", - "value": "267246" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !", - " I have been exposed to another dog who has canine parvovirus virus. I will need to be kept separated from unvaccinated or immunocompromised canines for at least two weeks." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137935.jpg", - "name": "Casaba", - "ageInWeeks": 8, - "sex": "Female", - "breed": "American Pit Bull", - "color": "White, Blue", - "fee": 500, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 11.2 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Sapphire Room" - }, - { - "key": "Kennel", - "value": "3" - }, - { - "key": "Code #", - "value": "268813" - } - ], - "description": [ - " I really enjoy the company of my human friends once I get to know them.", - " Once I’m comfortable with my human, my happy place is in a warm lap.", - " I love playing fetch! Meet me and we can play together!", - " Despite my tiny stature, I’m a pretty high energy dog.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " I will need to meet any canine companions prior to getting adopted." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137773.jpg", - "name": "Corbin", - "ageInWeeks": 156, - "sex": "Male", - "breed": "Chihuahua - Mix", - "color": "Tri Color", - "fee": 400, - "availableDate": "2022-03-21T07:00:00.000Z", - "weight": 6.5 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Ivory Room" - }, - { - "key": "Kennel", - "value": "2" - }, - { - "key": "Code #", - "value": "268394" - } - ], - "description": [ - " I just arrived from Oklahoma through the Second Chance Program and my friends at OHS are still learning about me.", - " I need to go to an adult only home.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137563.jpg", - "name": "Daisy", - "ageInWeeks": 52, - "sex": "Female", - "breed": "Brittany - Mix", - "color": "White, Liver", - "fee": 400, - "availableDate": "2022-03-26T07:00:00.000Z", - "weight": 28 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "7" - }, - { - "key": "Code #", - "value": "266604" - } - ], - "description": [ - " I am not for the first time dog owner. Someone very familiar with canine body language is a must for me.", - " I am an active girl! I would love to get up and go on adventures with you.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I’m learning to live my best life out on walks by using a special transitional leash. Watch this video to learn how to use it to continue helping me succeed.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " Bite History: I have a history of biting a person.", - " I have been diagnosed with cruciate ligament in my knee(s). This will require surgical intervention and extensive physical rehabilitation." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137295.jpg", - "name": "Demi", - "ageInWeeks": 52, - "sex": "Female", - "breed": "Shepherd - American Pit Bull", - "color": "White, Red", - "fee": 450, - "availableDate": "2022-02-22T08:00:00.000Z", - "weight": 52.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "4" - }, - { - "key": "Code #", - "value": "268906" - } - ], - "description": [ - " I know some basic cues, such as sit.", - " I really enjoy the company of my human friends.", - " Taking a training class will help us bond and help me become a model canine citizen.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137781.jpg", - "name": "Diva", - "ageInWeeks": 64, - "sex": "Female", - "breed": "American Pit Bull", - "color": "White, Lilac", - "fee": 400, - "availableDate": "2022-03-22T07:00:00.000Z", - "weight": 49.9 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "61" - }, - { - "key": "Code #", - "value": "268763" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137939.jpg", - "name": "Doughboy", - "ageInWeeks": 8, - "sex": "Male", - "breed": "Bull Terrier - Mix", - "color": "White, Black", - "fee": 500, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 8.7 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "9" - }, - { - "key": "Code #", - "value": "262067" - } - ], - "description": [ - " Get to know me by watching my video below.", - " I am on the running team at OHS and my friends say I am a dream runner!", - " I would make a great hiking companion.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I really enjoy the company of my human friends.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " I have chronic skin issues which will require long term management. It can be caused by different factors such as fleas, food or environmental factors." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/134347.jpg", - "name": "Dugong", - "ageInWeeks": 76, - "sex": "Female", - "breed": "American Pit Bull - Mix", - "color": "White, Blue", - "fee": 400, - "availableDate": "2022-02-11T08:00:00.000Z", - "weight": 57 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "52" - }, - { - "key": "Code #", - "value": "269336" - } - ], - "description": [ - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " I have chronic ear infections which will require long term management.", - " Helping me lose weight will allow me to live my best life!" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137927.jpg", - "name": "Duke", - "ageInWeeks": 364, - "sex": "Male", - "breed": "Cocker Spaniel - Labrador", - "color": "White, Black", - "fee": 150, - "availableDate": "2022-03-29T07:00:00.000Z", - "weight": 60 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "19" - }, - { - "key": "Code #", - "value": "269327" - } - ], - "description": [ - " Once I am comfortable, I enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137944.jpg", - "name": "Flower", - "ageInWeeks": 76, - "sex": "Female", - "breed": "Shepherd - American Pit Bull", - "color": "Red", - "fee": 400, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 66.1 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "48" - }, - { - "key": "Code #", - "value": "269084" - } - ], - "description": [ - " I really enjoy the company of my human friends. I give kisses and snuggles!", - " I am leash trained and am great at loose-leash walking!", - " Escape Artist: I have a history of escaping doors or fences. I will need supervision when outdoors or we can go on adventures together – on leash of course!", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137861.jpg", - "name": "Ghostface", - "ageInWeeks": 52, - "sex": "Female", - "breed": "Shepherd - American Pit Bull", - "color": "Tri Color", - "fee": 400, - "availableDate": "2022-03-25T07:00:00.000Z", - "weight": 55.1 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "18" - }, - { - "key": "Code #", - "value": "262708" - } - ], - "description": [ - " Get to know me by watching my video below. I’m a super smart boy with lots of love to give but also lots to learn! If you take the time to work with me I can be a real special companion!", - " I love to run! I’m a favorite on the running team at OHS and would make a great running buddy!", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Taking a training class will help us bond and help me become a model canine citizen.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " Escape Artist: I have a history of digging out from under fences. I will need supervision when outdoors or we can go on adventures together – on leash of course!", - " Bite History: I have a history of biting a person." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/134666.jpg", - "name": "Godric", - "ageInWeeks": 60, - "sex": "Male", - "breed": "American Pit Bull - Australian Cattledog", - "color": "White, Brown", - "fee": 400, - "availableDate": "2022-02-06T08:00:00.000Z", - "weight": 56 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "10" - }, - { - "key": "Code #", - "value": "269337" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137928.jpg", - "name": "Happy", - "ageInWeeks": 16, - "sex": "Male", - "breed": "Wirehaired Terrier - Mix", - "color": "White, Brindle", - "fee": 500, - "availableDate": "2022-03-29T07:00:00.000Z", - "weight": 25.4 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "33" - }, - { - "key": "Code #", - "value": "269049" - } - ], - "description": [ - " I know some basic cues, such as sit.", - " I really enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Taking a training class will help us bond and help me become a model canine citizen." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137894.jpg", - "name": "Ivy", - "ageInWeeks": 40, - "sex": "Female", - "breed": "American Pit Bull - Mix", - "color": "White, Brindle", - "fee": 450, - "availableDate": "2022-03-27T07:00:00.000Z", - "weight": 37 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "35" - }, - { - "key": "Code #", - "value": "266017" - } - ], - "description": [ - " Watch my video! I’m a sweet boy that loves to be loved on by my human friends.", - " I am an active young man! I would love to get up and go on an adventure with you and I play nice with other dogs too! But the squirrels at the park better watch out!", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " I have been diagnosed with dental disease which means I may need dental cleanings or extractions in the future." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/136285.jpg", - "name": "Jam", - "ageInWeeks": 60, - "sex": "Male", - "breed": "American Pit Bull - Shepherd", - "color": "White, Tan", - "fee": 400, - "availableDate": "2022-02-25T08:00:00.000Z", - "weight": 68.8 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "17" - }, - { - "key": "Code #", - "value": "268878" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you!", - " Taking a training class will help us bond and help me become a model canine citizen.", - " Resource Guarding: I have a history of guarding my people, food, toys and/or bedding from other animals or people.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137769.jpg", - "name": "Karen", - "ageInWeeks": 16, - "sex": "Female", - "breed": "American Pit Bull", - "color": "White, Tan", - "fee": 500, - "availableDate": "2022-03-23T07:00:00.000Z", - "weight": 27.4 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "27" - }, - { - "key": "Code #", - "value": "267609" - } - ], - "description": [ - " I have lived with other dogs in my last home.", - " Taking a training class will help us bond and help me become a model canine citizen.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I really enjoy the company of my human friends.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " I have been diagnosed with demodectic mange, which I am being treated for. It is not contagious to people or other animals." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137393.jpg", - "name": "Kiwi", - "ageInWeeks": 52, - "sex": "Male", - "breed": "American Pit Bull", - "color": "White, Brindle", - "fee": 400, - "availableDate": "2022-03-09T08:00:00.000Z", - "weight": 36.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Ivory Room" - }, - { - "key": "Kennel", - "value": "1" - }, - { - "key": "Code #", - "value": "267267" - } - ], - "description": [ - " Don’t let my three legs fool you, I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " I really enjoy the company of my human friends.", - " I know some basic cues, such as sit, down, come, and leave it.", - " I am a staff favorite and love to snuggle with my friends here at the shelter!", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Bite History: I have a history of biting a person.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137689.jpg", - "name": "Kronk", - "ageInWeeks": 76, - "sex": "Male", - "breed": "American Pit Bull - Mix", - "color": "White, Brown", - "fee": 400, - "availableDate": "2022-03-16T07:00:00.000Z", - "weight": 42.4 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Orange Room" - }, - { - "key": "Kennel", - "value": "1" - }, - { - "key": "Code #", - "value": "267511" - } - ], - "description": [ - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " House Training: I have a history of housetraining struggles.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Helping me lose weight will allow me to live my best life!" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137148.jpg", - "name": "Lilly", - "ageInWeeks": 56, - "sex": "Female", - "breed": "Labrador - Australian Shepherd", - "color": "White, Brown", - "fee": 400, - "availableDate": "2022-03-03T08:00:00.000Z", - "weight": 68.3 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Foster" - }, - { - "key": "Code #", - "value": "263454" - } - ], - "description": [ - " I really enjoy the company of my human friends. I am affectionate, love to learn and am eager to please.", - " I am tiny but mighty – I survived life on the street during Hurricane Ida and am now ready to live the good life.", - " Snuggling is my specialty – I’ve never met a lap I didn’t want to curl up in.", - " Working from home? I would love to lay in a bed all day next to your desk.", - " Even though I am a little older, I love to go for walks. My happy prance will surely charm you!", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " House Training: I have a history of housetraining struggles.", - " Bite History: I have a history of biting a person.", - " I have chronic ear infections which will require long term management.", - " I have chronic skin issues which will require long term management. It can be caused by different factors such as fleas, food or environmental factors.", - " I have been diagnosed with dental disease which means I may need dental cleanings or extractions in the future.", - " I have a heart murmur that may require long term monitoring." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/135078.jpg", - "name": "Lola", - "ageInWeeks": 428, - "sex": "Female", - "breed": "Chihuahua - Border Terrier", - "color": "Tri Color", - "fee": 75, - "availableDate": "2022-03-15T07:00:00.000Z", - "weight": 9.8 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Blue Pod" - }, - { - "key": "Kennel", - "value": "75" - }, - { - "key": "Code #", - "value": "256203" - } - ], - "description": [ - " I got my DNA results and I’m 50% Staffie, 12% Weimaraner, 10% Chesapeake, 7% Bichon Frise and another 10 breeds!", - " Watch my video below!", - " My friends say I am sweet and quite the charmer! I love belly rubs!", - " I love to learn! I already know a few things like Sit, Down, Come, Go to Bed, Leave it, and walking nicely on leash!", - " I really enjoy the company of my human friends. Belly rubs are my favorite!", - " I’m an active dog and would love to go on adventures, whether that be hiking, running, backpacking, or visiting the beach.", - " Animal Interactions: I have displayed behaviors toward other animals that will require additional caution and good management.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/131507.jpg", - "name": "Luca", - "ageInWeeks": 208, - "sex": "Male", - "breed": "American Staffordshire Terrier - Mix", - "color": "White, Brown", - "fee": 150, - "availableDate": "2022-02-18T08:00:00.000Z", - "weight": 73.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "34" - }, - { - "key": "Code #", - "value": "269158" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137883.jpg", - "name": "Lulu", - "ageInWeeks": 12, - "sex": "Female", - "breed": "American Pit Bull - Mix", - "color": "White, Brown", - "fee": 500, - "availableDate": "2022-03-26T07:00:00.000Z", - "weight": 21 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "14" - }, - { - "key": "Code #", - "value": "268428" - } - ], - "description": [ - " I really enjoy the company of my human friends.", - " I lived with a cat in my previous home.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " I have chronic skin issues which will require long term management. It can be caused by different factors such as fleas, food or environmental factors." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137635.jpg", - "name": "Luna", - "ageInWeeks": 208, - "sex": "Female", - "breed": "American Pit Bull", - "color": "White, Lilac", - "fee": 300, - "availableDate": "2022-03-12T08:00:00.000Z", - "weight": 74 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Foster" - }, - { - "key": "Code #", - "value": "258810" - } - ], - "description": [ - " I’m a very calm and relaxed guy who walks perfectly on leash and is part couch potato and grandpa (even though I’m young).", - " I have been working with the Behavior and Training team here at OHS and am looking for a special home.", - " Bite History: I have a history of biting a person when cornered and pressured to interact. I much prefer to go at my own pace.", - " I am not for the first time dog owner. Someone very familiar with canine body language is a must for me.", - " Escape Artist: I have a history of escaping doors or fences. I will need supervision when outdoors or we can go on adventures together – on leash of course!", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " I am currently in foster care living with 2 other dogs." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/132538.jpg", - "name": "Maverick", - "ageInWeeks": 244, - "sex": "Male", - "breed": "Shepherd - Terrier", - "color": "Red", - "fee": 300, - "availableDate": "2022-03-09T08:00:00.000Z", - "weight": 57.2 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "39" - }, - { - "key": "Code #", - "value": "269028" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137878.jpg", - "name": "Milo", - "ageInWeeks": 11, - "sex": "Male", - "breed": "Hound - Mix", - "color": "White, Brindle", - "fee": 500, - "availableDate": "2022-03-26T07:00:00.000Z", - "weight": 17 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "26" - }, - { - "key": "Code #", - "value": "268797" - } - ], - "description": [ - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I really enjoy the company of my human friends.", - " Taking a training class will help us bond and help me become a model canine citizen.", - " Escape Artist: I have a history of escaping doors or fences. I will need supervision when outdoors or we can go on adventures together – on leash of course!" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137866.jpg", - "name": "Moon", - "ageInWeeks": 260, - "sex": "Male", - "breed": "American Pit Bull", - "color": "Blue, White", - "fee": 300, - "availableDate": "2022-03-25T07:00:00.000Z", - "weight": 46 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "8" - }, - { - "key": "Code #", - "value": "268451" - } - ], - "description": [ - " Overstimulation: I get easily frustrated and can exhibit this in a variety of ways. I will need positive outlets for my energy and a calm environment.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137921.jpg", - "name": "Osiris", - "ageInWeeks": 44, - "sex": "Male", - "breed": "American Pit Bull - Mix", - "color": "Seal, White", - "fee": 450, - "availableDate": "2022-03-29T07:00:00.000Z", - "weight": 37.4 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "3" - }, - { - "key": "Code #", - "value": "267273" - } - ], - "description": [ - " Watch my video below!", - " I am very cute but have proven myself to be quite the exuberant dog!", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I really enjoy the company of my human friends.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " Taking a training class will help us bond and help me become a model canine citizen." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137002.jpg", - "name": "Panther", - "ageInWeeks": 212, - "sex": "Male", - "breed": "Siberian Husky - Mix", - "color": "White, Sable", - "fee": 300, - "availableDate": "2022-02-06T08:00:00.000Z", - "weight": 47.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "59" - }, - { - "key": "Code #", - "value": "267248" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !", - " I have been exposed to another dog who has canine parvovirus virus. I will need to be kept separated from unvaccinated or immunocompromised canines for at least two weeks." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137936.jpg", - "name": "Papaya", - "ageInWeeks": 8, - "sex": "Male", - "breed": "American Pit Bull", - "color": "White, Blue", - "fee": 500, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 11.1 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "56" - }, - { - "key": "Code #", - "value": "265823" - } - ], - "description": [ - " Watch my video below!", - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " I get very anxious when left home alone all day, but will do well if you work from home or are an active person with a lot of free time.", - " If my energy isn’t properly drained, I’ll find really fun ways to entertain myself, like redecorating the house while you’re away!", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I love to run and would make a great running buddy!", - " I really enjoy the company of my human friends." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/136189.jpg", - "name": "Peanut", - "ageInWeeks": 68, - "sex": "Female", - "breed": "Shepherd - Mix", - "color": "Tri Color", - "fee": 400, - "availableDate": "2022-03-23T07:00:00.000Z", - "weight": 46.9 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "59" - }, - { - "key": "Code #", - "value": "267252" - } - ], - "description": [ - " I am just a baby! I will need guidance and patience – plus regular play time with you! Taking a training class will help us bond and help me become a model canine citizen.", - " To prepare for your meet and greet, please take a moment to learn more about puppy ownership here !", - " I have been exposed to another dog who has canine parvovirus virus. I will need to be kept separated from unvaccinated or immunocompromised canines for at least two weeks." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137937.jpg", - "name": "Pineapple", - "ageInWeeks": 8, - "sex": "Female", - "breed": "American Pit Bull", - "color": "Blue, White", - "fee": 500, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 10.3 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Yellow Pod" - }, - { - "key": "Kennel", - "value": "1" - }, - { - "key": "Code #", - "value": "269085" - } - ], - "description": [ - " I really enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Fear and Anxiety: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137847.jpg", - "name": "Rae", - "ageInWeeks": 52, - "sex": "Female", - "breed": "Shepherd", - "color": "Tan", - "fee": 400, - "availableDate": "2022-03-25T07:00:00.000Z", - "weight": 50.1 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "47" - }, - { - "key": "Code #", - "value": "269332" - } - ], - "description": [ - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137951.jpg", - "name": "Roco", - "ageInWeeks": 52, - "sex": "Male", - "breed": "Border Collie - Dachshund", - "color": "White, Black", - "fee": 400, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 25.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Foster" - }, - { - "key": "Code #", - "value": "264830" - } - ], - "description": [ - " Get to know me and watch my video below!", - " I love toys! Come meet me and I’ll show you my favorite one!", - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " I know some basic cues, such as sit.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " I can be very sensitive to handling or restraint, so going super slow is key.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/135872.jpg", - "name": "Roo", - "ageInWeeks": 172, - "sex": "Male", - "breed": "Labrador - Mix", - "color": "White, Black", - "fee": 250, - "availableDate": "2022-02-05T08:00:00.000Z", - "weight": 46 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Foster" - }, - { - "key": "Code #", - "value": "265384" - } - ], - "description": [ - " I really enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/135936.jpg", - "name": "Sadie", - "ageInWeeks": 168, - "sex": "Female", - "breed": "Beagle - American Pit Bull", - "color": "White, Brown", - "fee": 350, - "availableDate": "2022-02-28T08:00:00.000Z", - "weight": 55.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "24" - }, - { - "key": "Code #", - "value": "269328" - } - ], - "description": [ - " I really enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I lived with small dogs and cats in my last home.", - " Escape Artist: I have a history of escaping doors or fences. I will need supervision when outdoors or we can go on adventures together – on leash of course!" - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137945.jpg", - "name": "Sassy", - "ageInWeeks": 76, - "sex": "Female", - "breed": "Labrador - Australian Shepherd", - "color": "Grey, White", - "fee": 400, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 51.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Blue Pod" - }, - { - "key": "Kennel", - "value": "65" - }, - { - "key": "Code #", - "value": "253809" - } - ], - "description": [ - " Get to know me. Check out my video below!", - " I have been working with the Behavior and Training team here at OHS and am looking for a special home.", - " It will take time and patience to get to know me. You’ll need to meet with me multiple times before taking me home.", - " I am a total goofball and love belly rubs and playing with toys!", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things. I know some basic cues like sit, walking nicely on leash, go to bed, leave it, down and stay!", - " One of my most favorite activities is splashing around in a pool! I would love to go on adventures with you that involve water!", - " I love to run! I have been on the running team while at OHS and would make a great running or adventure buddy!", - " Animal Interactions: I have displayed behaviors toward other animals that will require additional caution and good management. I never learned to speak “dog” properly and will need my human to be well versed in canine body language. In the right environment, with well-matched dog friends, I really love to play!", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/130113.jpg", - "name": "Sheila", - "ageInWeeks": 112, - "sex": "Female", - "breed": "American Staffordshire Terrier - Siberian Husky", - "color": "Tan, Black", - "fee": 250, - "availableDate": "2022-02-16T08:00:00.000Z", - "weight": 36.6 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "43" - }, - { - "key": "Code #", - "value": "268315" - } - ], - "description": [ - " Watch my video below!", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137470.jpg", - "name": "Silver", - "ageInWeeks": 52, - "sex": "Male", - "breed": "Siberian Husky", - "color": "White, Brown", - "fee": 400, - "availableDate": "2022-03-04T08:00:00.000Z", - "weight": 55 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "38" - }, - { - "key": "Code #", - "value": "269155" - } - ], - "description": [ - " I really enjoy the company of my human friends.", - " I have lived with other dogs in my last home.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137900.jpg", - "name": "Sky", - "ageInWeeks": 156, - "sex": "Female", - "breed": "Terrier - Dachshund", - "color": "White, Blonde", - "fee": 400, - "availableDate": "2022-03-28T07:00:00.000Z", - "weight": 12.5 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "55" - }, - { - "key": "Code #", - "value": "264832" - } - ], - "description": [ - " To learn more about my specific needs, please read my What to Expect handout.", - " Watch my video below!", - " I really enjoy the company of my human friends.", - " I am used to living an active lifestyle! I would love to get up and go adventure with you.", - " I know some basic cues, such as sit.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " Shy and Nervous: I can be worried about new people, new surroundings and touch. I prefer to take things at my own pace and will need to live in a calm environment.", - " Escape Artist: I have a history of escaping doors or fences. I will need supervision when outdoors or we can go on adventures together – on leash of course!", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish.", - " Resource Guarding: I have a history of guarding my people, food, toys and/or bedding from other animals or people." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/135615.jpg", - "name": "Summer", - "ageInWeeks": 212, - "sex": "Female", - "breed": "Border Collie - Mix", - "color": "White, Black", - "fee": 300, - "availableDate": "2022-02-01T08:00:00.000Z", - "weight": 52 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Green Pod" - }, - { - "key": "Kennel", - "value": "23" - }, - { - "key": "Code #", - "value": "269329" - } - ], - "description": [ - " I really enjoy the company of my human friends.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137952.jpg", - "name": "Thelma", - "ageInWeeks": 28, - "sex": "Female", - "breed": "Border Collie - Mix", - "color": "Black, White", - "fee": 450, - "availableDate": "2022-03-30T07:00:00.000Z", - "weight": 31 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Foster" - }, - { - "key": "Code #", - "value": "268733" - } - ], - "description": [ - " I’m pretty chill in my old age. I like people. I like dogs. I just go with the flow.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " I really enjoy the company of my human friends. I am a big fan of being fawned over.", - " I have been diagnosed with dental disease which means I may need dental cleanings or extractions in the future.", - " I have arthritis , which there is no cure for, but there are many ways to manage." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137823.jpg", - "name": "Tippy", - "ageInWeeks": 624, - "sex": "Female", - "breed": "American Pit Bull - Mix", - "color": "White, Black", - "fee": 55, - "availableDate": "2022-03-27T07:00:00.000Z", - "weight": 47 - }, - { - "attributes": [ - { - "key": "Location", - "value": "Dog Red Pod" - }, - { - "key": "Kennel", - "value": "58" - }, - { - "key": "Code #", - "value": "267473" - } - ], - "description": [ - " Watch my video below!", - " I’m a very active young man. I would love to get up and go on adventures with you.", - " I love to learn! You can use my favorite toys or treats as positive reinforcement and to teach me new things.", - " High Energy: I can become easily frustrated if my energy and exercise needs are not met. I will need positive outlets and a calm environment to help me flourish." - ], - "image": "https://ohspets.shelterbuddy.com/photos/lostfound/137107.jpg", - "name": "Yogi", - "ageInWeeks": 56, - "sex": "Male", - "breed": "Labrador - Siberian Husky", - "color": "White, Black", - "fee": 400, - "availableDate": "2022-02-28T08:00:00.000Z", - "weight": 74.6 - } -] diff --git a/src/graphql/schema/dogs/dogs.resolver.ts b/src/graphql/schema/dogs/dogs.resolver.ts deleted file mode 100644 index 617c4fa..0000000 --- a/src/graphql/schema/dogs/dogs.resolver.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Resolver, Query, Arg, Int } from "type-graphql"; - -import { Dog } from "./dogs"; -import dogs from "./dogs.json"; - -@Resolver(Dog) -export class DogsResolver { - @Query(() => Dog, { nullable: true }) - dog(@Arg("name", () => String) name: string): Dog | undefined { - const dog = dogs.find((dog) => dog.name === name); - if (dog === undefined) { - throw new Error("Dog not found"); - } - return dog; - } - - @Query(() => [Dog]) - dogs(): Dog[] { - return dogs; - } - - @Query(() => [Dog]) - paginatedDogs( - @Arg("limit", () => Int, { defaultValue: 10 }) limit: number, - @Arg("offset", () => Int, { defaultValue: 0 }) offset: number - ): Dog[] { - return dogs.slice(offset, offset + limit); - } -} diff --git a/src/graphql/schema/dogs/dogs.ts b/src/graphql/schema/dogs/dogs.ts deleted file mode 100644 index 88fb047..0000000 --- a/src/graphql/schema/dogs/dogs.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ObjectType, Field, ID } from "type-graphql"; - -@ObjectType() -class DogAttribute { - @Field(() => ID) - key: string; - - @Field(() => String) - value: string; -} - -@ObjectType({ description: "Dog object" }) -export class Dog { - @Field() - name: string; - - @Field(() => [DogAttribute]) - attributes: DogAttribute[]; - - @Field(() => [String]) - description: string[]; - - @Field(() => String) - image: string; - - @Field(() => Number) - ageInWeeks: number; - - @Field(() => String) - sex: string; - - @Field(() => String) - breed: string; - - @Field(() => String) - color: string; - - @Field(() => Number) - fee: number; - - @Field(() => Number) - weight: number; - - @Field(() => String) - availableDate: string; -} diff --git a/src/graphql/schema/users/users.resolver.ts b/src/graphql/schema/users/users.resolver.ts index 9f2cc9f..3f27f57 100644 --- a/src/graphql/schema/users/users.resolver.ts +++ b/src/graphql/schema/users/users.resolver.ts @@ -1,7 +1,7 @@ import { Arg, Mutation, Query, Resolver } from "type-graphql"; import { User } from "./users"; import { db } from "@/db/db"; -import { users as dbUsers, users } from "@/db/schema"; +import { users as dbUsers } from "@/db/schema"; @Resolver(User) export class UserResolver { @@ -20,7 +20,7 @@ export class UserResolver { id, }; - await db.insert(users).values(newUser); + await db.insert(dbUsers).values(newUser); return newUser; } diff --git a/src/pages/api/graphql.ts b/src/pages/api/graphql.ts index a84d2b0..e5f0252 100644 --- a/src/pages/api/graphql.ts +++ b/src/pages/api/graphql.ts @@ -1,12 +1,13 @@ import "reflect-metadata"; import { ApolloServer } from "apollo-server-micro"; import { buildSchema } from "type-graphql"; -import { DogsResolver } from "@/graphql/schema/dogs/dogs.resolver"; import { ApolloServerPluginLandingPageLocalDefault } from "apollo-server-core"; import { UserResolver } from "@/graphql/schema/users/users.resolver"; +import type { NextApiRequest, NextApiResponse } from "next"; +import { DealResolver } from "@/graphql/schema/deals/deals.resolver"; const schema = await buildSchema({ - resolvers: [DogsResolver, UserResolver], + resolvers: [UserResolver, DealResolver], }); const server = new ApolloServer({ @@ -24,7 +25,10 @@ export const config = { const startServer = server.start(); -export default async function handler(req, res) { +export default async function handler( + req: NextApiRequest, + res: NextApiResponse +) { res.setHeader( "Access-Control-Allow-Origin", "https://studio.apollographql.com" diff --git a/src/utils/apolloClient.ts b/src/utils/apolloClient.ts index 1279bf8..2c4b736 100644 --- a/src/utils/apolloClient.ts +++ b/src/utils/apolloClient.ts @@ -10,7 +10,7 @@ import merge from "deepmerge"; import isEqual from "lodash/isEqual"; import { useMemo } from "react"; -export const APOLLO_STATE_PROP_NAME = "__APOLLO_STATE__"; +const APOLLO_STATE_PROP_NAME = "__APOLLO_STATE__"; let apolloClient: ApolloClient; diff --git a/src/utils/example.ts b/src/utils/example.ts new file mode 100644 index 0000000..730cbb8 --- /dev/null +++ b/src/utils/example.ts @@ -0,0 +1,11 @@ +const colors = ["text-green-500", "text-blue-500", "text-violet-500"] as const; + +type ExtractColor = S extends `text-${infer R}-500` ? R : S; + +const findColor = (color: ExtractColor<(typeof colors)[number]>) => { + return colors.find((c) => c.includes(color)); +}; + +const color = "text-red-500"; + +findColor("violet");