@metacensus/api 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/src/metacensus/v1/auth.d.ts +21 -0
- package/dist/src/metacensus/v1/auth.d.ts.map +1 -0
- package/dist/src/metacensus/v1/auth.js +8 -0
- package/dist/src/metacensus/v1/auth.js.map +1 -0
- package/dist/src/metacensus/v1/common.d.ts +20 -0
- package/dist/src/metacensus/v1/common.d.ts.map +1 -0
- package/dist/src/metacensus/v1/common.js +8 -0
- package/dist/src/metacensus/v1/common.js.map +1 -0
- package/dist/src/metacensus/v1/extraction.d.ts +48 -0
- package/dist/src/metacensus/v1/extraction.d.ts.map +1 -0
- package/dist/src/metacensus/v1/extraction.js +8 -0
- package/dist/src/metacensus/v1/extraction.js.map +1 -0
- package/dist/src/metacensus/v1/paper.d.ts +57 -0
- package/dist/src/metacensus/v1/paper.d.ts.map +1 -0
- package/dist/src/metacensus/v1/paper.js +8 -0
- package/dist/src/metacensus/v1/paper.js.map +1 -0
- package/dist/src/metacensus/v1/prop.d.ts +90 -0
- package/dist/src/metacensus/v1/prop.d.ts.map +1 -0
- package/dist/src/metacensus/v1/prop.js +27 -0
- package/dist/src/metacensus/v1/prop.js.map +1 -0
- package/dist/src/metacensus/v1/protocol.d.ts +42 -0
- package/dist/src/metacensus/v1/protocol.d.ts.map +1 -0
- package/dist/src/metacensus/v1/protocol.js +8 -0
- package/dist/src/metacensus/v1/protocol.js.map +1 -0
- package/dist/src/metacensus/v1/topic.d.ts +45 -0
- package/dist/src/metacensus/v1/topic.d.ts.map +1 -0
- package/dist/src/metacensus/v1/topic.js +8 -0
- package/dist/src/metacensus/v1/topic.js.map +1 -0
- package/dist/src/metacensus/v1/user.d.ts +21 -0
- package/dist/src/metacensus/v1/user.d.ts.map +1 -0
- package/dist/src/metacensus/v1/user.js +8 -0
- package/dist/src/metacensus/v1/user.js.map +1 -0
- package/dist/src/route-manifest.d.ts +14 -0
- package/dist/src/route-manifest.d.ts.map +1 -0
- package/dist/src/route-manifest.js +34 -0
- package/dist/src/route-manifest.js.map +1 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @metacensus/api
|
|
2
|
+
|
|
3
|
+
TypeScript interfaces for the MetaCensus API contract — every request and
|
|
4
|
+
response under `/metacensus/api/v1`, generated from the `.proto` sources that
|
|
5
|
+
also generate the Go side.
|
|
6
|
+
|
|
7
|
+
**Types only.** There are no runtime dependencies and no value imports; a build
|
|
8
|
+
step enforces both. What ships is the generated interfaces, the route manifest,
|
|
9
|
+
and `protobufPackage`.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @metacensus/api
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import type { Topic, PropCreateRequest } from "@metacensus/api";
|
|
17
|
+
import { routes } from "@metacensus/api";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The wire format is JSON, not protobuf binary. Field names are `lowerCamelCase`
|
|
21
|
+
on the wire, enum values are PascalCase, and all ids are strings.
|
|
22
|
+
|
|
23
|
+
Source, the derivation of every field, and the Go module:
|
|
24
|
+
<https://github.com/metacensus/api>
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./src/metacensus/v1/auth.js";
|
|
2
|
+
export * from "./src/metacensus/v1/common.js";
|
|
3
|
+
export * from "./src/metacensus/v1/extraction.js";
|
|
4
|
+
export * from "./src/metacensus/v1/paper.js";
|
|
5
|
+
export * from "./src/metacensus/v1/prop.js";
|
|
6
|
+
export * from "./src/metacensus/v1/protocol.js";
|
|
7
|
+
export * from "./src/metacensus/v1/topic.js";
|
|
8
|
+
export * from "./src/metacensus/v1/user.js";
|
|
9
|
+
export * from "./src/route-manifest.js";
|
|
10
|
+
export { protobufPackage } from "./src/metacensus/v1/common.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAIA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AAIxC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The MetaCensus API contract, as TypeScript. Types only, no runtime.
|
|
2
|
+
//
|
|
3
|
+
// Everything under ./src is generated; a new .proto file needs a line here.
|
|
4
|
+
export * from "./src/metacensus/v1/auth.js";
|
|
5
|
+
export * from "./src/metacensus/v1/common.js";
|
|
6
|
+
export * from "./src/metacensus/v1/extraction.js";
|
|
7
|
+
export * from "./src/metacensus/v1/paper.js";
|
|
8
|
+
export * from "./src/metacensus/v1/prop.js";
|
|
9
|
+
export * from "./src/metacensus/v1/protocol.js";
|
|
10
|
+
export * from "./src/metacensus/v1/topic.js";
|
|
11
|
+
export * from "./src/metacensus/v1/user.js";
|
|
12
|
+
export * from "./src/route-manifest.js";
|
|
13
|
+
// Every generated file exports an identical `protobufPackage`, so `export *`
|
|
14
|
+
// cannot pick one.
|
|
15
|
+
export { protobufPackage } from "./src/metacensus/v1/common.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,4EAA4E;AAE5E,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AAExC,6EAA6E;AAC7E,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Sign-up, login and logout. */
|
|
3
|
+
export interface LoginRequest {
|
|
4
|
+
email: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SignUpRequest {
|
|
8
|
+
name: string;
|
|
9
|
+
email: string;
|
|
10
|
+
country: string;
|
|
11
|
+
password: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Session {
|
|
14
|
+
/** Bearer token, sent back as `Authorization: Bearer <token>`. */
|
|
15
|
+
token: string;
|
|
16
|
+
}
|
|
17
|
+
export interface LogoutRequest {
|
|
18
|
+
}
|
|
19
|
+
export interface LogoutResponse {
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/auth.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,iCAAiC;AAEjC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;CAC7B;AAED,MAAM,WAAW,cAAc;CAC9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/auth.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/auth.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,mCAAmC;AAEnC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Shared types. */
|
|
3
|
+
/**
|
|
4
|
+
* ListMetadata is the pagination envelope for list responses. No route
|
|
5
|
+
* paginates yet, so nothing references it.
|
|
6
|
+
*/
|
|
7
|
+
export interface ListMetadata {
|
|
8
|
+
/** 1-based. */
|
|
9
|
+
page: number;
|
|
10
|
+
/** Items per page. */
|
|
11
|
+
limit: number;
|
|
12
|
+
/** Items across all pages, not just this one. */
|
|
13
|
+
total: number;
|
|
14
|
+
}
|
|
15
|
+
export interface HealthcheckRequest {
|
|
16
|
+
}
|
|
17
|
+
export interface HealthcheckResponse {
|
|
18
|
+
status: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/common.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,oBAAoB;AAEpB;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,eAAe;IACf,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/common.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/common.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,qCAAqC;AAErC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Data extraction: the values pulled from one paper against one protocol. */
|
|
3
|
+
/**
|
|
4
|
+
* DataExtraction is the values extracted from one paper against one protocol,
|
|
5
|
+
* identified by the three ids together. Upserted and read back as-is.
|
|
6
|
+
*/
|
|
7
|
+
export interface DataExtraction {
|
|
8
|
+
topicId: string;
|
|
9
|
+
paperId: string;
|
|
10
|
+
protocolId: string;
|
|
11
|
+
data: DatumExtraction[];
|
|
12
|
+
}
|
|
13
|
+
/** DatumExtraction is one answered protocol element. */
|
|
14
|
+
export interface DatumExtraction {
|
|
15
|
+
protocolElementId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The extracted value. A string for every element type the contract
|
|
18
|
+
* describes; multi-select elements have no representation yet.
|
|
19
|
+
*/
|
|
20
|
+
datum: string;
|
|
21
|
+
/**
|
|
22
|
+
* Where in the PDF the value was read from. Empty when the value was typed
|
|
23
|
+
* rather than selected.
|
|
24
|
+
*/
|
|
25
|
+
sourceLocation: SourceLocationPage[];
|
|
26
|
+
}
|
|
27
|
+
/** SourceLocationPage is the highlighted rectangles on one page of a PDF. */
|
|
28
|
+
export interface SourceLocationPage {
|
|
29
|
+
page: number;
|
|
30
|
+
rects: SourceRect[];
|
|
31
|
+
}
|
|
32
|
+
/** SourceRect is one highlight rectangle, in the PDF viewer's coordinate space. */
|
|
33
|
+
export interface SourceRect {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
w: number;
|
|
37
|
+
h: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* DataExtractionGetRequest requires all three fields; together they identify
|
|
41
|
+
* one DataExtraction.
|
|
42
|
+
*/
|
|
43
|
+
export interface DataExtractionGetRequest {
|
|
44
|
+
topicId: string;
|
|
45
|
+
paperId: string;
|
|
46
|
+
protocolId: string;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=extraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/extraction.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,cAAc,EAAE,kBAAkB,EAAE,CAAC;CACtC;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/extraction.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=extraction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extraction.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/extraction.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,yCAAyC;AAEzC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Papers: the literature under review in a topic. */
|
|
3
|
+
export interface Paper {
|
|
4
|
+
id: string;
|
|
5
|
+
topicId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
/** Author names, in reading order. */
|
|
8
|
+
authors: string[];
|
|
9
|
+
abstract: string;
|
|
10
|
+
/**
|
|
11
|
+
* Bibliographic identifiers. Either may be empty: not every paper has both,
|
|
12
|
+
* and one uploaded as a PDF may have neither.
|
|
13
|
+
*/
|
|
14
|
+
doi: string;
|
|
15
|
+
pmid: string;
|
|
16
|
+
created?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* PaperListRequest requires at least one field; setting `paper_id` narrows the
|
|
20
|
+
* result to a single paper.
|
|
21
|
+
*/
|
|
22
|
+
export interface PaperListRequest {
|
|
23
|
+
topicId: string;
|
|
24
|
+
paperId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PaperList {
|
|
27
|
+
items: Paper[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* PaperCreateRequest carries no PDF; uploading one is not part of this
|
|
31
|
+
* contract.
|
|
32
|
+
*/
|
|
33
|
+
export interface PaperCreateRequest {
|
|
34
|
+
topicId: string;
|
|
35
|
+
title: string;
|
|
36
|
+
authors: string[];
|
|
37
|
+
abstract: string;
|
|
38
|
+
doi: string;
|
|
39
|
+
pmid: string;
|
|
40
|
+
}
|
|
41
|
+
/** PaperLookupRequest names the PubMed record the create form is prefilled from. */
|
|
42
|
+
export interface PaperLookupRequest {
|
|
43
|
+
pmid: string;
|
|
44
|
+
}
|
|
45
|
+
/** PaperLookupResponse is whatever PubMed supplied, so any field may be empty. */
|
|
46
|
+
export interface PaperLookupResponse {
|
|
47
|
+
pmid: string;
|
|
48
|
+
title: string;
|
|
49
|
+
authors: string[];
|
|
50
|
+
/**
|
|
51
|
+
* Labelled sections arrive joined by blank lines and prefixed with their
|
|
52
|
+
* label — `"METHODS: …"` — rather than structured.
|
|
53
|
+
*/
|
|
54
|
+
abstract: string;
|
|
55
|
+
doi: string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=paper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/paper.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,sDAAsD;AAEtD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,KAAK,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oFAAoF;AACpF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/paper.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=paper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/paper.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,oCAAoC;AAEpC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Propositions and votes: the consensus mechanism. */
|
|
3
|
+
/**
|
|
4
|
+
* Prop is a motion a topic's members vote on. It can be functional, changing
|
|
5
|
+
* the topic, or simply establish consensus.
|
|
6
|
+
*/
|
|
7
|
+
export interface Prop {
|
|
8
|
+
id: string;
|
|
9
|
+
authorId: string;
|
|
10
|
+
created?: string | undefined;
|
|
11
|
+
type: Prop_Type;
|
|
12
|
+
/** The text of the proposition, and the text `Vote.citations` index into. */
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
/** Type is what the proposition would do if it passed. */
|
|
16
|
+
export declare enum Prop_Type {
|
|
17
|
+
Unspecified = "Unspecified",
|
|
18
|
+
Statement = "Statement",
|
|
19
|
+
TopicQuestion = "TopicQuestion",
|
|
20
|
+
TopicChange = "TopicChange",
|
|
21
|
+
UserAdmit = "UserAdmit",
|
|
22
|
+
UserExpulse = "UserExpulse",
|
|
23
|
+
PaperExtractionComplete = "PaperExtractionComplete",
|
|
24
|
+
PaperIncludeMetaAnalysis = "PaperIncludeMetaAnalysis"
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Vote is one member's position on one prop, keyed by `(propId, userId)`: a
|
|
28
|
+
* second vote from the same user replaces the first rather than adding to it.
|
|
29
|
+
*/
|
|
30
|
+
export interface Vote {
|
|
31
|
+
propId: string;
|
|
32
|
+
userId: string;
|
|
33
|
+
position: Vote_Position;
|
|
34
|
+
/** Free-text rationale. */
|
|
35
|
+
explanation: string;
|
|
36
|
+
/**
|
|
37
|
+
* Spans of the prop's `description` the voter highlighted. Meaningful only
|
|
38
|
+
* for an `Against` vote; cleared when the position changes to any other.
|
|
39
|
+
*/
|
|
40
|
+
citations: PropCitation[];
|
|
41
|
+
/** When the vote was most recently cast. Overwritten on every recast. */
|
|
42
|
+
lastCast?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export declare enum Vote_Position {
|
|
45
|
+
Unspecified = "Unspecified",
|
|
46
|
+
For = "For",
|
|
47
|
+
Against = "Against",
|
|
48
|
+
Abstain = "Abstain"
|
|
49
|
+
}
|
|
50
|
+
/** PropCitation is a half-open character range in a prop's `description`. */
|
|
51
|
+
export interface PropCitation {
|
|
52
|
+
start: number;
|
|
53
|
+
end: number;
|
|
54
|
+
}
|
|
55
|
+
export interface PropListRequest {
|
|
56
|
+
topicId: string;
|
|
57
|
+
}
|
|
58
|
+
export interface PropList {
|
|
59
|
+
items: Prop[];
|
|
60
|
+
}
|
|
61
|
+
export interface PropGetRequest {
|
|
62
|
+
topicId: string;
|
|
63
|
+
propId: string;
|
|
64
|
+
}
|
|
65
|
+
/** PropCreateRequest takes no author: it is the authenticated user. */
|
|
66
|
+
export interface PropCreateRequest {
|
|
67
|
+
topicId: string;
|
|
68
|
+
type: Prop_Type;
|
|
69
|
+
description: string;
|
|
70
|
+
}
|
|
71
|
+
export interface VoteListRequest {
|
|
72
|
+
topicId: string;
|
|
73
|
+
propId: string;
|
|
74
|
+
}
|
|
75
|
+
/** VoteList is the only way to read a prop's votes. */
|
|
76
|
+
export interface VoteList {
|
|
77
|
+
items: Vote[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* VoteSetRequest sets rather than creates: it replaces the caller's previous
|
|
81
|
+
* vote on this prop.
|
|
82
|
+
*/
|
|
83
|
+
export interface VoteSetRequest {
|
|
84
|
+
topicId: string;
|
|
85
|
+
propId: string;
|
|
86
|
+
position: Vote_Position;
|
|
87
|
+
explanation: string;
|
|
88
|
+
citations: PropCitation[];
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=prop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/prop.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,uDAAuD;AAEvD;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,0DAA0D;AAC1D,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,uBAAuB,4BAA4B;IACnD,wBAAwB,6BAA6B;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,oBAAY,aAAa;IACvB,WAAW,gBAAgB;IAC3B,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,6EAA6E;AAC7E,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,uDAAuD;AACvD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/prop.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
/** Type is what the proposition would do if it passed. */
|
|
9
|
+
export var Prop_Type;
|
|
10
|
+
(function (Prop_Type) {
|
|
11
|
+
Prop_Type["Unspecified"] = "Unspecified";
|
|
12
|
+
Prop_Type["Statement"] = "Statement";
|
|
13
|
+
Prop_Type["TopicQuestion"] = "TopicQuestion";
|
|
14
|
+
Prop_Type["TopicChange"] = "TopicChange";
|
|
15
|
+
Prop_Type["UserAdmit"] = "UserAdmit";
|
|
16
|
+
Prop_Type["UserExpulse"] = "UserExpulse";
|
|
17
|
+
Prop_Type["PaperExtractionComplete"] = "PaperExtractionComplete";
|
|
18
|
+
Prop_Type["PaperIncludeMetaAnalysis"] = "PaperIncludeMetaAnalysis";
|
|
19
|
+
})(Prop_Type || (Prop_Type = {}));
|
|
20
|
+
export var Vote_Position;
|
|
21
|
+
(function (Vote_Position) {
|
|
22
|
+
Vote_Position["Unspecified"] = "Unspecified";
|
|
23
|
+
Vote_Position["For"] = "For";
|
|
24
|
+
Vote_Position["Against"] = "Against";
|
|
25
|
+
Vote_Position["Abstain"] = "Abstain";
|
|
26
|
+
})(Vote_Position || (Vote_Position = {}));
|
|
27
|
+
//# sourceMappingURL=prop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/prop.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,mCAAmC;AAEnC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAiB/C,0DAA0D;AAC1D,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,gEAAmD,CAAA;IACnD,kEAAqD,CAAA;AACvD,CAAC,EATW,SAAS,KAAT,SAAS,QASpB;AAqBD,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,4BAAW,CAAA;IACX,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;AACrB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Protocols: the extraction form a topic's reviewers fill in per paper. */
|
|
3
|
+
/** Protocol is an ordered set of sections, each an ordered set of elements. */
|
|
4
|
+
export interface Protocol {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
protocolSections: ProtocolSection[];
|
|
8
|
+
}
|
|
9
|
+
/** ProtocolSection is a titled group of elements, ordered by `sort_order`. */
|
|
10
|
+
export interface ProtocolSection {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
sortOrder: number;
|
|
14
|
+
protocolElements: ProtocolElement[];
|
|
15
|
+
}
|
|
16
|
+
export interface ProtocolElement {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* An HTML input type, used verbatim as `<input type=…>`: `text`, `number`,
|
|
21
|
+
* `date`, `textarea`, `radio` or `checkbox`.
|
|
22
|
+
*/
|
|
23
|
+
type: string;
|
|
24
|
+
label: string;
|
|
25
|
+
placeholder: string;
|
|
26
|
+
required: boolean;
|
|
27
|
+
/** Only meaningful for `radio` and `checkbox`. */
|
|
28
|
+
options: ProtocolElementOption[];
|
|
29
|
+
sortOrder: number;
|
|
30
|
+
}
|
|
31
|
+
/** ProtocolElementOption is one choice of a radio or checkbox element. */
|
|
32
|
+
export interface ProtocolElementOption {
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
/** ProtocolCreateRequest ignores the ids on its sections and elements. */
|
|
37
|
+
export interface ProtocolCreateRequest {
|
|
38
|
+
topicId: string;
|
|
39
|
+
title: string;
|
|
40
|
+
sections: ProtocolSection[];
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/protocol.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,4EAA4E;AAE5E,+EAA+E;AAC/E,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,eAAe,EAAE,CAAC;CACrC;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,eAAe,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/protocol.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/protocol.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,uCAAuC;AAEvC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Topics and their membership. */
|
|
3
|
+
/** Topic is a systematic review in progress. */
|
|
4
|
+
export interface Topic {
|
|
5
|
+
id: string;
|
|
6
|
+
created?: string | undefined;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TopicListRequest {
|
|
11
|
+
}
|
|
12
|
+
export interface TopicList {
|
|
13
|
+
items: Topic[];
|
|
14
|
+
}
|
|
15
|
+
export interface TopicGetRequest {
|
|
16
|
+
topicId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TopicCreateRequest {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TopicProtocolRequest {
|
|
23
|
+
topicId: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Member is a user's membership of a topic. No backend implements the member
|
|
27
|
+
* routes yet.
|
|
28
|
+
*/
|
|
29
|
+
export interface Member {
|
|
30
|
+
/** The member's user id, not an id of the membership itself. */
|
|
31
|
+
id: string;
|
|
32
|
+
/** When the user joined the topic. */
|
|
33
|
+
joined?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface MemberListRequest {
|
|
36
|
+
topicId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface MemberList {
|
|
39
|
+
items: Member[];
|
|
40
|
+
}
|
|
41
|
+
export interface MemberGetRequest {
|
|
42
|
+
topicId: string;
|
|
43
|
+
userId: string;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=topic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/topic.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,mCAAmC;AAEnC,gDAAgD;AAChD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,KAAK,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/topic.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=topic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/topic.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,oCAAoC;AAEpC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const protobufPackage = "metacensus.v1";
|
|
2
|
+
/** Users. Sign-up and login live in auth.proto. */
|
|
3
|
+
export interface User {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
country: string;
|
|
8
|
+
created?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface UserListRequest {
|
|
11
|
+
}
|
|
12
|
+
export interface UserList {
|
|
13
|
+
items: User[];
|
|
14
|
+
}
|
|
15
|
+
export interface UserGetRequest {
|
|
16
|
+
userId: string;
|
|
17
|
+
}
|
|
18
|
+
/** SelfGetRequest is empty: the user is the authenticated one. */
|
|
19
|
+
export interface SelfGetRequest {
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/metacensus/v1/user.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,mDAAmD;AAEnD,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;CAC/B;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kEAAkE;AAClE,MAAM,WAAW,cAAc;CAC9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: metacensus/v1/user.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "metacensus.v1";
|
|
8
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../src/metacensus/v1/user.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,mCAAmC;AAEnC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const apiPrefix = "/metacensus/api/v1";
|
|
2
|
+
export interface Route {
|
|
3
|
+
readonly service: string;
|
|
4
|
+
readonly rpc: string;
|
|
5
|
+
readonly method: string;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly params: readonly string[];
|
|
8
|
+
readonly query: readonly string[];
|
|
9
|
+
readonly body: string;
|
|
10
|
+
readonly request: string;
|
|
11
|
+
readonly response: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const routes: readonly Route[];
|
|
14
|
+
//# sourceMappingURL=route-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-manifest.d.ts","sourceRoot":"","sources":["../../src/route-manifest.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS,uBAAuB,CAAC;AAO9C,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,EAAE,SAAS,KAAK,EAyBlC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Code generated by cmd/routegen. DO NOT EDIT.
|
|
2
|
+
// The whole route table of /metacensus/api/v1 on one screen, generated from
|
|
3
|
+
// the google.api.http annotations on each resource's service in metacensus/v1.
|
|
4
|
+
// The path every route below hangs off. Join it with a route's `path` to get
|
|
5
|
+
// the path a client actually requests; the reverse proxy in front of the API
|
|
6
|
+
// is what makes that resolve.
|
|
7
|
+
export const apiPrefix = "/metacensus/api/v1";
|
|
8
|
+
export const routes = [
|
|
9
|
+
{ service: "AuthRoutes", rpc: "Login", method: "POST", path: "/login", params: [], query: [], body: "*", request: "LoginRequest", response: "Session" },
|
|
10
|
+
{ service: "AuthRoutes", rpc: "SignUp", method: "POST", path: "/signup", params: [], query: [], body: "*", request: "SignUpRequest", response: "Session" },
|
|
11
|
+
{ service: "AuthRoutes", rpc: "Logout", method: "POST", path: "/logout", params: [], query: [], body: "", request: "LogoutRequest", response: "LogoutResponse" },
|
|
12
|
+
{ service: "HealthRoutes", rpc: "Healthcheck", method: "GET", path: "/healthcheck", params: [], query: [], body: "", request: "HealthcheckRequest", response: "HealthcheckResponse" },
|
|
13
|
+
{ service: "ExtractionRoutes", rpc: "GetExtraction", method: "GET", path: "/extraction", params: [], query: ["topicId", "paperId", "protocolId"], body: "", request: "DataExtractionGetRequest", response: "DataExtraction" },
|
|
14
|
+
{ service: "ExtractionRoutes", rpc: "UpsertExtraction", method: "POST", path: "/extraction", params: [], query: [], body: "*", request: "DataExtraction", response: "DataExtraction" },
|
|
15
|
+
{ service: "PaperRoutes", rpc: "ListPapers", method: "POST", path: "/paper", params: [], query: [], body: "*", request: "PaperListRequest", response: "PaperList" },
|
|
16
|
+
{ service: "PaperRoutes", rpc: "CreatePaper", method: "POST", path: "/paper/create", params: [], query: [], body: "*", request: "PaperCreateRequest", response: "Paper" },
|
|
17
|
+
{ service: "PaperRoutes", rpc: "LookupPaper", method: "GET", path: "/paper/lookup", params: [], query: ["pmid"], body: "", request: "PaperLookupRequest", response: "PaperLookupResponse" },
|
|
18
|
+
{ service: "PropRoutes", rpc: "ListProps", method: "GET", path: "/topic/{topicId}/prop", params: ["topicId"], query: [], body: "", request: "PropListRequest", response: "PropList" },
|
|
19
|
+
{ service: "PropRoutes", rpc: "GetProp", method: "GET", path: "/topic/{topicId}/prop/{propId}", params: ["topicId", "propId"], query: [], body: "", request: "PropGetRequest", response: "Prop" },
|
|
20
|
+
{ service: "PropRoutes", rpc: "CreateProp", method: "POST", path: "/topic/{topicId}/prop", params: ["topicId"], query: [], body: "*", request: "PropCreateRequest", response: "Prop" },
|
|
21
|
+
{ service: "PropRoutes", rpc: "ListVotes", method: "GET", path: "/topic/{topicId}/prop/{propId}/vote", params: ["topicId", "propId"], query: [], body: "", request: "VoteListRequest", response: "VoteList" },
|
|
22
|
+
{ service: "PropRoutes", rpc: "SetVote", method: "POST", path: "/topic/{topicId}/prop/{propId}/vote", params: ["topicId", "propId"], query: [], body: "*", request: "VoteSetRequest", response: "Vote" },
|
|
23
|
+
{ service: "ProtocolRoutes", rpc: "CreateProtocol", method: "POST", path: "/protocol", params: [], query: [], body: "*", request: "ProtocolCreateRequest", response: "Protocol" },
|
|
24
|
+
{ service: "TopicRoutes", rpc: "ListTopics", method: "GET", path: "/topic", params: [], query: [], body: "", request: "TopicListRequest", response: "TopicList" },
|
|
25
|
+
{ service: "TopicRoutes", rpc: "GetTopic", method: "GET", path: "/topic/{topicId}", params: ["topicId"], query: [], body: "", request: "TopicGetRequest", response: "Topic" },
|
|
26
|
+
{ service: "TopicRoutes", rpc: "CreateTopic", method: "POST", path: "/topic", params: [], query: [], body: "*", request: "TopicCreateRequest", response: "Topic" },
|
|
27
|
+
{ service: "TopicRoutes", rpc: "GetProtocol", method: "GET", path: "/topic/{topicId}/protocol", params: ["topicId"], query: [], body: "", request: "TopicProtocolRequest", response: "Protocol" },
|
|
28
|
+
{ service: "TopicRoutes", rpc: "ListMembers", method: "GET", path: "/topic/{topicId}/member", params: ["topicId"], query: [], body: "", request: "MemberListRequest", response: "MemberList" },
|
|
29
|
+
{ service: "TopicRoutes", rpc: "GetMember", method: "GET", path: "/topic/{topicId}/member/{userId}", params: ["topicId", "userId"], query: [], body: "", request: "MemberGetRequest", response: "Member" },
|
|
30
|
+
{ service: "UserRoutes", rpc: "ListUsers", method: "GET", path: "/user", params: [], query: [], body: "", request: "UserListRequest", response: "UserList" },
|
|
31
|
+
{ service: "UserRoutes", rpc: "GetUser", method: "GET", path: "/user/{userId}", params: ["userId"], query: [], body: "", request: "UserGetRequest", response: "User" },
|
|
32
|
+
{ service: "UserRoutes", rpc: "GetSelf", method: "GET", path: "/self", params: [], query: [], body: "", request: "SelfGetRequest", response: "User" },
|
|
33
|
+
];
|
|
34
|
+
//# sourceMappingURL=route-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-manifest.js","sourceRoot":"","sources":["../../src/route-manifest.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,4EAA4E;AAC5E,+EAA+E;AAE/E,6E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/v1). Types only, no runtime dependencies.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/metacensus/api.git",
|
|
23
|
+
"directory": "ts"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/metacensus/api#readme",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/metacensus/api/issues"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
34
|
+
"check": "tsc --noEmit && node scripts/check-no-runtime.mjs",
|
|
35
|
+
"prepack": "npm run build"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"ts-proto": "2.7.7",
|
|
40
|
+
"typescript": "5.5.4"
|
|
41
|
+
}
|
|
42
|
+
}
|