@ecency/sdk 1.0.53 → 1.0.54
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/ecency-sdk.es.js
CHANGED
@@ -905,10 +905,14 @@ function Qe(e, t) {
|
|
905
905
|
queryKey: ["community", "context", e, t],
|
906
906
|
enabled: !!e && !!t,
|
907
907
|
queryFn: async () => {
|
908
|
-
const n = await i.hiveClient.call(
|
909
|
-
|
910
|
-
|
911
|
-
|
908
|
+
const n = await i.hiveClient.call(
|
909
|
+
"bridge",
|
910
|
+
"get_community_context",
|
911
|
+
{
|
912
|
+
account: e,
|
913
|
+
name: t
|
914
|
+
}
|
915
|
+
);
|
912
916
|
return {
|
913
917
|
role: (n == null ? void 0 : n.role) ?? "guest",
|
914
918
|
subscribed: (n == null ? void 0 : n.subscribed) ?? !1
|
@@ -948,7 +952,9 @@ function Fe({
|
|
948
952
|
userRole: t,
|
949
953
|
subscribed: n
|
950
954
|
}) {
|
951
|
-
const o = t === d.MUTED ? !1 : e === "Topic" ? !0 : [d.OWNER, d.ADMIN, d.MOD, d.MEMBER].includes(
|
955
|
+
const o = t === d.MUTED ? !1 : e === "Topic" ? !0 : [d.OWNER, d.ADMIN, d.MOD, d.MEMBER].includes(
|
956
|
+
t
|
957
|
+
), r = (() => {
|
952
958
|
if (t === d.MUTED) return !1;
|
953
959
|
switch (e) {
|
954
960
|
case "Topic":
|
@@ -8,6 +8,8 @@ export declare enum ROLES {
|
|
8
8
|
}
|
9
9
|
export declare const roleMap: Record<string, string[]>;
|
10
10
|
export type CommunityTeam = Array<Array<string>>;
|
11
|
+
export type CommunityRole = (typeof ROLES)[keyof typeof ROLES];
|
12
|
+
export type CommunityType = "Topic" | "Journal" | "Council";
|
11
13
|
export interface Community {
|
12
14
|
about: string;
|
13
15
|
admins?: string[];
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
export type CommunityRole = (typeof ROLES)[keyof typeof ROLES];
|
3
|
-
export type CommunityType = "Topic" | "Journal" | "Council";
|
1
|
+
import { CommunityRole, CommunityType } from '../types';
|
4
2
|
export declare function getCommunityType(name: string, type_id: number): CommunityType;
|
5
3
|
export declare function getCommunityPermissions({ communityType, userRole, subscribed, }: {
|
6
4
|
communityType: CommunityType;
|