apache / apache/couchdb-nano

Types differ from real data. Again.

Open
#222 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
167
Avg merge
1h
Merged PRs (30d)
1

Description

Changes type:
```ts
// http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes
interface DatabaseChangesResultItem {
// List of document’s leaves with single field rev.
changes: Array<{ rev: string }>;

// Document ID.
id: string;

// Update sequence.
seq: any;

// true if the document is deleted.
deleted: boolean;
}
```

Real data:
![image](https://user-images.githubusercontent.com/39277134/81270805-8f56d180-904b-11ea-8769-e0cc1b6d0331.png)

There is a **doc** property, however it's not in the interface. Also there's no **deleted** property, despite it's set as required.
Please fix.

## Your Environment
* Version used: 8.2.2
* Operating System and version (desktop or mobile): Win 10

Contributor guide

Open the contributing guide

Research direction

Start by locating the DatabaseChangesResultItem interface and compare it with the CouchDB database changes API linked in the issue. Update the interface to match the documented and observed response shape, including doc and the deleted field, then verify the TypeScript definitions against real changes responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.