pg-mvc-service 2.0.129 → 2.1.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.
Files changed (97) hide show
  1. package/dist/PoolManager.d.ts +7 -0
  2. package/dist/PoolManager.d.ts.map +1 -0
  3. package/dist/Service.d.ts +82 -0
  4. package/dist/Service.d.ts.map +1 -0
  5. package/dist/Service.js +40 -23
  6. package/dist/Utils/DateTimeUtil.d.ts +58 -0
  7. package/dist/Utils/DateTimeUtil.d.ts.map +1 -0
  8. package/dist/Utils/NumberUtil.d.ts +10 -0
  9. package/dist/Utils/NumberUtil.d.ts.map +1 -0
  10. package/dist/Utils/StringUtil.d.ts +16 -0
  11. package/dist/Utils/StringUtil.d.ts.map +1 -0
  12. package/dist/clients/AwsS3Client.d.ts +35 -0
  13. package/dist/clients/AwsS3Client.d.ts.map +1 -0
  14. package/dist/clients/Base64Client.d.ts +31 -0
  15. package/dist/clients/Base64Client.d.ts.map +1 -0
  16. package/dist/clients/EncryptClient.d.ts +18 -0
  17. package/dist/clients/EncryptClient.d.ts.map +1 -0
  18. package/dist/clients/StringClient.d.ts +6 -0
  19. package/dist/clients/StringClient.d.ts.map +1 -0
  20. package/dist/cron/BaseCron.d.ts +35 -0
  21. package/dist/cron/BaseCron.d.ts.map +1 -0
  22. package/dist/cron/CronExecuter.d.ts +2 -0
  23. package/dist/cron/CronExecuter.d.ts.map +1 -0
  24. package/dist/cron/CronType.d.ts +6 -0
  25. package/dist/cron/CronType.d.ts.map +1 -0
  26. package/dist/documents/Swagger.d.ts +10 -0
  27. package/dist/documents/Swagger.d.ts.map +1 -0
  28. package/dist/exceptions/Exception.d.ts +31 -0
  29. package/dist/exceptions/Exception.d.ts.map +1 -0
  30. package/{src/index.ts → dist/index.d.ts} +2 -6
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/models/ExpressionClient.d.ts +12 -0
  33. package/dist/models/ExpressionClient.d.ts.map +1 -0
  34. package/dist/models/MigrateDatabase.d.ts +19 -0
  35. package/dist/models/MigrateDatabase.d.ts.map +1 -0
  36. package/dist/models/MigrateRollback.d.ts +18 -0
  37. package/dist/models/MigrateRollback.d.ts.map +1 -0
  38. package/dist/models/MigrateTable.d.ts +13 -0
  39. package/dist/models/MigrateTable.d.ts.map +1 -0
  40. package/dist/models/SqlUtils/SelectExpression.d.ts +31 -0
  41. package/dist/models/SqlUtils/SelectExpression.d.ts.map +1 -0
  42. package/dist/models/SqlUtils/UpdateExpression.d.ts +8 -0
  43. package/dist/models/SqlUtils/UpdateExpression.d.ts.map +1 -0
  44. package/dist/models/SqlUtils/ValidateValueUtil.d.ts +19 -0
  45. package/dist/models/SqlUtils/ValidateValueUtil.d.ts.map +1 -0
  46. package/dist/models/SqlUtils/WhereExpression.d.ts +30 -0
  47. package/dist/models/SqlUtils/WhereExpression.d.ts.map +1 -0
  48. package/dist/models/TableDoc.d.ts +3 -0
  49. package/dist/models/TableDoc.d.ts.map +1 -0
  50. package/dist/models/TableModel.d.ts +196 -0
  51. package/dist/models/TableModel.d.ts.map +1 -0
  52. package/dist/models/Type.d.ts +64 -0
  53. package/dist/models/Type.d.ts.map +1 -0
  54. package/dist/models/Utils/MessageUtil.d.ts +7 -0
  55. package/dist/models/Utils/MessageUtil.d.ts.map +1 -0
  56. package/dist/models/ValidateClient.d.ts +27 -0
  57. package/dist/models/ValidateClient.d.ts.map +1 -0
  58. package/dist/reqestResponse/ReqResType.d.ts +113 -0
  59. package/dist/reqestResponse/ReqResType.d.ts.map +1 -0
  60. package/dist/reqestResponse/RequestType.d.ts +247 -0
  61. package/dist/reqestResponse/RequestType.d.ts.map +1 -0
  62. package/dist/reqestResponse/RequestType.js +218 -173
  63. package/dist/reqestResponse/ResponseType.d.ts +85 -0
  64. package/dist/reqestResponse/ResponseType.d.ts.map +1 -0
  65. package/package.json +8 -1
  66. package/index.d.ts +0 -192
  67. package/src/PoolManager.ts +0 -48
  68. package/src/Service.ts +0 -284
  69. package/src/Utils/DateTimeUtil.ts +0 -146
  70. package/src/Utils/NumberUtil.ts +0 -23
  71. package/src/Utils/StringUtil.ts +0 -33
  72. package/src/clients/AwsS3Client.ts +0 -310
  73. package/src/clients/Base64Client.ts +0 -305
  74. package/src/clients/EncryptClient.ts +0 -100
  75. package/src/clients/StringClient.ts +0 -19
  76. package/src/cron/BaseCron.ts +0 -122
  77. package/src/cron/CronExecuter.ts +0 -34
  78. package/src/cron/CronType.ts +0 -25
  79. package/src/documents/Swagger.ts +0 -106
  80. package/src/exceptions/Exception.ts +0 -72
  81. package/src/models/ExpressionClient.ts +0 -72
  82. package/src/models/MigrateDatabase.ts +0 -135
  83. package/src/models/MigrateRollback.ts +0 -151
  84. package/src/models/MigrateTable.ts +0 -56
  85. package/src/models/SqlUtils/SelectExpression.ts +0 -102
  86. package/src/models/SqlUtils/UpdateExpression.ts +0 -29
  87. package/src/models/SqlUtils/ValidateValueUtil.ts +0 -354
  88. package/src/models/SqlUtils/WhereExpression.ts +0 -455
  89. package/src/models/TableDoc.ts +0 -372
  90. package/src/models/TableModel.ts +0 -749
  91. package/src/models/Type.ts +0 -62
  92. package/src/models/Utils/MessageUtil.ts +0 -60
  93. package/src/models/ValidateClient.ts +0 -182
  94. package/src/reqestResponse/ReqResType.ts +0 -241
  95. package/src/reqestResponse/RequestType.ts +0 -1588
  96. package/src/reqestResponse/ResponseType.ts +0 -549
  97. package/tsconfig.json +0 -14
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -91,7 +100,6 @@ class RequestType extends ReqResType_1.default {
91
100
  }
92
101
  return this.headers;
93
102
  }
94
- get RemoteAddress() { return this.remoteAddress; }
95
103
  get Authorization() {
96
104
  var _a;
97
105
  const authorization = (_a = this.Headers['authorization']) !== null && _a !== void 0 ? _a : '';
@@ -100,23 +108,41 @@ class RequestType extends ReqResType_1.default {
100
108
  }
101
109
  return authorization.replace(/^Bearer\s/, '');
102
110
  }
103
- setRequest(request) {
104
- var _a, _b, _c;
105
- this.createBody(request);
106
- this.params = {};
107
- if (request.params !== undefined) {
108
- for (const [key, value] of Object.entries(request.params)) {
109
- const index = this.paramProperties.findIndex(property => property.key === key);
110
- if (index === -1) {
111
- throw new Error(`${key} is not set in paramProperties.`);
111
+ setRequest(module, request) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ var _a, _b, _c, _d;
114
+ yield this.createBody(module, request);
115
+ this.params = {};
116
+ if (module === 'express') {
117
+ const req = request;
118
+ if (req.params !== undefined) {
119
+ for (const [key, value] of Object.entries(req.params)) {
120
+ const index = this.paramProperties.findIndex((p) => p.key === key);
121
+ if (index === -1)
122
+ throw new Error(`${key} is not set in paramProperties.`);
123
+ const prop = this.paramProperties[index];
124
+ this.params[key] = this.convertValue(prop, value, [key, `(pathIndex: ${index})`], false);
125
+ }
112
126
  }
113
- const property = this.paramProperties[index];
114
- this.params[key] = this.convertValue(property, value, [key, `(pathIndex: ${index})`], false);
127
+ this.params = (_a = req.params) !== null && _a !== void 0 ? _a : {};
128
+ this.headers = (_b = req.headers) !== null && _b !== void 0 ? _b : {};
115
129
  }
116
- }
117
- this.params = (_a = request.params) !== null && _a !== void 0 ? _a : {};
118
- this.headers = (_b = request.headers) !== null && _b !== void 0 ? _b : {};
119
- this.remoteAddress = (_c = request.socket) === null || _c === void 0 ? void 0 : _c.remoteAddress;
130
+ else {
131
+ const c = request;
132
+ for (let index = 0; index < this.paramProperties.length; index++) {
133
+ const prop = this.paramProperties[index];
134
+ const value = (_d = (_c = c.req).param) === null || _d === void 0 ? void 0 : _d.call(_c, prop.key); // hono の param()
135
+ if (value !== undefined) {
136
+ this.params[prop.key] = this.convertValue(prop, value, [prop.key, `(pathIndex: ${index})`], false);
137
+ }
138
+ }
139
+ const headersObj = {};
140
+ c.req.raw.headers.forEach((v, k) => {
141
+ headersObj[k.toLowerCase()] = v;
142
+ });
143
+ this.headers = headersObj;
144
+ }
145
+ });
120
146
  }
121
147
  createErrorMessage(code, keys, value) {
122
148
  var _a, _b, _c, _d, _e;
@@ -240,179 +266,198 @@ class RequestType extends ReqResType_1.default {
240
266
  * @param {Object} body - Request body object, リクエストボディオブジェクト
241
267
  * @throws {InputErrorException} Thrown when the input value is invalid, 入力値が不正な場合にスローされます
242
268
  */
243
- createBody(request) {
244
- if (request.method === 'GET' || request.method === 'DELETE') {
245
- this.data = request.query;
246
- }
247
- else {
248
- this.data = request.body;
249
- }
250
- if (this.data === undefined) {
251
- this.data = {};
252
- }
253
- for (const key of Object.keys(this.properties)) {
254
- // NULLチェック
255
- if (key in this.data === false || this.data[key] === null || this.data[key] === "") {
256
- if (this.properties[key].type === 'array' && ['GET', 'DELETE'].includes(request.method)) {
257
- // GET,DELETEメソッドの場合、?array=1&array=2で配列となるが、
258
- // ?array=1のみで終わる場合は配列にならないため、直接配列にしている
259
- // この処理で空文字やnullが入った場合の対処をここで行う
260
- const itemProperty = this.properties[key].item;
261
- if (itemProperty.type.endsWith('?')) {
262
- const tempValue = this.data[key];
263
- this.data[key] = [];
264
- if (tempValue !== undefined) {
265
- if (itemProperty.type === 'string?') {
266
- this.data[key][0] = tempValue;
267
- }
268
- else {
269
- this.data[key][0] = null;
270
- }
271
- }
272
- continue;
273
- }
274
- else {
275
- this.throwInputError("REQUIRE_00", [key, 0], "");
276
- }
269
+ createBody(module, request) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ let method = '';
272
+ if (module === 'express') {
273
+ const req = request;
274
+ method = req.method;
275
+ if (method === 'GET' || method === 'DELETE') {
276
+ this.data = req.query;
277
277
  }
278
278
  else {
279
- if (this.properties[key].type.endsWith('?')) {
280
- this.changeBody([key], null);
281
- continue;
282
- }
283
- else {
284
- this.throwInputError("REQUIRE_01", [key], "");
285
- }
279
+ this.data = req.body;
286
280
  }
287
281
  }
288
- const value = this.data[key];
289
- switch (this.properties[key].type) {
290
- case 'object':
291
- case 'object?':
292
- if (typeof value === 'object') {
293
- this.setObject([key], value);
294
- }
295
- else {
296
- this.throwInputError("OBJECT_01", [key], value);
297
- }
298
- break;
299
- case 'array':
300
- case 'array?':
301
- if (Array.isArray(value)) {
302
- this.setArray([key], value);
282
+ else {
283
+ const c = request;
284
+ method = c.req.method;
285
+ if (method === 'GET' || method === 'DELETE') {
286
+ const url = new URL(c.req.url);
287
+ this.data = Object.fromEntries(url.searchParams.entries());
288
+ }
289
+ else {
290
+ // JSON を想定(form 等なら parseBody() を使う)
291
+ this.data = yield c.req.json();
292
+ }
293
+ }
294
+ if (this.data === undefined) {
295
+ this.data = {};
296
+ }
297
+ for (const key of Object.keys(this.properties)) {
298
+ // NULLチェック
299
+ if (key in this.data === false || this.data[key] === null || this.data[key] === "") {
300
+ if (this.properties[key].type === 'array' && ['GET', 'DELETE'].includes(method)) {
301
+ // GET,DELETEメソッドの場合、?array=1&array=2で配列となるが、
302
+ // ?array=1のみで終わる場合は配列にならないため、直接配列にしている
303
+ // この処理で空文字やnullが入った場合の対処をここで行う
304
+ const itemProperty = this.properties[key].item;
305
+ if (itemProperty.type.endsWith('?')) {
306
+ const tempValue = this.data[key];
307
+ this.data[key] = [];
308
+ if (tempValue !== undefined) {
309
+ if (itemProperty.type === 'string?') {
310
+ this.data[key][0] = tempValue;
311
+ }
312
+ else {
313
+ this.data[key][0] = null;
314
+ }
315
+ }
316
+ continue;
317
+ }
318
+ else {
319
+ this.throwInputError("REQUIRE_00", [key, 0], "");
320
+ }
303
321
  }
304
322
  else {
305
- if (request.method === 'GET' || request.method === 'DELETE') {
306
- // GET,DELETEメソッドの場合、?array=1&array=2で配列となるが、
307
- // ?array=1のみで終わる場合は配列にならないため、直接配列にしている
308
- const type = this.properties[key].item.type;
309
- if (type === 'object' || type === 'object?' || type === 'array' || type === 'array?' || type === 'map' || type === 'map?') {
310
- throw new Error("GETまたはDELETEメソッドでは配列型にobject, array, mapを使用することはできません。");
311
- }
312
- if (type === 'enum' || type === 'enum?') {
313
- const tempProp = {
314
- type: type,
315
- description: this.properties[key].item.description,
316
- enumType: this.properties[key].item.enumType,
317
- enums: this.properties[key].item.enums,
318
- };
319
- this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
320
- }
321
- else if (type === 'string' || type === 'string?') {
322
- const tempProp = {
323
- type: type,
324
- description: this.properties[key].item.description,
325
- maxLength: this.properties[key].item.maxLength,
326
- regExp: this.properties[key].item.regExp
327
- };
328
- this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
329
- }
330
- else if (type === 'number' || type === 'number?') {
331
- const tempProp = {
332
- type: type,
333
- description: this.properties[key].item.description,
334
- max: this.properties[key].item.max,
335
- min: this.properties[key].item.min,
336
- };
337
- this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
338
- }
339
- else {
340
- const tempProp = {
341
- type: type,
342
- description: this.properties[key].item.description
343
- };
344
- this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
345
- }
323
+ if (this.properties[key].type.endsWith('?')) {
324
+ this.changeBody([key], null);
325
+ continue;
346
326
  }
347
327
  else {
348
- this.throwInputError("ARRAY_01", [key], value);
328
+ this.throwInputError("REQUIRE_01", [key], "");
349
329
  }
350
330
  }
351
- break;
352
- case 'map':
353
- case 'map?':
354
- // tODO : ここは共通化したい
355
- const mapData = {};
356
- for (const [mapKey, mapValue] of Object.entries(value)) {
357
- switch (this.properties[key].mapType) {
358
- case 'number':
359
- if (this.isNumber(mapValue) === false) {
360
- this.throwInputError("MAP_01", [key], value);
331
+ }
332
+ const value = this.data[key];
333
+ switch (this.properties[key].type) {
334
+ case 'object':
335
+ case 'object?':
336
+ if (typeof value === 'object') {
337
+ this.setObject([key], value);
338
+ }
339
+ else {
340
+ this.throwInputError("OBJECT_01", [key], value);
341
+ }
342
+ break;
343
+ case 'array':
344
+ case 'array?':
345
+ if (Array.isArray(value)) {
346
+ this.setArray([key], value);
347
+ }
348
+ else {
349
+ if (method === 'GET' || method === 'DELETE') {
350
+ // GET,DELETEメソッドの場合、?array=1&array=2で配列となるが、
351
+ // ?array=1のみで終わる場合は配列にならないため、直接配列にしている
352
+ const type = this.properties[key].item.type;
353
+ if (type === 'object' || type === 'object?' || type === 'array' || type === 'array?' || type === 'map' || type === 'map?') {
354
+ throw new Error("GETまたはDELETEメソッドでは配列型にobject, array, mapを使用することはできません。");
361
355
  }
362
- mapData[mapKey] = Number(mapValue);
363
- break;
364
- case 'string':
365
- switch (typeof mapValue) {
366
- case 'number':
367
- mapData[mapKey] = mapValue.toString();
368
- break;
369
- case 'string':
370
- mapData[mapKey] = mapValue;
371
- break;
372
- default:
373
- this.throwInputError("MAP_02", [key], value);
356
+ if (type === 'enum' || type === 'enum?') {
357
+ const tempProp = {
358
+ type: type,
359
+ description: this.properties[key].item.description,
360
+ enumType: this.properties[key].item.enumType,
361
+ enums: this.properties[key].item.enums,
362
+ };
363
+ this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
374
364
  }
375
- break;
376
- case 'bool':
377
- switch (typeof mapValue) {
378
- case 'boolean':
379
- mapData[mapKey] = mapValue;
380
- break;
381
- case 'number':
382
- if (mapValue !== 0 && mapValue !== 1) {
383
- this.throwInputError("MAP_03", [key], mapValue);
384
- }
385
- mapData[mapKey] = mapValue === 1;
386
- break;
387
- case 'string':
388
- if (mapValue !== 'true' && mapValue !== 'false') {
389
- this.throwInputError("MAP_04", [key], mapValue);
390
- }
391
- mapData[mapKey] = mapValue === 'true';
392
- break;
393
- default:
394
- this.throwInputError("MAP_05", [key], mapValue);
365
+ else if (type === 'string' || type === 'string?') {
366
+ const tempProp = {
367
+ type: type,
368
+ description: this.properties[key].item.description,
369
+ maxLength: this.properties[key].item.maxLength,
370
+ regExp: this.properties[key].item.regExp
371
+ };
372
+ this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
395
373
  }
396
- break;
374
+ else if (type === 'number' || type === 'number?') {
375
+ const tempProp = {
376
+ type: type,
377
+ description: this.properties[key].item.description,
378
+ max: this.properties[key].item.max,
379
+ min: this.properties[key].item.min,
380
+ };
381
+ this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
382
+ }
383
+ else {
384
+ const tempProp = {
385
+ type: type,
386
+ description: this.properties[key].item.description
387
+ };
388
+ this.data[key] = [this.convertValue(tempProp, value, [key, 0], true)];
389
+ }
390
+ }
391
+ else {
392
+ this.throwInputError("ARRAY_01", [key], value);
393
+ }
397
394
  }
398
- }
399
- this.changeBody([key], mapData);
400
- break;
401
- case 'enum':
402
- case 'enum?':
403
- this.setEnum([key], value);
404
- break;
405
- default:
406
- this.convertInput([key], value);
407
- break;
395
+ break;
396
+ case 'map':
397
+ case 'map?':
398
+ // tODO : ここは共通化したい
399
+ const mapData = {};
400
+ for (const [mapKey, mapValue] of Object.entries(value)) {
401
+ switch (this.properties[key].mapType) {
402
+ case 'number':
403
+ if (this.isNumber(mapValue) === false) {
404
+ this.throwInputError("MAP_01", [key], value);
405
+ }
406
+ mapData[mapKey] = Number(mapValue);
407
+ break;
408
+ case 'string':
409
+ switch (typeof mapValue) {
410
+ case 'number':
411
+ mapData[mapKey] = mapValue.toString();
412
+ break;
413
+ case 'string':
414
+ mapData[mapKey] = mapValue;
415
+ break;
416
+ default:
417
+ this.throwInputError("MAP_02", [key], value);
418
+ }
419
+ break;
420
+ case 'bool':
421
+ switch (typeof mapValue) {
422
+ case 'boolean':
423
+ mapData[mapKey] = mapValue;
424
+ break;
425
+ case 'number':
426
+ if (mapValue !== 0 && mapValue !== 1) {
427
+ this.throwInputError("MAP_03", [key], mapValue);
428
+ }
429
+ mapData[mapKey] = mapValue === 1;
430
+ break;
431
+ case 'string':
432
+ if (mapValue !== 'true' && mapValue !== 'false') {
433
+ this.throwInputError("MAP_04", [key], mapValue);
434
+ }
435
+ mapData[mapKey] = mapValue === 'true';
436
+ break;
437
+ default:
438
+ this.throwInputError("MAP_05", [key], mapValue);
439
+ }
440
+ break;
441
+ }
442
+ }
443
+ this.changeBody([key], mapData);
444
+ break;
445
+ case 'enum':
446
+ case 'enum?':
447
+ this.setEnum([key], value);
448
+ break;
449
+ default:
450
+ this.convertInput([key], value);
451
+ break;
452
+ }
408
453
  }
409
- }
410
- // 不要項目チェック
411
- for (const [key, value] of Object.entries(this.data)) {
412
- if (key in this.properties === false) {
413
- this.throwInputError("UNNECESSARY_01", [key], value);
454
+ // 不要項目チェック
455
+ for (const [key, value] of Object.entries(this.data)) {
456
+ if (key in this.properties === false) {
457
+ this.throwInputError("UNNECESSARY_01", [key], value);
458
+ }
414
459
  }
415
- }
460
+ });
416
461
  }
417
462
  /**
418
463
  * Sets the value for an enum type based on the specified keys.
@@ -0,0 +1,85 @@
1
+ import ReqResType from "./ReqResType";
2
+ import { IError } from "../Service";
3
+ export declare class ResponseType extends ReqResType {
4
+ /**
5
+ * Property to store response data
6
+ * レスポンスデータを格納するためのプロパティ
7
+ */
8
+ Data: {
9
+ [key: string]: any;
10
+ };
11
+ /**
12
+ * Convert and retrieve data according to the type definition
13
+ * 型定義に従ってデータを変換して取得
14
+ * @returns {Object.<string, any>} Converted data, 変換されたデータ
15
+ */
16
+ get ResponseData(): {
17
+ [key: string]: any;
18
+ };
19
+ /**
20
+ * Retrieve object type data
21
+ * オブジェクト型のデータを取得
22
+ * @param {Array.<string|number>} keys - Path to the property, プロパティへのパス
23
+ * @returns {Object.<string, any>} Retrieved object data, 取得されたオブジェクトデータ
24
+ */
25
+ private getObject;
26
+ /**
27
+ * Retrieve array type data
28
+ * 配列型のデータを取得
29
+ * @param {Array.<string|number>} keys - Path to the property, プロパティへのパス
30
+ * @returns {Array<any> | undefined} Retrieved array data, 取得された配列データ
31
+ */
32
+ private getArray;
33
+ /**
34
+ * Retrieve array type data
35
+ * 配列型のデータを取得
36
+ * @param {Array.<string|number>} keys - Path to the property, プロパティへのパス
37
+ * @returns {Array<any> | undefined} Retrieved array data, 取得された配列データ
38
+ */
39
+ private getMap;
40
+ /**
41
+ * Retrieve data based on the provided keys
42
+ * 指定されたキーに基づいてデータを取得
43
+ * @param {Array.<string|number>} keys - Path to the data, データへのパス
44
+ * @returns {any} Retrieved data, 取得されたデータ
45
+ */
46
+ private getData;
47
+ /**
48
+ * Retrieve value based on the provided keys
49
+ * 指定されたキーに基づいて値を取得
50
+ * @param {Array.<string|number>} keys - Path to the value, 値へのパス
51
+ * @returns {string | number | boolean | null | undefined} Retrieved value, 取得された値
52
+ */
53
+ private getValue;
54
+ /**
55
+ * Generates Swagger response definition
56
+ * Swaggerのレスポンス定義を生成します
57
+ * @returns {string} Swagger format response definition
58
+ * Swagger形式のレスポンス定義
59
+ */
60
+ createSwagger(errorList: Array<IError>, apiCode: string): string;
61
+ /**
62
+ * Generates Swagger properties from object type properties
63
+ * オブジェクト型のプロパティからSwaggerのプロパティを生成
64
+ * @param {Array.<string|number>} keys - Path to the properties
65
+ * プロパティへのパス
66
+ * @returns {string} Swagger format property definition
67
+ * Swagger形式のプロパティ定義
68
+ */
69
+ private makeSwaggerProperyFromObject;
70
+ /**
71
+ * Generates Swagger properties from array type properties
72
+ * 配列型のプロパティからSwaggerのプロパティを生成
73
+ * @param {Array.<string|number>} keys - Path to the properties, プロパティへのパス
74
+ * @returns {string} Swagger format property definition, Swagger形式のプロパティ定義
75
+ */
76
+ private makeSwaggerPropertyFromArray;
77
+ /**
78
+ * Generates Swagger properties from array type properties
79
+ * 配列型のプロパティからSwaggerのプロパティを生成
80
+ * @param {Array.<string|number>} keys - Path to the properties, プロパティへのパス
81
+ * @returns {string} Swagger format property definition, Swagger形式のプロパティ定義
82
+ */
83
+ private makeSwaggerPropertyFromDictionary;
84
+ }
85
+ //# sourceMappingURL=ResponseType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseType.d.ts","sourceRoot":"","sources":["../../src/reqestResponse/ResponseType.ts"],"names":[],"mappings":"AAEA,OAAO,UAA4B,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,qBAAa,YAAa,SAAQ,UAAU;IAExC;;;OAGG;IACI,IAAI,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAM;IAEvC;;;;OAIG;IACH,IAAI,YAAY,IAAI;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAoCvC;IAED;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IA2CjB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAoCZ;;;;;GAKD;IACH,OAAO,CAAC,MAAM;IAqDd;;;;;OAKG;IACH,OAAO,CAAC,OAAO;IAef;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAmIhB;;;;;OAKG;IACI,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IA6EvE;;;;;;;OAOG;IACH,OAAO,CAAC,4BAA4B;IAqCpC;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;IAgChC;;;;;GAKD;IACH,OAAO,CAAC,iCAAiC;CAU5C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.129",
3
+ "version": "2.1.1",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -14,6 +14,12 @@
14
14
  "author": "Sho Nakadaira",
15
15
  "type": "commonjs",
16
16
  "main": "dist/index.js",
17
+ "types": "dist/index.d.ts",
18
+ "files": [
19
+ "dist/**/*",
20
+ "README.md",
21
+ "package.json"
22
+ ],
17
23
  "scripts": {
18
24
  "build": "rm -rf dist/* && tsc",
19
25
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -31,6 +37,7 @@
31
37
  "@types/express": "5.0.1",
32
38
  "axios": "1.10.0",
33
39
  "crypto": "1.0.1",
40
+ "hono": "4.11.2",
34
41
  "node-cron": "4.2.1",
35
42
  "pdf-lib": "1.17.1",
36
43
  "sharp": "0.34.1",