@permaweb/libs 0.0.21 → 0.0.23

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.
@@ -70,67 +70,46 @@ export type ProfileType = {
70
70
  export type AssetCreateArgsType = {
71
71
  name: string;
72
72
  description: string;
73
- type: string;
74
73
  topics: string[];
75
- contentType: string;
76
- data: any;
77
74
  creator: string;
78
- collectionId?: string;
79
- renderWith?: string;
80
- thumbnail?: string;
75
+ data: any;
76
+ contentType: string;
77
+ assetType: string;
81
78
  supply?: number;
82
79
  denomination?: number;
83
80
  transferable?: boolean;
81
+ metadata?: object;
84
82
  tags?: TagType[];
85
83
  src?: string;
86
84
  };
87
85
  export type AssetHeaderType = {
88
86
  id: string;
89
87
  owner: string | null;
90
- creator: string | null;
91
- name: string | null;
92
- description: string | null;
93
- type: string | null;
94
- topics: string[] | null;
95
- implementation: string | null;
96
- contentType: string | null;
97
- renderWith: string | null;
98
- thumbnail: string | null;
99
- udl: UDLicenseType | null;
100
- collectionId: string | null;
101
- dateCreated: number | null;
102
- blockHeight: number | null;
103
- tags?: TagType[];
104
88
  };
105
- export type AssetStateType = {
106
- ticker: string | null;
107
- denomination: string | null;
108
- balances: {
109
- [key: string]: string;
110
- } | null;
111
- transferable: boolean | null;
112
- };
113
- export type AoAssetType = {
89
+ export type AssetDetailType = {
90
+ id: string;
91
+ name: string;
114
92
  ticker: string;
115
93
  denomination: string;
116
- balances: {
117
- [key: string]: string;
118
- };
119
- transferable: boolean;
120
- name: string;
94
+ totalSupply: string;
95
+ transferable: string;
121
96
  creator: string;
122
- assetMetadata: {
123
- [key: string]: any;
124
- };
97
+ balances: object;
98
+ metadata: object;
99
+ dateCreated: string;
100
+ lastUpdate: string;
125
101
  };
126
- export type AssetDetailType = AssetHeaderType & AssetStateType;
127
- export type CommentHeaderType = AssetHeaderType & {
102
+ export type CommentHeaderType = {
103
+ id: string;
128
104
  content: string;
129
- dataSource: string;
130
- rootSource: string;
105
+ parentId: string;
106
+ rootId: string;
107
+ };
108
+ export type CommentDetailType = {
109
+ content: string;
110
+ parentId: string;
111
+ rootId: string;
131
112
  };
132
- export type CommentStateType = AssetStateType;
133
- export type CommentDetailType = CommentHeaderType & CommentStateType;
134
113
  export type CommentCreateArgType = {
135
114
  content: string;
136
115
  creator: string;
@@ -11,45 +11,33 @@ declare function init(deps: Helpers.DependencyType): {
11
11
  data: object;
12
12
  }, zoneId: string) => Promise<string | null>;
13
13
  getZone: (zoneId: string) => Promise<any | null>;
14
- createAtomicAsset: (args: Helpers.AssetCreateArgsType, callback?: (status: any) => void) => Promise<string>;
15
- getAtomicAsset: (id: string) => Promise<Helpers.AssetDetailType | null>;
16
- getAtomicAssets: typeof Services.getAtomicAssets;
17
14
  createProfile: (args: Helpers.ProfileArgsType, callback?: (status: any) => void) => Promise<string | null>;
18
15
  updateProfile: (args: Helpers.ProfileArgsType, profileId: string, callback?: (status: any) => void) => Promise<string | null>;
19
16
  getProfileById: (profileId: string) => Promise<Helpers.ProfileType | null>;
20
17
  getProfileByWalletAddress: (walletAddress: string) => Promise<(Helpers.ProfileType & any) | null>;
18
+ createAtomicAsset: (args: Helpers.AssetCreateArgsType, callback?: (status: any) => void) => Promise<string>;
19
+ getAtomicAsset: (id: string, args?: {
20
+ useGateway?: boolean;
21
+ }) => Promise<Helpers.AssetDetailType | null>;
22
+ getAtomicAssets: typeof Services.getAtomicAssets;
21
23
  createComment: (args: Helpers.CommentCreateArgType, callback?: (status: any) => void) => Promise<string>;
22
24
  getComment: (id: string) => Promise<Helpers.CommentDetailType | null>;
23
25
  getComments: (args: {
24
26
  parentId?: string;
25
27
  rootId?: string;
26
28
  }) => Promise<{
29
+ id: any;
27
30
  content: string;
28
- dataSource: string;
29
- rootSource: string;
30
- id: string;
31
- owner: string | null;
32
- creator: string | null;
33
- name: 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[];
31
+ parentId: any;
32
+ rootId: any;
46
33
  }[]>;
47
34
  createCollection: (args: {
48
35
  title: string;
49
36
  description: string;
50
37
  creator: string;
51
- banner: any;
52
38
  thumbnail: any;
39
+ banner: any;
40
+ skipRegistry?: boolean;
53
41
  }, callback?: (status: any) => void) => Promise<string>;
54
42
  updateCollectionAssets: (args: {
55
43
  collectionId: string;
@@ -1,7 +1,10 @@
1
- import { AoAssetType, AssetCreateArgsType, AssetDetailType, AssetHeaderType, DependencyType, GQLNodeResponseType } from 'helpers/types';
1
+ import { 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>;
4
- export declare function getAtomicAssetWith(deps: DependencyType): (id: string) => Promise<AssetDetailType | null>;
5
- export declare function getAoAtomicAssetWith(deps: DependencyType): (processId: string) => Promise<AoAssetType>;
3
+ export declare function getAtomicAsset(deps: DependencyType, id: string, args?: {
4
+ useGateway?: boolean;
5
+ }): Promise<AssetDetailType | null>;
6
+ export declare function getAtomicAssetWith(deps: DependencyType): (id: string, args?: {
7
+ useGateway?: boolean;
8
+ }) => Promise<AssetDetailType | null>;
6
9
  export declare function getAtomicAssets(ids: string[]): Promise<AssetHeaderType[] | null>;
7
- export declare function buildAsset(element: GQLNodeResponseType): AssetHeaderType;
10
+ export declare function buildAsset(element: GQLNodeResponseType): any;
@@ -3,8 +3,9 @@ export declare function createCollectionWith(deps: DependencyType): (args: {
3
3
  title: string;
4
4
  description: string;
5
5
  creator: string;
6
- banner: any;
7
6
  thumbnail: any;
7
+ banner: any;
8
+ skipRegistry?: boolean;
8
9
  }, callback?: (status: any) => void) => Promise<string>;
9
10
  export declare function updateCollectionAssetsWith(deps: DependencyType): (args: {
10
11
  collectionId: string;
@@ -1,27 +1,12 @@
1
- import { CommentCreateArgType, CommentDetailType, DependencyType, TagType } from 'helpers/types';
1
+ import { CommentCreateArgType, CommentDetailType, DependencyType } from 'helpers/types';
2
2
  export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType, callback?: (status: any) => void) => Promise<string>;
3
3
  export declare function getCommentWith(deps: DependencyType): (id: string) => Promise<CommentDetailType | null>;
4
4
  export declare function getCommentsWith(_deps: DependencyType): (args: {
5
5
  parentId?: string;
6
6
  rootId?: string;
7
7
  }) => Promise<{
8
+ id: any;
8
9
  content: string;
9
- dataSource: string;
10
- rootSource: string;
11
- id: string;
12
- owner: string | null;
13
- creator: string | null;
14
- name: 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[];
10
+ parentId: any;
11
+ rootId: any;
27
12
  }[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@permaweb/libs",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",