@jam-comments/server-utilities 0.0.1
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/dist/CommentFetcher.d.ts +40 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +2016 -0
- package/dist/index.umd.js +31 -0
- package/dist/utils.d.ts +9 -0
- package/package.json +48 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare class CommentFetcher {
|
|
2
|
+
isDev: any;
|
|
3
|
+
domain: any;
|
|
4
|
+
client: any;
|
|
5
|
+
constructor({ domain, apiKey, isDev }: {
|
|
6
|
+
domain: any;
|
|
7
|
+
apiKey: any;
|
|
8
|
+
isDev?: boolean;
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a batch of comments.
|
|
12
|
+
*
|
|
13
|
+
* @param {number} skip
|
|
14
|
+
* @returns {object}
|
|
15
|
+
*/
|
|
16
|
+
_getBatchOfComments({ skip, path }: {
|
|
17
|
+
skip?: number;
|
|
18
|
+
path?: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
comments: any[];
|
|
21
|
+
hasMore: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
_prepareDummyComments(): {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
emailAddress: string;
|
|
27
|
+
content: string;
|
|
28
|
+
path: any;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
status: string;
|
|
31
|
+
}[];
|
|
32
|
+
_prepareContent(comments: any[]): any[];
|
|
33
|
+
/**
|
|
34
|
+
* Get all the comments until there are no more remaining.
|
|
35
|
+
*
|
|
36
|
+
* @returns Promise<array>
|
|
37
|
+
*/
|
|
38
|
+
getAllComments(path?: string): Promise<any[]>;
|
|
39
|
+
}
|
|
40
|
+
export default CommentFetcher;
|
package/dist/index.d.ts
ADDED