@chevre/domain 21.28.0 → 21.29.0-alpha.0

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.
@@ -32,7 +32,7 @@ const schemaDefinition = {
32
32
  isGift: Boolean,
33
33
  dateReturned: Date,
34
34
  orderedItem: [mongoose_1.SchemaTypes.Mixed],
35
- additionalProperty: [mongoose_1.SchemaTypes.Mixed] // 追加(2023-02-13~)
35
+ additionalProperty: mongoose_1.SchemaTypes.Mixed // 追加(2023-02-13~) // 廃止(2024-04-12~)
36
36
  };
37
37
  const schemaOptions = {
38
38
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -69,12 +69,10 @@ export declare class MongoRepository {
69
69
  /**
70
70
  * 変更可能な属性を更新する
71
71
  */
72
- updateChangeableAttributes(params: {
72
+ updateChangeableAttributes(params: Pick<factory.order.IOrder, 'name'> & {
73
73
  project: {
74
74
  id: string;
75
75
  };
76
- additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
77
- name?: string;
78
76
  orderNumber: string;
79
77
  }): Promise<{
80
78
  updatedAt: Date;
@@ -144,7 +142,7 @@ export declare class MongoRepository {
144
142
  })[]>;
145
143
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
146
144
  unsetUnnecessaryFields(params: {
147
- filter: FilterQuery<any>;
145
+ filter: FilterQuery<factory.order.IOrder>;
148
146
  $unset: any;
149
147
  }): Promise<import("mongodb").UpdateResult>;
150
148
  }
@@ -23,7 +23,7 @@ class MongoRepository {
23
23
  }
24
24
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
25
25
  static CREATE_MONGO_CONDITIONS(params) {
26
- 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, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26;
26
+ 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, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
27
27
  const andConditions = [
28
28
  { typeOf: { $eq: factory.order.OrderType.Order } }
29
29
  ];
@@ -31,22 +31,22 @@ class MongoRepository {
31
31
  if (typeof projectIdEq === 'string') {
32
32
  andConditions.push({ 'project.id': { $eq: projectIdEq } });
33
33
  }
34
- const additionalPropertyAll = (_c = params.additionalProperty) === null || _c === void 0 ? void 0 : _c.$all;
35
- if (Array.isArray(additionalPropertyAll)) {
36
- andConditions.push({ additionalProperty: { $exists: true, $all: additionalPropertyAll } });
37
- }
38
- const additionalPropertyIn = (_d = params.additionalProperty) === null || _d === void 0 ? void 0 : _d.$in;
39
- if (Array.isArray(additionalPropertyIn)) {
40
- andConditions.push({ additionalProperty: { $exists: true, $in: additionalPropertyIn } });
41
- }
42
- const additionalPropertyNin = (_e = params.additionalProperty) === null || _e === void 0 ? void 0 : _e.$nin;
43
- if (Array.isArray(additionalPropertyNin)) {
44
- andConditions.push({ additionalProperty: { $nin: additionalPropertyNin } });
45
- }
46
- const additionalPropertyElemMatch = (_f = params.additionalProperty) === null || _f === void 0 ? void 0 : _f.$elemMatch;
47
- if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
48
- andConditions.push({ additionalProperty: { $exists: true, $elemMatch: additionalPropertyElemMatch } });
49
- }
34
+ // const additionalPropertyAll = params.additionalProperty?.$all; // 廃止(2024-04-12~)
35
+ // if (Array.isArray(additionalPropertyAll)) {
36
+ // andConditions.push({ additionalProperty: { $exists: true, $all: additionalPropertyAll } });
37
+ // }
38
+ // const additionalPropertyIn = params.additionalProperty?.$in; // 廃止(2024-04-12~)
39
+ // if (Array.isArray(additionalPropertyIn)) {
40
+ // andConditions.push({ additionalProperty: { $exists: true, $in: additionalPropertyIn } });
41
+ // }
42
+ // const additionalPropertyNin = params.additionalProperty?.$nin; // 廃止(2024-04-12~)
43
+ // if (Array.isArray(additionalPropertyNin)) {
44
+ // andConditions.push({ additionalProperty: { $nin: additionalPropertyNin } });
45
+ // }
46
+ // const additionalPropertyElemMatch = params.additionalProperty?.$elemMatch; // 廃止(2024-04-12~)
47
+ // if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
48
+ // andConditions.push({ additionalProperty: { $exists: true, $elemMatch: additionalPropertyElemMatch } });
49
+ // }
50
50
  // tslint:disable-next-line:no-single-line-block-comment
51
51
  /* istanbul ignore else */
52
52
  if (params.identifier !== undefined) {
@@ -71,15 +71,15 @@ class MongoRepository {
71
71
  });
72
72
  }
73
73
  }
74
- const providerIdEq = (_h = (_g = params.provider) === null || _g === void 0 ? void 0 : _g.id) === null || _h === void 0 ? void 0 : _h.$eq;
74
+ const providerIdEq = (_d = (_c = params.provider) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$eq;
75
75
  if (typeof providerIdEq === 'string') {
76
76
  andConditions.push({ 'seller.id': { $exists: true, $eq: providerIdEq } });
77
77
  }
78
- const sellerIdEq = (_k = (_j = params.seller) === null || _j === void 0 ? void 0 : _j.id) === null || _k === void 0 ? void 0 : _k.$eq;
78
+ const sellerIdEq = (_f = (_e = params.seller) === null || _e === void 0 ? void 0 : _e.id) === null || _f === void 0 ? void 0 : _f.$eq;
79
79
  if (typeof sellerIdEq === 'string') {
80
80
  andConditions.push({ 'seller.id': { $exists: true, $eq: sellerIdEq } });
81
81
  }
82
- const sellerIds = (_l = params.seller) === null || _l === void 0 ? void 0 : _l.ids;
82
+ const sellerIds = (_g = params.seller) === null || _g === void 0 ? void 0 : _g.ids;
83
83
  if (Array.isArray(sellerIds)) {
84
84
  andConditions.push({ 'seller.id': { $exists: true, $in: sellerIds } });
85
85
  }
@@ -87,7 +87,7 @@ class MongoRepository {
87
87
  // if (typeof params.seller?.typeOf === 'string') {
88
88
  // andConditions.push({ 'seller.typeOf': { $exists: true, $eq: params.seller.typeOf } });
89
89
  // }
90
- const brokerIdEq = (_o = (_m = params.broker) === null || _m === void 0 ? void 0 : _m.id) === null || _o === void 0 ? void 0 : _o.$eq;
90
+ const brokerIdEq = (_j = (_h = params.broker) === null || _h === void 0 ? void 0 : _h.id) === null || _j === void 0 ? void 0 : _j.$eq;
91
91
  if (typeof brokerIdEq === 'string') {
92
92
  andConditions.push({
93
93
  'broker.id': {
@@ -304,7 +304,7 @@ class MongoRepository {
304
304
  }
305
305
  }
306
306
  }
307
- const nameEq = (_p = params.name) === null || _p === void 0 ? void 0 : _p.$eq;
307
+ const nameEq = (_k = params.name) === null || _k === void 0 ? void 0 : _k.$eq;
308
308
  if (typeof nameEq === 'string') {
309
309
  andConditions.push({
310
310
  name: {
@@ -313,7 +313,7 @@ class MongoRepository {
313
313
  }
314
314
  });
315
315
  }
316
- const nameRegex = (_q = params.name) === null || _q === void 0 ? void 0 : _q.$regex;
316
+ const nameRegex = (_l = params.name) === null || _l === void 0 ? void 0 : _l.$regex;
317
317
  if (typeof nameRegex === 'string' && nameRegex.length > 0) {
318
318
  andConditions.push({
319
319
  name: {
@@ -346,19 +346,19 @@ class MongoRepository {
346
346
  }
347
347
  });
348
348
  }
349
- const orderedItemSize = (_r = params.orderedItem) === null || _r === void 0 ? void 0 : _r.$size;
349
+ const orderedItemSize = (_m = params.orderedItem) === null || _m === void 0 ? void 0 : _m.$size;
350
350
  if (typeof orderedItemSize === 'number') {
351
351
  andConditions.push({ orderedItem: { $size: orderedItemSize } });
352
352
  }
353
- const acceptedOffersSize = (_s = params.acceptedOffers) === null || _s === void 0 ? void 0 : _s.$size;
353
+ const acceptedOffersSize = (_o = params.acceptedOffers) === null || _o === void 0 ? void 0 : _o.$size;
354
354
  if (typeof acceptedOffersSize === 'number') {
355
355
  andConditions.push({ acceptedOffers: { $size: acceptedOffersSize } });
356
356
  }
357
- const serialNumberEq = (_u = (_t = params.acceptedOffers) === null || _t === void 0 ? void 0 : _t.serialNumber) === null || _u === void 0 ? void 0 : _u.$eq;
357
+ const serialNumberEq = (_q = (_p = params.acceptedOffers) === null || _p === void 0 ? void 0 : _p.serialNumber) === null || _q === void 0 ? void 0 : _q.$eq;
358
358
  if (typeof serialNumberEq === 'string') {
359
359
  andConditions.push({ 'acceptedOffers.serialNumber': { $exists: true, $eq: serialNumberEq } });
360
360
  }
361
- const itemOfferedIdentifierIn = (_x = (_w = (_v = params.acceptedOffers) === null || _v === void 0 ? void 0 : _v.itemOffered) === null || _w === void 0 ? void 0 : _w.identifier) === null || _x === void 0 ? void 0 : _x.$in;
361
+ const itemOfferedIdentifierIn = (_t = (_s = (_r = params.acceptedOffers) === null || _r === void 0 ? void 0 : _r.itemOffered) === null || _s === void 0 ? void 0 : _s.identifier) === null || _t === void 0 ? void 0 : _t.$in;
362
362
  if (Array.isArray(itemOfferedIdentifierIn)) {
363
363
  andConditions.push({
364
364
  'acceptedOffers.itemOffered.identifier': {
@@ -367,7 +367,7 @@ class MongoRepository {
367
367
  }
368
368
  });
369
369
  }
370
- const itemOfferedTypeOfIn = (_0 = (_z = (_y = params.acceptedOffers) === null || _y === void 0 ? void 0 : _y.itemOffered) === null || _z === void 0 ? void 0 : _z.typeOf) === null || _0 === void 0 ? void 0 : _0.$in;
370
+ const itemOfferedTypeOfIn = (_w = (_v = (_u = params.acceptedOffers) === null || _u === void 0 ? void 0 : _u.itemOffered) === null || _v === void 0 ? void 0 : _v.typeOf) === null || _w === void 0 ? void 0 : _w.$in;
371
371
  if (Array.isArray(itemOfferedTypeOfIn)) {
372
372
  andConditions.push({
373
373
  'acceptedOffers.itemOffered.typeOf': {
@@ -376,7 +376,7 @@ class MongoRepository {
376
376
  }
377
377
  });
378
378
  }
379
- const itemOfferedIssuedThroughTypeOfEq = (_4 = (_3 = (_2 = (_1 = params.acceptedOffers) === null || _1 === void 0 ? void 0 : _1.itemOffered) === null || _2 === void 0 ? void 0 : _2.issuedThrough) === null || _3 === void 0 ? void 0 : _3.typeOf) === null || _4 === void 0 ? void 0 : _4.$eq;
379
+ const itemOfferedIssuedThroughTypeOfEq = (_0 = (_z = (_y = (_x = params.acceptedOffers) === null || _x === void 0 ? void 0 : _x.itemOffered) === null || _y === void 0 ? void 0 : _y.issuedThrough) === null || _z === void 0 ? void 0 : _z.typeOf) === null || _0 === void 0 ? void 0 : _0.$eq;
380
380
  if (typeof itemOfferedIssuedThroughTypeOfEq === 'string') {
381
381
  andConditions.push({
382
382
  'acceptedOffers.itemOffered.issuedThrough.typeOf': {
@@ -385,7 +385,7 @@ class MongoRepository {
385
385
  }
386
386
  });
387
387
  }
388
- const itemOfferedIssuedThroughIdIn = (_8 = (_7 = (_6 = (_5 = params.acceptedOffers) === null || _5 === void 0 ? void 0 : _5.itemOffered) === null || _6 === void 0 ? void 0 : _6.issuedThrough) === null || _7 === void 0 ? void 0 : _7.id) === null || _8 === void 0 ? void 0 : _8.$in;
388
+ const itemOfferedIssuedThroughIdIn = (_4 = (_3 = (_2 = (_1 = params.acceptedOffers) === null || _1 === void 0 ? void 0 : _1.itemOffered) === null || _2 === void 0 ? void 0 : _2.issuedThrough) === null || _3 === void 0 ? void 0 : _3.id) === null || _4 === void 0 ? void 0 : _4.$in;
389
389
  if (Array.isArray(itemOfferedIssuedThroughIdIn)) {
390
390
  andConditions.push({
391
391
  'acceptedOffers.itemOffered.issuedThrough.id': {
@@ -394,7 +394,7 @@ class MongoRepository {
394
394
  }
395
395
  });
396
396
  }
397
- const itemOfferedProgramMembershipUsedIdentifierEq = (_12 = (_11 = (_10 = (_9 = params.acceptedOffers) === null || _9 === void 0 ? void 0 : _9.itemOffered) === null || _10 === void 0 ? void 0 : _10.programMembershipUsed) === null || _11 === void 0 ? void 0 : _11.identifier) === null || _12 === void 0 ? void 0 : _12.$eq;
397
+ const itemOfferedProgramMembershipUsedIdentifierEq = (_8 = (_7 = (_6 = (_5 = params.acceptedOffers) === null || _5 === void 0 ? void 0 : _5.itemOffered) === null || _6 === void 0 ? void 0 : _6.programMembershipUsed) === null || _7 === void 0 ? void 0 : _7.identifier) === null || _8 === void 0 ? void 0 : _8.$eq;
398
398
  if (typeof itemOfferedProgramMembershipUsedIdentifierEq === 'string') {
399
399
  andConditions.push({
400
400
  'acceptedOffers.itemOffered.programMembershipUsed.identifier': {
@@ -403,7 +403,7 @@ class MongoRepository {
403
403
  }
404
404
  });
405
405
  }
406
- const itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq = (_18 = (_17 = (_16 = (_15 = (_14 = (_13 = params.acceptedOffers) === null || _13 === void 0 ? void 0 : _13.itemOffered) === null || _14 === void 0 ? void 0 : _14.programMembershipUsed) === null || _15 === void 0 ? void 0 : _15.issuedThrough) === null || _16 === void 0 ? void 0 : _16.serviceType) === null || _17 === void 0 ? void 0 : _17.codeValue) === null || _18 === void 0 ? void 0 : _18.$eq;
406
+ const itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq = (_14 = (_13 = (_12 = (_11 = (_10 = (_9 = params.acceptedOffers) === null || _9 === void 0 ? void 0 : _9.itemOffered) === null || _10 === void 0 ? void 0 : _10.programMembershipUsed) === null || _11 === void 0 ? void 0 : _11.issuedThrough) === null || _12 === void 0 ? void 0 : _12.serviceType) === null || _13 === void 0 ? void 0 : _13.codeValue) === null || _14 === void 0 ? void 0 : _14.$eq;
407
407
  if (typeof itemOfferedProgramMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
408
408
  andConditions.push({
409
409
  'acceptedOffers.itemOffered.programMembershipUsed.issuedThrough.serviceType.codeValue': {
@@ -565,11 +565,11 @@ class MongoRepository {
565
565
  }
566
566
  }
567
567
  }
568
- const paymentMethodIdentifierIn = (_21 = (_20 = (_19 = params.paymentMethods) === null || _19 === void 0 ? void 0 : _19.paymentMethod) === null || _20 === void 0 ? void 0 : _20.identifier) === null || _21 === void 0 ? void 0 : _21.$in;
568
+ const paymentMethodIdentifierIn = (_17 = (_16 = (_15 = params.paymentMethods) === null || _15 === void 0 ? void 0 : _15.paymentMethod) === null || _16 === void 0 ? void 0 : _16.identifier) === null || _17 === void 0 ? void 0 : _17.$in;
569
569
  if (Array.isArray(paymentMethodIdentifierIn)) {
570
570
  andConditions.push({ 'paymentMethods.paymentMethod.identifier': { $exists: true, $in: paymentMethodIdentifierIn } });
571
571
  }
572
- const paymentMethodsTypeOfIn = (_22 = params.paymentMethods) === null || _22 === void 0 ? void 0 : _22.typeOfs;
572
+ const paymentMethodsTypeOfIn = (_18 = params.paymentMethods) === null || _18 === void 0 ? void 0 : _18.typeOfs;
573
573
  if (Array.isArray(paymentMethodsTypeOfIn)) {
574
574
  // paymentMethod.identifierで検索(2023-11-15~)
575
575
  // andConditions.push({ 'paymentMethods.typeOf': { $exists: true, $in: paymentMethodsTypeOfIn } });
@@ -599,7 +599,7 @@ class MongoRepository {
599
599
  });
600
600
  }
601
601
  }
602
- const paymentMethodAdditionalPropertyAll = (_24 = (_23 = params.paymentMethods) === null || _23 === void 0 ? void 0 : _23.additionalProperty) === null || _24 === void 0 ? void 0 : _24.$all;
602
+ const paymentMethodAdditionalPropertyAll = (_20 = (_19 = params.paymentMethods) === null || _19 === void 0 ? void 0 : _19.additionalProperty) === null || _20 === void 0 ? void 0 : _20.$all;
603
603
  if (Array.isArray(paymentMethodAdditionalPropertyAll)) {
604
604
  andConditions.push({
605
605
  'paymentMethods.additionalProperty': {
@@ -608,7 +608,7 @@ class MongoRepository {
608
608
  }
609
609
  });
610
610
  }
611
- const paymentMethodAdditionalPropertyIn = (_26 = (_25 = params.paymentMethods) === null || _25 === void 0 ? void 0 : _25.additionalProperty) === null || _26 === void 0 ? void 0 : _26.$in;
611
+ const paymentMethodAdditionalPropertyIn = (_22 = (_21 = params.paymentMethods) === null || _21 === void 0 ? void 0 : _21.additionalProperty) === null || _22 === void 0 ? void 0 : _22.$in;
612
612
  if (Array.isArray(paymentMethodAdditionalPropertyIn)) {
613
613
  andConditions.push({
614
614
  'paymentMethods.additionalProperty': {
@@ -802,7 +802,7 @@ class MongoRepository {
802
802
  'project.id': { $eq: params.project.id },
803
803
  typeOf: { $eq: factory.order.OrderType.Order }
804
804
  }, {
805
- $set: Object.assign(Object.assign({}, (Array.isArray(params.additionalProperty)) ? { additionalProperty: params.additionalProperty } : undefined), (typeof params.name === 'string') ? { name: params.name } : undefined)
805
+ $set: Object.assign({}, (typeof params.name === 'string') ? { name: params.name } : undefined)
806
806
  }, {
807
807
  new: true,
808
808
  projection: {
@@ -1,5 +1,5 @@
1
1
  import * as factory from '../../../factory';
2
- export type IUpdatedOrder4inform = Pick<factory.order.IOrder, 'typeOf' | 'orderNumber' | 'name' | 'additionalProperty' | 'project'> & {
2
+ export type IUpdatedOrder4inform = Pick<factory.order.IOrder, 'typeOf' | 'orderNumber' | 'name' | 'project'> & {
3
3
  updatedAt: Date;
4
4
  };
5
5
  declare function createInformTasks(order: IUpdatedOrder4inform): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "@aws-sdk/credential-providers": "3.433.0",
13
- "@chevre/factory": "4.366.0",
13
+ "@chevre/factory": "4.367.0-alpha.1",
14
14
  "@cinerino/sdk": "5.17.1",
15
15
  "@motionpicture/coa-service": "9.4.0",
16
16
  "@motionpicture/gmo-service": "5.3.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": "21.28.0"
113
+ "version": "21.29.0-alpha.0"
114
114
  }