@chevre/domain 22.2.0-alpha.16 → 22.2.0-alpha.18

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.
@@ -19,7 +19,10 @@ async function main() {
19
19
  limit: 1,
20
20
  page: 1,
21
21
  project: { id: { $eq: project.id } },
22
- serviceOutput: { issuedThrough: { serviceType: { codeValue: { $eq: 'SP' } } } }
22
+ serviceOutput: {
23
+ paymentMethod: { amount: { currency: { $eq: 'Point' } } }
24
+ // issuedThrough: { serviceType: { codeValue: { $eq: 'SP' } } }
25
+ }
23
26
  },
24
27
  ['productID', 'name', 'serviceOutput'],
25
28
  []
@@ -69,11 +69,11 @@ const indexes = [
69
69
  }
70
70
  ],
71
71
  [
72
- { 'serviceOutput.amount.currency': 1, productID: 1 },
72
+ { 'serviceOutput.paymentMethod.amount.currency': 1, productID: 1 },
73
73
  {
74
- name: 'searchByServiceOutputAmountCurrency',
74
+ name: 'searchByServiceOutputPaymentMethodAmountCurrency',
75
75
  partialFilterExpression: {
76
- 'serviceOutput.amount.currency': { $exists: true }
76
+ 'serviceOutput.paymentMethod.amount.currency': { $exists: true }
77
77
  }
78
78
  }
79
79
  ],
@@ -44,7 +44,7 @@ class PaymentServiceRepo {
44
44
  }
45
45
  // tslint:disable-next-line:max-func-body-length
46
46
  static CREATE_MONGO_CONDITIONS(params) {
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
47
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
48
48
  // MongoDB検索条件
49
49
  const andConditions = [];
50
50
  const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
@@ -119,17 +119,17 @@ class PaymentServiceRepo {
119
119
  }
120
120
  });
121
121
  }
122
- const serviceOutputAmountCurrencyEq = (_p = (_o = (_m = params.serviceOutput) === null || _m === void 0 ? void 0 : _m.amount) === null || _o === void 0 ? void 0 : _o.currency) === null || _p === void 0 ? void 0 : _p.$eq;
123
- if (typeof serviceOutputAmountCurrencyEq === 'string') {
122
+ const serviceOutputPaymentMethodAmountCurrencyEq = (_q = (_p = (_o = (_m = params.serviceOutput) === null || _m === void 0 ? void 0 : _m.paymentMethod) === null || _o === void 0 ? void 0 : _o.amount) === null || _p === void 0 ? void 0 : _p.currency) === null || _q === void 0 ? void 0 : _q.$eq;
123
+ if (typeof serviceOutputPaymentMethodAmountCurrencyEq === 'string') {
124
124
  andConditions.push({
125
- 'serviceOutput.amount.currency': {
125
+ 'serviceOutput.paymentMethod.amount.currency': {
126
126
  $exists: true,
127
- $eq: serviceOutputAmountCurrencyEq
127
+ $eq: serviceOutputPaymentMethodAmountCurrencyEq
128
128
  }
129
129
  });
130
130
  }
131
131
  // extend(2024-08-20~)
132
- const serviceOutputIssuedThroughServiceTypeCodeValueEq = (_t = (_s = (_r = (_q = params.serviceOutput) === null || _q === void 0 ? void 0 : _q.issuedThrough) === null || _r === void 0 ? void 0 : _r.serviceType) === null || _s === void 0 ? void 0 : _s.codeValue) === null || _t === void 0 ? void 0 : _t.$eq;
132
+ const serviceOutputIssuedThroughServiceTypeCodeValueEq = (_u = (_t = (_s = (_r = params.serviceOutput) === null || _r === void 0 ? void 0 : _r.issuedThrough) === null || _s === void 0 ? void 0 : _s.serviceType) === null || _t === void 0 ? void 0 : _t.codeValue) === null || _u === void 0 ? void 0 : _u.$eq;
133
133
  if (typeof serviceOutputIssuedThroughServiceTypeCodeValueEq === 'string') {
134
134
  andConditions.push({
135
135
  'serviceOutput.issuedThrough.serviceType.codeValue': {
@@ -138,7 +138,7 @@ class PaymentServiceRepo {
138
138
  }
139
139
  });
140
140
  }
141
- const serviceTypeCodeValueEq = (_v = (_u = params.serviceType) === null || _u === void 0 ? void 0 : _u.codeValue) === null || _v === void 0 ? void 0 : _v.$eq;
141
+ const serviceTypeCodeValueEq = (_w = (_v = params.serviceType) === null || _v === void 0 ? void 0 : _v.codeValue) === null || _w === void 0 ? void 0 : _w.$eq;
142
142
  if (typeof serviceTypeCodeValueEq === 'string') {
143
143
  andConditions.push({
144
144
  'serviceType.codeValue': {
@@ -147,7 +147,7 @@ class PaymentServiceRepo {
147
147
  }
148
148
  });
149
149
  }
150
- const nameRegex = (_w = params.name) === null || _w === void 0 ? void 0 : _w.$regex;
150
+ const nameRegex = (_x = params.name) === null || _x === void 0 ? void 0 : _x.$regex;
151
151
  if (typeof nameRegex === 'string' && nameRegex.length > 0) {
152
152
  const nameRegexExp = new RegExp(nameRegex);
153
153
  andConditions.push({
@@ -168,7 +168,7 @@ class PaymentServiceRepo {
168
168
  });
169
169
  }
170
170
  // プロバイダー条件を追加(2023-06-21~)
171
- const providerIdEq = (_y = (_x = params.provider) === null || _x === void 0 ? void 0 : _x.id) === null || _y === void 0 ? void 0 : _y.$eq;
171
+ const providerIdEq = (_z = (_y = params.provider) === null || _y === void 0 ? void 0 : _y.id) === null || _z === void 0 ? void 0 : _z.$eq;
172
172
  if (typeof providerIdEq === 'string') {
173
173
  andConditions.push({ 'provider.id': { $exists: true, $eq: providerIdEq } });
174
174
  }
@@ -67,22 +67,26 @@ function onAuthorizationCreated(params) {
67
67
  }
68
68
  break;
69
69
  case 'OwnershipInfo':
70
- // 所有権検索
71
- const ownershipInfoId = authorization.object.id;
72
- if (typeof ownershipInfoId === 'string' && ownershipInfoId.length > 0) {
73
- const ownershipInfo = yield repos.ownershipInfo.projectFieldsById({ id: ownershipInfoId }, ['typeOfGood']);
74
- // 座席予約に対する所有権であれば発券
75
- if (ownershipInfo.typeOfGood.typeOf === factory.reservationType.EventReservation
76
- || ownershipInfo.typeOfGood.typeOf === factory.reservationType.BusReservation) {
77
- const reservationId = String(ownershipInfo.typeOfGood.id);
78
- reservationIds = [reservationId];
79
- const { reservationFor } = yield repos.reservation.projectFieldsById({
80
- id: reservationId,
81
- inclusion: ['reservationFor.id']
82
- });
83
- reservationForIds = [String(reservationFor.id)];
84
- }
85
- }
70
+ // 所有権に対する承認はいったん廃止したので、所有権のケースは処理不要(2024-08-21~)
71
+ reservationIds = [];
72
+ // const ownershipInfoId = authorization.object.id;
73
+ // if (typeof ownershipInfoId === 'string' && ownershipInfoId.length > 0) {
74
+ // const ownershipInfo = <Pick<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, 'id' | 'typeOfGood'>>
75
+ // await repos.ownershipInfo.projectFieldsById({ id: ownershipInfoId }, ['typeOfGood']);
76
+ // // 予約に対する所有権であれば発券
77
+ // if (ownershipInfo.typeOfGood.typeOf === factory.reservationType.EventReservation
78
+ // || ownershipInfo.typeOfGood.typeOf === factory.reservationType.BusReservation) {
79
+ // const reservationId = String(ownershipInfo.typeOfGood.id);
80
+ // reservationIds = [reservationId];
81
+ // const { reservationFor } = <{ reservationFor: { id: string } }>await repos.reservation.projectFieldsById<
82
+ // factory.reservationType.EventReservation | factory.reservationType.BusReservation
83
+ // >({
84
+ // id: reservationId,
85
+ // inclusion: ['reservationFor.id']
86
+ // });
87
+ // reservationForIds = [String(reservationFor.id)];
88
+ // }
89
+ // }
86
90
  break;
87
91
  default:
88
92
  // no op
package/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.381.0-alpha.9",
13
- "@cinerino/sdk": "10.7.0-alpha.0",
12
+ "@chevre/factory": "4.381.0-alpha.11",
13
+ "@cinerino/sdk": "10.7.0-alpha.2",
14
14
  "@motionpicture/coa-service": "9.4.0",
15
15
  "@motionpicture/gmo-service": "5.3.0",
16
16
  "@sendgrid/mail": "6.4.0",
@@ -110,5 +110,5 @@
110
110
  "postversion": "git push origin --tags",
111
111
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
112
112
  },
113
- "version": "22.2.0-alpha.16"
113
+ "version": "22.2.0-alpha.18"
114
114
  }