@communecter/cocolight-api-client 1.0.56 → 1.0.58

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.
@@ -0,0 +1,54 @@
1
+ import { DateValue, IdObject, ParentsMap } from "./common.js";
2
+
3
+ import type EJSONType from "../../EJSONType.js";
4
+ import type { Organization } from "../Organization.js";
5
+ import type { Project } from "../Project.js";
6
+ import type { User } from "../User.js";
7
+
8
+ type ObjectIDCtor = typeof EJSONType["ObjectID"];
9
+ type ObjectID = InstanceType<ObjectIDCtor>;
10
+
11
+ export interface AnswerLinksBlock {
12
+ answered: string[];
13
+ }
14
+
15
+ export interface AnswerItemJson {
16
+ _id: IdObject;
17
+ collection: "answers";
18
+ created?: DateValue;
19
+ updated?: DateValue;
20
+ user?: string;
21
+ links?: AnswerLinksBlock;
22
+ draft?: boolean;
23
+ answers?: Record<string, unknown>;
24
+ context?: ParentsMap;
25
+ form?: string;
26
+ modified?: DateValue;
27
+ voteCount?: Record<string, number>;
28
+ vote: Record<string, {
29
+ status: string;
30
+ date: DateValue;
31
+ }>;
32
+ [key: string]: unknown;
33
+ }
34
+
35
+ export interface AnswerItemNormalized {
36
+ id: string;
37
+ _id: ObjectID;
38
+ collection: "answers";
39
+ created?: Date;
40
+ updated?: Date;
41
+ user?: string | User;
42
+ links?: AnswerLinksBlock;
43
+ draft?: boolean;
44
+ answers?: Record<string, unknown>;
45
+ context?: ParentsMap | Record<string, Organization | Project>;
46
+ form?: string;
47
+ modified?: Date;
48
+ voteCount?: Record<string, number>;
49
+ vote: Record<string, {
50
+ status: string;
51
+ date: Date;
52
+ }>;
53
+ [key: string]: unknown;
54
+ }