TS - LoggedInUser Custom Type

Sources:

  • **
title: Contents 
style: nestedList # TOC style (nestedList|inlineFirstLevel)
minLevel: 1 # Include headings from the specified level
maxLevel: 4 # Include headings up to the specified level
includeLinks: true # Make headings clickable
debugInConsole: false # Print debug info in Obsidian console

Overview

Code Snippets

export type LoggedInUser = {
  id: number;
  collective: {
    id: number;
    slug: string;
    name: string;
    legalName: string;
    type: string;
  };
  memberOf: Array<{
    id: number;
    role: string;
    collective: {
      id: number;
      slug: string;
      name: string;
      type: string;
      imageUrl: string;
      isArchived: boolean;
      isIncognito: boolean;
    };
  }>;
  hasTwoFactorAuth: boolean;
  hasRole: (roles: string[] | string, collective) => boolean;
  hostsUserisAdminOf: () => any[];
  isAdminOfCollective: (collective: any) => boolean;
  isAdminOfCollectiveOrHost: (collective: any) => boolean;
  isHostAdmin: (collective: any) => boolean;
  isAccountantOnly: (collective: any) => boolean;
  isSelf: (collective: any) => boolean;
  isRoot: boolean;
  canEditComment: (comment: any) => boolean;
  canEditEvent: (event: any) => boolean;
  canEditProject: (project: any) => boolean;
  canEditUpdate: (update: any) => boolean;
  canSeeAdminPanel: (collective: any) => boolean;
  email: string;
  hasPreviewFeatureEnabled: (featureKey: PREVIEW_FEATURE_KEYS | `${PREVIEW_FEATURE_KEYS}`) => boolean;
  getAvailablePreviewFeatures: () => PreviewFeature[];
};

Details

About

This note is about …

See Also


Appendix

Note created on 2024-04-12 and last modified on 2024-04-12.

LIST FROM [[TS - LoggedInUser Custom Type]] AND -"CHANGELOG" AND -"04-RESOURCES/Code/TypeScript/TS - LoggedInUser Custom Type"

(c) No Clocks, LLC | 2024