@nymphjs/server
Version:
Nymph.js - REST Server
107 lines (106 loc) • 3.67 kB
TypeScript
import { Entity as EntityServer } from '@nymphjs/nymph';
import { Entity } from '@nymphjs/client';
export type EmployeeBaseData<T> = {
name?: string;
id?: number;
title?: string;
department?: string;
subordinates?: T[];
salary?: number;
current?: boolean;
startDate?: number;
endDate?: number;
phone?: string;
building?: string;
thing?: string;
other?: string;
};
export type EmployeeModelData = EmployeeBaseData<EmployeeModel>;
/**
* This class is a test class that extends the Entity class.
*/
export declare class EmployeeModel extends EntityServer<EmployeeModelData> {
static ETYPE: string;
static class: string;
protected $clientEnabledMethods: string[];
static clientEnabledStaticMethods: string[];
protected $protectedTags: string[];
protected $allowlistTags?: string[] | undefined;
protected $allowlistData?: string[] | undefined;
constructor();
$save(): Promise<boolean>;
$testMethodStateless(value: number): number;
$testMethod(value: number): number;
static testStatic(value: number): number;
static testStaticIterable(value: number): Generator<number, void, unknown>;
static testStaticIterableAbort(): Iterator<number, void, boolean>;
static throwErrorStatic(): void;
static throwErrorStaticIterable(): Generator<number, void, unknown>;
$throwError(): void;
$throwHttpError(): void;
$throwHttpErrorWithDescription(): void;
static inaccessibleMethod(): boolean;
}
export declare class BadFunctionCallError extends Error {
constructor(message: string);
}
export type EmployeeData = EmployeeBaseData<Employee>;
export declare class Employee extends Entity<EmployeeData> {
static class: string;
constructor();
$testMethod(value: number): Promise<any>;
$testMethodStateless(value: number): Promise<any>;
$throwError(): Promise<any>;
$throwHttpError(): Promise<any>;
$throwHttpErrorWithDescription(): Promise<any>;
static testStatic(value: number): Promise<any>;
static testStaticIterable(value: number): Promise<import("@nymphjs/client").AbortableAsyncIterator<any>>;
static testStaticIterableAbort(): Promise<import("@nymphjs/client").AbortableAsyncIterator<any>>;
static throwErrorStatic(): Promise<any>;
static throwErrorStaticIterable(): Promise<import("@nymphjs/client").AbortableAsyncIterator<any>>;
static inaccessibleMethod(): Promise<any>;
}
export type RestrictedModelData = {
name: string;
};
/**
* This class is a test class that extends the Entity class.
*/
export declare class RestrictedModel extends EntityServer<RestrictedModelData> {
static ETYPE: string;
static class: string;
static restEnabled: boolean;
constructor();
$save(): Promise<boolean>;
$testMethod(value: string): string;
static testStatic(value: number): number;
}
export type RestrictedData = {
name: string;
};
export declare class Restricted extends Entity<RestrictedData> {
static class: string;
constructor();
$testMethod(value: number): Promise<any>;
static testStatic(value: number): Promise<any>;
}
export type PubSubDisabledModelData = {
name: string;
};
/**
* This class is a test class that extends the Entity class.
*/
export declare class PubSubDisabledModel extends EntityServer<PubSubDisabledModelData> {
static ETYPE: string;
static class: string;
static pubSubEnabled: boolean;
constructor();
$save(): Promise<boolean>;
}
export type PubSubDisabledData = {
name: string;
};
export declare class PubSubDisabled extends Entity<PubSubDisabledData> {
static class: string;
constructor();
}