Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

664 B
Raw Blame
import { Schema } from "effect";
import { OrganisationId } from "./Organisation.ts";

export const SpaceId = Schema.String.pipe(Schema.brand("SpaceId"));
export type SpaceId = typeof SpaceIdOrOrganisationId.Type;

export const SpaceIdOrOrganisationId = Schema.Union(SpaceId, OrganisationId);
export type SpaceIdOrOrganisationId = typeof SpaceIdOrOrganisationId.Type;

export const SpaceMemberId = Schema.String.pipe(Schema.brand("SpaceMemberId"));
export type SpaceMemberId = typeof SpaceMemberId.Type;

export const SpaceMemberRole = Schema.Union(
	Schema.Literal("admin"),
	Schema.Literal("member"),
);
export type SpaceMemberRole = typeof SpaceMemberRole.Type;