pg-mvc-service 2.0.89 → 2.0.90

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.
@@ -4,30 +4,6 @@ class ReqResType {
4
4
  constructor() {
5
5
  this.properties = {};
6
6
  }
7
- /**
8
- * Retrieve the property definition corresponding to the specified key path.
9
- * 指定されたキーパスに対応するプロパティ定義を取得します。
10
- * @param {Array<string | number>} keys - Access path to the property (array of strings or index numbers)
11
- * プロパティへのアクセスパス(文字列またはインデックス番号の配列)
12
- * @returns {BaseType} Property definition object
13
- * プロパティ定義オブジェクト
14
- */
15
- // protected getProperty(keys: Array<string | number>) {
16
- // let property: any = this.properties;
17
- // for (let i = 0;i < keys.length;i++) {
18
- // const key = keys[i];
19
- // if (typeof key === 'number') {
20
- // property = property.properties;
21
- // continue;
22
- // }
23
- // if (i === 0) {
24
- // property = property[key];
25
- // } else {
26
- // property = property.properties[key];
27
- // }
28
- // }
29
- // return property;
30
- // }
31
7
  /**
32
8
  * Retrieve property type data
33
9
  * プロパティ型のデータを取得
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { AxiosResponse } from "axios";
2
2
  import { Request, Response } from 'express';
3
3
  import { Pool, PoolClient } from 'pg';
4
4
  import { ErrorMessageType, IncomingHttpHeaders } from './src/reqestResponse/RequestType';
5
- import { ArrayType, EnumType, MapType, ObjectType, PrimitiveType } from './src/reqestResponse/ReqResType';
5
+ import { ArrayType, EnumType, MapType, NumberType, ObjectType, PrimitiveType, StringType } from './src/reqestResponse/ReqResType';
6
6
 
7
7
  import { MethodType } from './src/Service';
8
8
  export { MethodType } from './src/Service';
@@ -90,13 +90,13 @@ declare module 'pg-mvc-service' {
90
90
  }
91
91
  export function createSwagger(services: Service[], name: string, url: string, params: Array<IParams>): string;
92
92
 
93
- export type PropertyType = PrimitiveType | ObjectType | ArrayType | EnumType | MapType;
93
+ export type PropertyType = PrimitiveType | StringType | NumberType | ObjectType | ArrayType | EnumType | MapType;
94
94
 
95
95
  export class RequestType {
96
96
  constructor();
97
97
 
98
98
  protected properties: { [key: string]: PropertyType; };
99
- protected paramProperties: Array<(PrimitiveType | EnumType) & { key: string }>;
99
+ protected paramProperties: Array<(PrimitiveType | StringType | NumberType | EnumType) & { key: string }>;
100
100
  protected readonly ERROR_MESSAGE: ErrorMessageType;
101
101
 
102
102
  protected throwException(code: string, message: string): never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.89",
3
+ "version": "2.0.90",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -47,33 +47,6 @@ export default class ReqResType {
47
47
 
48
48
  protected properties: { [key: string]: PropertyType; } = {};
49
49
 
50
-
51
- /**
52
- * Retrieve the property definition corresponding to the specified key path.
53
- * 指定されたキーパスに対応するプロパティ定義を取得します。
54
- * @param {Array<string | number>} keys - Access path to the property (array of strings or index numbers)
55
- * プロパティへのアクセスパス(文字列またはインデックス番号の配列)
56
- * @returns {BaseType} Property definition object
57
- * プロパティ定義オブジェクト
58
- */
59
- // protected getProperty(keys: Array<string | number>) {
60
- // let property: any = this.properties;
61
- // for (let i = 0;i < keys.length;i++) {
62
- // const key = keys[i];
63
- // if (typeof key === 'number') {
64
- // property = property.properties;
65
- // continue;
66
- // }
67
-
68
- // if (i === 0) {
69
- // property = property[key];
70
- // } else {
71
- // property = property.properties[key];
72
- // }
73
- // }
74
-
75
- // return property;
76
- // }
77
50
  /**
78
51
  * Retrieve property type data
79
52
  * プロパティ型のデータを取得
@@ -1,5 +1,5 @@
1
1
  import { Request } from 'express';
2
- import ReqResType, { EnumType, PrimitiveType, PropertyType, StringType } from "./ReqResType";
2
+ import ReqResType, { EnumType, NumberType, PrimitiveType, PropertyType, StringType } from "./ReqResType";
3
3
  import { InputErrorException } from '../exceptions/Exception';
4
4
  import StringUtil from '../Utils/StringUtil';
5
5
  import { ValidateStringUtil } from 'type-utils-n-daira';
@@ -85,7 +85,7 @@ export class RequestType extends ReqResType {
85
85
  }
86
86
  protected readonly ERROR_MESSAGE: ErrorMessageType = process.env.TZ === 'Asia/Tokyo' ? this.ERROR_MESSAGE_JAPAN : this.ERROR_MESSAGE_ENGLISH;
87
87
 
88
- protected paramProperties: Array<(PrimitiveType | EnumType) & { key: string }> = []
88
+ protected paramProperties: Array<(PrimitiveType | StringType | NumberType | EnumType) & { key: string }> = []
89
89
  get paramPath(): string {
90
90
  return this.paramProperties.map(property => `/{${property.key}}`).join("");
91
91
  }