copdb-sdk (0.0.9-deployment-ci)
Published 2026-01-18 00:36:31 +00:00 by matt
Installation
registry=npm install copdb-sdk@0.0.9-deployment-ci"copdb-sdk": "0.0.9-deployment-ci"About this package
copdb-sdk@0.0.9-deployment-ci
A TypeScript SDK client for the localhost API.
Usage
First, install the SDK from npm.
npm install copdb-sdk --save
Next, try it out.
import {
Configuration,
AccountApi,
} from 'copdb-sdk';
import type { ChangePasswordRequest } from 'copdb-sdk';
async function example() {
console.log("🚀 Testing copdb-sdk SDK...");
const config = new Configuration({
// To configure API key authorization: Bearer
apiKey: "YOUR API KEY",
});
const api = new AccountApi(config);
const body = {
// UpdatePasswordDto (optional)
updatePasswordDto: ...,
} satisfies ChangePasswordRequest;
try {
const data = await api.changePassword(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Documentation
API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountApi | changePassword | POST /accounts/change-password | |
| AccountApi | passwordResetRequest | POST /accounts/password-reset-request | |
| AccountApi | refreshToken | POST /accounts/refresh-token | |
| AccountApi | requestEmailVerification | POST /accounts/request-email-verification | |
| AccountApi | resetPasswordWithToken | POST /accounts/reset-password-with-token | |
| AccountApi | signIn | POST /accounts/sign-in | |
| AccountApi | signUp | POST /accounts/sign-up | |
| AccountApi | signUpWithInvite | POST /accounts/sign-up-with-invite | |
| AccountApi | tfaConfiguration | GET /accounts/tfa-configuration | |
| AccountApi | tfaRemove | POST /accounts/tfa-remove | |
| AccountApi | tfaSetup | POST /accounts/tfa-setup | |
| AccountApi | tfaSignIn | POST /accounts/tfa-sign-in | |
| AccountApi | verifySignUp | POST /accounts/verify-sign-up | |
| AdminApi | getUsers | GET /admin/users | |
| AdminApi | inviteUser | POST /admin/invite-user | |
| AdminApi | sendTestEmail | POST /admin/test-email | |
| AdminApi | updateUser | POST /admin/users/{userId} | |
| CopApi | createCopEdit | POST /cops/{copId}/edits | |
| CopApi | deleteCop | DELETE /cops/{copId} | |
| CopApi | getCopDetails | GET /cops/{copId}/details | |
| CopApi | listCopDetails | GET /cops/details | |
| CopApi | listCopEdits | GET /cops/edits | |
| CopApi | listCopIncidents | GET /cops/{copId}/incidents | |
| CopApi | listCops | GET /cops | |
| CopApi | updateCopEdit | POST /cops/edits/{editId} | |
| CopApi | updateCopEditStatus | POST /cops/edits/{editId}/{status} | |
| CopImportApi | denyCopImport | POST /cop-imports/{copImportId}/deny | Denies a cop import record by setting its status to Denied. |
| CopImportApi | getCopImports | GET /cop-imports | Gets a list of cop import records with the provided filter applied. |
| CopImportApi | importCops | POST /cop-imports | TODO: write better comment here, maybe even referencing documentation... |
| CopImportApi | submitCopImport | POST /cop-imports/{copImportId} | Submits the provided UpsertCopDto for the cop import record, either creating a Report for new cops or creating a CopEdit for existing cops. |
| CopPagesApi | getCopPage | GET /pages/cops/{copId} | |
| DepartmentApi | createDepartment | POST /departments | |
| DepartmentApi | listDepartments | GET /departments | |
| DepartmentApi | updateDepartment | POST /departments/{departmentId} | |
| DepartmentPagesApi | getDepartmentPage | GET /pages/departments/{departmentId} | |
| FeatureApi | getFeatures | GET /features | |
| IncidentApi | createIncidentEdit | POST /incidents/{incidentId}/edits | |
| IncidentApi | listIncidentEdits | GET /incidents/edits | |
| IncidentApi | listIncidents | GET /incidents | |
| IncidentApi | updateIncidentEditStatus | POST /incidents/edits/{editId}/{status} | |
| IncidentPagesApi | getIncidentPage | GET /pages/incidents/{incidentId} | |
| MappingApi | query | POST /mapping/query | |
| MediaApi | createMedia | POST /medias | |
| MediaApi | createMediaEdit | POST /medias/{mediaId}/edits | |
| MediaApi | getMediaDetails | GET /medias/details/{mediaId} | |
| MediaApi | listMediaEdits | GET /medias/edits | |
| MediaApi | listMedias | POST /medias/list | |
| MediaApi | setMediaDisplayName | POST /medias/{mediaId} | |
| MediaApi | updateMediaEditStatus | POST /medias/edits/{editId}/{status} | |
| MetaApi | getPublicStatistics | GET /meta/public-statistics | |
| ReportApi | createReport | POST /reports | |
| ReportApi | createReportComment | POST /reports/{reportId}/comments | |
| ReportApi | deleteReportComment | DELETE /reports/{reportId}/comments/{commentId} | |
| ReportApi | getReport | GET /reports/{reportId} | |
| ReportApi | listReportComments | GET /reports/{reportId}/comments | |
| ReportApi | listReportVersions | GET /reports/{reportId}/versions | Gets a list of all the metadata for the ReportVersion records for the provided report. |
| ReportApi | listReports | GET /reports | Return a list of reports that are filtered based on the provided options. Note: when you are requesting draft reports, you can only request those that you have authored. Otherwise the request will be rejected as unauthorized. |
| ReportApi | setReportVersion | POST /reports/{reportId}/set-version | Sets the provided version as the latest version for the report. It does not modify any existing records. Instead, a new version will be created with the data populated from the specified version. |
| ReportApi | submitReport | POST /reports/{reportId}/submit | Submits a report to be approved my moderators. This will update the report status to "pending" until a moderator approves or denies it. |
| ReportApi | updateReport | POST /reports/{reportId} | |
| ReportApi | updateReportComment | POST /reports/{reportId}/comments/{commentId} | |
| ReportApi | updateReportStatus | POST /reports/{reportId}/{status} | |
| SearchApi | search | GET /search | |
| TagApi | listIncidentTagOptions | GET /tags/incident-options | |
| UserApi | getCurrentUserProfile | GET /users/me | |
| UserApi | getPublicUserProfiles | GET /users |
Models
- Assembly
- AuthenticateRequest
- AuthenticateResponse
- CallingConventions
- CommentDto
- ConstructorInfo
- CoordinateDto
- CopDepartmentDto
- CopDepartmentNotability
- CopDepartmentResponseDto
- CopDetailsResponseDto
- CopEdit
- CopFilterNameQueryType
- CopImportDto
- CopImportResponseDto
- CopImportResponseType
- CopImportStatus
- CopImportType
- CopImportsFilterResponseDto
- CopPageDto
- CopResponseDto
- CopSortField
- CopsFilterResponse
- CreateMediaDto
- CreateMediaResponse
- CustomAttributeData
- CustomAttributeNamedArgument
- CustomAttributeTypedArgument
- DepartmentCapabilities
- DepartmentDto
- DepartmentFilterResponse
- DepartmentPageDto
- DepartmentResponseDto
- DepartmentSortField
- DepartmentType
- EditStatus
- EmailActionRequestDto
- EventAttributes
- EventInfo
- Expression
- ExpressionType
- EyeColor
- FeaturesResponseDto
- FieldAttributes
- FieldInfo
- Gender
- GenericParameterAttributes
- HairColor
- ImportCopsResponseDto
- Incident
- IncidentEdit
- IncidentFilter
- IncidentFilterFieldMap
- IncidentFilterResponse
- IncidentInformationDto
- IncidentMapResponseDto
- IncidentMedia
- IncidentObjectFuncExpression
- IncidentPageDto
- IncidentResponseDto
- IncidentSortField
- IncidentTagDto
- IncidentTagOption
- IncludeMode
- IndexableCop
- IndexableDepartment
- IndexableIncident
- InviteUserDto
- LayoutKind
- Lexeme
- ListMediasDto
- LocationDto
- MapQueryDto
- MapQueryResponseDto
- Media
- MediaAssociationDto
- MediaDetailsDto
- MediaEdit
- MediaProcessInfo
- MediaRelationType
- MediaUpdateDto
- MemberInfo
- MemberTypes
- MethodAttributes
- MethodBase
- MethodImplAttributes
- MethodInfo
- Module
- ModuleHandle
- MultiPolygon
- Operation
- ParameterAttributes
- ParameterExpression
- ParameterInfo
- PasswordResetDto
- Person
- PersonIncidentAssociationDto
- PersonMedia
- PersonMediaResponseDto
- PersonResponseDto
- PropertyAttributes
- PropertyInfo
- PublicStatisticsResponseDto
- PublicUserProfileDto
- Race
- Report
- ReportFilterResponse
- ReportResponseDto
- ReportStatus
- ReportStatusHistory
- ReportVersion
- ReportVersionResponseDto
- RuntimeFieldHandle
- RuntimeMethodHandle
- RuntimeTypeHandle
- SearchResponseDto
- SecurityRuleSet
- SendTestEmailDto
- SeparationReason
- SetReportVersionDto
- SignUpDto
- SignUpWithInviteDto
- SortDirection
- StructLayoutAttribute
- SubmitCopImportResponseDto
- TfaConfigurationDto
- TfaSetupResponseDto
- TfaSignInDto
- Type
- TypeAttributes
- TypeInfo
- UpdatePasswordDto
- UpdateUserDto
- UpsertCommentDto
- UpsertCopDto
- UpsertIncidentDto
- UpsertMediaRelationDto
- UpsertPersonMediaDto
- UpsertReportDto
- UserProfileDto
- VerifyEmailDto
Authorization
Authentication schemes defined for the API:
Bearer
- Type: API key
- API key parameter name:
Authorization - Location: HTTP header
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
v1 - Package version:
0.0.9-deployment-ci - Generator version:
7.18.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run build
Publishing
Once you've built the package, you can publish it to npm:
npm publish
License
Dependencies
Development dependencies
| ID | Version |
|---|---|
| typescript | ^4.0 || ^5.0 |