starta.microservice 0.1.13062 → 0.1.13064

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.
@@ -3,6 +3,7 @@ export type PermissionsMap = {
3
3
  [Key: string]: true;
4
4
  };
5
5
  import { Request, Response } from 'express';
6
+ import type { ValidationRule } from 'co.validation';
6
7
  import Account from '../entities/Account';
7
8
  import ServiceHandlerBase from '../services/ServiceHandlerBase';
8
9
  import ServiceFactoryBase from '../services/ServiceFactoryBase';
@@ -70,10 +71,10 @@ export type MulterSettings = {
70
71
  type EndpointContext = 'user' | 'organization' | 'any';
71
72
  export interface IServiceDescription {
72
73
  getBodyParser?: () => 'raw' | 'json';
73
- getValidationRules?: (request?: IAuthorizedRequest, requestData?: any) => Object;
74
+ getValidationRules?: (request?: IAuthorizedRequest, requestData?: any) => Record<string, ValidationRule>;
74
75
  getValidationRulesPerContext?: (request?: IAuthorizedRequest) => {
75
- user: Object;
76
- organization: Object;
76
+ user: Record<string, ValidationRule>;
77
+ organization: Record<string, ValidationRule>;
77
78
  };
78
79
  getRequestMethod(): RequestMethod;
79
80
  getRequestPathTemplate(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;AAOA,wFAAgE;AAGnC,6BAHtB,4BAAkB,CAGsB;AAF/C,wFAAgE;AAEvD,6BAFF,4BAAkB,CAEE;AAoE3B,MAAa,kBAAkB;CAY9B;AAZD,gDAYC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;AAQA,wFAAgE;AAGnC,6BAHtB,4BAAkB,CAGsB;AAF/C,wFAAgE;AAEvD,6BAFF,4BAAkB,CAEE;AAoE3B,MAAa,kBAAkB;CAY9B;AAZD,gDAYC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.microservice",
3
- "version": "0.1.13062",
3
+ "version": "0.1.13064",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Core library for Starta.one microservice",
6
6
  "author": "Collaboracia OÜ",