{"id":21861473,"url":"https://github.com/ozmap/ozmap-sdk","last_synced_at":"2025-04-14T19:36:09.494Z","repository":{"id":44640841,"uuid":"376594151","full_name":"ozmap/ozmap-sdk","owner":"ozmap","description":"Use this SDK to access the OZmap platform and connect it to your systems.","archived":false,"fork":false,"pushed_at":"2025-04-09T20:03:54.000Z","size":735,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T20:43:39.841Z","etag":null,"topics":["nodejs","sdk","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozmap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-06-13T16:48:15.000Z","updated_at":"2025-04-09T20:03:58.000Z","dependencies_parsed_at":"2024-04-23T18:40:50.399Z","dependency_job_id":null,"html_url":"https://github.com/ozmap/ozmap-sdk","commit_stats":{"total_commits":97,"total_committers":11,"mean_commits":8.818181818181818,"dds":0.7216494845360825,"last_synced_commit":"6a0b25011112c0c728067deed127cc2e561c5a06"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozmap%2Fozmap-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozmap%2Fozmap-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozmap%2Fozmap-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozmap%2Fozmap-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozmap","download_url":"https://codeload.github.com/ozmap/ozmap-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248946823,"owners_count":21187581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","sdk","typescript"],"created_at":"2024-11-28T03:11:45.020Z","updated_at":"2025-04-14T19:36:09.489Z","avatar_url":"https://github.com/ozmap.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OZmap SDK\n\nOZmap is a solution by devOZ. Based in Florianópolis since 2012, we develop software focused on facilitating the mapping of georeferenced data with the intention of generating intelligent information for strategic decisions.\n\n## What is OZmap SDK?\n\nThe OZmap SDK is a tool designed to help developers interact with the OZmap API, providing a streamlined interface for managing georeferenced data. This SDK includes various methods for creating, updating, retrieving, and deleting different models within the OZmap ecosystem, such as projects, cables, boxes, poles, and more.\n\n## Features\n\n- **CRUD Operations**: Easily create, read, update, and delete data.\n- **Data Mapping**: Simplifies the interaction with georeferenced data.\n- **Batch Operations**: Perform batch updates and retrieves efficiently.\n- **Pagination Support**: Handle large datasets with pagination.\n- **Filter and Query**: Advanced filtering and querying capabilities.\n\n## Installation\n\nTo install the OZmap SDK, use npm:\n\n```bash\nnpm i --save @ozmap/ozmap-sdk\n```\n\n## Usage\n\n### Using login and password\n\n```typescript\nimport OZMapSDK from '@ozmap/ozmap-sdk';\n\nconst sdk = new OZMapSDK('https://api.example.com', { login: 'your-ozmap-login', password: 'your-ozmap-password' });\n```\n\n### Using API Key\n\n```typescript\nimport OZMapSDK from '@ozmap/ozmap-sdk';\n\nconst sdk = new OZMapSDK('https://api.example.com', { apiKey: 'your-ozmap-api-key' });\n```\n\n## CRUD operations\n\n### Create\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nconst newPopData: CreatePopDTO = {\n  name: \"New Pop\",\n  hierarchyLevel: 1,\n  popType: \"popTypeId\",\n  pole: \"poleId\",\n  implanted: true,\n};\n\nsdk.pop.create(newPopData).then((pop) =\u003e {\n  console.log('Pop created:', pop);\n});\n```\n\n### Update\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nconst updatePopData: UpdatePopDTO = {\n  name: \"Updated Pop\",\n  hierarchyLevel: 2,\n};\n\nsdk.pop.updateById('popId', updatePopData).then(() =\u003e {\n  console.log('Pop updated');\n});\n```\n\n### Fetch\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.pop.find({ page: 1, limit: 10, filter: [\n    {\n      property: \"name\",\n      operator: FilterOperator.EQUAL,\n      value: \"Popname\",\n    }]\n}).then((pagination) =\u003e {\n  console.log('Pops:', pagination);\n});\n```\n\n### Fetch by id\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.pop.findById('popId').then((pop) =\u003e {\n  console.log('Pop:', pop);\n});\n```\n\n### Delete\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.pop.deleteById('popId').then(() =\u003e {\n  console.log('Pop deleted');\n});\n```\n\n## API instance methods\n\nFor making non-CRUD operations, such as viability or any other that isn't included in an element route, you can use the `apiInstance` of the SDK.\n\n### Get\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.apiInstance.get\u003cOUTPUT\u003e({\n    route: 'ftth-viability/radius',\n    options: { params: { lat, lng } },\n}).then((response) =\u003e {\n    console.log('Response:', response);\n});\n```\n\n\n### Post\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.apiInstance.post\u003cINPUT, OUTPUT\u003e({\n  route: 'custom/route',\n  inputData: { key: 'value' },\n  options: { headers: { 'Custom-Header': 'value' } },\n}).then((response) =\u003e {\n  console.log('Response:', response);\n});\n```\n\n### Patch\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.apiInstance.patch\u003cINPUT\u003e({\n    route: 'custom/route',\n    inputData: { key: 'newValue' },\n    options: { headers: { 'Custom-Header': 'value' } },\n}).then(() =\u003e {\n    console.log('Data updated');\n});\n```\n\n### Delete\n\n```typescript\nimport OZMapSDK from 'ozmapsdk';\n\nconst sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });\n\nsdk.apiInstance.delete({\n    route: 'custom/route',\n    options: { headers: { 'Custom-Header': 'value' } },\n}).then(() =\u003e {\n    console.log('Data deleted');\n});\n```\n\n\n## Documentation\n\n## Models\n\n### Boxes\n\n- [Base Box](./docs/BASEBOX.md)\n- [Box](./docs/BOX.md)\n- [Box Template](./docs/BOXTEMPLATE.md)\n- [Box Type](./docs/BOXTYPE.md)\n\n### Building\n\n- [Building](./docs/BUILDING.md)\n\n### Cables\n\n- [Cable](./docs/CABLE.md)\n- [Cable Type](./docs/CABLETYPE.md)\n\n### Clients\n\n- [FTTH Client](./docs/FTTHCLIENT.md)\n\n### Colors\n\n- [Color](./docs/COLOR.md)\n\n### Connectors\n\n- [Connector](./docs/CONNECTOR.md)\n- [Connector Type](./docs/CONNECTORTYPE.md)\n- [Network Connectable](./docs/NETWORKCONNECTABLE.md)\n- [Network Connector](./docs/NETWORKCONNECTOR.md)\n\n### Cords\n\n- [Cord](./docs/CORD.md)\n\n### Devices\n\n- [DIO](./docs/DIO.md)\n- [DIO Type](./docs/DIOTYPE.md)\n\n### Ducts\n\n- [Duct](./docs/DUCT.md)\n- [Duct Type](./docs/DUCTTYPE.md)\n\n### Fibers\n\n- [Fiber](./docs/FIBER.md)\n- [Fiber Profile](./docs/FIBERPROFILE.md)\n\n### Files\n\n- [File](./docs/FILE.md)\n\n### Fusion\n\n- [Fusion](./docs/FUSION.md)\n- [Fusion Type](./docs/FUSIONTYPE.md)\n\n### Horizontal Condominium\n\n- [Horizontal Condominium](./docs/HORIZONTALCONDOMINIUM.md)\n\n### Junction Boxes\n\n- [Junction Box](./docs/JUNCTIONBOX.md)\n- [Junction Box Type](./docs/JUNCTIONBOXTYPE.md)\n\n### OLT\n\n- [OLT](./docs/OLT.md)\n- [OLT Type](./docs/OLTTYPE.md)\n\n### Passing\n\n- [Passing](./docs/PASSING.md)\n\n### Pendencies\n\n- [Pendency](./docs/PENDENCY.md)\n- [Pendency Type](./docs/PENDENCYTYPE.md)\n\n### Points\n\n- [Base Point](./docs/BASEPOINT.md)\n- [Point](./docs/POINT.md)\n\n\n### Poles\n- [Pole](./docs/POLE.md)\n- [Pole Type](./docs/POLETYPE.md)\n\n### PON\n\n- [PON](./docs/PON.md)\n\n### POP\n- [POP](./docs/POP.md)\n- [POP Type](./docs/POPTYPE.md)\n\n### POST\n- [Post](./docs/POST.md)\n### Projects\n\n- [Project](./docs/PROJECT.md)\n- [Project Group](./docs/PROJECTGROUP.md)\n\n### Properties\n\n- [Property](./docs/PROPERTY.md)\n- [Prospect](./docs/PROSPECT.md)\n\n### Regions\n\n- [Region](./docs/REGION.md)\n- [Region Type](./docs/REGIONTYPE.md)\n\n### Roles\n\n- [Role](./docs/ROLE.md)\n\n### Shelves\n\n- [Shelf](./docs/SHELF.md)\n- [Shelf Type](./docs/SHELFTYPE.md)\n\n### Slots\n\n- [Slot](./docs/SLOT.md)\n\n### Splitters\n\n- [Splitter](./docs/SPLITTER.md)\n- [Splitter Type](./docs/SPLITTERTYPE.md)\n\n### Switches\n\n- [Switch](./docs/SWITCH.md)\n- [Switch Type](./docs/SWITCHTYPE.md)\n\n### System\n\n- [System Configuration](./docs/SYSTEMCONFIG.md)\n- [Tags](./docs/TAG.md)\n- [Users](./docs/USER.md)\n\n## API\n\nFor detailed information about the API endpoints and how to use them, please refer to the [OZmap API Documentation](https://ozmap.stoplight.io/docs/ozmap/f20b389eedb19-o-zmap).\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Links\n\n- [OZmap Website](https://ozmap.net/)\n- [OZmap API Documentation](https://ozmap.stoplight.io/docs/ozmap/f20b389eedb19-o-zmap)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozmap%2Fozmap-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozmap%2Fozmap-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozmap%2Fozmap-sdk/lists"}