@permaweb/libs 0.0.81 → 0.0.83
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 +11 -11
- package/dist/index.esm.js +36 -36
- package/dist/index.js +11 -11
- package/dist/types/helpers/types.d.ts +5 -0
- package/dist/types/helpers/utils.d.ts +1 -1
- package/dist/types/index.d.ts +10 -2
- package/dist/types/services/comments.d.ts +8 -1
- package/dist/types/services/moderation.d.ts +2 -2
- package/dist/types/services/zones.d.ts +1 -0
- package/package.json +1 -1
|
@@ -143,6 +143,11 @@ export type CommentCreateArgType = {
|
|
|
143
143
|
tags?: TagType[];
|
|
144
144
|
metadata?: object;
|
|
145
145
|
};
|
|
146
|
+
export type CommentRulesType = {
|
|
147
|
+
profileAgeRequired?: number;
|
|
148
|
+
mutedWords?: string[];
|
|
149
|
+
requireProfileThumbnail?: boolean;
|
|
150
|
+
};
|
|
146
151
|
export type CollectionManifestType = {
|
|
147
152
|
type: string;
|
|
148
153
|
items: string[];
|
|
@@ -25,7 +25,7 @@ export declare function cleanTagValue(value: string): string;
|
|
|
25
25
|
/**
|
|
26
26
|
* Extracts all values from a key-value store that match a given prefix
|
|
27
27
|
* @param store The key-value store object to search
|
|
28
|
-
* @param prefix The prefix to filter keys by (e.g., '
|
|
28
|
+
* @param prefix The prefix to filter keys by (e.g., 'zone')
|
|
29
29
|
* @returns Array of values whose keys match the prefix
|
|
30
30
|
*/
|
|
31
31
|
export declare function getStoreNamespace<T = any>(prefix: string, store: Record<string, T>): T[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
39
39
|
op: "Invite" | "Accept" | "Reject" | "Cancel";
|
|
40
40
|
to?: string;
|
|
41
41
|
}) => Promise<string | null>;
|
|
42
|
+
leaveZone: (zoneId: string) => Promise<string | null>;
|
|
42
43
|
createProfile: (args: Helpers.ProfileArgsType, callback?: (status: any) => void) => Promise<string | null>;
|
|
43
44
|
updateProfile: (args: Helpers.ProfileArgsType, profileId: string, callback?: (status: any) => void) => Promise<string | null>;
|
|
44
45
|
updateProfileVersion: (args: {
|
|
@@ -81,6 +82,13 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
81
82
|
commentsId: string;
|
|
82
83
|
commentId: string;
|
|
83
84
|
}) => Promise<string>;
|
|
85
|
+
getRules: (args: {
|
|
86
|
+
commentsId: string;
|
|
87
|
+
}) => Promise<Helpers.CommentRulesType>;
|
|
88
|
+
updateRules: (args: {
|
|
89
|
+
commentsId: string;
|
|
90
|
+
rules: Helpers.CommentRulesType;
|
|
91
|
+
}) => Promise<string>;
|
|
84
92
|
createCollection: (args: {
|
|
85
93
|
title: string;
|
|
86
94
|
description: string;
|
|
@@ -133,12 +141,12 @@ declare function init(deps: Helpers.DependencyType): {
|
|
|
133
141
|
}) => Promise<string | null>;
|
|
134
142
|
addModerationSubscription: (args: {
|
|
135
143
|
moderationId: string;
|
|
136
|
-
|
|
144
|
+
originZone: string;
|
|
137
145
|
subscriptionType?: string;
|
|
138
146
|
}) => Promise<string | null>;
|
|
139
147
|
removeModerationSubscription: (args: {
|
|
140
148
|
moderationId: string;
|
|
141
|
-
|
|
149
|
+
originZone: string;
|
|
142
150
|
}) => Promise<string | null>;
|
|
143
151
|
getModerationSubscriptions: (args: {
|
|
144
152
|
moderationId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommentCreateArgType, DependencyType } from '../helpers/types.ts';
|
|
1
|
+
import { CommentCreateArgType, CommentRulesType, DependencyType } from '../helpers/types.ts';
|
|
2
2
|
export declare function createCommentWith(deps: DependencyType): (args: CommentCreateArgType) => Promise<string>;
|
|
3
3
|
export declare function getCommentsWith(deps: DependencyType): (args: {
|
|
4
4
|
commentsId: string;
|
|
@@ -29,3 +29,10 @@ export declare function unpinCommentWith(deps: DependencyType): (args: {
|
|
|
29
29
|
commentsId: string;
|
|
30
30
|
commentId: string;
|
|
31
31
|
}) => Promise<string>;
|
|
32
|
+
export declare function getRulesWith(deps: DependencyType): (args: {
|
|
33
|
+
commentsId: string;
|
|
34
|
+
}) => Promise<CommentRulesType>;
|
|
35
|
+
export declare function updateRulesWith(deps: DependencyType): (args: {
|
|
36
|
+
commentsId: string;
|
|
37
|
+
rules: CommentRulesType;
|
|
38
|
+
}) => Promise<string>;
|
|
@@ -47,7 +47,7 @@ export declare function removeModerationEntryWith(deps: DependencyType): (args:
|
|
|
47
47
|
*/
|
|
48
48
|
export declare function addModerationSubscriptionWith(deps: DependencyType): (args: {
|
|
49
49
|
moderationId: string;
|
|
50
|
-
|
|
50
|
+
originZone: string;
|
|
51
51
|
subscriptionType?: string;
|
|
52
52
|
}) => Promise<string | null>;
|
|
53
53
|
/**
|
|
@@ -55,7 +55,7 @@ export declare function addModerationSubscriptionWith(deps: DependencyType): (ar
|
|
|
55
55
|
*/
|
|
56
56
|
export declare function removeModerationSubscriptionWith(deps: DependencyType): (args: {
|
|
57
57
|
moderationId: string;
|
|
58
|
-
|
|
58
|
+
originZone: string;
|
|
59
59
|
}) => Promise<string | null>;
|
|
60
60
|
/**
|
|
61
61
|
* Get moderation subscriptions from the moderation process
|
|
@@ -34,3 +34,4 @@ export declare function transferZoneOwnershipWith(deps: DependencyType): (args:
|
|
|
34
34
|
op: "Invite" | "Accept" | "Reject" | "Cancel";
|
|
35
35
|
to?: string;
|
|
36
36
|
}) => Promise<string | null>;
|
|
37
|
+
export declare function leaveZoneWith(deps: DependencyType): (zoneId: string) => Promise<string | null>;
|