@chevre/domain 21.0.0-alpha.5 → 21.0.0-alpha.7

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 (38) hide show
  1. package/lib/chevre/index.d.ts +1 -2
  2. package/lib/chevre/index.js +1 -3
  3. package/lib/chevre/repo/mongoose/model/account.js +2 -12
  4. package/lib/chevre/repo/mongoose/model/accountTitle.js +2 -27
  5. package/lib/chevre/repo/mongoose/model/accountTransaction.js +2 -12
  6. package/lib/chevre/repo/mongoose/model/accountingReport.js +2 -12
  7. package/lib/chevre/repo/mongoose/model/action.js +2 -12
  8. package/lib/chevre/repo/mongoose/model/additionalProperty.js +2 -12
  9. package/lib/chevre/repo/mongoose/model/aggregation.js +2 -12
  10. package/lib/chevre/repo/mongoose/model/assetTransaction.d.ts +1 -1
  11. package/lib/chevre/repo/mongoose/model/assetTransaction.js +2 -12
  12. package/lib/chevre/repo/mongoose/model/authorization.js +2 -12
  13. package/lib/chevre/repo/mongoose/model/categoryCode.js +2 -12
  14. package/lib/chevre/repo/mongoose/model/comments.js +2 -12
  15. package/lib/chevre/repo/mongoose/model/creativeWork.js +2 -12
  16. package/lib/chevre/repo/mongoose/model/customer.js +2 -12
  17. package/lib/chevre/repo/mongoose/model/emailMessages.js +2 -12
  18. package/lib/chevre/repo/mongoose/model/event.js +2 -12
  19. package/lib/chevre/repo/mongoose/model/member.js +2 -12
  20. package/lib/chevre/repo/mongoose/model/merchantReturnPolicy.js +2 -12
  21. package/lib/chevre/repo/mongoose/model/offer.js +2 -12
  22. package/lib/chevre/repo/mongoose/model/offerCatalog.js +2 -12
  23. package/lib/chevre/repo/mongoose/model/order.js +2 -12
  24. package/lib/chevre/repo/mongoose/model/ownershipInfo.js +2 -12
  25. package/lib/chevre/repo/mongoose/model/place.js +2 -12
  26. package/lib/chevre/repo/mongoose/model/priceSpecification.js +2 -12
  27. package/lib/chevre/repo/mongoose/model/product.js +2 -12
  28. package/lib/chevre/repo/mongoose/model/project.js +2 -12
  29. package/lib/chevre/repo/mongoose/model/reservation.js +2 -12
  30. package/lib/chevre/repo/mongoose/model/role.js +2 -12
  31. package/lib/chevre/repo/mongoose/model/seller.js +2 -12
  32. package/lib/chevre/repo/mongoose/model/serviceOutput.js +2 -12
  33. package/lib/chevre/repo/mongoose/model/task.js +2 -12
  34. package/lib/chevre/repo/mongoose/model/telemetry.js +2 -12
  35. package/lib/chevre/repo/mongoose/model/transaction.d.ts +1 -1
  36. package/lib/chevre/repo/mongoose/model/transaction.js +2 -2
  37. package/lib/chevre/repo/mongoose/model/trip.js +2 -12
  38. package/package.json +3 -2
@@ -4,7 +4,6 @@
4
4
  import * as COA from '@motionpicture/coa-service';
5
5
  import * as GMO from '@motionpicture/gmo-service';
6
6
  import * as surfrock from '@surfrock/sdk';
7
- import * as AWS from 'aws-sdk';
8
7
  import { credentials } from './credentials';
9
8
  import * as errorHandler from './errorHandler';
10
9
  import * as factory from './factory';
@@ -12,4 +11,4 @@ import * as pecorinoapi from './pecorinoapi';
12
11
  import * as repository from './repository';
13
12
  import * as service from './service';
14
13
  import { settings } from './settings';
15
- export { credentials, errorHandler, factory, repository, service, settings, surfrock, pecorinoapi, AWS, COA, GMO };
14
+ export { credentials, errorHandler, factory, repository, service, settings, surfrock, pecorinoapi, COA, GMO };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GMO = exports.COA = exports.AWS = exports.pecorinoapi = exports.surfrock = exports.settings = exports.service = exports.repository = exports.factory = exports.errorHandler = exports.credentials = void 0;
3
+ exports.GMO = exports.COA = exports.pecorinoapi = exports.surfrock = exports.settings = exports.service = exports.repository = exports.factory = exports.errorHandler = exports.credentials = void 0;
4
4
  /**
5
5
  * index module
6
6
  */
@@ -10,8 +10,6 @@ const GMO = require("@motionpicture/gmo-service");
10
10
  exports.GMO = GMO;
11
11
  const surfrock = require("@surfrock/sdk");
12
12
  exports.surfrock = surfrock;
13
- const AWS = require("aws-sdk");
14
- exports.AWS = AWS;
15
13
  const credentials_1 = require("./credentials");
16
14
  Object.defineProperty(exports, "credentials", { enumerable: true, get: function () { return credentials_1.credentials; } });
17
15
  const errorHandler = require("./errorHandler");
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Account';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 口座スキーマ
10
10
  */
@@ -12,7 +12,7 @@ const schema = new mongoose_1.Schema({}, {
12
12
  collection: 'accounts',
13
13
  id: true,
14
14
  read: 'primaryPreferred',
15
- writeConcern: writeConcern,
15
+ writeConcern: writeConcern_1.writeConcern,
16
16
  strict: false,
17
17
  useNestedStrict: true,
18
18
  timestamps: {
@@ -58,13 +58,3 @@ schema.index({ name: 1, openDate: -1 }, { name: 'searchByName-v2' });
58
58
  schema.index({ openDate: -1 }, { name: 'searchByOpenDate-v2' });
59
59
  schema.index({ status: 1, openDate: -1 }, { name: 'searchByStatus-v2' });
60
60
  schema.index({ accountType: 1, accountNumber: 1, status: 1 }, { name: 'authorizeAmount' });
61
- (0, mongoose_1.model)(modelName, schema)
62
- .on('index',
63
- // tslint:disable-next-line:no-single-line-block-comment
64
- /* istanbul ignore next */
65
- (error) => {
66
- if (error !== undefined) {
67
- // tslint:disable-next-line:no-console
68
- console.error(error);
69
- }
70
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'AccountTitle';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 勘定科目スキーマ
10
10
  */
@@ -27,7 +27,7 @@ const schema = new mongoose_1.Schema({
27
27
  collection: 'accountTitles',
28
28
  id: true,
29
29
  read: 'primaryPreferred',
30
- writeConcern: writeConcern,
30
+ writeConcern: writeConcern_1.writeConcern,
31
31
  timestamps: {
32
32
  createdAt: 'createdAt',
33
33
  updatedAt: 'updatedAt'
@@ -83,28 +83,3 @@ schema.index({ 'project.id': 1, 'hasCategoryCode.codeValue': 1 }, {
83
83
  'hasCategoryCode.codeValue': { $exists: true }
84
84
  }
85
85
  });
86
- // 'hasCategoryCode.hasCategoryCode.codeValue': null のインデックスは作成されてうまくいかないので保留
87
- // schema.index(
88
- // {
89
- // 'project.id': 1,
90
- // 'hasCategoryCode.hasCategoryCode.codeValue': 1
91
- // },
92
- // {
93
- // name: 'uniqueHasCategoryCodeHasCategoryCodeCodeValue',
94
- // unique: true,
95
- // partialFilterExpression: {
96
- // 'project.id': { $exists: true },
97
- // 'hasCategoryCode.hasCategoryCode.codeValue': { $exists: true }
98
- // }
99
- // }
100
- // );
101
- (0, mongoose_1.model)(modelName, schema)
102
- .on('index',
103
- // tslint:disable-next-line:no-single-line-block-comment
104
- /* istanbul ignore next */
105
- (error) => {
106
- if (error !== undefined) {
107
- // tslint:disable-next-line:no-console
108
- console.error(error);
109
- }
110
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'AccountTransaction';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 口座取引スキーマ
10
10
  */
@@ -34,7 +34,7 @@ const schema = new mongoose_1.Schema({
34
34
  collection: 'accountTransactions',
35
35
  id: true,
36
36
  read: 'primaryPreferred',
37
- writeConcern: writeConcern,
37
+ writeConcern: writeConcern_1.writeConcern,
38
38
  strict: true,
39
39
  useNestedStrict: true,
40
40
  timestamps: {
@@ -109,13 +109,3 @@ schema.index({ tasksExportationStatus: 1, updatedAt: 1 }, {
109
109
  schema.index({ status: 1, expires: 1 }, {
110
110
  name: 'makeExpired'
111
111
  });
112
- (0, mongoose_1.model)(modelName, schema)
113
- .on('index',
114
- // tslint:disable-next-line:no-single-line-block-comment
115
- /* istanbul ignore next */
116
- (error) => {
117
- if (error !== undefined) {
118
- // tslint:disable-next-line:no-console
119
- console.error(error);
120
- }
121
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'AccountingReport';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 経理レポートスキーマ
10
10
  */
@@ -16,7 +16,7 @@ const schema = new mongoose_1.Schema({
16
16
  collection: 'accountingReports',
17
17
  id: true,
18
18
  read: 'primaryPreferred',
19
- writeConcern: writeConcern,
19
+ writeConcern: writeConcern_1.writeConcern,
20
20
  strict: false,
21
21
  useNestedStrict: true,
22
22
  timestamps: {
@@ -92,13 +92,3 @@ schema.index({ 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate':
92
92
  'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': { $exists: true }
93
93
  }
94
94
  });
95
- (0, mongoose_1.model)(modelName, schema)
96
- .on('index',
97
- // tslint:disable-next-line:no-single-line-block-comment
98
- /* istanbul ignore next */
99
- (error) => {
100
- if (error !== undefined) {
101
- // tslint:disable-next-line:no-console
102
- console.error(error);
103
- }
104
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Action';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * アクションスキーマ
10
10
  */
@@ -32,7 +32,7 @@ const schema = new mongoose_1.Schema({
32
32
  collection: 'actions',
33
33
  id: true,
34
34
  read: 'primaryPreferred',
35
- writeConcern: writeConcern,
35
+ writeConcern: writeConcern_1.writeConcern,
36
36
  // true化(2022-11-12~)
37
37
  strict: true,
38
38
  useNestedStrict: true,
@@ -242,13 +242,3 @@ schema.index({ 'toLocation.accountType': 1, startDate: -1 }, {
242
242
  'toLocation.accountType': { $exists: true }
243
243
  }
244
244
  });
245
- (0, mongoose_1.model)(modelName, schema)
246
- .on('index',
247
- // tslint:disable-next-line:no-single-line-block-comment
248
- /* istanbul ignore next */
249
- (error) => {
250
- if (error !== undefined) {
251
- // tslint:disable-next-line:no-console
252
- console.error(error);
253
- }
254
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'AdditionalProperty';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 追加特性スキーマ
10
10
  */
@@ -24,7 +24,7 @@ const schema = new mongoose_1.Schema({
24
24
  collection: 'additionalProperties',
25
25
  id: true,
26
26
  read: 'primaryPreferred',
27
- writeConcern: writeConcern,
27
+ writeConcern: writeConcern_1.writeConcern,
28
28
  strict: true,
29
29
  useNestedStrict: true,
30
30
  timestamps: {
@@ -69,13 +69,3 @@ schema.index({ 'name.en': 1, codeValue: 1 }, {
69
69
  'name.en': { $exists: true }
70
70
  }
71
71
  });
72
- (0, mongoose_1.model)(modelName, schema)
73
- .on('index',
74
- // tslint:disable-next-line:no-single-line-block-comment
75
- /* istanbul ignore next */
76
- (error) => {
77
- if (error !== undefined) {
78
- // tslint:disable-next-line:no-console
79
- console.error(error);
80
- }
81
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Aggregation';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 集計スキーマ
10
10
  */
@@ -12,7 +12,7 @@ const schema = new mongoose_1.Schema({}, {
12
12
  collection: 'aggregations',
13
13
  id: true,
14
14
  read: 'primaryPreferred',
15
- writeConcern: writeConcern,
15
+ writeConcern: writeConcern_1.writeConcern,
16
16
  strict: false,
17
17
  useNestedStrict: true,
18
18
  timestamps: {
@@ -35,13 +35,3 @@ const schema = new mongoose_1.Schema({}, {
35
35
  exports.schema = schema;
36
36
  schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
37
37
  schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
38
- (0, mongoose_1.model)(modelName, schema)
39
- .on('index',
40
- // tslint:disable-next-line:no-single-line-block-comment
41
- /* istanbul ignore next */
42
- (error) => {
43
- if (error !== undefined) {
44
- // tslint:disable-next-line:no-console
45
- console.error(error);
46
- }
47
- });
@@ -54,8 +54,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
54
54
  object?: any;
55
55
  typeOf?: string | undefined;
56
56
  status?: string | undefined;
57
- expires?: Date | undefined;
58
57
  error?: any;
58
+ expires?: Date | undefined;
59
59
  project?: any;
60
60
  agent?: any;
61
61
  recipient?: any;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'AssetTransaction';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 資産取引スキーマ
10
10
  */
@@ -31,7 +31,7 @@ const schema = new mongoose_1.Schema({
31
31
  collection: 'assetTransactions',
32
32
  id: true,
33
33
  read: 'primaryPreferred',
34
- writeConcern: writeConcern,
34
+ writeConcern: writeConcern_1.writeConcern,
35
35
  strict: true,
36
36
  useNestedStrict: true,
37
37
  timestamps: {
@@ -172,13 +172,3 @@ schema.index({ 'object.itemOffered.serviceOutput.identifier': 1, startDate: -1 }
172
172
  schema.index({ typeOf: 1, status: 1, tasksExportationStatus: 1 }, { name: 'startExportTasks' });
173
173
  schema.index({ tasksExportationStatus: 1, updatedAt: 1 }, { name: 'reexportTasks' });
174
174
  schema.index({ status: 1, expires: 1 }, { name: 'makeExpired' });
175
- (0, mongoose_1.model)(modelName, schema)
176
- .on('index',
177
- // tslint:disable-next-line:no-single-line-block-comment
178
- /* istanbul ignore next */
179
- (error) => {
180
- if (error !== undefined) {
181
- // tslint:disable-next-line:no-console
182
- console.error(error);
183
- }
184
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Authorization';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 認可スキーマ
10
10
  */
@@ -19,7 +19,7 @@ const schema = new mongoose_1.Schema({
19
19
  collection: 'authorizations',
20
20
  id: true,
21
21
  read: 'primaryPreferred',
22
- writeConcern: writeConcern,
22
+ writeConcern: writeConcern_1.writeConcern,
23
23
  strict: true,
24
24
  useNestedStrict: true,
25
25
  timestamps: {
@@ -93,13 +93,3 @@ schema.index({ 'object.typeOfGood.id': 1, validFrom: 1 }, {
93
93
  'object.typeOfGood.id': { $exists: true }
94
94
  }
95
95
  });
96
- (0, mongoose_1.model)(modelName, schema)
97
- .on('index',
98
- // tslint:disable-next-line:no-single-line-block-comment
99
- /* istanbul ignore next */
100
- (error) => {
101
- if (error !== undefined) {
102
- // tslint:disable-next-line:no-console
103
- console.error(error);
104
- }
105
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'CategoryCode';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * カテゴリーコードスキーマ
10
10
  */
@@ -28,7 +28,7 @@ const schema = new mongoose_1.Schema({
28
28
  collection: 'categoryCodes',
29
29
  id: true,
30
30
  read: 'primaryPreferred',
31
- writeConcern: writeConcern,
31
+ writeConcern: writeConcern_1.writeConcern,
32
32
  strict: true,
33
33
  useNestedStrict: true,
34
34
  timestamps: {
@@ -87,13 +87,3 @@ schema.index({ additionalProperty: 1, codeValue: 1 }, {
87
87
  additionalProperty: { $exists: true }
88
88
  }
89
89
  });
90
- (0, mongoose_1.model)(modelName, schema)
91
- .on('index',
92
- // tslint:disable-next-line:no-single-line-block-comment
93
- /* istanbul ignore next */
94
- (error) => {
95
- if (error !== undefined) {
96
- // tslint:disable-next-line:no-console
97
- console.error(error);
98
- }
99
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Comment';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * コメントスキーマ
10
10
  */
@@ -30,7 +30,7 @@ const schema = new mongoose_1.Schema({
30
30
  collection: 'comments',
31
31
  id: true,
32
32
  read: 'primaryPreferred',
33
- writeConcern: writeConcern,
33
+ writeConcern: writeConcern_1.writeConcern,
34
34
  strict: true,
35
35
  useNestedStrict: true,
36
36
  timestamps: {
@@ -71,13 +71,3 @@ schema.index({ additionalProperty: 1, dateCreated: 1 }, {
71
71
  additionalProperty: { $exists: true }
72
72
  }
73
73
  });
74
- (0, mongoose_1.model)(modelName, schema)
75
- .on('index',
76
- // tslint:disable-next-line:no-single-line-block-comment
77
- /* istanbul ignore next */
78
- (error) => {
79
- if (error !== undefined) {
80
- // tslint:disable-next-line:no-console
81
- console.error(error);
82
- }
83
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'CreativeWork';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 作品スキーマ
10
10
  */
@@ -34,7 +34,7 @@ const schema = new mongoose_1.Schema({
34
34
  collection: 'creativeWorks',
35
35
  id: true,
36
36
  read: 'primaryPreferred',
37
- writeConcern: writeConcern,
37
+ writeConcern: writeConcern_1.writeConcern,
38
38
  strict: true,
39
39
  useNestedStrict: true,
40
40
  timestamps: {
@@ -117,13 +117,3 @@ schema.index({ additionalProperty: 1, identifier: 1 }, {
117
117
  additionalProperty: { $exists: true }
118
118
  }
119
119
  });
120
- (0, mongoose_1.model)(modelName, schema)
121
- .on('index',
122
- // tslint:disable-next-line:no-single-line-block-comment
123
- /* istanbul ignore next */
124
- (error) => {
125
- if (error !== undefined) {
126
- // tslint:disable-next-line:no-console
127
- console.error(error);
128
- }
129
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Customer';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 顧客スキーマ
10
10
  */
@@ -25,7 +25,7 @@ const schema = new mongoose_1.Schema({
25
25
  collection: 'customers',
26
26
  id: true,
27
27
  read: 'primaryPreferred',
28
- writeConcern: writeConcern,
28
+ writeConcern: writeConcern_1.writeConcern,
29
29
  strict: true,
30
30
  useNestedStrict: true,
31
31
  timestamps: {
@@ -64,13 +64,3 @@ schema.index({ 'name.en': 1, branchCode: 1 }, {
64
64
  'name.en': { $exists: true }
65
65
  }
66
66
  });
67
- (0, mongoose_1.model)(modelName, schema)
68
- .on('index',
69
- // tslint:disable-next-line:no-single-line-block-comment
70
- /* istanbul ignore next */
71
- (error) => {
72
- if (error !== undefined) {
73
- // tslint:disable-next-line:no-console
74
- console.error(error);
75
- }
76
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'EmailMessage';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * Eメールメッセージスキーマ
10
10
  */
@@ -23,7 +23,7 @@ const schema = new mongoose_1.Schema({
23
23
  collection: 'emailMessages',
24
24
  id: true,
25
25
  read: 'primaryPreferred',
26
- writeConcern: writeConcern,
26
+ writeConcern: writeConcern_1.writeConcern,
27
27
  strict: true,
28
28
  useNestedStrict: true,
29
29
  timestamps: {
@@ -52,13 +52,3 @@ schema.index({ identifier: 1 }, {
52
52
  schema.index({ 'project.id': 1, identifier: 1 }, {
53
53
  name: 'searchByProjectId'
54
54
  });
55
- (0, mongoose_1.model)(modelName, schema)
56
- .on('index',
57
- // tslint:disable-next-line:no-single-line-block-comment
58
- /* istanbul ignore next */
59
- (error) => {
60
- if (error !== undefined) {
61
- // tslint:disable-next-line:no-console
62
- console.error(error);
63
- }
64
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Event';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * イベント(公演など)スキーマ
10
10
  */
@@ -50,7 +50,7 @@ const schema = new mongoose_1.Schema({
50
50
  collection: 'events',
51
51
  id: true,
52
52
  read: 'primaryPreferred',
53
- writeConcern: writeConcern,
53
+ writeConcern: writeConcern_1.writeConcern,
54
54
  strict: true,
55
55
  useNestedStrict: true,
56
56
  timestamps: {
@@ -228,13 +228,3 @@ schema.index({ additionalProperty: 1, startDate: 1 }, {
228
228
  additionalProperty: { $exists: true }
229
229
  }
230
230
  });
231
- (0, mongoose_1.model)(modelName, schema)
232
- .on('index',
233
- // tslint:disable-next-line:no-single-line-block-comment
234
- /* istanbul ignore next */
235
- (error) => {
236
- if (error !== undefined) {
237
- // tslint:disable-next-line:no-console
238
- console.error(error);
239
- }
240
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Member';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * プロジェクトメンバースキーマ
10
10
  */
@@ -19,7 +19,7 @@ const schema = new mongoose_1.Schema({
19
19
  collection: 'members',
20
20
  id: true,
21
21
  read: 'primaryPreferred',
22
- writeConcern: writeConcern,
22
+ writeConcern: writeConcern_1.writeConcern,
23
23
  strict: true,
24
24
  useNestedStrict: true,
25
25
  timestamps: {
@@ -61,13 +61,3 @@ schema.index({ 'member.hasRole.roleName': 1, 'member.id': 1 }, {
61
61
  'member.hasRole.roleName': { $exists: true }
62
62
  }
63
63
  });
64
- (0, mongoose_1.model)(modelName, schema)
65
- .on('index',
66
- // tslint:disable-next-line:no-single-line-block-comment
67
- /* istanbul ignore next */
68
- (error) => {
69
- if (error !== undefined) {
70
- // tslint:disable-next-line:no-console
71
- console.error(error);
72
- }
73
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'MerchantReturnPolicy';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 返品ポリシースキーマ
10
10
  */
@@ -23,7 +23,7 @@ const schema = new mongoose_1.Schema({
23
23
  collection: 'merchantReturnPolicies',
24
24
  id: true,
25
25
  read: 'primaryPreferred',
26
- writeConcern: writeConcern,
26
+ writeConcern: writeConcern_1.writeConcern,
27
27
  strict: true,
28
28
  useNestedStrict: true,
29
29
  timestamps: {
@@ -46,13 +46,3 @@ const schema = new mongoose_1.Schema({
46
46
  exports.schema = schema;
47
47
  schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
48
48
  schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
49
- (0, mongoose_1.model)(modelName, schema)
50
- .on('index',
51
- // tslint:disable-next-line:no-single-line-block-comment
52
- /* istanbul ignore next */
53
- (error) => {
54
- if (error !== undefined) {
55
- // tslint:disable-next-line:no-console
56
- console.error(error);
57
- }
58
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Offer';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * オファースキーマ
10
10
  */
@@ -48,7 +48,7 @@ const schema = new mongoose_1.Schema({
48
48
  collection: 'offers',
49
49
  id: true,
50
50
  read: 'primaryPreferred',
51
- writeConcern: writeConcern,
51
+ writeConcern: writeConcern_1.writeConcern,
52
52
  // trueに変更(2022-08-08~)
53
53
  strict: true,
54
54
  timestamps: {
@@ -206,13 +206,3 @@ schema.index({ validThrough: 1, 'priceSpecification.price': 1 }, {
206
206
  validThrough: { $exists: true }
207
207
  }
208
208
  });
209
- (0, mongoose_1.model)(modelName, schema)
210
- .on('index',
211
- // tslint:disable-next-line:no-single-line-block-comment
212
- /* istanbul ignore next */
213
- (error) => {
214
- if (error !== undefined) {
215
- // tslint:disable-next-line:no-console
216
- console.error(error);
217
- }
218
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'OfferCatalog';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * オファーカタログスキーマ
10
10
  */
@@ -29,7 +29,7 @@ const schema = new mongoose_1.Schema({
29
29
  collection: 'offerCatalogs',
30
30
  id: true,
31
31
  read: 'primaryPreferred',
32
- writeConcern: writeConcern,
32
+ writeConcern: writeConcern_1.writeConcern,
33
33
  strict: true,
34
34
  timestamps: {
35
35
  createdAt: 'createdAt',
@@ -81,13 +81,3 @@ schema.index({ additionalProperty: 1, identifier: 1 }, {
81
81
  additionalProperty: { $exists: true }
82
82
  }
83
83
  });
84
- (0, mongoose_1.model)(modelName, schema)
85
- .on('index',
86
- // tslint:disable-next-line:no-single-line-block-comment
87
- /* istanbul ignore next */
88
- (error) => {
89
- if (error !== undefined) {
90
- // tslint:disable-next-line:no-console
91
- console.error(error);
92
- }
93
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Order';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 注文スキーマ
10
10
  */
@@ -38,7 +38,7 @@ const schema = new mongoose_1.Schema({
38
38
  collection: 'orders',
39
39
  id: true,
40
40
  read: 'primaryPreferred',
41
- writeConcern: writeConcern,
41
+ writeConcern: writeConcern_1.writeConcern,
42
42
  strict: true,
43
43
  useNestedStrict: true,
44
44
  timestamps: {
@@ -303,13 +303,3 @@ schema.index({ additionalProperty: 1, orderDate: -1 }, {
303
303
  additionalProperty: { $exists: true }
304
304
  }
305
305
  });
306
- (0, mongoose_1.model)(modelName, schema)
307
- .on('index',
308
- // tslint:disable-next-line:no-single-line-block-comment
309
- /* istanbul ignore next */
310
- (error) => {
311
- if (error !== undefined) {
312
- // tslint:disable-next-line:no-console
313
- console.error(error);
314
- }
315
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'OwnershipInfo';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 所有権スキーマ
10
10
  */
@@ -25,7 +25,7 @@ const schema = new mongoose_1.Schema({
25
25
  collection: 'ownershipInfos',
26
26
  id: true,
27
27
  read: 'primaryPreferred',
28
- writeConcern: writeConcern,
28
+ writeConcern: writeConcern_1.writeConcern,
29
29
  strict: true,
30
30
  useNestedStrict: true,
31
31
  timestamps: {
@@ -148,13 +148,3 @@ schema.index({ 'typeOfGood.reservationNumber': 1, ownedFrom: -1 }, {
148
148
  'typeOfGood.reservationNumber': { $exists: true }
149
149
  }
150
150
  });
151
- (0, mongoose_1.model)(modelName, schema)
152
- .on('index',
153
- // tslint:disable-next-line:no-single-line-block-comment
154
- /* istanbul ignore next */
155
- (error) => {
156
- if (error !== undefined) {
157
- // tslint:disable-next-line:no-console
158
- console.error(error);
159
- }
160
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Place';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 場所スキーマ
10
10
  */
@@ -37,7 +37,7 @@ const schema = new mongoose_1.Schema({
37
37
  collection: 'places',
38
38
  id: true,
39
39
  read: 'primaryPreferred',
40
- writeConcern: writeConcern,
40
+ writeConcern: writeConcern_1.writeConcern,
41
41
  strict: true,
42
42
  useNestedStrict: true,
43
43
  timestamps: {
@@ -131,13 +131,3 @@ schema.index({ 'containsPlace.containsPlace.containsPlace.additionalProperty': 1
131
131
  'containsPlace.containsPlace.containsPlace.additionalProperty': { $exists: true }
132
132
  }
133
133
  });
134
- (0, mongoose_1.model)(modelName, schema)
135
- .on('index',
136
- // tslint:disable-next-line:no-single-line-block-comment
137
- /* istanbul ignore next */
138
- (error) => {
139
- if (error !== undefined) {
140
- // tslint:disable-next-line:no-console
141
- console.error(error);
142
- }
143
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'PriceSpecification';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 価格仕様スキーマ
10
10
  */
@@ -26,7 +26,7 @@ const schema = new mongoose_1.Schema({
26
26
  collection: 'priceSpecifications',
27
27
  id: true,
28
28
  read: 'primaryPreferred',
29
- writeConcern: writeConcern,
29
+ writeConcern: writeConcern_1.writeConcern,
30
30
  strict: true,
31
31
  useNestedStrict: true,
32
32
  timestamps: {
@@ -88,13 +88,3 @@ schema.index({ 'appliesToCategoryCode.inCodeSet.identifier': 1, price: 1 }, {
88
88
  'appliesToCategoryCode.inCodeSet.identifier': { $exists: true }
89
89
  }
90
90
  });
91
- (0, mongoose_1.model)(modelName, schema)
92
- .on('index',
93
- // tslint:disable-next-line:no-single-line-block-comment
94
- /* istanbul ignore next */
95
- (error) => {
96
- if (error !== undefined) {
97
- // tslint:disable-next-line:no-console
98
- console.error(error);
99
- }
100
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Product';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * プロダクトスキーマ
10
10
  */
@@ -31,7 +31,7 @@ const schema = new mongoose_1.Schema({
31
31
  collection: 'products',
32
32
  id: true,
33
33
  read: 'primaryPreferred',
34
- writeConcern: writeConcern,
34
+ writeConcern: writeConcern_1.writeConcern,
35
35
  strict: true,
36
36
  useNestedStrict: true,
37
37
  timestamps: {
@@ -99,13 +99,3 @@ schema.index({ 'name.en': 1, productID: 1 }, {
99
99
  'name.en': { $exists: true }
100
100
  }
101
101
  });
102
- (0, mongoose_1.model)(modelName, schema)
103
- .on('index',
104
- // tslint:disable-next-line:no-single-line-block-comment
105
- /* istanbul ignore next */
106
- (error) => {
107
- if (error !== undefined) {
108
- // tslint:disable-next-line:no-console
109
- console.error(error);
110
- }
111
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Project';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * プロジェクトスキーマ
10
10
  */
@@ -24,7 +24,7 @@ const schema = new mongoose_1.Schema({
24
24
  collection: 'projects',
25
25
  id: true,
26
26
  read: 'primaryPreferred',
27
- writeConcern: writeConcern,
27
+ writeConcern: writeConcern_1.writeConcern,
28
28
  strict: true,
29
29
  useNestedStrict: true,
30
30
  timestamps: {
@@ -45,13 +45,3 @@ const schema = new mongoose_1.Schema({
45
45
  }
46
46
  });
47
47
  exports.schema = schema;
48
- (0, mongoose_1.model)(modelName, schema)
49
- .on('index',
50
- // tslint:disable-next-line:no-single-line-block-comment
51
- /* istanbul ignore next */
52
- (error) => {
53
- if (error !== undefined) {
54
- // tslint:disable-next-line:no-console
55
- console.error(error);
56
- }
57
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Reservation';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 予約スキーマ
10
10
  */
@@ -49,7 +49,7 @@ const schema = new mongoose_1.Schema({
49
49
  collection: 'reservations',
50
50
  id: true,
51
51
  read: 'primaryPreferred',
52
- writeConcern: writeConcern,
52
+ writeConcern: writeConcern_1.writeConcern,
53
53
  strict: true,
54
54
  useNestedStrict: true,
55
55
  timestamps: {
@@ -291,13 +291,3 @@ schema.index({ 'underName.identifier': 1, bookingTime: -1 }, {
291
291
  'underName.identifier': { $exists: true }
292
292
  }
293
293
  });
294
- (0, mongoose_1.model)(modelName, schema)
295
- .on('index',
296
- // tslint:disable-next-line:no-single-line-block-comment
297
- /* istanbul ignore next */
298
- (error) => {
299
- if (error !== undefined) {
300
- // tslint:disable-next-line:no-console
301
- console.error(error);
302
- }
303
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Role';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * ロールスキーマ
10
10
  */
@@ -15,7 +15,7 @@ const schema = new mongoose_1.Schema({
15
15
  collection: 'roles',
16
16
  id: true,
17
17
  read: 'primaryPreferred',
18
- writeConcern: writeConcern,
18
+ writeConcern: writeConcern_1.writeConcern,
19
19
  strict: false,
20
20
  useNestedStrict: true,
21
21
  timestamps: {
@@ -47,13 +47,3 @@ schema.index({ permissions: 1, roleName: 1 }, {
47
47
  permissions: { $exists: true }
48
48
  }
49
49
  });
50
- (0, mongoose_1.model)(modelName, schema)
51
- .on('index',
52
- // tslint:disable-next-line:no-single-line-block-comment
53
- /* istanbul ignore next */
54
- (error) => {
55
- if (error !== undefined) {
56
- // tslint:disable-next-line:no-console
57
- console.error(error);
58
- }
59
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Seller';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 販売者スキーマ
10
10
  */
@@ -28,7 +28,7 @@ const schema = new mongoose_1.Schema({
28
28
  collection: 'sellers',
29
29
  id: true,
30
30
  read: 'primaryPreferred',
31
- writeConcern: writeConcern,
31
+ writeConcern: writeConcern_1.writeConcern,
32
32
  strict: true,
33
33
  useNestedStrict: true,
34
34
  timestamps: {
@@ -74,13 +74,3 @@ schema.index({ additionalProperty: 1, branchCode: 1 }, {
74
74
  additionalProperty: { $exists: true }
75
75
  }
76
76
  });
77
- (0, mongoose_1.model)(modelName, schema)
78
- .on('index',
79
- // tslint:disable-next-line:no-single-line-block-comment
80
- /* istanbul ignore next */
81
- (error) => {
82
- if (error !== undefined) {
83
- // tslint:disable-next-line:no-console
84
- console.error(error);
85
- }
86
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'ServiceOutput';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 許可証スキーマ
10
10
  */
@@ -18,7 +18,7 @@ const schema = new mongoose_1.Schema({
18
18
  collection: 'serviceOutputs',
19
19
  id: true,
20
20
  read: 'primaryPreferred',
21
- writeConcern: writeConcern,
21
+ writeConcern: writeConcern_1.writeConcern,
22
22
  strict: false,
23
23
  useNestedStrict: true,
24
24
  timestamps: {
@@ -94,13 +94,3 @@ schema.index({ 'issuedThrough.serviceType.codeValue': 1, productID: 1 }, {
94
94
  'issuedThrough.serviceType.codeValue': { $exists: true }
95
95
  }
96
96
  });
97
- (0, mongoose_1.model)(modelName, schema)
98
- .on('index',
99
- // tslint:disable-next-line:no-single-line-block-comment
100
- /* istanbul ignore next */
101
- (error) => {
102
- if (error !== undefined) {
103
- // tslint:disable-next-line:no-console
104
- console.error(error);
105
- }
106
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Task';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * タスクスキーマ
10
10
  */
@@ -23,7 +23,7 @@ const schema = new mongoose_1.Schema({
23
23
  collection: 'tasks',
24
24
  id: true,
25
25
  read: 'primaryPreferred',
26
- writeConcern: writeConcern,
26
+ writeConcern: writeConcern_1.writeConcern,
27
27
  strict: true,
28
28
  useNestedStrict: true,
29
29
  timestamps: {
@@ -148,13 +148,3 @@ schema.index({ 'data.transactionId': 1, runsAt: -1 }, {
148
148
  'data.transactionId': { $exists: true }
149
149
  }
150
150
  });
151
- (0, mongoose_1.model)(modelName, schema)
152
- .on('index',
153
- // tslint:disable-next-line:no-single-line-block-comment
154
- /* istanbul ignore next */
155
- (error) => {
156
- if (error !== undefined) {
157
- // tslint:disable-next-line:no-console
158
- console.error(error);
159
- }
160
- });
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Telemetry';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * 測定スキーマ
10
10
  */
@@ -20,7 +20,7 @@ const schema = new mongoose_1.Schema({
20
20
  collection: 'telemetries',
21
21
  id: true,
22
22
  read: 'primaryPreferred',
23
- writeConcern: writeConcern,
23
+ writeConcern: writeConcern_1.writeConcern,
24
24
  strict: true,
25
25
  useNestedStrict: true,
26
26
  timestamps: {
@@ -57,13 +57,3 @@ schema.index({ 'purpose.typeOf': 1, 'object.scope': 1, 'object.measuredAt': 1 },
57
57
  'object.measuredAt': { $exists: true }
58
58
  }
59
59
  });
60
- (0, mongoose_1.model)(modelName, schema)
61
- .on('index',
62
- // tslint:disable-next-line:no-single-line-block-comment
63
- /* istanbul ignore next */
64
- (error) => {
65
- if (error !== undefined) {
66
- // tslint:disable-next-line:no-console
67
- console.error(error);
68
- }
69
- });
@@ -54,8 +54,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
54
54
  object?: any;
55
55
  typeOf?: string | undefined;
56
56
  status?: string | undefined;
57
- expires?: Date | undefined;
58
57
  error?: any;
58
+ expires?: Date | undefined;
59
59
  project?: any;
60
60
  agent?: any;
61
61
  recipient?: any;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const factory = require("../../../factory");
6
+ const writeConcern_1 = require("../writeConcern");
6
7
  const modelName = 'Transaction';
7
8
  exports.modelName = modelName;
8
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
9
9
  /**
10
10
  * 取引スキーマ
11
11
  */
@@ -29,7 +29,7 @@ const schema = new mongoose_1.Schema({
29
29
  collection: 'transactions',
30
30
  id: true,
31
31
  read: 'primaryPreferred',
32
- writeConcern: writeConcern,
32
+ writeConcern: writeConcern_1.writeConcern,
33
33
  strict: true,
34
34
  useNestedStrict: true,
35
35
  timestamps: {
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const writeConcern_1 = require("../writeConcern");
5
6
  const modelName = 'Trip';
6
7
  exports.modelName = modelName;
7
- const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
8
8
  /**
9
9
  * トリップスキーマ
10
10
  */
@@ -18,7 +18,7 @@ const schema = new mongoose_1.Schema({
18
18
  collection: 'trips',
19
19
  id: true,
20
20
  read: 'primaryPreferred',
21
- writeConcern: writeConcern,
21
+ writeConcern: writeConcern_1.writeConcern,
22
22
  strict: false,
23
23
  useNestedStrict: true,
24
24
  timestamps: {
@@ -39,13 +39,3 @@ const schema = new mongoose_1.Schema({
39
39
  }
40
40
  });
41
41
  exports.schema = schema;
42
- (0, mongoose_1.model)(modelName, schema)
43
- .on('index',
44
- // tslint:disable-next-line:no-single-line-block-comment
45
- /* istanbul ignore next */
46
- (error) => {
47
- if (error !== undefined) {
48
- // tslint:disable-next-line:no-console
49
- console.error(error);
50
- }
51
- });
package/package.json CHANGED
@@ -16,7 +16,6 @@
16
16
  "@sendgrid/mail": "6.4.0",
17
17
  "@surfrock/sdk": "1.2.0-alpha.0",
18
18
  "@waiter/domain": "5.1.0",
19
- "aws-sdk": "^2.984.0",
20
19
  "azure-storage": "^2.10.4",
21
20
  "cdigit": "2.6.7",
22
21
  "debug": "^3.2.7",
@@ -56,6 +55,7 @@
56
55
  "@types/sinon-mongoose": "^1.3.11",
57
56
  "@types/uniqid": "^4.1.3",
58
57
  "@types/uuid": "^3.4.10",
58
+ "aws-sdk": "2.1348.0",
59
59
  "coveralls": "^3.1.0",
60
60
  "csvtojson": "^2.0.10",
61
61
  "googleapis": "^85.0.0",
@@ -76,6 +76,7 @@
76
76
  "typescript": "^4.8.4"
77
77
  },
78
78
  "peerDependencies": {
79
+ "aws-sdk": "^2.0.0",
79
80
  "mongoose": "^6.0.0",
80
81
  "redis": "^3.1.2"
81
82
  },
@@ -119,5 +120,5 @@
119
120
  "postversion": "git push origin --tags",
120
121
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
121
122
  },
122
- "version": "21.0.0-alpha.5"
123
+ "version": "21.0.0-alpha.7"
123
124
  }