vue-contentful-hook
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -1,2 +0,2 @@ | ||
declare type ContentfulOptions = { | ||
type ContentfulOptions = { | ||
readonly spaceId: string; | ||
@@ -6,12 +6,18 @@ readonly token: string; | ||
/** | ||
* | ||
* @param query GraphQL query you want to execute | ||
* @param options An object containing the spaceId and token | ||
* @returns an object containing the data, errors and a loading state | ||
* Executes a GraphQL query using the Contentful API. | ||
* @template T - The type of the response data. | ||
* @param {string} query - The GraphQL query you want to execute. | ||
* @param {ContentfulOptions} options - An object containing the spaceId and token. | ||
* @param {string} options.spaceId - The space ID. | ||
* @param {string} options.token - The access token. | ||
* @returns {object} - An object containing the response data, errors, and a loading state. | ||
* @property {T} data - The response data. | ||
* @property {string[]} errors - An array of error messages. | ||
* @property {boolean} isLoading - A boolean indicating if the request is still loading. | ||
*/ | ||
export declare const useContentful: <T>(query: string, { spaceId, token }: ContentfulOptions) => { | ||
readonly data: import("vue").Ref<Readonly<T>>; | ||
readonly errors: import("vue").Ref<readonly string[]>; | ||
readonly isLoading: import("vue").Ref<boolean>; | ||
readonly data: import("vue").Ref<Readonly<T>, Readonly<T>>; | ||
readonly errors: import("vue").Ref<readonly string[], readonly string[]>; | ||
readonly isLoading: import("vue").Ref<boolean, boolean>; | ||
}; | ||
export {}; |
{ | ||
"name": "vue-contentful-hook", | ||
"author": "Lucien Bénié <lucien.benie@gmail.com>", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "A vue hook to fetch contentful data using GraphQL query", | ||
@@ -42,36 +42,31 @@ "repository": { | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "8.5.0", | ||
"@semantic-release/changelog": "6.0.1", | ||
"@lbenie/linting": "1.8.22", | ||
"@rollup/plugin-typescript": "12.1.0", | ||
"@semantic-release/changelog": "6.0.3", | ||
"@semantic-release/git": "10.0.1", | ||
"@semantic-release/github": "8.0.6", | ||
"@stryker-mutator/core": "6.2.2", | ||
"@stryker-mutator/jest-runner": "6.2.2", | ||
"@types/jest": "29.0.3", | ||
"@types/semantic-release": "17.2.4", | ||
"@typescript-eslint/eslint-plugin": "5.37.0", | ||
"@typescript-eslint/parser": "5.37.0", | ||
"all-contributors-cli": "6.20.4", | ||
"axios": "0.27.2", | ||
"concurrently": "7.4.0", | ||
"conventional-changelog-conventionalcommits": "5.0.0", | ||
"eslint": "8.23.1", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"jest": "29.0.3", | ||
"jest-chain": "1.1.5", | ||
"jest-extended": "3.1.0", | ||
"prettier": "2.7.1", | ||
"prettier-eslint": "15.0.1", | ||
"@semantic-release/github": "11.0.0", | ||
"@stryker-mutator/core": "8.5.0", | ||
"@stryker-mutator/jest-runner": "8.5.0", | ||
"@types/jest": "29.5.13", | ||
"@types/semantic-release": "20.0.6", | ||
"all-contributors-cli": "6.26.1", | ||
"axios": "1.7.7", | ||
"concurrently": "9.0.1", | ||
"conventional-changelog-conventionalcommits": "8.0.0", | ||
"jest": "29.7.0", | ||
"jest-chain": "1.1.6", | ||
"jest-extended": "4.0.2", | ||
"rollup-plugin-peer-deps-external": "2.2.4", | ||
"ts-jest": "29.0.1", | ||
"ts-jest-mock": "1.1.33", | ||
"ts-node": "10.9.1", | ||
"typescript": "4.8.3", | ||
"vite": "3.1.1", | ||
"vue": "3.2.39" | ||
"ts-jest": "29.2.5", | ||
"ts-jest-mock": "1.4.2", | ||
"ts-node": "10.9.2", | ||
"typescript": "5.6.2", | ||
"vite": "5.4.8", | ||
"vue": "3.5.8" | ||
}, | ||
"peerDependencies": { | ||
"axios": "^0.26.1 || ^0.27.0", | ||
"axios": "^1.7.4", | ||
"vue": "^3.2.29" | ||
} | ||
}, | ||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
Sorry, the diff of this file is not supported yet
23
51
7534
7