Websites v4 docs v12.7.0
    Preparing search index...

    Hierarchy

    Index
    serializer: (model: any) => any

    serializer is a pure function that takes a model instance and returns a plain object that describes how to convert the model to JSON

    • Retrieves a value from raw API data. Prioritises DBAPI data if available

      Parameters

      • key: string

      Returns any

    • Special method to define behaviour of JSON.stringify() on model instance

      Returns any

    • Finds the chunks an agency owns, excluding any chunks other agencies have shared with it.

      Used when importing a legacy page shared by a parent agency, as the child's own chunks take precedence over the parent's chunks of the same name.

      Parameters

      • __namedParameters: { agencyId: number }

      Returns Promise<{ errors: ModelError[] | null; results: ContentChunk[] }>

      const { results } = await ContentChunk.findAllOwnedByAgency({ agencyId: 9002 });