@qelos/plugin-play 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,14 +27,14 @@ export interface ICrudOptions<ResourcePublicData, ResourceInsertData> {
27
27
  iconSvg?: string;
28
28
  priority?: number;
29
29
  };
30
- screens: {
30
+ screens?: {
31
31
  list: Screen;
32
32
  create: Screen;
33
33
  edit: Screen;
34
34
  };
35
35
  publicKeys?: string[];
36
36
  verify?: (request: FastifyRequest, reply: FastifyReply) => Promise<any>;
37
- createOne: (body: Partial<ResourceInsertData>, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData>);
37
+ createOne: (body: Partial<ResourceInsertData>, request: FastifyRequest, reply: FastifyReply) => (any | Promise<ResourcePublicData>);
38
38
  readOne: (id: string, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData>);
39
39
  readMany: (query: Record<string, string | string[]>, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData[]>);
40
40
  updateOne: (id: string, body: Partial<ResourceInsertData>, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData>);
@@ -1,9 +1,10 @@
1
1
  import { StandardPayload } from './handlers';
2
2
  export type RequestUser = {
3
- _id: any;
4
- email: any;
5
- firstName: any;
6
- lastName: any;
3
+ _id: string;
4
+ email: string;
5
+ firstName: string;
6
+ lastName: string;
7
+ roles: string[];
7
8
  };
8
9
  declare module 'fastify' {
9
10
  interface FastifyRequest {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qelos/plugin-play",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Play a plugin for Qelos!",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
package/src/crud.types.ts CHANGED
@@ -30,14 +30,14 @@ export interface ICrudOptions<ResourcePublicData, ResourceInsertData> {
30
30
  iconSvg?: string;
31
31
  priority?: number;
32
32
  },
33
- screens: {
33
+ screens?: {
34
34
  list: Screen;
35
35
  create: Screen;
36
36
  edit: Screen;
37
37
  },
38
38
  publicKeys?: string[];
39
39
  verify?: (request: FastifyRequest, reply: FastifyReply) => Promise<any>;
40
- createOne: (body: Partial<ResourceInsertData>, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData>),
40
+ createOne: (body: Partial<ResourceInsertData>, request: FastifyRequest, reply: FastifyReply) => (any | Promise<ResourcePublicData>),
41
41
  readOne: (id: string, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData>);
42
42
  readMany: (query: Record<string, string | string[]>, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData[]>);
43
43
  updateOne: (id: string, body: Partial<ResourceInsertData>, request: FastifyRequest, reply: FastifyReply) => (Promise<ResourcePublicData>);
@@ -1,6 +1,12 @@
1
1
  import {StandardPayload} from './handlers';
2
2
 
3
- export type RequestUser = { _id, email, firstName, lastName };
3
+ export type RequestUser = {
4
+ _id: string,
5
+ email: string,
6
+ firstName: string,
7
+ lastName: string,
8
+ roles: string[]
9
+ };
4
10
 
5
11
  declare module 'fastify' {
6
12
  interface FastifyRequest {