@chevre/domain 24.0.0-alpha.73 → 24.0.0-alpha.75

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 (86) hide show
  1. package/lib/chevre/credentials.js +3 -26
  2. package/lib/chevre/errorHandler.js +15 -38
  3. package/lib/chevre/eventEmitter.js +17 -7
  4. package/lib/chevre/index.d.ts +0 -2
  5. package/lib/chevre/index.js +17 -29
  6. package/lib/chevre/repo/aggregateOffer.js +3 -26
  7. package/lib/chevre/repo/event.js +17 -7
  8. package/lib/chevre/repo/eventSeries.js +1 -24
  9. package/lib/chevre/repo/offerCatalog.js +3 -26
  10. package/lib/chevre/repository.js +103 -126
  11. package/lib/chevre/service/accountTransaction.js +17 -7
  12. package/lib/chevre/service/aggregation.js +17 -7
  13. package/lib/chevre/service/assetTransaction/pay/check.js +17 -7
  14. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +17 -7
  15. package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.js +17 -7
  16. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.js +5 -5
  17. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.js +17 -7
  18. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.js +17 -7
  19. package/lib/chevre/service/assetTransaction/registerService/potentialActions.js +0 -1
  20. package/lib/chevre/service/assetTransaction/registerService.d.ts +3 -0
  21. package/lib/chevre/service/assetTransaction/registerService.js +19 -62
  22. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +52 -76
  23. package/lib/chevre/service/assetTransaction/reserve/start.js +18 -75
  24. package/lib/chevre/service/assetTransaction.d.ts +0 -2
  25. package/lib/chevre/service/assetTransaction.js +18 -17
  26. package/lib/chevre/service/notification/notifyByEmail.js +1 -1
  27. package/lib/chevre/service/notification/sendEmailMessage.js +1 -1
  28. package/lib/chevre/service/notification/triggerWebhook.js +22 -12
  29. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.js +17 -7
  30. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +2 -2
  31. package/lib/chevre/service/offer/product.js +17 -7
  32. package/lib/chevre/service/offer.js +17 -7
  33. package/lib/chevre/service/order/confirmPayTransaction.js +17 -7
  34. package/lib/chevre/service/payment/any/authorize.js +17 -7
  35. package/lib/chevre/service/payment/any/processVoidPayTransaction.js +17 -7
  36. package/lib/chevre/service/payment/any/publishPaymentUrl.js +17 -7
  37. package/lib/chevre/service/payment/creditCard/authorize/handleAuthorizeError.js +1 -1
  38. package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.js +1 -1
  39. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSync.js +4 -4
  40. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSyncCancel.js +1 -1
  41. package/lib/chevre/service/permit.js +17 -7
  42. package/lib/chevre/service/reserveCOA/cancelReservation.js +1 -1
  43. package/lib/chevre/service/task/aggregateScreeningEvent.js +17 -7
  44. package/lib/chevre/service/task/deletePerson.js +2 -25
  45. package/lib/chevre/service/task/deleteTransaction.js +17 -7
  46. package/lib/chevre/service/task/importEventCapacitiesFromCOA.js +17 -7
  47. package/lib/chevre/service/task/importEventsFromCOA.js +17 -7
  48. package/lib/chevre/service/task/importOffersFromCOA.js +17 -7
  49. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.js +17 -7
  50. package/lib/chevre/service/task/payment/payByTask.js +21 -11
  51. package/lib/chevre/service/task/payment/refundByTask.js +21 -11
  52. package/lib/chevre/service/task/payment/voidPaymentByTask.js +21 -11
  53. package/lib/chevre/service/task/returnPayTransaction.js +17 -7
  54. package/lib/chevre/service/task/returnReserveTransaction.js +17 -7
  55. package/lib/chevre/service/task.js +2 -25
  56. package/lib/chevre/service/taskHandler.js +3 -26
  57. package/lib/chevre/service/transaction/returnOrder/preStart/getReturnPolicyByProject.js +5 -5
  58. package/lib/chevre/service/transaction.js +17 -7
  59. package/lib/chevre/service.d.ts +0 -4
  60. package/lib/chevre/service.js +33 -43
  61. package/lib/index.js +17 -7
  62. package/package.json +9 -14
  63. package/lib/chevre/pecorinoapi.d.ts +0 -5
  64. package/lib/chevre/pecorinoapi.js +0 -9
  65. package/lib/chevre/service/assetTransaction/moneyTransfer/potentialActions.d.ts +0 -7
  66. package/lib/chevre/service/assetTransaction/moneyTransfer/potentialActions.js +0 -104
  67. package/lib/chevre/service/assetTransaction/moneyTransfer.d.ts +0 -51
  68. package/lib/chevre/service/assetTransaction/moneyTransfer.js +0 -434
  69. package/lib/chevre/service/assetTransaction/pay/start/account/validation.d.ts +0 -8
  70. package/lib/chevre/service/assetTransaction/pay/start/account/validation.js +0 -43
  71. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeAccount.d.ts +0 -13
  72. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeAccount.js +0 -62
  73. package/lib/chevre/service/delivery.d.ts +0 -27
  74. package/lib/chevre/service/delivery.js +0 -305
  75. package/lib/chevre/service/moneyTransfer.d.ts +0 -76
  76. package/lib/chevre/service/moneyTransfer.js +0 -659
  77. package/lib/chevre/service/payment/paymentCard.d.ts +0 -42
  78. package/lib/chevre/service/payment/paymentCard.js +0 -442
  79. package/lib/chevre/service/task/cancelMoneyTransfer.d.ts +0 -6
  80. package/lib/chevre/service/task/cancelMoneyTransfer.js +0 -19
  81. package/lib/chevre/service/task/givePointAward.d.ts +0 -6
  82. package/lib/chevre/service/task/givePointAward.js +0 -55
  83. package/lib/chevre/service/task/moneyTransfer.d.ts +0 -6
  84. package/lib/chevre/service/task/moneyTransfer.js +0 -49
  85. package/lib/chevre/service/task/returnPointAward.d.ts +0 -6
  86. package/lib/chevre/service/task/returnPointAward.js +0 -55
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.credentials = void 0;
27
4
  /**
@@ -34,7 +11,7 @@ var credentials;
34
11
  let cred;
35
12
  async function createInstance(...params) {
36
13
  if (cred === undefined) {
37
- cred = (await Promise.resolve().then(() => __importStar(require('./credentials/customSearch')))).CustomSearchCredentials;
14
+ cred = (await import('./credentials/customSearch.js')).CustomSearchCredentials;
38
15
  }
39
16
  return new cred(...params);
40
17
  }
@@ -45,7 +22,7 @@ var credentials;
45
22
  let cred;
46
23
  async function createInstance(...params) {
47
24
  if (cred === undefined) {
48
- cred = (await Promise.resolve().then(() => __importStar(require('./credentials/lineNotify')))).LINENotifyCredentials;
25
+ cred = (await import('./credentials/lineNotify.js')).LINENotifyCredentials;
49
26
  }
50
27
  return new cred(...params);
51
28
  }
@@ -56,7 +33,7 @@ var credentials;
56
33
  let cred;
57
34
  async function createInstance(...params) {
58
35
  if (cred === undefined) {
59
- cred = (await Promise.resolve().then(() => __importStar(require('./credentials/sendGrid')))).SendGridCredentials;
36
+ cred = (await import('./credentials/sendGrid.js')).SendGridCredentials;
60
37
  }
61
38
  return new cred(...params);
62
39
  }
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.MOVIE_TICKET_RESERVE_REQUEST_ERROR_NAME = exports.MongoErrorCode = void 0;
27
4
  exports.isMongoError = isMongoError;
@@ -51,16 +28,16 @@ var MongoErrorCode;
51
28
  })(MongoErrorCode || (exports.MongoErrorCode = MongoErrorCode = {}));
52
29
  async function isMongoError(error) {
53
30
  if (mongo === undefined) {
54
- mongo = (await Promise.resolve().then(() => __importStar(require('mongoose')))).mongo;
31
+ mongo = (await import('mongoose')).mongo;
55
32
  }
56
33
  return (error instanceof mongo.MongoError || error instanceof mongo.MongoServerError);
57
34
  }
58
35
  async function handleMongoError(error) {
59
36
  if (mongo === undefined) {
60
- mongo = (await Promise.resolve().then(() => __importStar(require('mongoose')))).mongo;
37
+ mongo = (await import('mongoose')).mongo;
61
38
  }
62
39
  if (mongooseError === undefined) {
63
- mongooseError = (await Promise.resolve().then(() => __importStar(require('mongoose')))).Error;
40
+ mongooseError = (await import('mongoose')).Error;
64
41
  }
65
42
  let handledError = error;
66
43
  if (handledError instanceof mongo.MongoError || handledError instanceof mongo.MongoServerError) {
@@ -124,7 +101,7 @@ function handleCOAReserveTemporarilyError(error) {
124
101
  // Chevreが500未満であればクライアントエラーとみなす
125
102
  const reserveServiceHttpStatusCode = error.code;
126
103
  if (Number.isInteger(reserveServiceHttpStatusCode)) {
127
- if (reserveServiceHttpStatusCode < http_status_1.INTERNAL_SERVER_ERROR) {
104
+ if (reserveServiceHttpStatusCode < http_status_1.status.INTERNAL_SERVER_ERROR) {
128
105
  handledError = new factory_1.factory.errors.Argument('Event', error.message);
129
106
  }
130
107
  else {
@@ -150,19 +127,19 @@ function handlePecorinoError(error) {
150
127
  // PecorinoAPIのレスポンスステータスコードが4xxであればクライアントエラー
151
128
  const message = `${error.name}:${error.message}`;
152
129
  switch (error.code) {
153
- case http_status_1.BAD_REQUEST: // 400
130
+ case http_status_1.status.BAD_REQUEST: // 400
154
131
  handledError = new factory_1.factory.errors.Argument((typeof error.argumentName === 'string' && error.argumentName.length > 0) ? error.argumentName : 'PecorinoArgument', message);
155
132
  break;
156
- case http_status_1.UNAUTHORIZED: // 401
133
+ case http_status_1.status.UNAUTHORIZED: // 401
157
134
  handledError = new factory_1.factory.errors.Unauthorized(message);
158
135
  break;
159
- case http_status_1.FORBIDDEN: // 403
136
+ case http_status_1.status.FORBIDDEN: // 403
160
137
  handledError = new factory_1.factory.errors.Forbidden(message);
161
138
  break;
162
- case http_status_1.NOT_FOUND: // 404
139
+ case http_status_1.status.NOT_FOUND: // 404
163
140
  handledError = new factory_1.factory.errors.NotFound(message);
164
141
  break;
165
- case http_status_1.TOO_MANY_REQUESTS: // 429
142
+ case http_status_1.status.TOO_MANY_REQUESTS: // 429
166
143
  handledError = new factory_1.factory.errors.RateLimitExceeded(message);
167
144
  break;
168
145
  default:
@@ -183,23 +160,23 @@ function handleMvtkReserveError(error) {
183
160
  // ムビチケAPIのレスポンスステータスコードが4xxであればクライアントエラー
184
161
  const message = `${error.name}:${error.message}`;
185
162
  switch (error.code) {
186
- case http_status_1.BAD_REQUEST: // 400
163
+ case http_status_1.status.BAD_REQUEST: // 400
187
164
  handledError = new factory_1.factory.errors.Argument((typeof error.argumentName === 'string' && error.argumentName.length > 0) ? error.argumentName : 'MovieticketReserveArgument', message);
188
165
  break;
189
- case http_status_1.UNAUTHORIZED: // 401
166
+ case http_status_1.status.UNAUTHORIZED: // 401
190
167
  handledError = new factory_1.factory.errors.Unauthorized(message);
191
168
  break;
192
- case http_status_1.FORBIDDEN: // 403
169
+ case http_status_1.status.FORBIDDEN: // 403
193
170
  handledError = new factory_1.factory.errors.Forbidden(message);
194
171
  break;
195
- case http_status_1.NOT_FOUND: // 404
172
+ case http_status_1.status.NOT_FOUND: // 404
196
173
  handledError = new factory_1.factory.errors.NotFound(message);
197
174
  break;
198
- case http_status_1.TOO_MANY_REQUESTS: // 429
175
+ case http_status_1.status.TOO_MANY_REQUESTS: // 429
199
176
  handledError = new factory_1.factory.errors.RateLimitExceeded(message);
200
177
  break;
201
178
  // handle 504(2025-04-25~)
202
- case http_status_1.GATEWAY_TIMEOUT: // 504
179
+ case http_status_1.status.GATEWAY_TIMEOUT: // 504
203
180
  handledError = new factory_1.factory.errors.GatewayTimeout(message);
204
181
  break;
205
182
  default:
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.transaction = exports.task = exports.assetTransaction = void 0;
27
37
  const assetTransaction_1 = require("./eventEmitter/assetTransaction");
@@ -1,4 +1,3 @@
1
- import type * as Pecorinoapi from './pecorinoapi';
2
1
  import { credentials } from './credentials';
3
2
  import * as errorHandler from './errorHandler';
4
3
  import * as eventEmitter from './eventEmitter';
@@ -8,4 +7,3 @@ import * as service from './service';
8
7
  import * as settings from './settings';
9
8
  import * as taskSettings from './taskSettings';
10
9
  export { credentials, errorHandler, eventEmitter, factory, repository, service, settings, taskSettings };
11
- export declare function loadPecorinoapi(): Promise<typeof Pecorinoapi>;
@@ -15,16 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.taskSettings = exports.settings = exports.service = exports.repository = exports.factory = exports.eventEmitter = exports.errorHandler = exports.credentials = void 0;
27
- exports.loadPecorinoapi = loadPecorinoapi;
28
37
  const credentials_1 = require("./credentials");
29
38
  Object.defineProperty(exports, "credentials", { enumerable: true, get: function () { return credentials_1.credentials; } });
30
39
  const errorHandler = __importStar(require("./errorHandler"));
@@ -41,24 +50,3 @@ const settings = __importStar(require("./settings"));
41
50
  exports.settings = settings;
42
51
  const taskSettings = __importStar(require("./taskSettings"));
43
52
  exports.taskSettings = taskSettings;
44
- let pecorinoapi;
45
- async function loadPecorinoapi() {
46
- if (pecorinoapi === undefined) {
47
- pecorinoapi = await Promise.resolve().then(() => __importStar(require('./pecorinoapi')));
48
- }
49
- return pecorinoapi;
50
- }
51
- // let cachedCOA: typeof COA | undefined;
52
- // export async function loadCOA(): Promise<typeof COA> {
53
- // if (cachedCOA === undefined) {
54
- // cachedCOA = (await import('@motionpicture/coa-service')).COA;
55
- // }
56
- // return cachedCOA;
57
- // }
58
- // let cachedGMO: typeof GMO | undefined;
59
- // export async function loadGMO(): Promise<typeof GMO> {
60
- // if (cachedGMO === undefined) {
61
- // cachedGMO = (await import('@motionpicture/gmo-service')).GMO;
62
- // }
63
- // return cachedGMO;
64
- // }
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
@@ -573,7 +550,7 @@ class AggregateOfferRepo {
573
550
  const { ...paramsWithoutUnset } = params;
574
551
  // let savedUnitPriceOffer: factory.unitPriceOffer.IUnitPriceOffer;
575
552
  if (typeof params.id !== 'string' || params.id.length === 0) {
576
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
553
+ const { default: uniqid } = await import('uniqid');
577
554
  const newId = uniqid();
578
555
  aggregateOfferId = newId;
579
556
  // サブオファー最適化(2023-12-22~)
@@ -651,7 +628,7 @@ class AggregateOfferRepo {
651
628
  */
652
629
  async upsertByIdentifier(params, options) {
653
630
  const { productType } = options;
654
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
631
+ const { default: uniqid } = await import('uniqid');
655
632
  const insertBulkWriteOps = [];
656
633
  // const updateBulkWriteOps: AnyBulkWriteOperation<factory.aggregateOffer.IAggregateOffer>[] = [];
657
634
  const queryFilters = [];
@@ -713,7 +690,7 @@ class AggregateOfferRepo {
713
690
  * sskts専用オファー保管
714
691
  */
715
692
  async saveManyByIdentifier4sskts(params) {
716
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
693
+ const { default: uniqid } = await import('uniqid');
717
694
  const insertBulkWriteOps = [];
718
695
  // const updateBulkWriteOps: AnyBulkWriteOperation[] = [];
719
696
  if (Array.isArray(params)) {
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.EventRepo = void 0;
27
37
  const mongoose_1 = require("mongoose");
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.EventSeriesRepo = void 0;
27
4
  const factory_1 = require("../factory");
@@ -302,7 +279,7 @@ class EventSeriesRepo {
302
279
  */
303
280
  async upsertByVersion(params, options) {
304
281
  const { upsert } = options;
305
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
282
+ const { default: uniqid } = await import('uniqid');
306
283
  const bulkWriteOps = [];
307
284
  const queryFilters = [];
308
285
  if (Array.isArray(params)) {
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.OfferCatalogRepo = void 0;
27
4
  const factory_1 = require("../factory");
@@ -151,7 +128,7 @@ class OfferCatalogRepo {
151
128
  let savedId;
152
129
  let doc;
153
130
  if (typeof params.id !== 'string' || params.id === '') {
154
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
131
+ const { default: uniqid } = await import('uniqid');
155
132
  const newId = uniqid();
156
133
  const { id, $unset, ...creatingDoc } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
157
134
  doc = await this.offerCatalogModel.create({ ...creatingDoc, _id: newId });
@@ -176,7 +153,7 @@ class OfferCatalogRepo {
176
153
  * プロジェクトとコードから冪等保管
177
154
  */
178
155
  async saveByIdentifier(params) {
179
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
156
+ const { default: uniqid } = await import('uniqid');
180
157
  const newId = uniqid();
181
158
  const { id, identifier, itemOffered, project, typeOf, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
182
159
  const doc = await this.offerCatalogModel.findOneAndUpdate({
@@ -199,7 +176,7 @@ class OfferCatalogRepo {
199
176
  */
200
177
  async upsertManyByIdentifier(params, options) {
201
178
  const { itemListElementType, productType, update } = options;
202
- const { default: uniqid } = await Promise.resolve().then(() => __importStar(require('uniqid')));
179
+ const { default: uniqid } = await import('uniqid');
203
180
  const bulkWriteOps = [];
204
181
  const queryFilters = [];
205
182
  if (Array.isArray(params)) {