{"_id":"@del-internet/sdk-cpe","_rev":"3-dbfb03f641b655324139cfad2d433d70","name":"@del-internet/sdk-cpe","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@del-internet/sdk-cpe","version":"1.0.0","keywords":["cpe","ACS","Delinternet"],"author":{"name":"Ismail Zare","email":"zarehesmaiel@gmail.com"},"license":"MIT","_id":"@del-internet/sdk-cpe@1.0.0","maintainers":[{"name":"zareismail","email":"zarehesmaiel@gmail.com"}],"homepage":"https://gitlab.delinternet.com/zareismail/sdk-cpe/blob/main/README.md","bugs":{"url":"https://gitlab.delinternet.com/zareismail/sdk-cpe/-/issues"},"dist":{"shasum":"30312b6e513e3a9b3811292dd115937b2f838068","tarball":"https://registry.npmjs.org/@del-internet/sdk-cpe/-/sdk-cpe-1.0.0.tgz","fileCount":24,"integrity":"sha512-13yFBQH+tXoQXHfjxKlRNfPj88OsCzWAZ0lb1FHiuwf6t2cFCUrje/OFuildljzkArk9YFJjXCwaQncrszYrWA==","signatures":[{"sig":"MEUCIEDaWYNBA96x+fQVOB/xZe64aXW9NHQK9TmnHkMpyAN5AiEAsGyMVrJyrWDkAtA87hc8N6/jqvVlIj27Py+xVcNN/Ek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37951},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">= 18.0.0"},"gitHead":"e17b4030b5385c25407b63ed88adf356f77f01d6","private":false,"scripts":{"dev":"npx tsc --watch","build":"tsc --declaration"},"_npmUser":{"name":"zareismail","email":"zarehesmaiel@gmail.com"},"repository":{"url":"git+https://gitlab.delinternet.com/zareismail/sdk-cpe.git","type":"git"},"_npmVersion":"10.4.0","description":"TypeScript SDK to interact with ACS services.","directories":{},"_nodeVersion":"18.17.1","dependencies":{"axios":"^1.6.8","lodash":"^4.17.21","await-to-js":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.1.0","typescript":"^5.2.2","@types/node":"^20.9.0","@types/lodash":"^4.17.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-cpe_1.0.0_1714474653017_0.08073288565176173","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@del-internet/sdk-cpe","version":"1.0.1","keywords":["cpe","ACS","Delinternet"],"author":{"name":"Ismail Zare","email":"zarehesmaiel@gmail.com"},"license":"MIT","_id":"@del-internet/sdk-cpe@1.0.1","maintainers":[{"name":"zareismail","email":"zarehesmaiel@gmail.com"}],"homepage":"https://gitlab.delinternet.com/zareismail/sdk-cpe/blob/main/README.md","bugs":{"url":"https://gitlab.delinternet.com/zareismail/sdk-cpe/-/issues"},"dist":{"shasum":"19f230f472bd280858842aabfa335411f6e005ff","tarball":"https://registry.npmjs.org/@del-internet/sdk-cpe/-/sdk-cpe-1.0.1.tgz","fileCount":24,"integrity":"sha512-I2iI6pPzvQDW9/iAVPP5WMFE6wD7c1y++chkxRL19fsrRoxcIAk1NE8GbTune51mfvnII0p0YKnVGApsw1YNrQ==","signatures":[{"sig":"MEQCIGe5wR2wfvQTi1qRNsV+Ls7TO8dkESqy+LO96wQGPTdWAiBXta1LYADbvcHV8QmkreKxpclVhPxGE2EQU13qVtax3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41986},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">= 18.0.0"},"gitHead":"6210731670ee2c45823983927f105f391fafdac1","private":false,"scripts":{"dev":"npx tsc --watch","build":"tsc --declaration"},"_npmUser":{"name":"zareismail","email":"zarehesmaiel@gmail.com"},"repository":{"url":"git+https://gitlab.delinternet.com/zareismail/sdk-cpe.git","type":"git"},"_npmVersion":"10.4.0","description":"TypeScript SDK to interact with ACS services.","directories":{},"_nodeVersion":"18.17.1","dependencies":{"axios":"^1.6.8","lodash":"^4.17.21","await-to-js":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.1.0","typescript":"^5.2.2","@types/node":"^20.9.0","@types/lodash":"^4.17.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-cpe_1.0.1_1714637601834_0.8988356448535864","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@del-internet/sdk-cpe","version":"1.0.2","keywords":["cpe","ACS","Delinternet"],"author":{"name":"Ismail Zare","email":"zarehesmaiel@gmail.com"},"license":"MIT","_id":"@del-internet/sdk-cpe@1.0.2","maintainers":[{"name":"zareismail","email":"zarehesmaiel@gmail.com"}],"homepage":"https://gitlab.delinternet.com/zareismail/sdk-cpe/blob/main/README.md","bugs":{"url":"https://gitlab.delinternet.com/zareismail/sdk-cpe/-/issues"},"dist":{"shasum":"a070e4a677e7a5ef35401a8303164987e13fd006","tarball":"https://registry.npmjs.org/@del-internet/sdk-cpe/-/sdk-cpe-1.0.2.tgz","fileCount":18,"integrity":"sha512-f9Etd/HaCfeCWE70EujelH0s/KMLW5LaakHn2Ly0EBlVNLTuJzbeDg4p79VLU70QegUznhkDbytc0MN6p/Zjtw==","signatures":[{"sig":"MEUCIHo5/3MqPK7kpowqyMhQqp/SPiALt3ufiPx/Y4ubmgAwAiEA2d7Ccsnu47Yyv1YeegjJFhv8vXfODwK27fYjHgoboPM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30450},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">= 18.0.0"},"gitHead":"9c1590c0f0d3618463843e26c091c3053e9c7f80","private":false,"scripts":{"dev":"npx tsc --watch","build":"tsc --declaration"},"_npmUser":{"name":"zareismail","email":"zarehesmaiel@gmail.com"},"repository":{"url":"git+https://gitlab.delinternet.com/zareismail/sdk-cpe.git","type":"git"},"_npmVersion":"10.7.0","description":"TypeScript SDK to interact with ACS services.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"axios":"^1.6.8","lodash":"^4.17.21","await-to-js":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.1.0","typescript":"^5.2.2","@types/node":"^20.9.0","@types/lodash":"^4.17.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-cpe_1.0.2_1715157291240_0.20971989150966008","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@del-internet/sdk-cpe","version":"1.1.0","description":"TypeScript SDK to interact with ACS services.","main":"dist/index.js","private":false,"publishConfig":{"access":"public"},"engines":{"node":">= 18.0.0"},"scripts":{"build":"tsc --declaration","dev":"npx tsc --watch"},"repository":{"type":"git","url":"git+https://gitlab.delinternet.com/zareismail/sdk-cpe.git"},"author":{"name":"Ismail Zare","email":"zarehesmaiel@gmail.com"},"license":"MIT","bugs":{"url":"https://gitlab.delinternet.com/zareismail/sdk-cpe/-/issues"},"homepage":"https://gitlab.delinternet.com/zareismail/sdk-cpe/blob/main/README.md","keywords":["cpe","ACS","Delinternet"],"dependencies":{"await-to-js":"^3.0.0","axios":"^1.6.8","lodash":"^4.17.21"},"devDependencies":{"@types/lodash":"^4.17.0","@types/node":"^20.9.0","prettier":"^3.1.0","typescript":"^5.2.2"},"_id":"@del-internet/sdk-cpe@1.1.0","gitHead":"e67b28a60b823e689557e44d1740d9499086dcc5","types":"./dist/index.d.ts","_nodeVersion":"20.12.2","_npmVersion":"10.8.0","dist":{"integrity":"sha512-toMtL7Z7M3PRgGUSAV5sZpe14rsyMhedBFafcK4dDRQ2Y9B817v2za0o1OMKmtGWWQEBPyiYDp5FQQKMkMt1jw==","shasum":"d78e7836efc0402087f14661777e3cbd19f8bc92","tarball":"https://registry.npmjs.org/@del-internet/sdk-cpe/-/sdk-cpe-1.1.0.tgz","fileCount":18,"unpackedSize":30772,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDdYZl44TDuJYfqCp5hDsJmW1xKZuFEMY85JdKOVlgXwAiEA79jatBwcMcFm4kN7xf1JHNtL+fmzPe2DlzW5/RdbCHU="}]},"_npmUser":{"name":"zareismail","email":"zarehesmaiel@gmail.com"},"directories":{},"maintainers":[{"name":"zareismail","email":"zarehesmaiel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk-cpe_1.1.0_1721632413010_0.8366505207833521"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-30T10:57:32.901Z","modified":"2024-07-22T07:13:33.315Z","1.0.0":"2024-04-30T10:57:33.188Z","1.0.1":"2024-05-02T08:13:22.002Z","1.0.2":"2024-05-08T08:34:51.394Z","1.1.0":"2024-07-22T07:13:33.140Z"},"bugs":{"url":"https://gitlab.delinternet.com/zareismail/sdk-cpe/-/issues"},"author":{"name":"Ismail Zare","email":"zarehesmaiel@gmail.com"},"license":"MIT","homepage":"https://gitlab.delinternet.com/zareismail/sdk-cpe/blob/main/README.md","keywords":["cpe","ACS","Delinternet"],"repository":{"type":"git","url":"git+https://gitlab.delinternet.com/zareismail/sdk-cpe.git"},"description":"TypeScript SDK to interact with ACS services.","maintainers":[{"name":"zareismail","email":"zarehesmaiel@gmail.com"}],"readme":"## CPE & ACS\n\nThis package written to work with Delinternet ACS service. the package contains only `devices` [API's](https://docs.genieacs.com/en/latest/api-reference.html).\n\n## Usage\n\nTo use the package in you project do it like so:\n\n```\nimport factory from '@del-internet/sdk-cpe';\n\nconst ACS = factory({ endpoint: 'acs.example.com' });\n\nawait ACS.devices.all() // to list all devices\nawait ACS.devices.find('device_id') // to get device by its id\n...\n```\n\n## Extending\n\nto add more collection API you could create another collection like so:\n\n```\n///\n...\n\nimport Collection from '../Collection';\n\nexport default class Tasks extends Collection<Task> {\n\n  /**\n   * Get collection uri.\n   */\n  protected abstract collection(): string {\n    return 'tasks'\n  }\n}\n```\n\nthen export you endpoint in `index.ts`:\n\n```\nexport const factory = (config: Config) => {\n  const client = new Client(config);\n  const devices = new Devices(client);\n  const tasks = new Tasks(client);\n\n  return { client, devices, tasks };\n};\n```\n","readmeFilename":"README.md"}