{"_id":"@aysnet/qv-strapi","_rev":"13-bc3f6595806fed3160708b60964c597d","time":{"0.0.2-beta":"2021-01-26T17:50:05.563Z","created":"2021-01-26T17:56:39.939Z","1.0.0":"2021-01-26T17:56:40.342Z","modified":"2022-04-04T17:15:00.204Z","1.0.1":"2021-01-26T17:58:50.183Z","1.0.2":"2021-01-27T16:21:43.408Z"},"name":"@aysnet/qv-strapi","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@aysnet/qv-strapi","version":"1.0.1","description":"Strapi plugin vuejs and quasar project","main":"build/main/index.js","typings":"build/main/index.d.ts","module":"build/module/index.js","repository":{"type":"git","url":"git+https://github.com/aysnet1/qv-strapi.git"},"license":"MIT","keywords":["strapi","cms","vuejs","vue","quasar","plugin"],"engines":{"node":">=10"},"dependencies":{"axios":"^0.21.1","js-cookie":"^2.2.1","qs":"^6.9.2"},"gitHead":"09af5dcdf68cc16918bb5d8a3f1253ad7b68fb86","bugs":{"url":"https://github.com/aysnet1/qv-strapi/issues"},"homepage":"https://github.com/aysnet1/qv-strapi#readme","_id":"@aysnet/qv-strapi@1.0.1","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-axiyBwqPRBwuR9EDXQzLzlooRnzN4QcMO2xwL2e11zvr8X1WYEYVL/giCdvXPF5bTI/JQWIOqRqirIfScgUoLg==","shasum":"3722a806337f583ad9ed0a0851e94d7c7022d687","tarball":"https://registry.npmjs.org/@aysnet/qv-strapi/-/qv-strapi-1.0.1.tgz","fileCount":16,"unpackedSize":64342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEFhaCRA9TVsSAnZWagAAOGgP/1FzuYiIFtlgMMyXCMaD\nKJaFr5sQJGTGQJLKpY0aKxRzpKoBVyoTFhwpBxv/ifDDHGjrOM9F727zwaSP\ntyXnYkjl0RDOZQmwwz/FsLznSNsLj4W9Mv8eUMpIJWdUyqXnV7fJ1qppgFr/\nSwLV4MWBqxGfLsk+gParBO0L+tIxJpwYQR19sOv/M+BHRQqt/QBrLIYEjCz4\nDrvo7VALRhLIlno4bruZQnphnfQgd/CNOPNPUGbgQLCXOSyY3YeidEA8Y3DG\nIyrUp0CcIN+Ouf3HOCipVdmpKxCJXAqxjz1xp80qEgk7ewmIJq71O2hl1K4U\n/NUlwivQXTHK+/VQPCtAVVBPcMP1YhT9n07DZd4pFFMg9a+Mu7WGeqz+MwYp\n2DhFZYooMG9V7LoundfKhu2Vx+3R63QCHDZGWQRSWHiawCegBzKZDYzh8P3u\ns3K8jniD6/0JPPud2g1hpFqZoBOVuCDUqpvivISdF+Y7aO9D9dpl1kHAAdt9\nxTY3NFeCIu6XWIg/NGNCuWlPTXNIlNzIpRBIbdl2OfkeEItk3KKH0qIqMW/r\nL3ThiwVe8tHlK7HzM8OI1A05HYcDTs8IaaN4YSq1frJvv4RNuiHyMk1H87WO\nm4dEaNa444r/E31Cww/cOz6yLnOVeI966+5eE5OA8WKRpWwj1rYYyaV4DxtS\n9XD/\r\n=V692\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFt3+QnOT4AXUudain3bL6CnjulmIR2MF0EhuKVuJA/sAiEA+38tie7aq6BigknsDoZrPicPAKJ6EHoJXK+f5ajdzwQ="}]},"_npmUser":{"name":"aycer","email":"aysser21@gmail.com"},"directories":{},"maintainers":[{"name":"aycer","email":"aysser21@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/qv-strapi_1.0.1_1611683929901_0.13476222218234168"},"_hasShrinkwrap":false},"1.0.2":{"name":"@aysnet/qv-strapi","version":"1.0.2","description":"Strapi plugin vuejs and quasar project","main":"build/main/index.js","typings":"build/main/index.d.ts","module":"build/module/index.js","repository":{"type":"git","url":"git+https://github.com/aysnet1/qv-strapi.git"},"license":"MIT","keywords":["strapi","cms","vuejs","vue","quasar","plugin"],"engines":{"node":">=10"},"dependencies":{"axios":"^0.21.1","js-cookie":"^2.2.1","qs":"^6.9.2"},"bugs":{"url":"https://github.com/aysnet1/qv-strapi/issues"},"homepage":"https://github.com/aysnet1/qv-strapi#readme","_id":"@aysnet/qv-strapi@1.0.2","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3wgk5haJP0dCDVB1P04XPUMFUGf1Qvu0gSANZS+sH3Oq3ZljAo9kfK7z7PhiZWbW1dZ7JRg79QjgBdvQjKaiXQ==","shasum":"5212a1d83578040641f28cdb831c473db250f4e7","tarball":"https://registry.npmjs.org/@aysnet/qv-strapi/-/qv-strapi-1.0.2.tgz","fileCount":16,"unpackedSize":64456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEZMXCRA9TVsSAnZWagAAmjMQAKUmbmNNByK7bLj83fEY\nIbHs1Qn1lD3nB2hBnODSOkCnksmpMyf+iw42cQna2E3/pN4yNdAnlF1M4AW3\nU0hR3cIRoluZlQUuAxNaOAT7NnofDu2EXgPDFoTDlw/BmWqsJpZCWsPq3CrL\n+My+oRCRLOspo2nDCzYRsrqu+8tkVFBK4FttPwhMw+HCwGxcwY3DuYZ2F4LO\nwwSg4F+kYam3jdg7Z7tNy1W0dUAoY5Okm2cLwou4Vi50ON1aXayriWQfZuE5\nMMwkACTpapIa79VyvWpUh4obbPw28UI0uTdnw1QTvpa9w1eOjNIHo3ouViJL\n4DU3Bnpq8ja6GTx/aWla9OCHbP6PQFS075ekmyn9VOk2O+asWfiIql9Ic8Fz\nz0p8wZIdS8fDS3Lz6lESnVJpax+0FvsdtRJAQh6RGnOuUX73HhIw5lNJKA7+\ntmEmI7Peudfawzj/8bXrrEtoe9q3VtsvVnTsqm3fq/APNF4dlB+1ssFwYPnO\nx+VuDpu/AFy1uA2XxMklQC4arUgaEHUDKR/kSkurcbGRyC7FW5jwoLmJwzLj\n43wq4EIgUc4U4ZfOHjjKys4M5z0ZFTj2mn65zrToPSG+JaaESJnf8sh9dpre\nt4233G7nAI5QabhTQ3DSzqb4W4z4slJO+geTRbsDXwbpa17FrUpOlcX5P5Jr\nYFpu\r\n=v/xe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIESYfKH3JsT1TTOWWF1jGrqwDjOpBgGcyL6MK8dXs32TAiA1N/udv6+rcny853NXp1M3V0TzmswCTqNThGH9okYrXg=="}]},"_npmUser":{"name":"aycer","email":"aysser21@gmail.com"},"directories":{},"maintainers":[{"name":"aycer","email":"aysser21@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/qv-strapi_1.0.2_1611764503137_0.27775074303944525"},"_hasShrinkwrap":false}},"maintainers":[{"name":"aycer","email":"aysser21@gmail.com"}],"description":"Strapi plugin vuejs and quasar project","homepage":"https://github.com/aysnet1/qv-strapi#readme","keywords":["strapi","cms","vuejs","vue","quasar","plugin"],"repository":{"type":"git","url":"git+https://github.com/aysnet1/qv-strapi.git"},"bugs":{"url":"https://github.com/aysnet1/qv-strapi/issues"},"license":"MIT","readme":"# Strapi plugin vuejs and Quasar Project\r\n\r\n \r\n<br>\r\n\r\n## Install\r\n\r\n```sh\r\nnpm install @aysnet/qv-strapi\r\n```\r\n'or'\r\n\r\n```sh\r\nyarn add @aysnet/qv-strapi\r\n```\r\n\r\n## Start now\r\n\r\n### New instance\r\n##### Vuejs\r\n```js \r\nimport Vue from 'vue';\r\nimport App from \"./App.vue\";\r\nimport Strapi from '@aysnet/qv-strapi';\r\nconst  options = {\r\n    url:'', // by default : 'http://localhost:1337\r\n    storeConfig: {\r\n        cookie: {\r\n        key: 'jwt',\r\n        options: {\r\n          path: '/'\r\n        }\r\n    },\r\n    localStorage:{} // | boolean\r\n    },\r\n    requestConfig: '',\r\n}\r\nconst strapi = new Strapi(options)\r\n\r\nVue.prototype.$strapi = strapi;\r\n\r\nnew Vue({\r\n  render: (h) => h(App, strapi)\r\n}).$mount(\"#app\");\r\n```\r\n---\r\n##### Quasar Project [boot/strapi.js]\r\n```js \r\nimport Vue from 'vue'\r\nimport Strapi from '@aysnet/qv-strapi';\r\n\r\nconst  options = {\r\n    url:'', // by default : 'http://localhost:1337\r\n    storeConfig: {\r\n        cookie: {\r\n        key: 'jwt',\r\n        options: {\r\n          path: '/'\r\n        }\r\n    },\r\n    localStorage:{} // | boolean\r\n    },\r\n    requestConfig: '',\r\n}\r\n\r\nconst strapi = new Strapi(options)\r\nexport default ({\r\n  Vue\r\n}) => {\r\n  Vue.prototype.$strapi = strapi\r\n}\r\n \r\n\r\nexport {\r\n  strapi\r\n}\r\n```\r\n\r\n### usage\r\n\r\n## Authentication\r\n\r\nTo handle authentication in your Vue / quasar app with Strapi, you can:\r\n\r\n### Login\r\n\r\n```js\r\nawait this.$strapi.login({identifier:'email', password:'password'})\r\n```\r\n\r\n### Register\r\n\r\n```js\r\nawait this.$strapi.register({email:'email', username:'username', password:'password'} )\r\n```\r\n\r\n### Logout\r\n\r\n```js\r\nawait this.$strapi.logout()\r\n```\r\n\r\n### Forgot password\r\n\r\n```js\r\nawait this.$strapi.forgotPassword({email:'email'})\r\n```\r\n\r\n### Reset password\r\n\r\n```js\r\nawait this.$strapi.resetPassword({code:this.$route.query.code /*url*/, password:'password', passwordConfirmation:'passwordConfir..'})\r\n```\r\n\r\n### User\r\n\r\nOnce logged in, you can access your `user` everywhere:\r\n\r\n```vue\r\n<template>\r\n  <div>\r\n    <p v-if=\"$strapi.user\">\r\n      Logged in\r\n    </p>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n  computed: {\r\n    user () {\r\n      return this.$strapi.user\r\n    }\r\n  },\r\n  methods: {\r\n    logout () {\r\n      this.$strapi.logout()\r\n      this.$router.push('/')\r\n    }\r\n  }\r\n}\r\n</script>\r\n```\r\n\r\n\r\n\r\n\r\n## Entities\r\n\r\nYou can access the default Strapi CRUD operations by using these methods:\r\n\r\n- `find`\r\n- `count`\r\n- `findByid`\r\n- `create`\r\n- `update`\r\n- `delete`\r\n- `searchFiles`\r\n- `findFile`\r\n- `findFiles`\r\n- `upload`\r\n- `fetch`\r\n\r\n```js\r\nawait this.$strapi.find('products')\r\n```\r\n\r\n### Updating current user\r\n\r\n<alert type=\"info\">\r\n\r\nYou often need to update your user, and so on define a custom route in Strapi: `PUT /users/me`.\r\n\r\n</alert>\r\n\r\nYou can use this module to call it this way:\r\n\r\n```js\r\nconst user = await this.$strapi.$users.update('me', form)\r\n```\r\n\r\nAnd then mutate the `user`:\r\n\r\n```js\r\nthis.$strapi.user = user\r\n```\r\n\r\n### Authentications\r\n\r\n#### Local\r\n```js\r\nawait strapi.login({identifier:'email', password:'password'});\r\n```\r\n\r\n```js\r\n// Redirect your user to the provider's authentication page.\r\nwindow.location = strapi.getProviderAuthenticationUrl('facebook');\r\n```\r\nOnce authorized, the provider will redirects the user to your app with an access token in the URL.\r\n```js\r\n// Complete the authentication: (The SDK will store the access token for you)\r\nawait strapi.authenticateProvider('facebook');\r\n```\r\nYou can now fetch private APIs\r\n```js\r\nconst posts = await strapi.find('posts');\r\n```\r\n\r\n### Files management\r\n\r\n#### Browser\r\n```js\r\nconst form = new FormData();\r\nform.append('files', fileInputElement.files[0], 'file-name.ext');\r\nform.append('files', fileInputElement.files[1], 'file-2-name.ext');\r\nconst files = await strapi.upload(form);\r\n```\r\n\r\n#### Node.js\r\n```js\r\nconst FormData = require('form-data');\r\nconst fs = require('fs');\r\nconst form = new FormData();\r\nform.append('files', fs.createReadStream('./file-name.ext'), 'file-name.ext');\r\nconst files = await strapi.upload(form, {\r\n  headers: form.getHeaders()\r\n});\r\n```\r\n\r\n\r\n## API\r\n\r\n### `Strapi({url, storeConfig, requestConfig})` ..url default: loclahost:1337\r\n### `request(method, url, requestConfig)`\r\n### `register(username:'usernme', email:'email', password:'password' )`\r\n### `login({identifier:'email', password:'password'})`\r\n### `forgotPassword({email:'email'})`\r\n### `resetPassword({code:'code', password:'password', passwordConfirmation:'passwordConfirmation'})`\r\n### `getProviderAuthenticationUrl(provider)`\r\n### `authenticateProvider(provider, params)`\r\n### `setToken(token, comesFromStorage)`\r\n### `clearToken(token)`\r\n### `fechUser()` return data users/me\r\n### `find(entity, params)`\r\n### `findById(entity, id)`\r\n### `count(entity, params)`\r\n### `create(entity, data)`\r\n### `update(entity, id, data)`\r\n### `delete(entity, id)`\r\n### `searchFiles(query)`\r\n### `findFiles(params)`\r\n### `findFile(id)`\r\n### `upload(data)`\r\n##### `graphql(query)` \r\n###### exemple query qraphql:\r\n```js\r\n const DataQuery =  await this.$strapi.graphql({\r\n         query: `\r\n           query {\r\n             classes {\r\n               title\r\n                 user{\r\n                   username\r\n                 }\r\n               }\r\n          }\r\n         `\r\n  });\r\n```\r\n## License\r\n\r\nMIT\r\n* [Documentation](https://aysnet1.github.io/qv-strapi/index.html)\r\n\r\n","readmeFilename":"README.md"}