@permaweb/libs 0.0.17 → 0.0.19

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.
@@ -19,24 +19,42 @@ declare function init(deps: Helpers.DependencyType): {
19
19
  getProfileById: (profileId: string) => Promise<Helpers.ProfileType | null>;
20
20
  getProfileByWalletAddress: (walletAddress: string) => Promise<(Helpers.ProfileType & any) | null>;
21
21
  createComment: (args: Helpers.CommentCreateArgType, callback?: (status: any) => void) => Promise<string>;
22
- getComment: (args: {
23
- parentId: string;
24
- }) => Promise<Helpers.CommentDetailType>;
22
+ getComment: (id: string) => Promise<Helpers.CommentDetailType | null>;
25
23
  getComments: (args: {
26
24
  parentId?: string;
27
25
  rootId?: string;
28
- }) => Promise<Helpers.CommentHeaderType[]>;
26
+ }) => Promise<{
27
+ content: string;
28
+ dataSource: string;
29
+ rootSource: string;
30
+ id: string;
31
+ owner: string | null;
32
+ creator: string | null;
33
+ title: string | null;
34
+ description: string | null;
35
+ type: string | null;
36
+ topics: string[] | null;
37
+ implementation: string | null;
38
+ contentType: string | null;
39
+ renderWith: string | null;
40
+ thumbnail: string | null;
41
+ udl: Helpers.UDLicenseType | null;
42
+ collectionId: string | null;
43
+ dateCreated: number | null;
44
+ blockHeight: number | null;
45
+ tags?: Helpers.TagType[];
46
+ }[]>;
29
47
  createCollection: (args: {
30
48
  title: string;
31
49
  description: string;
32
50
  creator: string;
33
51
  banner: any;
34
52
  thumbnail: any;
35
- }) => Promise<string | undefined>;
53
+ }, callback?: (status: any) => void) => Promise<string>;
36
54
  updateCollectionAssets: (args: {
37
55
  collectionId: string;
38
56
  assetIds: string[];
39
- profileId: string;
57
+ creator: string;
40
58
  updateType: "Add" | "Remove";
41
59
  }) => Promise<string>;
42
60
  getCollection: (collectionId: string) => Promise<Helpers.CollectionDetailType | null>;
@@ -46,6 +64,8 @@ declare function init(deps: Helpers.DependencyType): {
46
64
  resolveTransaction: (data: any) => Promise<any>;
47
65
  getGQLData: typeof Common.getGQLData;
48
66
  createProcess: (args: Helpers.ProcessCreateType, statusCB?: (status: any) => void) => Promise<string>;
67
+ readProcess: (args: Helpers.MessageSendType) => Promise<any>;
68
+ sendMessage: (args: Helpers.MessageSendType) => Promise<string>;
49
69
  mapFromProcessCase: typeof Helpers.mapFromProcessCase;
50
70
  mapToProcessCase: typeof Helpers.mapToProcessCase;
51
71
  };
@@ -1,5 +1,6 @@
1
1
  import { AoAssetType, AssetCreateArgsType, AssetDetailType, AssetHeaderType, DependencyType, GQLNodeResponseType } from 'helpers/types';
2
2
  export declare function createAtomicAssetWith(deps: DependencyType): (args: AssetCreateArgsType, callback?: (status: any) => void) => Promise<string>;
3
+ export declare function getAtomicAsset(deps: DependencyType, id: string): Promise<AssetDetailType | null>;
3
4
  export declare function getAtomicAssetWith(deps: DependencyType): (id: string) => Promise<AssetDetailType | null>;
4
5
  export declare function getAoAtomicAssetWith(deps: DependencyType): (processId: string) => Promise<AoAssetType>;
5
6
  export declare function getAtomicAssets(ids: string[]): Promise<AssetHeaderType[] | null>;
@@ -5,11 +5,11 @@ export declare function createCollectionWith(deps: DependencyType): (args: {
5
5
  creator: string;
6
6
  banner: any;
7
7
  thumbnail: any;
8
- }) => Promise<string | undefined>;
8
+ }, callback?: (status: any) => void) => Promise<string>;
9
9
  export declare function updateCollectionAssetsWith(deps: DependencyType): (args: {
10
10
  collectionId: string;
11
11
  assetIds: string[];
12
- profileId: string;
12
+ creator: string;
13
13
  updateType: "Add" | "Remove";
14
14
  }) => Promise<string>;
15
15
  export declare function getCollectionWith(deps: DependencyType): (collectionId: string) => Promise<CollectionDetailType | null>;
@@ -1,9 +1,27 @@
1
- import { CommentCreateArgType, CommentDetailType, CommentHeaderType, DependencyType } from 'helpers/types';
1
+ import { CommentCreateArgType, CommentDetailType, DependencyType, TagType } from 'helpers/types';
2
2
  export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType, callback?: (status: any) => void) => Promise<string>;
3
- export declare function getCommentWith(deps: DependencyType): (args: {
4
- parentId: string;
5
- }) => Promise<CommentDetailType>;
3
+ export declare function getCommentWith(deps: DependencyType): (id: string) => Promise<CommentDetailType | null>;
6
4
  export declare function getCommentsWith(_deps: DependencyType): (args: {
7
5
  parentId?: string;
8
6
  rootId?: string;
9
- }) => Promise<CommentHeaderType[]>;
7
+ }) => Promise<{
8
+ content: string;
9
+ dataSource: string;
10
+ rootSource: string;
11
+ id: string;
12
+ owner: string | null;
13
+ creator: string | null;
14
+ title: string | null;
15
+ description: string | null;
16
+ type: string | null;
17
+ topics: string[] | null;
18
+ implementation: string | null;
19
+ contentType: string | null;
20
+ renderWith: string | null;
21
+ thumbnail: string | null;
22
+ udl: import("helpers/types").UDLicenseType | null;
23
+ collectionId: string | null;
24
+ dateCreated: number | null;
25
+ blockHeight: number | null;
26
+ tags?: TagType[];
27
+ }[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@permaweb/libs",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",