Skip to main content

DomainServiceParameters

@webda/core


Class: DomainServiceParameters

Defined in: packages/core/src/services/domainservice.service.ts:172

Parameters for DomainService, controlling model exposure, URL naming, and query methods

Extends​

Constructors​

Constructor​

new DomainServiceParameters(): DomainServiceParameters

Returns​

DomainServiceParameters

Inherited from​

ServiceParameters.constructor

Properties​

models?​

optional models?: string[]

Defined in: packages/core/src/services/domainservice.service.ts:199

List of models to include

If model is prefixed with a ! it will be excluded

Default​

["*"]

nameTransfomer?​

optional nameTransfomer?: TransformCaseType

Defined in: packages/core/src/services/domainservice.service.ts:185

Transform the name of the model to be used in the URL

See​

https://blog.boot.dev/clean-code/casings-in-coding/#:~:text=%F0%9F%94%97%20Camel%20Case,Go

Default​

camelCase

operations?​

optional operations?: boolean

Defined in: packages/core/src/services/domainservice.service.ts:178

Expose objects as operations too

Default​

true

queryMethod?​

optional queryMethod?: "GET" | "PUT"

Defined in: packages/core/src/services/domainservice.service.ts:191

Method used for query objects

Default​

"PUT"

type​

type: string

Defined in: packages/core/src/services/serviceparameters.ts:10

Type of the service

Inherited from​

ServiceParameters.type

Methods​

isExcluded()​

isExcluded(model): boolean

Defined in: packages/core/src/services/domainservice.service.ts:249

Is a model excluded from the service

Parameters​

model​

string

the model to use

Returns​

boolean

the result


isExplicitlyIncluded()​

isExplicitlyIncluded(model): boolean

Defined in: packages/core/src/services/domainservice.service.ts:240

Is a model explicitly listed (not through the wildcard) in models

Parameters​

model​

string

the model identifier

Returns​

boolean

the result


isIncluded()​

isIncluded(model): boolean

Defined in: packages/core/src/services/domainservice.service.ts:231

Is a model is included in the service

Parameters​

model​

string

the model to use

Returns​

boolean

the result


load()​

load(params?): this

Defined in: packages/core/src/services/domainservice.service.ts:211

Load parameters with defaults for operations, naming, and query method

Parameters​

params?​

any = {}

the service parameters

Returns​

this

this for chaining

Overrides​

ServiceParameters.load


update()​

update(params?, delta): this

Defined in: packages/core/src/services/serviceparameters.ts:35

Update parameters and call watchers if a parameter was changed

Parameters​

params?​

any = {}

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

ServiceParameters.update


with()​

with(callback): this

Defined in: packages/core/src/services/serviceparameters.ts:65

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

ServiceParameters.with