@permaweb/libs 0.0.51 → 0.0.53
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/index.cjs +12 -12
- package/dist/index.esm.js +32 -32
- package/dist/index.js +12 -12
- package/dist/types/helpers/config.d.ts +3 -2
- package/dist/types/helpers/types.d.ts +8 -2
- package/dist/types/helpers/utils.d.ts +1 -0
- package/dist/types/index.d.ts +13 -10
- package/dist/types/services/comments.d.ts +15 -12
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ export declare const AO: {
|
|
|
6
6
|
asset: string;
|
|
7
7
|
collection: string;
|
|
8
8
|
collectionActivity: string;
|
|
9
|
+
comments: string;
|
|
9
10
|
zone: {
|
|
10
11
|
id: string;
|
|
11
12
|
version: string;
|
|
@@ -24,7 +25,7 @@ export declare const CONTENT_TYPES: {
|
|
|
24
25
|
};
|
|
25
26
|
export declare const GATEWAYS: {
|
|
26
27
|
arweave: string;
|
|
27
|
-
|
|
28
|
+
ao: string;
|
|
28
29
|
};
|
|
29
30
|
export declare const LICENSES: {
|
|
30
31
|
udl: {
|
|
@@ -77,9 +78,9 @@ export declare const TAGS: {
|
|
|
77
78
|
zoneType: string;
|
|
78
79
|
};
|
|
79
80
|
values: {
|
|
81
|
+
dataProtocol: string;
|
|
80
82
|
document: string;
|
|
81
83
|
user: string;
|
|
82
|
-
zone: string;
|
|
83
84
|
};
|
|
84
85
|
};
|
|
85
86
|
export declare const UPLOAD: {
|
|
@@ -2,7 +2,10 @@ export type DependencyType = {
|
|
|
2
2
|
ao: any;
|
|
3
3
|
signer?: any;
|
|
4
4
|
arweave?: any;
|
|
5
|
-
node?:
|
|
5
|
+
node?: {
|
|
6
|
+
url: string;
|
|
7
|
+
scheduler: string;
|
|
8
|
+
};
|
|
6
9
|
};
|
|
7
10
|
export type ProcessReadType = {
|
|
8
11
|
processId: string;
|
|
@@ -89,6 +92,8 @@ export type AssetCreateArgsType = {
|
|
|
89
92
|
tags?: TagType[];
|
|
90
93
|
src?: string;
|
|
91
94
|
users?: string[];
|
|
95
|
+
spawnComments?: boolean;
|
|
96
|
+
commentsId?: string;
|
|
92
97
|
};
|
|
93
98
|
export type AssetHeaderType = {
|
|
94
99
|
id: string;
|
|
@@ -121,7 +126,8 @@ export type CommentDetailType = {
|
|
|
121
126
|
export type CommentCreateArgType = {
|
|
122
127
|
content: string;
|
|
123
128
|
creator: string;
|
|
124
|
-
|
|
129
|
+
commentsId: string;
|
|
130
|
+
parentId?: string;
|
|
125
131
|
rootId?: string;
|
|
126
132
|
tags?: TagType[];
|
|
127
133
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -39,17 +39,20 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
39
39
|
useGateway?: boolean;
|
|
40
40
|
}) => Promise<Helpers.AssetDetailType | null>;
|
|
41
41
|
getAtomicAssets: typeof Services.getAtomicAssets;
|
|
42
|
-
createComment: (args: Helpers.CommentCreateArgType
|
|
43
|
-
getComment: (id: string) => Promise<Helpers.CommentDetailType | null>;
|
|
42
|
+
createComment: (args: Helpers.CommentCreateArgType) => Promise<string>;
|
|
44
43
|
getComments: (args: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
commentsId: string;
|
|
45
|
+
}) => Promise<any>;
|
|
46
|
+
updateCommentStatus: (args: {
|
|
47
|
+
commentsId: string;
|
|
48
|
+
commentId: string;
|
|
49
|
+
status: "active" | "inactive";
|
|
50
|
+
}) => Promise<string>;
|
|
51
|
+
removeComment: (args: {
|
|
52
|
+
commentsId: string;
|
|
53
|
+
commentId: string;
|
|
54
|
+
status: "active" | "inactive";
|
|
55
|
+
}) => Promise<string>;
|
|
53
56
|
createCollection: (args: {
|
|
54
57
|
title: string;
|
|
55
58
|
description: string;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { CommentCreateArgType,
|
|
2
|
-
export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { CommentCreateArgType, DependencyType } from '../helpers/types.ts';
|
|
2
|
+
export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType) => Promise<string>;
|
|
3
|
+
export declare function getCommentsWith(deps: DependencyType): (args: {
|
|
4
|
+
commentsId: string;
|
|
5
|
+
}) => Promise<any>;
|
|
6
|
+
export declare function updateCommentStatusWith(deps: DependencyType): (args: {
|
|
7
|
+
commentsId: string;
|
|
8
|
+
commentId: string;
|
|
9
|
+
status: "active" | "inactive";
|
|
10
|
+
}) => Promise<string>;
|
|
11
|
+
export declare function removeCommentWith(deps: DependencyType): (args: {
|
|
12
|
+
commentsId: string;
|
|
13
|
+
commentId: string;
|
|
14
|
+
status: "active" | "inactive";
|
|
15
|
+
}) => Promise<string>;
|