Global

Members

# constant CustomParser

It wasn't possible to pass raw filters to adapters with AdminJS

This solution allows you to pass custom filters to typeorm adapter modyfing list handler

In your custom list handler modify creating filters in this way:

// That makes `Filter` class to create proper filter object.
filters[propertyToFilterBy] = 1;
const filter = await new Filter(filters, resource).populate();
// This parser recognizes `custom` field and passes the value directly to typeorm
filter.filters[propertyToFilterBy].custom = In([1,2,3]);

View Source adminjs-typeorm/src/utils/filter/custom-filter.parser.ts, line 16

# constant lowerCase

This function is used to map actual model name to it's prisma manager.

Ref: https://github.com/prisma/prisma/blob/ba74c81fdbc9e6405946fdc6f9d42d103d008dc2/packages/client/src/runtime/utils/common.ts#L452

View Source adminjs-prisma/src/utils/helpers.ts, line 10

# constant relativeFilePathResolver

resolve relative file path to absolute file path.

View Source adminjs/src/utils/file-resolver.ts, line 8

# constant validatePropertiesGlobally

Checks if all properties have uniq names

View Source adminjs-upload/src/features/upload-file/utils/validate-properties.ts, line 33

Methods

# buildFeature(options) → {FeatureType}

Higher Order Function which creates a feature
Parameters:
Name Type Description
options ResourceOptions

View Source adminjs/src/backend/utils/build-feature/build-feature.ts, line 90

FeatureType
Example
const { buildFeature } = require('adminjs')

const feature = buildFeature({
  // resource options goes here.
})

# mergeResourceOptions(oldOptions, newOptions) → {ResourceOptions}

Merges 2 ResourceOptions together. Used by features
  • 'id', 'href', 'parent', 'sort' from newOptions override oldOptions
  • 'listProperties', 'showProperties', 'editProperties', 'filterProperties' are joined and made unique
  • all 'properties' from newOptions override properties from oldOptions
  • all 'actions' with their parameters from newOptions override oldOptions except hooks and handler - which are chained.
Parameters:
Name Type Description
oldOptions ResourceOptions
newOptions ResourceOptions

View Source adminjs/src/backend/utils/build-feature/build-feature.ts, line 35

# populator(records)

Parameters:
Name Type Description
records Array.<BaseRecord>

View Source adminjs/src/backend/utils/populator/populator.ts, line 8

# async sessionAuth()

Creates authentication logic for admin users

View Source adminjs-hapijs/src/extensions/session-auth.ts, line 6

Type Definitions

object

# AuthOptions

Plugin definition for Hapi.js framework.
Properties:
Name Type Attributes Description
authenticate function <optional>

Function takes email and password as argument. Should return a logged-in user object or null/false., If provided, the strategy is set to 'session'.

strategy string <optional>

Auth strategy for Hapi routes.

cookieName string <optional>

This is the name of the cookie if strategy is set to 'session'.

cookiePassword string <optional>

Cookie password for 'session' strategy.

isSecure boolean

If cookie should be accessible only via https, defaults to false

{...} any

Cookie options: https://github.com/hapijs/cookie

View Source adminjs-hapijs/src/plugin.ts, line 145

object

# NonNullishPartialRecord

NonNullishPartialRecord
Properties:
Name Type Description
{...} V

View Source adminjs-design-system/src/utils/non-nullish-partial-record.type.ts, line 4

object

# PropertyCustom

Custom (PropertyOptions#custom) properties passed down to the component.
Properties:
Name Type Attributes Description
filePathProperty string
fileProperty string
filesToDeleteProperty string
keyProperty string
fileNameProperty string <optional>
mimeTypeProperty string <optional>
bucketProperty string <optional>
defaultBucket string
mimeTypes Array.<(MimeType|string)> <optional>
maxSize number <optional>
provider string
multiple boolean

View Source adminjs-upload/src/features/upload-file/types/property-custom.type.ts, line 5