Skip to content

Commit 43e3299

Browse files
committed
add definitions for the add enhanced changeset statistics
1 parent 1efc40f commit 43e3299

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

examples/getChangeset.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Response:
1111
```json
1212
{
1313
"changes_count": 10,
14+
"created_count": 7,
15+
"modified_count": 2,
16+
"deleted_count": 1,
1417
"closed_at": "2022-09-10T11:30:13.000Z",
1518
"comments_count": 0,
1619
"created_at": "2022-09-10T11:30:12.000Z",

examples/listChangesets.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Response:
1515
[
1616
{
1717
"changes_count": 10,
18+
"created_count": 7,
19+
"modified_count": 2,
20+
"deleted_count": 1,
1821
"closed_at": "2022-09-10T11:30:13.000Z",
1922
"comments_count": 0,
2023
"created_at": "2022-09-10T11:30:12.000Z",

src/__tests__/__snapshots__/e2e.test.ts.snap

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,15 @@ exports[`end to end tests > getChangeset (no discussion) 1`] = `
112112
"closed_at": 2021-12-16T09:29:15.000Z,
113113
"comments_count": 2,
114114
"created_at": 2021-12-16T09:29:14.000Z,
115+
"created_count": 0,
116+
"deleted_count": 0,
115117
"discussion": undefined,
116118
"id": 227200,
117119
"max_lat": -36.8801278,
118120
"max_lon": 174.7400986,
119121
"min_lat": -36.8809762,
120122
"min_lon": 174.739496,
123+
"modified_count": 0,
121124
"open": false,
122125
"tags": {
123126
"changesets_count": "2",
@@ -139,6 +142,8 @@ exports[`end to end tests > getChangeset (with discussion) 1`] = `
139142
"closed_at": 2021-12-16T09:29:15.000Z,
140143
"comments_count": 2,
141144
"created_at": 2021-12-16T09:29:14.000Z,
145+
"created_count": 0,
146+
"deleted_count": 0,
142147
"discussion": [
143148
{
144149
"date": 2024-06-30T08:59:15.000Z,
@@ -162,6 +167,7 @@ exports[`end to end tests > getChangeset (with discussion) 1`] = `
162167
"max_lon": 174.7400986,
163168
"min_lat": -36.8809762,
164169
"min_lon": 174.739496,
170+
"modified_count": 0,
165171
"open": false,
166172
"tags": {
167173
"changesets_count": "2",
@@ -588,12 +594,15 @@ exports[`end to end tests > listChangesets 1`] = `
588594
"closed_at": 2022-09-10T11:47:14.000Z,
589595
"comments_count": 0,
590596
"created_at": 2022-09-10T11:47:13.000Z,
597+
"created_count": 0,
598+
"deleted_count": 0,
591599
"discussion": undefined,
592600
"id": 243638,
593601
"max_lat": -36.8804862,
594602
"max_lon": 174.739748,
595603
"min_lat": -36.8806247,
596604
"min_lon": 174.7395027,
605+
"modified_count": 0,
597606
"open": false,
598607
"tags": {
599608
"comment": "Restore deleted features",
@@ -608,12 +617,15 @@ exports[`end to end tests > listChangesets 1`] = `
608617
"closed_at": 2022-09-10T11:30:13.000Z,
609618
"comments_count": 0,
610619
"created_at": 2022-09-10T11:30:12.000Z,
620+
"created_count": 0,
621+
"deleted_count": 0,
611622
"discussion": undefined,
612623
"id": 243637,
613624
"max_lat": -36.8804809,
614625
"max_lon": 174.7397571,
615626
"min_lat": -36.880627,
616627
"min_lon": 174.739496,
628+
"modified_count": 0,
617629
"open": false,
618630
"tags": {
619631
"changesets_count": "5",
@@ -631,12 +643,15 @@ exports[`end to end tests > listChangesets 1`] = `
631643
"closed_at": 2021-12-16T09:29:15.000Z,
632644
"comments_count": 2,
633645
"created_at": 2021-12-16T09:29:14.000Z,
646+
"created_count": 0,
647+
"deleted_count": 0,
634648
"discussion": undefined,
635649
"id": 227200,
636650
"max_lat": -36.8801278,
637651
"max_lon": 174.7400986,
638652
"min_lat": -36.8809762,
639653
"min_lon": 174.739496,
654+
"modified_count": 0,
640655
"open": false,
641656
"tags": {
642657
"changesets_count": "2",
@@ -655,12 +670,15 @@ exports[`end to end tests > listChangesets 1`] = `
655670
"closed_at": 2021-12-16T08:43:07.000Z,
656671
"comments_count": 0,
657672
"created_at": 2021-12-16T08:43:06.000Z,
673+
"created_count": 0,
674+
"deleted_count": 0,
658675
"discussion": undefined,
659676
"id": 227184,
660677
"max_lat": -36.8804809,
661678
"max_lon": 174.7397571,
662679
"min_lat": -36.880627,
663680
"min_lon": 174.739496,
681+
"modified_count": 0,
664682
"open": false,
665683
"tags": {
666684
"changesets_count": "1",

src/types/changesets.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export type Changeset = {
1919
open: boolean;
2020
comments_count: number;
2121
changes_count: number;
22+
created_count: number;
23+
modified_count: number;
24+
deleted_count: number;
2225
/** property only exists if `open=false` */
2326
// TODO:(semver breaking) mark as optional
2427
closed_at: Date;

0 commit comments

Comments
 (0)