@permaweb/libs 0.0.21 → 0.0.22

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,17 +70,15 @@ 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
  };
@@ -102,35 +100,30 @@ export type AssetHeaderType = {
102
100
  blockHeight: number | null;
103
101
  tags?: TagType[];
104
102
  };
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 = {
103
+ export type AssetDetailType = {
104
+ name: string;
114
105
  ticker: string;
115
106
  denomination: string;
116
- balances: {
117
- [key: string]: string;
118
- };
119
- transferable: boolean;
120
- name: string;
107
+ totalSupply: string;
108
+ transferable: string;
121
109
  creator: string;
122
- assetMetadata: {
123
- [key: string]: any;
124
- };
110
+ balances: object;
111
+ metadata: object;
112
+ dateCreated: string;
113
+ lastUpdate: string;
114
+ tags?: TagType[];
115
+ };
116
+ export type CommentHeaderType = {
117
+ id: string;
118
+ content: string;
119
+ parentId: string;
120
+ rootId: string;
125
121
  };
126
- export type AssetDetailType = AssetHeaderType & AssetStateType;
127
- export type CommentHeaderType = AssetHeaderType & {
122
+ export type CommentDetailType = {
128
123
  content: string;
129
- dataSource: string;
130
- rootSource: string;
124
+ parentId: string;
125
+ rootId: string;
131
126
  };
132
- export type CommentStateType = AssetStateType;
133
- export type CommentDetailType = CommentHeaderType & CommentStateType;
134
127
  export type CommentCreateArgType = {
135
128
  content: string;
136
129
  creator: string;
@@ -24,25 +24,10 @@ declare function init(deps: Helpers.DependencyType): {
24
24
  parentId?: string;
25
25
  rootId?: string;
26
26
  }) => Promise<{
27
- content: string;
28
- dataSource: string;
29
- rootSource: string;
30
27
  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[];
28
+ content: string;
29
+ parentId: string;
30
+ rootId: string;
46
31
  }[]>;
47
32
  createCollection: (args: {
48
33
  title: string;
@@ -1,7 +1,8 @@
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>;
3
+ export declare function getAtomicAsset(deps: DependencyType, id: string, args?: {
4
+ useGateway?: boolean;
5
+ }): Promise<AssetDetailType | null>;
4
6
  export declare function getAtomicAssetWith(deps: DependencyType): (id: string) => Promise<AssetDetailType | null>;
5
- export declare function getAoAtomicAssetWith(deps: DependencyType): (processId: string) => Promise<AoAssetType>;
6
7
  export declare function getAtomicAssets(ids: string[]): Promise<AssetHeaderType[] | null>;
7
8
  export declare function buildAsset(element: GQLNodeResponseType): AssetHeaderType;
@@ -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
- content: string;
9
- dataSource: string;
10
- rootSource: string;
11
8
  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[];
9
+ content: string;
10
+ parentId: string;
11
+ rootId: string;
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.22",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",