@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.
@@ -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
- goldsky: string;
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?: string;
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
- parentId: string;
129
+ commentsId: string;
130
+ parentId?: string;
125
131
  rootId?: string;
126
132
  tags?: TagType[];
127
133
  };
@@ -36,3 +36,4 @@ export declare function getBootTag(key: string, value: string): {
36
36
  name: string;
37
37
  value: string;
38
38
  };
39
+ export declare function isValidMediaData(data: any): any;
@@ -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, callback?: (status: any) => void) => Promise<string>;
43
- getComment: (id: string) => Promise<Helpers.CommentDetailType | null>;
42
+ createComment: (args: Helpers.CommentCreateArgType) => Promise<string>;
44
43
  getComments: (args: {
45
- parentId?: string;
46
- rootId?: string;
47
- }) => Promise<{
48
- id: any;
49
- content: string;
50
- parentId: any;
51
- rootId: any;
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, CommentDetailType, DependencyType } from '../helpers/types.ts';
2
- export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType, callback?: (status: any) => void) => Promise<string>;
3
- export declare function getCommentWith(deps: DependencyType): (id: string) => Promise<CommentDetailType | null>;
4
- export declare function getCommentsWith(_deps: DependencyType): (args: {
5
- parentId?: string;
6
- rootId?: string;
7
- }) => Promise<{
8
- id: any;
9
- content: string;
10
- parentId: any;
11
- rootId: any;
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@permaweb/libs",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",