{"_id":"@code-nl/shopify-to-firestore","_rev":"4-7f9933b0aa38b714bad64765a678f8fa","name":"@code-nl/shopify-to-firestore","dist-tags":{"latest":"1.0.2"},"versions":{"0.9.0":{"name":"@code-nl/shopify-to-firestore","version":"0.9.0","description":"Package with methods to store and remove Shopify JSON Object simply to and from Firestore.","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/code_internet_applications/code-shopify-to-firestore.git"},"keywords":["Shopify","Firestore"],"author":{"name":"CODE Internet Applications"},"license":"MIT","dependencies":{"camelcase-keys":"^5.2.0"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","mocha":"^6.1.4","sinon":"^7.3.2"},"gitHead":"4f3c299d5f58564696dfdf9ef1af16ec741853de","homepage":"https://bitbucket.org/code_internet_applications/code-shopify-to-firestore#readme","_id":"@code-nl/shopify-to-firestore@0.9.0","_shasum":"76c7f461f1655a523e87ebf094ff4a8858711c8f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.14.4","_npmUser":{"name":"code-nl-account","email":"tools@code.nl"},"dist":{"shasum":"76c7f461f1655a523e87ebf094ff4a8858711c8f","tarball":"https://registry.npmjs.org/@code-nl/shopify-to-firestore/-/shopify-to-firestore-0.9.0.tgz","integrity":"sha512-z6c37LN2bzd2x9P5cUOMnpQQEglpcqth5q+3deRM1WrUjA3byFsbTnjk4js0M7KGJqKASDW/hsd9U2BrRLzvCA==","fileCount":5,"unpackedSize":13971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyYGoCRA9TVsSAnZWagAArAcP/1xVKLYOlC2QtKgPGCHn\nHOuy+PnRbaT8KylDsB7dxoytcMg+gSl4Pcb77Ldty6VMZW6D5ezTJDZKjF0z\nyFOF9sG389/LYYGQ545fJgDLD6C6PLYG5egmLFQjul4pQ0/Gtrc2AUBO2R9i\npPi/o9dw4aGQfWLG0KveODOhfejy/PFIuuBaVrskxnuKG/hevxL+UD6u0yxq\npEr4pUgFzwv6rqWovDq50+2Q9HI7/pd/zrymKMfUr2g3IaZO5POT8NYB2j1n\ncR8XOVnYRo8SJnjKR1By8kTdxW4H+alAsgiXxr6/f+BY5Vf2Ce0h8rKlHrEi\nWgH/DZTBlAu9poi2nmw9+QJwNYGKBViN7RdcXOAJYx63fGUS0xMTBt7IevXq\nFwpFdpF3cKpKfVrnxSvyq/fJp9L1fF9AhCGVvt4JUBPyXgiy7LZyPmnEyElV\nrRZPTSrdZCAsuyc0SmkP0NKuZwmQfD8Wj/R+MAyCDKY/w/mS5Qvnni4QPtdO\nvdfzQZJmCEzbQ9TqjA+qDbHQfkLMQDdgmkclAhe71cSqYmXlSnwrzedsvHfU\nwLWyGYgwjvuCvU0l6vDJtTZVhMe5KHQv6gw5zqzqgKvGJflJ7ZjkyW9bIGIY\n4UPKENckFlMEtQKTjpR8/JwU3IUH564p08KK7/2G3IlCLQZz98kYRDEItZqA\nheu3\r\n=lC2F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq+RI6dXK8aXteEWxSUF4Ywcf+XU5Ti4hhssG9MlwUpwIhAI4t7XWK6By2MIkXJ8j9XvA0AI6PKKTEE7dxi1quBarp"}]},"maintainers":[{"name":"code-nl-account","email":"tools@code.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-to-firestore_0.9.0_1556709799736_0.8923595624372724"},"_hasShrinkwrap":false},"1.0.0":{"name":"@code-nl/shopify-to-firestore","version":"1.0.0","description":"Package with methods to store and remove Shopify JSON Object simply to and from Firestore.","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/code_internet_applications/code-shopify-to-firestore.git"},"keywords":["Shopify","Firestore"],"author":{"name":"CODE Internet Applications"},"license":"MIT","dependencies":{"camelcase-keys":"^5.2.0"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","mocha":"^6.1.4","sinon":"^7.3.2"},"gitHead":"c7a40b400619d1e8486a885e3d98ac4226106c03","homepage":"https://bitbucket.org/code_internet_applications/code-shopify-to-firestore#readme","_id":"@code-nl/shopify-to-firestore@1.0.0","_shasum":"5074b8a9ad734fa3a0666a1d5c5a3b23ada90ff1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.14.4","_npmUser":{"name":"code-nl-account","email":"tools@code.nl"},"dist":{"shasum":"5074b8a9ad734fa3a0666a1d5c5a3b23ada90ff1","tarball":"https://registry.npmjs.org/@code-nl/shopify-to-firestore/-/shopify-to-firestore-1.0.0.tgz","integrity":"sha512-fI+V6jGF11kwhRxPHT+lAMOTG5eTcSLAhI8ZWnu36IAXkN+f3G+SPnVHSXZj+OYiiyw7uP8ZqDdEW49EG4XeMw==","fileCount":5,"unpackedSize":14134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyYfbCRA9TVsSAnZWagAAbA4P/RnxWRvN3cBRTIS4VjE9\n7XOGn7DhHJVPW9czfxY3JncQ1yjNEtBnJ+Aa5Cq0JxHMrReX3kDTWFFS8ITL\nK/snKuFnsAjl6YyBaATSvvBRLc4d2Ux79N9NrgI+hlPEjJWFPXlDUr/z01sq\nPk2As9cmwU3eNJNidUeIXlimBdy2xabSjmhWi09qPt+kUqD7YXNUPJyLXsSR\nSlFRcO0gHYbcWank1osuQRVnnbEcQ+dJ8m3eITYijDqUmj1F3e3Qj05W6VRx\n1Bjlp8l9f9BhJOxuXHlfBF0fjuE5rbko6X/XFxktlhiKB8tL4SNJ+sKNNTKH\nIMvNOdayUBlvua25VKLz3IH7FVIkJjZmgjvIqtoszIhjrFErDFBDDTsGddau\nWQJJnwAWW9Y/E1kRDjfzJ9/h40yN9KBgYPRGwJbgytS32Hpev/IW/TI53q/4\nogyyf+/CiQXOzo2xwg1XFAYge3VhsXQklHU7KfIz/ZdbO2vlLjIBtS8QTTsR\ni98ZaL+WfrFChsT4PrB+H/GubMIt7hVFMB7I3NdbWbzfgFLttUc+dFRMIbUB\nDnaOGAiq8TNk8MWO/4oJq9KhPeU9kEYGTjMspvidMRxZJnMbAGuYYSrUuqSM\n7kaTTx7DatnAALykpnruJxikM1CraDiIcswm+1+XIjizBjM4SEUk7a2Tvdi3\npKLV\r\n=G8td\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHc27eOIMXl3eKgJiqrtRJUhHtJx/zY2nbpsBVqU2yhFAiEAkOSYhmNmtWlBXTRNMxqgM+XKBpq8pQ7lhcQ86y0F3ac="}]},"maintainers":[{"name":"code-nl-account","email":"tools@code.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-to-firestore_1.0.0_1556711387279_0.3984347748688353"},"_hasShrinkwrap":false},"1.0.1":{"name":"@code-nl/shopify-to-firestore","version":"1.0.1","description":"Package with methods to store and remove Shopify JSON Object simply to and from Firestore.","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/code_internet_applications/code-shopify-to-firestore.git"},"keywords":["Shopify","Firestore"],"author":{"name":"CODE Internet Applications"},"license":"MIT","dependencies":{"camelcase-keys":"^5.2.0"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","mocha":"^6.1.4","sinon":"^7.3.2"},"gitHead":"01c7cbed0f7a0df943bf7d709646cb60d3332713","homepage":"https://bitbucket.org/code_internet_applications/code-shopify-to-firestore#readme","_id":"@code-nl/shopify-to-firestore@1.0.1","_shasum":"5cfc72ebaf3105087fa54ccb1a659ef5326e7985","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.14.4","_npmUser":{"name":"code-nl-account","email":"tools@code.nl"},"dist":{"shasum":"5cfc72ebaf3105087fa54ccb1a659ef5326e7985","tarball":"https://registry.npmjs.org/@code-nl/shopify-to-firestore/-/shopify-to-firestore-1.0.1.tgz","integrity":"sha512-yjTQN3E6yJhNFFjf7FyOb8Ve/f+DfDPOy1A+/f+gZGo2HOPr6zZJUBGyhwXn6T9ZDDMF/5WALn2PnKs+eVFBrw==","fileCount":5,"unpackedSize":14228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyY1bCRA9TVsSAnZWagAA+kMP/1OXFCclwaEYUg/u0X0Q\n6NCA4sXkHTmvGSzs5JzXdzeTJ6DIvfi7YW32FLtvybvWcsEg0NpB/KrL+NEY\nLlPCDQKd4eCtzNmPxuv39HhJC1Bk3Sn3VJVvPS/q8qpzqiDSO2PYj21arHlx\nRsLR4mXpFR1lxdqfVuLt0fCsK6lcHaGpyhQFNtRAF6FfUEzrh6Tp8PbaODWC\nzd7Kbf0bakPeE6Ajy2A558Opu1AXTNDn3ZQn9Xq97PLpYyBtqOEAP7HfRR6p\nnH4GFb7ZOLrXbN7+GV2anqSn3XsNP17SsQeDi4AdApuUjOqLqpuHUuKXPb9b\n+AKfbK+6N6sM7K2P9unmFkGZtA/vkUMtOH5u/VAfXf8GEcDQPtBdONs5j+lc\n+PECpKe68RJFjgYBN0vcWdoYcc1zXocCro4kT7vzCcmRIJWWzuAVV9t2fFjb\nSe4kfvn1EXdKIDASEs7q4bg0sCo1qs6BNILctY8RNAI4PgQtMK3Y/Du69MVD\nFNsaTJeIKW0ylDSNsZjGzNWcNXRQ8ue9EUXOq6+w+k1mHmGwvZO67QO1Rg2E\nVB5oWUziQaFHsynw/PYL9JgR2gyUcRgaIVHGG26XgcqAY7qCzOcp5aOEOFr3\nzfloYm9I3iRmWciOGSbSh8ROF1zxsS/7xzDJPfQKQqqELoF98R2qIevnb/5r\nqyiS\r\n=tX2M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD45ppUsKu6DD7fVuwQyg8JAkMHl36RAQdcy7PF60MqQQIhANQu9Zri94NPWXvU1V0Q+kMtMUuHKFIiUCnQ+jdN2P7X"}]},"maintainers":[{"name":"code-nl-account","email":"tools@code.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-to-firestore_1.0.1_1556712794943_0.6344452220600612"},"_hasShrinkwrap":false},"1.0.2":{"name":"@code-nl/shopify-to-firestore","version":"1.0.2","description":"Package with methods to store and remove Shopify JSON Object simply to and from Firestore.","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/code_internet_applications/code-shopify-to-firestore.git"},"keywords":["Shopify","Firestore"],"author":{"name":"CODE Internet Applications"},"license":"MIT","dependencies":{"camelcase-keys":"^5.2.0"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","mocha":"^6.1.4","sinon":"^7.3.2"},"gitHead":"99b8dcc0b268e035c66299933d4c9d00680959ca","homepage":"https://bitbucket.org/code_internet_applications/code-shopify-to-firestore#readme","_id":"@code-nl/shopify-to-firestore@1.0.2","_shasum":"dd692c81755bd03087f85cfb42af847691c40353","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.14.4","_npmUser":{"name":"code-nl-account","email":"tools@code.nl"},"dist":{"shasum":"dd692c81755bd03087f85cfb42af847691c40353","tarball":"https://registry.npmjs.org/@code-nl/shopify-to-firestore/-/shopify-to-firestore-1.0.2.tgz","integrity":"sha512-/oFw9R3nv2x5IZ+9MOf/PEg1r+S05bs907cczspurY+dv770aNdg0SHNxf9aZQp87MK9PFFSeCZ8ieIT4oS2aA==","fileCount":5,"unpackedSize":15024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0Xf+CRA9TVsSAnZWagAA6M8P/3H2/gAJmisoS3YvKd6s\ntBzoFEANSWSrymRBH9M2utqvmeT6faqsNoD5yMdiu1amdTk6inwbiLsDiLTv\nxzgQFLHEStWhptmRA9oTHdlfAaBO4QPB8Q1Iy+Jh8BuoXh4w1y/3esUmXkn6\nGjs6t9hs1xX1pXDVOoG2Cjjod23Y/JghIBPHwIuaU3MIzV+oqR04MgMJJ1yJ\nLsW+S5mF2WXuJS358SWTqKx42aeq79BIRD4m3nmuZeqpYNr8TVNwZ+ufCFIH\nZp6V2E9TdjlGJQFHRP+jYmjek4SnlglAhVRLL65+TYEMYWagH5nUi38muXFf\nEVB4RqGZF2fEhZzbwIYZvynvchDgEVh2CbnzO0ENtKysSvGMH4YEVJd/lPh/\nMRN4WqweitlaC0Pfu1bgc+CFp9RHHcEUmox15aFqPu7JhUqSsUvc7PrCQol4\nsnXFsUpyBV+mK4X3kw33bLnyKNTaUUgjX5A4fiJuRtQEvAVc8YMFBufH1G/k\ncgcvsyWfTcQTWFmJrITSLn5ygVAP7ykCdKxalwBUCxCZ92pRSOhZYxrUxrtH\nvBpl1/GqzB9muoA9ITPgQzhHDsQW7YsVGbMvplc9EP3cER/800O7N/FllEvt\n2LQj97beXMjAcprY6rmeqWAfvz3RhAcVKL+7va9gNyCfYJi2GtoK9i2kBwzG\nTzcR\r\n=Ym59\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBAT6G9OYmnPa7Rxh55sZT8V8ubCzq0d5kBzgFzP98rRAiEAl6793CH2rJlxFvj7TKsDI6AUO6kv8O0wXA8SLTvjwFg="}]},"maintainers":[{"name":"code-nl-account","email":"tools@code.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-to-firestore_1.0.2_1557231613788_0.6752816016101963"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-01T11:23:19.558Z","0.9.0":"2019-05-01T11:23:19.843Z","modified":"2022-04-04T23:57:17.180Z","1.0.0":"2019-05-01T11:49:47.397Z","1.0.1":"2019-05-01T12:13:15.061Z","1.0.2":"2019-05-07T12:20:13.916Z"},"maintainers":[{"name":"code-nl-account","email":"tools@code.nl"}],"description":"Package with methods to store and remove Shopify JSON Object simply to and from Firestore.","homepage":"https://bitbucket.org/code_internet_applications/code-shopify-to-firestore#readme","keywords":["Shopify","Firestore"],"repository":{"type":"git","url":"git+ssh://git@bitbucket.org/code_internet_applications/code-shopify-to-firestore.git"},"author":{"name":"CODE Internet Applications"},"license":"MIT","readme":"# Shopify to Firestore\n\nProvides functionality to:\n* Store data from Shopify in Cloud Firestore\n* Delete data of Shopify from Cloud Firestore\n\n## How to use\n\n```sh\nnpm install @code-nl/shopify-to-firestore -- save\n```\n\n### Store data\nLoad the `storetoFirestore()` function:\n```js\nconst { storeToFirestore } = require('@code-nl/shopify-to-firestore');\n```\n\nTo use the `storeToFirestore` method :\n```js\nstoreToFirestore(firestore, shopifyDomain, documentRoot, documentId, sfyObject, extractToCollections);\n```\nNote that this returns a Promise so it is advisable to put this in your promise chain.\n\n```\nfirestore             | object    | This is the reference to your Cloud Firestore instance (firebase.firestore())\nshopifyDomain         | string    | This is the myshopify.com domain name of your Shopify Instance\ndocumentRoot          | callback  | This is a callback function that returns the Firestore collection root of the Shopify object you want to store (see below for more info)\ndocumentId            | string    | The unique ID of the Shopify object\nsfyObject             | object    | The Shopify object that you want to store\nextractToCollections  | array     | Array with collection options to extract specific elements to separate collections (see below for more info)\n```\n\n### Delete data\nLoad the `deleteFromFirestore()` function:\n```js\nconst { deleteFromFirestore } = require('@code-nl/shopify-to-firestore');\n```\n\nTo use the `deleteFromFirestore` method :\n```js\ndeleteFromFirestore(firestore, shopifyDomain, documentRoot, documentId, extractToCollections);\n```\nNote that this returns a Promise so it is advisable to put this in your promise chain.\n\n```\nfirestore             | object    | This is the reference to your Cloud Firestore instance (firebase.firestore())\nshopifyDomain         | string    | This is the myshopify.com domain name of your Shopify Instance\ndocumentRoot          | callback  | This is a callback function that returns the Firestore collection root of the Shopify object you want to delete (see below for more info)\ndocumentId            | string    | The unique ID of the Shopify object you want to delete\nextractToCollections  | array     | Array with collection options to delete the related separate collections (see below for more info)\n```\n\n#### documentRoot\nThe contains a callback to the Cloud Firestore collection where the main data is stored. The first argument that is passed is the shopify domain name. \nAn example of the callback can be:\n```js\n/**\n * Helper to get the Shopify orders root\n * @param {string} shopifyDomain The myshopify.com domain name\n */\nexports.getOrderDocRoot = (shopifyDomain) => { \n  return module.exports.getShopDocRoot(shopifyDomain).collection('sfyOrders');\n};\n```\n\nIn this case `getOrderDocRoot` is the callback you will have to pass on. The `sfyOrders` is the collection name that is used as subcollection in the shops collection.\n\n#### extractToCollections\nThis contains an array of objects which provides a config for linked elements that needs to be stored or removed.\n\nAn example:\n```js\n  // set the collections that needs to be extracted to a main collection\n  const extractToCollections = [\n    {\n      name: 'fulfillments',\n      collection: getFulfillmentDocRoot,\n      parentDocRef: 'orderId',\n      documentId: 'id'      \n    }\n  ];\n```\n\nIn this case the `fulfillments` array in the Shopify object will be stored as seperate document(s) in the `getFulfillmentDocRoot` collection. The `parentDocRef` will contain the ID of the parent document. `documentId` is the unique ID that is used to store the extracted document in.","readmeFilename":"README.md"}