Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace schemaUtils

Index

Variables

Const formProperties

formProperties: string[] = ...

Const schemaProperties

schemaProperties: string[] = ...

Functions

Const convertSchema

  • convertSchema(schema: VulcanSchema<AnyObject>, options?: { flatten?: boolean; removeArrays?: boolean }): {}
  • Vulcan Schema => Form Schema TODO: type this better

    Parameters

    • schema: VulcanSchema<AnyObject>
    • options: { flatten?: boolean; removeArrays?: boolean } = {}
      • Optional flatten?: boolean
      • Optional removeArrays?: boolean

    Returns {}

Const getEditableFields

  • getEditableFields(schema: any, user: any, document: any): string[]
  • method

    Mongo.Collection.getEditableFields Get an array of all fields editable by a specific user for a given collection (and optionally document)

    Parameters

    • schema: any
    • user: any

      – the user for which to check field permissions

    • document: any

    Returns string[]

Const getFieldSchema

  • getFieldSchema(fieldName: string, schema: VulcanSchema<AnyObject>): {}
  • Parameters

    • fieldName: string
    • schema: VulcanSchema<AnyObject>

    Returns {}

Const getInsertableFields

  • getInsertableFields(schema: any, user: any): string[]
  • method

    Mongo.Collection.getInsertableFields Get an array of all fields editable by a specific user for a given collection

    Parameters

    • schema: any
    • user: any

      – the user for which to check field permissions

    Returns string[]

Const getNestedFieldSchemaOrType

  • getNestedFieldSchemaOrType(fieldName: any, schema: any): null | Object | Number | Date
  • Parameters

    • fieldName: any
    • schema: any

    Returns null | Object | Number | Date

Const getSchemaType

  • getSchemaType(fieldSchema: VulcanFieldSchema<any>): VulcanFieldType
  • Parameters

    • fieldSchema: VulcanFieldSchema<any>

    Returns VulcanFieldType

Const getValidFields

  • getValidFields(schema: any): string[]
  • Parameters

    • schema: any

    Returns string[]

Generated using TypeDoc