import { UserEntitlementShim as UserEntitlementShimV3 } from './v3/UserEntitlementShim'; import { IMembershipBase as IMembershipBaseV3, IArchitectBase as ISpaceArchitectBaseV3 } from './v3/ICreateSpaceShim'; import { ILegacyArchitectBase } from './v3/ILegacySpaceArchitectShim'; import { IRolesBase as IRolesBaseV3 } from './v3/IRolesShim'; import { RuleEntitlementShim } from './v3/RuleEntitlementShim'; import { IRuleEntitlementBase, IRuleEntitlementV2Base } from './v3'; import { IPricingModulesBase } from './v3/IPricingShim'; import { RuleEntitlementV2Shim } from './v3/RuleEntitlementV2Shim'; import { CreateSpaceParams, CreateLegacySpaceParams, UpdateChannelParams, UpdateChannelAccessParams } from './ISpaceDapp'; export declare const Permission: { /** No permission required. */ readonly Undefined: "Undefined"; /** Read event permission. */ readonly Read: "Read"; /** Write event permission. */ readonly Write: "Write"; /** Invite user permission. */ readonly Invite: "Invite"; /** Join space permission. */ readonly JoinSpace: "JoinSpace"; /** Redact events permission. */ readonly Redact: "Redact"; /** Modify or ban user permission. */ readonly ModifyBanning: "ModifyBanning"; /** Pin/unpin events permission. */ readonly PinMessage: "PinMessage"; /** Add or remove channels permission. */ readonly AddRemoveChannels: "AddRemoveChannels"; /** Modify space settings permission. */ readonly ModifySpaceSettings: "ModifySpaceSettings"; /** React to a message permission. */ readonly React: "React"; }; export type Permission = (typeof Permission)[keyof typeof Permission]; export type EntitlementShim = UserEntitlementShimV3 | RuleEntitlementShim | RuleEntitlementV2Shim; export type EntitlementStruct = IRolesBaseV3.CreateEntitlementStruct; type UserEntitlementShim = UserEntitlementShimV3; type MembershipInfoStruct = IMembershipBaseV3.MembershipStruct; type TotalSupplyOutputStruct = { totalSupply: number; }; export type MembershipStruct = ISpaceArchitectBaseV3.MembershipStruct; export type LegacyMembershipStruct = ILegacyArchitectBase.MembershipStruct; export type MembershipRequirementsStruct = ISpaceArchitectBaseV3.MembershipRequirementsStruct; export type LegacyMembershipRequirementsStruct = ILegacyArchitectBase.MembershipRequirementsStruct; export type SpaceInfoStruct = ISpaceArchitectBaseV3.SpaceInfoStruct; export type LegacySpaceInfoStruct = ILegacyArchitectBase.SpaceInfoStruct; export type PricingModuleStruct = IPricingModulesBase.PricingModuleStruct; /** * Supported entitlement modules */ export declare enum EntitlementModuleType { UserEntitlement = "UserEntitlement", RuleEntitlement = "RuleEntitlement", RuleEntitlementV2 = "RuleEntitlementV2" } export declare function isLegacyMembershipType(object: MembershipStruct | LegacyMembershipStruct): object is LegacyMembershipStruct; export declare function isCreateLegacySpaceParams(object: CreateSpaceParams | CreateLegacySpaceParams): object is CreateLegacySpaceParams; export declare function isRuleDataV1(ruleData: IRuleEntitlementBase.RuleDataStruct | IRuleEntitlementV2Base.RuleDataV2Struct): ruleData is IRuleEntitlementBase.RuleDataStruct; /** * Role details from multiple contract sources */ interface RuleDataV1 { kind: 'v1'; rules: IRuleEntitlementBase.RuleDataStruct; } interface RuleDataV2 { kind: 'v2'; rules: IRuleEntitlementV2Base.RuleDataV2Struct; } export type VersionedRuleData = RuleDataV1 | RuleDataV2; export interface RoleDetails { id: number; name: string; permissions: Permission[]; users: string[]; ruleData: VersionedRuleData; channels: ChannelMetadata[]; } /** * Basic channel metadata from the space contract. */ export interface ChannelMetadata { name: string; description?: string; channelNetworkId: string; disabled: boolean; } /** * Channel details from multiple contract sources */ export interface ChannelDetails { /** The River `spaceId` which this channel belongs. */ spaceNetworkId: string; /** The River `channelId` of the channel. */ channelNetworkId: string; /** The name of the channel. */ name: string; /** Whether the channel is disabled. */ disabled: boolean; /** The roles defined for the channel {@link RoleEntitlements}. */ roles: RoleEntitlements[]; /** The description of the channel. */ description?: string; } /** Role details for a channel from multiple contract sources */ export interface RoleEntitlements { /** The id of the role. */ roleId: number; /** The name of the role. */ name: string; /** The permissions that this role has. @see {@link Permission} */ permissions: Permission[]; /** The userIds that are in this role. */ users: string[]; /** @internal The River struct that represents the rule data of the role {@link VersionedRuleData}. */ ruleData: VersionedRuleData; } export interface EntitlementDetails { users: string[]; ruleData: VersionedRuleData; } export interface BasicRoleInfo { roleId: number; name: string; } export interface EntitlementModule { moduleType: EntitlementModuleType; } export declare function isPermission(permission: string): permission is Permission; export declare function isUserEntitlement(entitlement: EntitlementModule): entitlement is UserEntitlementShim; export declare function isRuleEntitlement(entitlement: EntitlementModule): entitlement is RuleEntitlementShim; export declare function isRuleEntitlementV2(entitlement: EntitlementModule): entitlement is RuleEntitlementV2Shim; export declare const isUpdateChannelStatusParams: (params: UpdateChannelParams) => params is UpdateChannelAccessParams; export declare function isStringArray(args: any): args is string[]; export type MembershipInfo = Pick & TotalSupplyInfo & { prepaidSupply: number; remainingFreeSupply: number; }; export type TotalSupplyInfo = Pick; export type Address = `0x${string}`; export {}; //# sourceMappingURL=ContractTypes.d.ts.map