@permaweb/libs 0.0.62 → 0.0.63
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 +13 -13
- package/dist/index.esm.js +34 -34
- package/dist/index.js +13 -13
- package/dist/types/helpers/types.d.ts +4 -0
- package/dist/types/index.d.ts +27 -7
- package/dist/types/services/moderation.d.ts +38 -15
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export type ProcessReadType = {
|
|
|
13
13
|
path: string;
|
|
14
14
|
fallbackAction: string;
|
|
15
15
|
serialize?: boolean;
|
|
16
|
+
tags?: TagType[];
|
|
16
17
|
};
|
|
17
18
|
export type ProcessSpawnType = {
|
|
18
19
|
module: string;
|
|
@@ -221,12 +222,15 @@ export type BatchAGQLResponseType = {
|
|
|
221
222
|
export type ModerationStatusType = 'blocked' | 'allowed';
|
|
222
223
|
export type ModerationTargetType = 'comment' | 'profile';
|
|
223
224
|
export type ModerationEntryType = {
|
|
225
|
+
id: string;
|
|
224
226
|
targetId: string;
|
|
227
|
+
targetType: ModerationTargetType;
|
|
225
228
|
status: ModerationStatusType;
|
|
226
229
|
targetContext?: string;
|
|
227
230
|
reason?: string;
|
|
228
231
|
moderator: string;
|
|
229
232
|
dateCreated: number;
|
|
233
|
+
updatedAt?: number;
|
|
230
234
|
metadata?: any;
|
|
231
235
|
};
|
|
232
236
|
export type TagType = {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -95,7 +95,9 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
95
95
|
getCollections: (args: {
|
|
96
96
|
creator?: string;
|
|
97
97
|
}) => Promise<Helpers.CollectionType[] | null>;
|
|
98
|
-
addModerationEntry: (
|
|
98
|
+
addModerationEntry: (args: {
|
|
99
|
+
moderationId: string;
|
|
100
|
+
targetType: Helpers.ModerationTargetType;
|
|
99
101
|
targetId: string;
|
|
100
102
|
status: Helpers.ModerationStatusType;
|
|
101
103
|
targetContext?: string;
|
|
@@ -103,21 +105,39 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
103
105
|
reason?: string;
|
|
104
106
|
metadata?: any;
|
|
105
107
|
}) => Promise<string | null>;
|
|
106
|
-
getModerationEntries: (
|
|
108
|
+
getModerationEntries: (args: {
|
|
109
|
+
moderationId: string;
|
|
110
|
+
targetType: Helpers.ModerationTargetType;
|
|
107
111
|
targetId?: string;
|
|
108
112
|
status?: Helpers.ModerationStatusType;
|
|
109
113
|
targetContext?: string;
|
|
110
114
|
moderator?: string;
|
|
111
115
|
}) => Promise<Helpers.ModerationEntryType[] | null>;
|
|
112
|
-
updateModerationEntry: (
|
|
116
|
+
updateModerationEntry: (args: {
|
|
117
|
+
moderationId: string;
|
|
118
|
+
targetType: Helpers.ModerationTargetType;
|
|
119
|
+
targetId: string;
|
|
113
120
|
status: Helpers.ModerationStatusType;
|
|
114
121
|
moderator: string;
|
|
115
122
|
reason?: string;
|
|
116
123
|
}) => Promise<string | null>;
|
|
117
|
-
removeModerationEntry: (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
removeModerationEntry: (args: {
|
|
125
|
+
moderationId: string;
|
|
126
|
+
targetType: Helpers.ModerationTargetType;
|
|
127
|
+
targetId: string;
|
|
128
|
+
}) => Promise<string | null>;
|
|
129
|
+
addModerationSubscription: (args: {
|
|
130
|
+
moderationId: string;
|
|
131
|
+
originPortal: string;
|
|
132
|
+
subscriptionType?: string;
|
|
133
|
+
}) => Promise<string | null>;
|
|
134
|
+
removeModerationSubscription: (args: {
|
|
135
|
+
moderationId: string;
|
|
136
|
+
originPortal: string;
|
|
137
|
+
}) => Promise<string | null>;
|
|
138
|
+
getModerationSubscriptions: (args: {
|
|
139
|
+
moderationId: string;
|
|
140
|
+
}) => Promise<string[] | null>;
|
|
121
141
|
resolveTransaction: (data: any) => Promise<any>;
|
|
122
142
|
getGQLData: typeof Common.getGQLData;
|
|
123
143
|
getAggregatedGQLData: typeof Common.getAggregatedGQLData;
|
|
@@ -2,7 +2,9 @@ import { DependencyType, ModerationEntryType, ModerationStatusType, ModerationTa
|
|
|
2
2
|
/**
|
|
3
3
|
* Add a moderation entry to the moderation process
|
|
4
4
|
*/
|
|
5
|
-
export declare function addModerationEntryWith(deps: DependencyType): (
|
|
5
|
+
export declare function addModerationEntryWith(deps: DependencyType): (args: {
|
|
6
|
+
moderationId: string;
|
|
7
|
+
targetType: ModerationTargetType;
|
|
6
8
|
targetId: string;
|
|
7
9
|
status: ModerationStatusType;
|
|
8
10
|
targetContext?: string;
|
|
@@ -13,7 +15,9 @@ export declare function addModerationEntryWith(deps: DependencyType): (zoneId: s
|
|
|
13
15
|
/**
|
|
14
16
|
* Get moderation entries from the moderation process
|
|
15
17
|
*/
|
|
16
|
-
export declare function getModerationEntriesWith(deps: DependencyType): (
|
|
18
|
+
export declare function getModerationEntriesWith(deps: DependencyType): (args: {
|
|
19
|
+
moderationId: string;
|
|
20
|
+
targetType: ModerationTargetType;
|
|
17
21
|
targetId?: string;
|
|
18
22
|
status?: ModerationStatusType;
|
|
19
23
|
targetContext?: string;
|
|
@@ -22,7 +26,10 @@ export declare function getModerationEntriesWith(deps: DependencyType): (zoneId:
|
|
|
22
26
|
/**
|
|
23
27
|
* Update a moderation entry in the moderation process
|
|
24
28
|
*/
|
|
25
|
-
export declare function updateModerationEntryWith(deps: DependencyType): (
|
|
29
|
+
export declare function updateModerationEntryWith(deps: DependencyType): (args: {
|
|
30
|
+
moderationId: string;
|
|
31
|
+
targetType: ModerationTargetType;
|
|
32
|
+
targetId: string;
|
|
26
33
|
status: ModerationStatusType;
|
|
27
34
|
moderator: string;
|
|
28
35
|
reason?: string;
|
|
@@ -30,27 +37,43 @@ export declare function updateModerationEntryWith(deps: DependencyType): (zoneId
|
|
|
30
37
|
/**
|
|
31
38
|
* Remove a moderation entry from the moderation process
|
|
32
39
|
*/
|
|
33
|
-
export declare function removeModerationEntryWith(deps: DependencyType): (
|
|
40
|
+
export declare function removeModerationEntryWith(deps: DependencyType): (args: {
|
|
41
|
+
moderationId: string;
|
|
42
|
+
targetType: ModerationTargetType;
|
|
43
|
+
targetId: string;
|
|
44
|
+
}) => Promise<string | null>;
|
|
34
45
|
/**
|
|
35
46
|
* Add a moderation subscription to the moderation process
|
|
36
47
|
*/
|
|
37
|
-
export declare function addModerationSubscriptionWith(deps: DependencyType): (
|
|
48
|
+
export declare function addModerationSubscriptionWith(deps: DependencyType): (args: {
|
|
49
|
+
moderationId: string;
|
|
50
|
+
originPortal: string;
|
|
51
|
+
subscriptionType?: string;
|
|
52
|
+
}) => Promise<string | null>;
|
|
38
53
|
/**
|
|
39
54
|
* Remove a moderation subscription from the moderation process
|
|
40
55
|
*/
|
|
41
|
-
export declare function removeModerationSubscriptionWith(deps: DependencyType): (
|
|
56
|
+
export declare function removeModerationSubscriptionWith(deps: DependencyType): (args: {
|
|
57
|
+
moderationId: string;
|
|
58
|
+
originPortal: string;
|
|
59
|
+
}) => Promise<string | null>;
|
|
42
60
|
/**
|
|
43
61
|
* Get moderation subscriptions from the moderation process
|
|
44
62
|
*/
|
|
45
|
-
export declare function getModerationSubscriptionsWith(deps: DependencyType): (
|
|
63
|
+
export declare function getModerationSubscriptionsWith(deps: DependencyType): (args: {
|
|
64
|
+
moderationId: string;
|
|
65
|
+
}) => Promise<string[] | null>;
|
|
46
66
|
/**
|
|
47
67
|
* Bulk add moderation entries to the moderation process
|
|
48
68
|
*/
|
|
49
|
-
export declare function bulkAddModerationEntriesWith(deps: DependencyType): (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
export declare function bulkAddModerationEntriesWith(deps: DependencyType): (args: {
|
|
70
|
+
moderationId: string;
|
|
71
|
+
entries: Array<{
|
|
72
|
+
targetType: ModerationTargetType;
|
|
73
|
+
targetId: string;
|
|
74
|
+
status: ModerationStatusType;
|
|
75
|
+
targetContext?: string;
|
|
76
|
+
reason?: string;
|
|
77
|
+
metadata?: any;
|
|
78
|
+
}>;
|
|
79
|
+
}) => Promise<string | null>;
|