{"_id":"@bounder/scg-ng-data-service","_rev":"1-de8da411fd3f4a174f7d979e6dcdc206","name":"@bounder/scg-ng-data-service","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@bounder/scg-ng-data-service","version":"0.0.1","description":"Package for creating data services based on Django Rest Framework","author":{"name":"Arend H. Tolner"},"license":"ISC","peerDependencies":{"@angular/common":"^8.0.0","@angular/core":"^8.0.0"},"main":"bundles/bounder-scg-ng-data-service.umd.js","module":"fesm5/bounder-scg-ng-data-service.js","es2015":"fesm2015/bounder-scg-ng-data-service.js","esm5":"esm5/bounder-scg-ng-data-service.js","esm2015":"esm2015/bounder-scg-ng-data-service.js","fesm5":"fesm5/bounder-scg-ng-data-service.js","fesm2015":"fesm2015/bounder-scg-ng-data-service.js","typings":"bounder-scg-ng-data-service.d.ts","metadata":"bounder-scg-ng-data-service.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@bounder/scg-ng-data-service@0.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vQbz4KcCL099wq5RmTr1/8OS8R+w+Rc9eI31qf6waeamK7Qjgeo38iHh2SlIv95nr5EearpK1PXCUIbjextKWg==","shasum":"4269ec1f2c3d31b23d6cccac40f36cc70048d4ff","tarball":"https://registry.npmjs.org/@bounder/scg-ng-data-service/-/scg-ng-data-service-0.0.1.tgz","fileCount":35,"unpackedSize":212833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhL/qCRA9TVsSAnZWagAA1MEQAIVa/72/UijlF9ytRR7R\ng+mE0Ivb23r7XoD7cXVFBGh6OacPG8MAR/X4kXAnR1937numZn0+smQe3NOw\nhcPiYZk9GAemzYzzY7uQXfjIkv9waWSU5iyoKrauUekig7B++n0wdyZPtGKO\nQrbu0g41mIlgn/mvAq0S/82kxjmYqDh/1DFfQXEPewmmwVnMiZVdzBvaiNjl\n2whx4ZiObol550hksSRguFoQzXzOXchtUv1rRJK5Pj46GYmkgLR2E+USDqyS\nXTgSp+pU+V/JOnTJnbmswgRu+TTRC1MNgUj+TzkcUSowwjLtyh/tfp6ukCRt\nMMFPxgR71KL4WfzUTVFLUqY+enuK6z0FNmWfU8N2qv0OWWfHnPD1lo1HfyzB\nUDh9nlSzEDPtIhcInog3dZiw6VeFrJ8mwZ4MvmJcDYFWrRNcv+AvestEMc9B\nMvs2mTC7rWQekJA0WRyZ+I5LstQq/QGxA+9rR5IRramcB+G6mAVvzwL/p39K\nf/bCc5lj8KPv46jLzYN59TNjJQvw+b3TC35PPARUWS+/zXpmvyccsbjakmY9\nde9dZCP3lf9aXNtrDOc8glkQtR8TAA0FRdo5XqckS+5iz2f1DR1nUHEzfb23\nKLDEoAqG4RKVDetfqPeFK5oWv8PQXWTk9h3P+nOLeCAP2EmQV241CGpg1q05\nUTT3\r\n=OVh8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBP7kq+FFm0/gPDXyOtDBQi/XsZgdZIFfSvhPQ69om/uAiEAjJLkBTYF3EuPFVRcdvJgAE9xnW0N4gBPIs7RzHV9LXs="}]},"maintainers":[{"name":"bounder","email":"arie@bounder.nl"}],"_npmUser":{"name":"bounder","email":"arie@bounder.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scg-ng-data-service_0.0.1_1568980970256_0.12611015128778869"},"_hasShrinkwrap":false}},"time":{"created":"2019-09-20T12:02:50.032Z","0.0.1":"2019-09-20T12:02:50.380Z","modified":"2022-04-04T20:16:00.879Z"},"maintainers":[{"name":"bounder","email":"arie@bounder.nl"}],"description":"Package for creating data services based on Django Rest Framework","author":{"name":"Arend H. Tolner"},"license":"ISC","readme":"# ScgNgDataService\n\nThis library consist of a couple of base classes which makes it easy to create data services for Django Rest Framework. \nThis library is used internally by scgvisual.com for their web applications.\n\nThe following classes can be extended to create functional rest service classes:\n\n## BaseDataService\n\nThis is the base class for all DataService classes. It add the methods `getByKey`, `create`, `delete`, `update`, `partialUpdate` and `getFields` to a data service.\nThe end points for the methods are constructed based on the entityName and the type of method. \nYou can add custom UrlParams to the methods which are inserted into the end point path.\nFinally you can override `makeUrl` to add custom logic for forming Urls\n\n\n## ListDataService\n\nThis class extends BaseDataService and adds the `getAll` and `getWithQuery` in methods to any class extending it.\n\n## PaginatedDataService\n\nThis class extends BaseDataService and adds the `getPage` and `getWithQuery` methods to any class extending it.\n\n\n## Configuration\n\nYou have to configure the data service classes using the injectable config token. The following is an example of a minimum configuration:\n\n    // This is an example configuration\n    const MY_CONFIG: ScgDsConfig = {\n      baseUrl: 'https://api.test.sctvisual.com/'\n    };\n    \n    // This is an example implementation of a derrived data service.\n    @Injectable(\n      {providedIn: 'root'}\n    )\n    class TestDataService extends BaseDataService<TestEntity> {\n      constructor(dataServiceFactory: ScgDataServiceFactory) {\n        super('Test', dataServiceFactory);\n      }\n    }\n    \n    // Add the following providers to your module configuration\n    providers: [\n      {provide: SCG_DATA_SERVICE_CONFIG, useValue: MY_CONFIG}, // Configuration injection token\n      ScgDataServiceFactory, // ServiceFactory including the config and HttpClient\n    ]\n    \n\n","readmeFilename":"README.md"}