Skip to main content

Service

Represents a service class that provides access to various services related to the application.

API Reference

AuditLogsService

Kind: Exported class

new Service([conn])

Constructs a new instance of the class with an optional name parameter.

If a name is provided, it initializes a connection to the database using the provided name.

Example Basic usage:

import { Service } from "@ecoflow/services";

const service = new Service();

OR

const { service } = ecoflow;

Available arguments :

ParameterTypeDescription
[conn]stringThe name to use for the database connection.

Available Services

User Service

service.UserServiceUserService

note

Method that returns an instance of the UserService class.

Token Services

service.TokenServicesTokenServices

note

Method that returns an instance of TokenServices class.

Role Service

service.RoleServiceRoleService

note

Method that returns an instance of RoleService class.

AuditLogs Service

service.AuditLogsServiceAuditLogsService

note

Method that returns an instance of AuditLogsService class.

Schema Editor Service

service.SchemaEditorServiceSchemaEditorService

note

Method that returns an instance of SchemaEditorService class.

Flow Settings Service

service.FlowSettingsServiceFlowSettingsService

note

Method that returns an instance of FlowSettingsService class.