@chevre/domain 25.2.0-alpha.22 → 25.2.0-alpha.24

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.
@@ -344,6 +344,15 @@ const indexes = [
344
344
  }
345
345
  }
346
346
  ],
347
+ [
348
+ { paymentMethodId: 1, orderDate: -1 },
349
+ {
350
+ name: 'paymentMethodId',
351
+ partialFilterExpression: {
352
+ paymentMethodId: { $exists: true }
353
+ }
354
+ }
355
+ ],
347
356
  [
348
357
  { price: 1, orderDate: -1 },
349
358
  {
@@ -154,6 +154,739 @@ export declare class OrderRepo {
154
154
  $unset: any;
155
155
  arrayFilters?: any[];
156
156
  }): Promise<import("mongoose").UpdateWriteOpResult>;
157
+ savePaymentMethodId4migaration(params: {
158
+ id: string;
159
+ paymentMethod: factory.transaction.placeOrder.IPaymentMethodByPaymentUrl;
160
+ }): Promise<(import("mongoose").FlattenMaps<{
161
+ project: {
162
+ typeOf: factory.organizationType.Project;
163
+ id: string;
164
+ };
165
+ broker?: {
166
+ id: string;
167
+ typeOf: factory.personType;
168
+ } | undefined;
169
+ confirmationNumber: string;
170
+ customer: {
171
+ id: string;
172
+ typeOf: factory.personType;
173
+ additionalProperty?: {
174
+ name: string;
175
+ value: string;
176
+ }[] | undefined;
177
+ address?: string | undefined;
178
+ age?: string | undefined;
179
+ email?: string | undefined;
180
+ givenName?: string | undefined;
181
+ familyName?: string | undefined;
182
+ gender?: string | undefined;
183
+ identifier?: {
184
+ name: string;
185
+ value: string;
186
+ }[] | undefined;
187
+ name?: string | undefined;
188
+ telephone?: string | undefined;
189
+ image?: string | undefined;
190
+ url?: string | undefined;
191
+ } | {
192
+ id: string;
193
+ typeOf: factory.creativeWorkType.WebApplication;
194
+ additionalProperty?: {
195
+ name: string;
196
+ value: string;
197
+ }[] | undefined;
198
+ address?: string | undefined;
199
+ age?: string | undefined;
200
+ email?: string | undefined;
201
+ givenName?: string | undefined;
202
+ familyName?: string | undefined;
203
+ gender?: string | undefined;
204
+ identifier?: {
205
+ name: string;
206
+ value: string;
207
+ }[] | undefined;
208
+ name?: string | undefined;
209
+ telephone?: string | undefined;
210
+ image?: string | undefined;
211
+ url?: string | undefined;
212
+ } | {
213
+ id: string;
214
+ typeOf: factory.organizationType.Organization;
215
+ additionalProperty?: {
216
+ name: string;
217
+ value: string;
218
+ }[] | undefined;
219
+ address?: string | undefined;
220
+ age?: string | undefined;
221
+ email?: string | undefined;
222
+ givenName?: string | undefined;
223
+ familyName?: string | undefined;
224
+ gender?: string | undefined;
225
+ identifier?: {
226
+ name: string;
227
+ value: string;
228
+ }[] | undefined;
229
+ name?: string | undefined;
230
+ telephone?: string | undefined;
231
+ image?: string | undefined;
232
+ url?: string | undefined;
233
+ };
234
+ dateReturned?: Date | undefined;
235
+ name?: string | undefined;
236
+ orderedItem?: {
237
+ typeOf: "OrderItem";
238
+ orderedItem: {
239
+ typeOf: factory.product.ProductType.EventService;
240
+ serviceOutput: {
241
+ typeOf: factory.reservationType.EventReservation | factory.reservationType.ReservationPackage;
242
+ reservationFor: {
243
+ location?: {
244
+ branchCode: string;
245
+ name?: {
246
+ ja?: string | undefined;
247
+ en?: string | undefined;
248
+ kr?: string | undefined;
249
+ } | undefined;
250
+ typeOf: factory.placeType.ScreeningRoom;
251
+ } | undefined;
252
+ typeOf: factory.eventType.ScreeningEvent;
253
+ id: string;
254
+ name?: {
255
+ ja?: string | undefined;
256
+ en?: string | undefined;
257
+ kr?: string | undefined;
258
+ } | undefined;
259
+ startDate?: Date | undefined;
260
+ endDate?: Date | undefined;
261
+ };
262
+ };
263
+ serviceType?: {
264
+ typeOf: "CategoryCode";
265
+ codeValue: string;
266
+ inCodeSet: {
267
+ typeOf: "CategoryCodeSet";
268
+ identifier: factory.categoryCode.CategorySetIdentifier;
269
+ };
270
+ } | undefined;
271
+ id?: string | undefined;
272
+ };
273
+ }[] | undefined;
274
+ orderStatus: factory.orderStatus;
275
+ paymentMethods: {
276
+ accountId?: string | undefined;
277
+ name: string;
278
+ paymentMethod?: {
279
+ amount?: {
280
+ currency: string;
281
+ } | undefined;
282
+ identifier: string;
283
+ } | undefined;
284
+ paymentMethodId: string;
285
+ paymentStatus?: (factory.paymentStatusType.PaymentAutomaticallyApplied | factory.paymentStatusType.PaymentDue) | undefined;
286
+ totalPaymentDue?: {
287
+ value: number;
288
+ currency: factory.unitCode.C62 | factory.priceCurrency.JPY;
289
+ typeOf: "MonetaryAmount";
290
+ } | undefined;
291
+ additionalProperty: {
292
+ name: string;
293
+ value: string;
294
+ }[];
295
+ issuedThrough: {
296
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType;
297
+ id: string;
298
+ };
299
+ referencesOrder?: never | undefined;
300
+ }[];
301
+ previousOrderStatus?: factory.orderStatus | undefined;
302
+ price: number;
303
+ priceCurrency: factory.priceCurrency;
304
+ returner?: {
305
+ id: string;
306
+ typeOf: factory.personType | factory.organizationType.Project | factory.creativeWorkType.WebApplication;
307
+ } | undefined;
308
+ seller: {
309
+ id: string;
310
+ name: string;
311
+ typeOf: factory.organizationType.Corporation;
312
+ additionalProperty?: {
313
+ name: string;
314
+ value: string;
315
+ }[] | undefined;
316
+ };
317
+ typeOf: factory.order.OrderType;
318
+ orderNumber: string;
319
+ orderDate: Date;
320
+ acceptedOffers?: ({
321
+ itemOffered: {
322
+ id: string;
323
+ typeOf: factory.reservationType.EventReservation;
324
+ additionalTicketText?: string | undefined;
325
+ programMembershipUsed?: {
326
+ typeOf: factory.programMembership.ProgramMembershipType;
327
+ identifier: string;
328
+ issuedThrough: {
329
+ serviceType: {
330
+ codeValue: string;
331
+ };
332
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.FaceToFace;
333
+ };
334
+ } | {
335
+ typeOf: factory.programMembership.ProgramMembershipType;
336
+ identifier: string;
337
+ issuedThrough: {
338
+ id: string;
339
+ serviceType: {
340
+ codeValue: string;
341
+ };
342
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.CreditCard;
343
+ };
344
+ } | undefined;
345
+ reservationNumber: string;
346
+ issuedThrough: {
347
+ typeOf: factory.product.ProductType.EventService;
348
+ serviceType?: never | undefined;
349
+ id?: never | undefined;
350
+ };
351
+ reservationFor: {
352
+ id: string;
353
+ name: {
354
+ ja?: string | undefined;
355
+ en?: string | undefined;
356
+ kr?: string | undefined;
357
+ };
358
+ typeOf: factory.eventType.ScreeningEvent;
359
+ location: {
360
+ typeOf: factory.placeType.ScreeningRoom;
361
+ branchCode: string;
362
+ name?: {
363
+ ja?: string | undefined;
364
+ en?: string | undefined;
365
+ kr?: string | undefined;
366
+ } | undefined;
367
+ address?: {
368
+ ja?: string | undefined;
369
+ en?: string | undefined;
370
+ kr?: string | undefined;
371
+ } | undefined;
372
+ maximumAttendeeCapacity?: never | undefined;
373
+ };
374
+ startDate: Date;
375
+ endDate: Date;
376
+ doorTime?: Date | undefined;
377
+ superEvent: {
378
+ id: string;
379
+ name: {
380
+ ja?: string | undefined;
381
+ en?: string | undefined;
382
+ kr?: string | undefined;
383
+ };
384
+ typeOf: factory.eventType.ScreeningEventSeries;
385
+ location: {
386
+ typeOf: factory.placeType.MovieTheater;
387
+ id: string;
388
+ branchCode: string;
389
+ name?: {
390
+ ja?: string | undefined;
391
+ en?: string | undefined;
392
+ kr?: string | undefined;
393
+ } | undefined;
394
+ };
395
+ soundFormat?: {
396
+ typeOf: string;
397
+ name: string;
398
+ }[] | undefined;
399
+ headline?: {
400
+ ja?: string | undefined;
401
+ en?: string | undefined;
402
+ kr?: string | undefined;
403
+ } | undefined;
404
+ identifier?: string | undefined;
405
+ coaInfo?: {
406
+ dateMgtkBegin?: string | undefined;
407
+ dateMvtkBegin: string;
408
+ flgMgtkUse?: string | undefined;
409
+ flgMvtkUse: string;
410
+ flgNotDiscount?: string | undefined;
411
+ titleBranchNum: string;
412
+ kbnEirin?: {
413
+ kubunCode: string;
414
+ kubunName: string;
415
+ kubunNameEng: string;
416
+ kubunAddPrice: number;
417
+ } | undefined;
418
+ kbnEizou?: {
419
+ kubunCode: string;
420
+ kubunName: string;
421
+ kubunNameEng: string;
422
+ kubunAddPrice: number;
423
+ } | undefined;
424
+ kbnJoueihousiki?: {
425
+ kubunCode: string;
426
+ kubunName: string;
427
+ kubunNameEng: string;
428
+ kubunAddPrice: number;
429
+ } | undefined;
430
+ kbnJimakufukikae?: {
431
+ kubunCode: string;
432
+ kubunName: string;
433
+ kubunNameEng: string;
434
+ kubunAddPrice: number;
435
+ } | undefined;
436
+ } | undefined;
437
+ alternativeHeadline?: string | {
438
+ ja?: string | undefined;
439
+ en?: string | undefined;
440
+ kr?: string | undefined;
441
+ } | undefined;
442
+ duration?: string | undefined;
443
+ workPerformed: {
444
+ id?: string | undefined;
445
+ name?: string | {
446
+ ja?: string | undefined;
447
+ en?: string | undefined;
448
+ kr?: string | undefined;
449
+ } | undefined;
450
+ typeOf: factory.creativeWorkType.Movie;
451
+ identifier: string;
452
+ duration?: string | undefined;
453
+ };
454
+ };
455
+ identifier?: string | undefined;
456
+ coaInfo?: {
457
+ titleBranchNum: string;
458
+ dateJouei: string;
459
+ titleCode: string;
460
+ timeBegin: string;
461
+ timeEnd: string;
462
+ screenCode: string;
463
+ trailerTime: number;
464
+ nameServiceDay: string;
465
+ availableNum: number;
466
+ rsvStartDate: string;
467
+ rsvEndDate: string;
468
+ flgEarlyBooking: import("@coasystems/factory/lib/factory/master").FlgEarlyBooking;
469
+ theaterCode: string;
470
+ kbnService?: {
471
+ kubunCode: string;
472
+ kubunName: string;
473
+ kubunNameEng: string;
474
+ kubunAddPrice: number;
475
+ } | undefined;
476
+ kbnAcoustic?: {
477
+ kubunCode: string;
478
+ kubunName: string;
479
+ kubunNameEng: string;
480
+ kubunAddPrice: number;
481
+ } | undefined;
482
+ } | undefined;
483
+ };
484
+ reservedTicket: {
485
+ typeOf: import("@chevre/factory/lib/chevre/reservation").TicketType;
486
+ identifier: string;
487
+ ticketedSeat?: {
488
+ typeOf: factory.placeType.Seat;
489
+ seatingType?: import("@chevre/factory/lib/chevre/place/seat").ISeatingType | undefined;
490
+ seatNumber: string;
491
+ seatRow: string;
492
+ seatSection: string;
493
+ } | undefined;
494
+ dateIssued?: Date | undefined;
495
+ ticketType: {
496
+ id?: string | undefined;
497
+ name?: {
498
+ ja?: string | undefined;
499
+ en?: string | undefined;
500
+ kr?: string | undefined;
501
+ } | undefined;
502
+ typeOf: factory.offerType.Offer;
503
+ identifier: string;
504
+ };
505
+ coaTicketInfo?: {
506
+ ticketCode: string;
507
+ stdPrice: number;
508
+ addPrice: number;
509
+ spseatAdd1: number;
510
+ spseatAdd2: number;
511
+ disPrice: number;
512
+ salePrice: number;
513
+ mvtkAppPrice: number;
514
+ ticketCount: number;
515
+ spseatKbn: string;
516
+ seatNum: string;
517
+ addGlasses: number;
518
+ kbnEisyahousiki: string;
519
+ mvtkNum: string;
520
+ mvtkKbnDenshiken: string;
521
+ mvtkKbnMaeuriken: string;
522
+ mvtkKbnKensyu: string;
523
+ mvtkSalesPrice: number;
524
+ kbnMgtk: string;
525
+ ticketName: string;
526
+ ticketNameKana: string;
527
+ ticketNameEng: string;
528
+ usePoint: number;
529
+ } | undefined;
530
+ coaReserveAmount?: number | undefined;
531
+ ticketNumber?: string | undefined;
532
+ ticketToken?: string | undefined;
533
+ };
534
+ additionalProperty?: {
535
+ name: string;
536
+ value: string;
537
+ }[] | undefined;
538
+ };
539
+ offeredThrough: {
540
+ typeOf: "WebAPI";
541
+ identifier: import("@chevre/factory/lib/chevre/service/webAPI").Identifier.COA;
542
+ };
543
+ priceSpecification?: {
544
+ priceCurrency: factory.priceCurrency;
545
+ typeOf: factory.priceSpecificationType.CompoundPriceSpecification;
546
+ valueAddedTaxIncluded: boolean;
547
+ priceComponent: ({
548
+ name?: string | {
549
+ ja?: string | undefined;
550
+ en?: string | undefined;
551
+ kr?: string | undefined;
552
+ } | undefined;
553
+ price: number;
554
+ priceCurrency: factory.priceCurrency;
555
+ typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
556
+ valueAddedTaxIncluded: boolean;
557
+ accounting?: never | undefined;
558
+ appliesToCategoryCode: {
559
+ typeOf: "CategoryCode";
560
+ codeValue: string;
561
+ inCodeSet: {
562
+ typeOf: "CategoryCodeSet";
563
+ identifier: factory.categoryCode.CategorySetIdentifier.SeatingType | factory.categoryCode.CategorySetIdentifier.SoundFormatType | factory.categoryCode.CategorySetIdentifier.VideoFormatType;
564
+ };
565
+ }[];
566
+ } | {
567
+ name?: string | {
568
+ ja?: string | undefined;
569
+ en?: string | undefined;
570
+ kr?: string | undefined;
571
+ } | undefined;
572
+ price: number;
573
+ priceCurrency: factory.priceCurrency;
574
+ typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
575
+ valueAddedTaxIncluded: boolean;
576
+ accounting?: never | undefined;
577
+ appliesToMovieTicket: {
578
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.MovieTicket;
579
+ serviceType: string;
580
+ serviceOutput: {
581
+ typeOf: string;
582
+ };
583
+ };
584
+ appliesToVideoFormat: string;
585
+ } | {
586
+ name?: string | {
587
+ ja?: string | undefined;
588
+ en?: string | undefined;
589
+ kr?: string | undefined;
590
+ } | undefined;
591
+ price: number;
592
+ priceCurrency: factory.priceCurrency;
593
+ typeOf: factory.priceSpecificationType.UnitPriceSpecification;
594
+ valueAddedTaxIncluded: boolean;
595
+ accounting?: {
596
+ typeOf: "Accounting";
597
+ operatingRevenue?: {
598
+ typeOf: "AccountTitle";
599
+ codeValue: string;
600
+ } | undefined;
601
+ accountsReceivable?: number | undefined;
602
+ } | undefined;
603
+ appliesToMovieTicket?: {
604
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.MovieTicket;
605
+ serviceOutput: {
606
+ typeOf: string;
607
+ };
608
+ serviceType: string;
609
+ identifier?: string | undefined;
610
+ }[] | undefined;
611
+ appliesToAddOn?: {
612
+ typeOf: factory.offerType.Offer;
613
+ id?: string | undefined;
614
+ identifier?: string | undefined;
615
+ itemOffered: {
616
+ id?: string | undefined;
617
+ name?: {
618
+ ja?: string | undefined;
619
+ en?: string | undefined;
620
+ } | undefined;
621
+ typeOf: factory.product.ProductType.Product;
622
+ productID: string;
623
+ };
624
+ }[] | undefined;
625
+ referenceQuantity: {
626
+ typeOf: factory.quantitativeValue.QuantitativeValueType;
627
+ value?: (number | factory.quantitativeValue.StringValue) | undefined;
628
+ unitCode?: factory.unitCode | undefined;
629
+ minValue?: number | undefined;
630
+ };
631
+ })[];
632
+ } | undefined;
633
+ serialNumber: string;
634
+ id?: string | undefined;
635
+ typeOf: factory.offerType;
636
+ name?: never | undefined;
637
+ } | {
638
+ itemOffered: {
639
+ id: string;
640
+ typeOf: factory.reservationType.EventReservation;
641
+ additionalProperty?: never | undefined;
642
+ additionalTicketText?: string | undefined;
643
+ programMembershipUsed?: {
644
+ typeOf: factory.programMembership.ProgramMembershipType;
645
+ identifier: string;
646
+ issuedThrough: {
647
+ serviceType: {
648
+ codeValue: string;
649
+ };
650
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.FaceToFace;
651
+ };
652
+ } | {
653
+ typeOf: factory.programMembership.ProgramMembershipType;
654
+ identifier: string;
655
+ issuedThrough: {
656
+ id: string;
657
+ serviceType: {
658
+ codeValue: string;
659
+ };
660
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.CreditCard;
661
+ };
662
+ } | undefined;
663
+ reservationNumber: string;
664
+ issuedThrough: {
665
+ typeOf: factory.product.ProductType.EventService;
666
+ serviceType?: {
667
+ typeOf: "CategoryCode";
668
+ codeValue: string;
669
+ inCodeSet: {
670
+ typeOf: "CategoryCodeSet";
671
+ identifier: factory.categoryCode.CategorySetIdentifier;
672
+ };
673
+ } | undefined;
674
+ id: string;
675
+ };
676
+ reservationFor: {
677
+ id: string;
678
+ name: {
679
+ ja?: string | undefined;
680
+ en?: string | undefined;
681
+ kr?: string | undefined;
682
+ };
683
+ typeOf: factory.eventType.ScreeningEvent;
684
+ location: {
685
+ typeOf: factory.placeType.ScreeningRoom;
686
+ branchCode: string;
687
+ name?: {
688
+ ja?: string | undefined;
689
+ en?: string | undefined;
690
+ kr?: string | undefined;
691
+ } | undefined;
692
+ address?: {
693
+ ja?: string | undefined;
694
+ en?: string | undefined;
695
+ kr?: string | undefined;
696
+ } | undefined;
697
+ maximumAttendeeCapacity?: never | undefined;
698
+ };
699
+ startDate: Date;
700
+ endDate: Date;
701
+ doorTime?: Date | undefined;
702
+ superEvent: {
703
+ id: string;
704
+ name: {
705
+ ja?: string | undefined;
706
+ en?: string | undefined;
707
+ kr?: string | undefined;
708
+ };
709
+ typeOf: factory.eventType.ScreeningEventSeries;
710
+ location: {
711
+ typeOf: factory.placeType.MovieTheater;
712
+ id: string;
713
+ branchCode: string;
714
+ name?: {
715
+ ja?: string | undefined;
716
+ en?: string | undefined;
717
+ kr?: string | undefined;
718
+ } | undefined;
719
+ };
720
+ soundFormat?: {
721
+ typeOf: string;
722
+ name: string;
723
+ }[] | undefined;
724
+ headline?: {
725
+ ja?: string | undefined;
726
+ en?: string | undefined;
727
+ kr?: string | undefined;
728
+ } | undefined;
729
+ workPerformed: {
730
+ id?: string | undefined;
731
+ name?: string | {
732
+ ja?: string | undefined;
733
+ en?: string | undefined;
734
+ kr?: string | undefined;
735
+ } | undefined;
736
+ typeOf: factory.creativeWorkType.Movie;
737
+ identifier: string;
738
+ duration?: string | undefined;
739
+ };
740
+ identifier?: never | undefined;
741
+ alternativeHeadline?: never | undefined;
742
+ duration?: never | undefined;
743
+ coaInfo?: never | undefined;
744
+ };
745
+ identifier?: never | undefined;
746
+ coaInfo?: never | undefined;
747
+ };
748
+ reservedTicket: {
749
+ typeOf: import("@chevre/factory/lib/chevre/reservation").TicketType;
750
+ identifier: string;
751
+ ticketedSeat?: {
752
+ typeOf: factory.placeType.Seat;
753
+ seatingType?: import("@chevre/factory/lib/chevre/place/seat").ISeatingType | undefined;
754
+ seatNumber: string;
755
+ seatRow: string;
756
+ seatSection: string;
757
+ } | undefined;
758
+ ticketType: {
759
+ id?: string | undefined;
760
+ name?: {
761
+ ja?: string | undefined;
762
+ en?: string | undefined;
763
+ kr?: string | undefined;
764
+ } | undefined;
765
+ typeOf: factory.offerType.Offer;
766
+ identifier: string;
767
+ additionalProperty?: {
768
+ name: string;
769
+ value: string;
770
+ }[] | undefined;
771
+ description?: string | {
772
+ ja?: string | undefined;
773
+ en?: string | undefined;
774
+ kr?: string | undefined;
775
+ } | undefined;
776
+ };
777
+ ticketNumber?: never | undefined;
778
+ dateIssued?: never | undefined;
779
+ ticketToken?: never | undefined;
780
+ coaTicketInfo?: never | undefined;
781
+ coaReserveAmount?: never | undefined;
782
+ };
783
+ };
784
+ offeredThrough: {
785
+ typeOf: "WebAPI";
786
+ identifier: import("@chevre/factory/lib/chevre/service/webAPI").Identifier.Chevre;
787
+ };
788
+ priceSpecification?: {
789
+ priceCurrency: factory.priceCurrency;
790
+ typeOf: factory.priceSpecificationType.CompoundPriceSpecification;
791
+ valueAddedTaxIncluded: boolean;
792
+ priceComponent: ({
793
+ name?: string | {
794
+ ja?: string | undefined;
795
+ en?: string | undefined;
796
+ kr?: string | undefined;
797
+ } | undefined;
798
+ price: number;
799
+ priceCurrency: factory.priceCurrency;
800
+ typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
801
+ valueAddedTaxIncluded: boolean;
802
+ accounting?: never | undefined;
803
+ appliesToCategoryCode: {
804
+ typeOf: "CategoryCode";
805
+ codeValue: string;
806
+ inCodeSet: {
807
+ typeOf: "CategoryCodeSet";
808
+ identifier: factory.categoryCode.CategorySetIdentifier.SeatingType | factory.categoryCode.CategorySetIdentifier.SoundFormatType | factory.categoryCode.CategorySetIdentifier.VideoFormatType;
809
+ };
810
+ }[];
811
+ } | {
812
+ name?: string | {
813
+ ja?: string | undefined;
814
+ en?: string | undefined;
815
+ kr?: string | undefined;
816
+ } | undefined;
817
+ price: number;
818
+ priceCurrency: factory.priceCurrency;
819
+ typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
820
+ valueAddedTaxIncluded: boolean;
821
+ accounting?: never | undefined;
822
+ appliesToMovieTicket: {
823
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.MovieTicket;
824
+ serviceType: string;
825
+ serviceOutput: {
826
+ typeOf: string;
827
+ };
828
+ };
829
+ appliesToVideoFormat: string;
830
+ } | {
831
+ name?: string | {
832
+ ja?: string | undefined;
833
+ en?: string | undefined;
834
+ kr?: string | undefined;
835
+ } | undefined;
836
+ price: number;
837
+ priceCurrency: factory.priceCurrency;
838
+ typeOf: factory.priceSpecificationType.UnitPriceSpecification;
839
+ valueAddedTaxIncluded: boolean;
840
+ accounting?: {
841
+ typeOf: "Accounting";
842
+ operatingRevenue?: {
843
+ typeOf: "AccountTitle";
844
+ codeValue: string;
845
+ } | undefined;
846
+ accountsReceivable?: number | undefined;
847
+ } | undefined;
848
+ appliesToMovieTicket?: {
849
+ typeOf: import("@chevre/factory/lib/chevre/service/paymentService").PaymentServiceType.MovieTicket;
850
+ serviceOutput: {
851
+ typeOf: string;
852
+ };
853
+ serviceType: string;
854
+ identifier?: string | undefined;
855
+ }[] | undefined;
856
+ appliesToAddOn?: {
857
+ typeOf: factory.offerType.Offer;
858
+ id?: string | undefined;
859
+ identifier?: string | undefined;
860
+ itemOffered: {
861
+ id?: string | undefined;
862
+ name?: {
863
+ ja?: string | undefined;
864
+ en?: string | undefined;
865
+ } | undefined;
866
+ typeOf: factory.product.ProductType.Product;
867
+ productID: string;
868
+ };
869
+ }[] | undefined;
870
+ referenceQuantity: {
871
+ typeOf: factory.quantitativeValue.QuantitativeValueType;
872
+ value?: (number | factory.quantitativeValue.StringValue) | undefined;
873
+ unitCode?: factory.unitCode | undefined;
874
+ minValue?: number | undefined;
875
+ };
876
+ })[];
877
+ } | undefined;
878
+ serialNumber: string;
879
+ id?: string | undefined;
880
+ typeOf: factory.offerType;
881
+ name?: never | undefined;
882
+ })[] | undefined;
883
+ identifier?: string | undefined;
884
+ paymentMethodId?: string | undefined;
885
+ }> & {
886
+ _id: import("mongoose").Types.ObjectId;
887
+ } & {
888
+ __v: number;
889
+ }) | null>;
157
890
  aggregateOrder(params: {
158
891
  project?: {
159
892
  id?: {
@@ -848,26 +848,19 @@ class OrderRepo {
848
848
  })
849
849
  .exec();
850
850
  }
851
- // public async updateIdentifier4migration(params: {
852
- // project: { id: string };
853
- // orderNumber: string;
854
- // identifier: string;
855
- // }) {
856
- // const { orderNumber, project, identifier } = params;
857
- // return this.orderModel.updateOne(
858
- // {
859
- // orderNumber: { $eq: orderNumber },
860
- // 'project.id': { $eq: project.id },
861
- // typeOf: { $eq: factory.order.OrderType.Order }
862
- // },
863
- // {
864
- // $set: {
865
- // ...(typeof identifier === 'string') ? { identifier } : undefined
866
- // }
867
- // }
868
- // )
869
- // .exec();
870
- // }
851
+ async savePaymentMethodId4migaration(params) {
852
+ const { paymentMethodId } = params.paymentMethod;
853
+ if (typeof paymentMethodId !== 'string' || paymentMethodId === '') {
854
+ throw new factory_1.factory.errors.ArgumentNull('paymentMethod.paymentMethodId');
855
+ }
856
+ // 注文ドキュメントにも保管する(2026-07-12~)
857
+ return this.orderModel.findOneAndUpdate({
858
+ identifier: { $eq: params.id },
859
+ paymentMethodId: { $exists: false }
860
+ }, { $set: { paymentMethodId } }, { projection: { _id: 1 } })
861
+ .lean()
862
+ .exec();
863
+ }
871
864
  async aggregateOrder(params) {
872
865
  const matchConditions = {
873
866
  orderDate: {
@@ -158,12 +158,14 @@ export declare class OrderInTransactionRepo extends AcceptedOfferInReserveRepo {
158
158
  }): Promise<void>;
159
159
  /**
160
160
  * 進行中取引に保管された採用済決済方法を検索する
161
+ * 注文ドキュメントから参照する(2026-07-13~)
161
162
  */
162
163
  findInProgressPaymentMethodId(params: {
163
164
  id: string;
164
165
  }): Promise<string | undefined>;
165
166
  /**
166
167
  * 保管された採用済決済方法を検索する
168
+ * 注文ドキュメントから参照する(2026-07-13~)
167
169
  */
168
170
  findPaymentMethodId(params: {
169
171
  id: string;
@@ -317,59 +317,100 @@ class OrderInTransactionRepo extends acceptedOfferInReserve_1.AcceptedOfferInRes
317
317
  }
318
318
  /**
319
319
  * 進行中取引に保管された採用済決済方法を検索する
320
+ * 注文ドキュメントから参照する(2026-07-13~)
320
321
  */
321
322
  async findInProgressPaymentMethodId(params) {
322
- const doc = await this.transactionModel.findOne({
323
- _id: { $eq: params.id },
324
- typeOf: { $eq: factory_1.factory.transactionType.PlaceOrder },
325
- status: { $eq: factory_1.factory.transactionStatusType.InProgress }
323
+ // const doc = await this.transactionModel.findOne(
324
+ // {
325
+ // _id: { $eq: params.id },
326
+ // typeOf: { $eq: factory.transactionType.PlaceOrder },
327
+ // status: { $eq: factory.transactionStatusType.InProgress }
328
+ // },
329
+ // {
330
+ // 'object.paymentMethods': 1,
331
+ // _id: 0
332
+ // }
333
+ // )
334
+ // .lean<{ object: Pick<factory.transaction.placeOrder.IObject, 'paymentMethods'> }>()
335
+ // .exec();
336
+ // if (doc === null) {
337
+ // throw new factory.errors.NotFound(
338
+ // this.transactionModel.modelName,
339
+ // `${factory.transactionType.PlaceOrder} ${factory.transactionStatusType.InProgress} not found`
340
+ // );
341
+ // }
342
+ // return (typeof doc.object.paymentMethods?.paymentMethodId === 'string') ? doc.object.paymentMethods.paymentMethodId : undefined;
343
+ const doc = await this.orderModel.findOne({
344
+ identifier: { $eq: params.id },
345
+ typeOf: { $eq: factory_1.factory.transactionType.PlaceOrder }
326
346
  }, {
327
- 'object.paymentMethods': 1,
347
+ paymentMethodId: 1,
328
348
  _id: 0
329
349
  })
330
350
  .lean()
331
351
  .exec();
332
352
  if (doc === null) {
333
- throw new factory_1.factory.errors.NotFound(this.transactionModel.modelName, `${factory_1.factory.transactionType.PlaceOrder} ${factory_1.factory.transactionStatusType.InProgress} not found`);
353
+ throw new factory_1.factory.errors.NotFound('orderInTransaction');
334
354
  }
335
- return (typeof doc.object.paymentMethods?.paymentMethodId === 'string') ? doc.object.paymentMethods.paymentMethodId : undefined;
355
+ return (typeof doc.paymentMethodId === 'string') ? doc.paymentMethodId : undefined;
336
356
  }
337
357
  /**
338
358
  * 保管された採用済決済方法を検索する
359
+ * 注文ドキュメントから参照する(2026-07-13~)
339
360
  */
340
361
  async findPaymentMethodId(params) {
341
- const doc = await this.transactionModel.findOne({
342
- _id: { $eq: params.id },
343
- typeOf: { $eq: factory_1.factory.transactionType.PlaceOrder }
344
- }, {
345
- 'object.paymentMethods': 1,
362
+ // const doc = await this.transactionModel.findOne(
363
+ // {
364
+ // _id: { $eq: params.id },
365
+ // typeOf: { $eq: factory.transactionType.PlaceOrder }
366
+ // },
367
+ // {
368
+ // 'object.paymentMethods': 1,
369
+ // _id: 0
370
+ // }
371
+ // )
372
+ // .lean<{ object: Pick<factory.transaction.placeOrder.IObject, 'paymentMethods'> }>()
373
+ // .exec();
374
+ // if (doc === null) {
375
+ // throw new factory.errors.NotFound(
376
+ // this.transactionModel.modelName,
377
+ // `${factory.transactionType.PlaceOrder} ${factory.transactionStatusType.InProgress} not found`
378
+ // );
379
+ // }
380
+ // const paymentMethodId = doc.object.paymentMethods?.paymentMethodId;
381
+ // if (typeof paymentMethodId === 'string') {
382
+ // // 注文ドキュメントにも発行済の場合、同一性を検証(2026-07-12~)
383
+ // const orderDoc = await this.orderModel.findOne(
384
+ // { identifier: { $eq: params.id } },
385
+ // {
386
+ // paymentMethodId: 1,
387
+ // _id: 0
388
+ // }
389
+ // )
390
+ // .lean<Pick<IDocType, 'paymentMethodId'>>()
391
+ // .exec();
392
+ // if (orderDoc === null) {
393
+ // throw new factory.errors.NotFound('orderInTransaction');
394
+ // }
395
+ // const paymentMethodIdByOrder = orderDoc.paymentMethodId;
396
+ // if (typeof paymentMethodIdByOrder === 'string') {
397
+ // // console.log('paymentMethodId matched?', JSON.stringify(doc), JSON.stringify(orderDoc));
398
+ // if (paymentMethodId !== paymentMethodIdByOrder) {
399
+ // throw new factory.errors.Internal('paymentMethodId not matched unexpectedly');
400
+ // }
401
+ // }
402
+ // }
403
+ // return (typeof paymentMethodId === 'string') ? paymentMethodId : undefined;
404
+ const doc = await this.orderModel.findOne({ identifier: { $eq: params.id } }, {
405
+ paymentMethodId: 1,
346
406
  _id: 0
347
407
  })
348
408
  .lean()
349
409
  .exec();
350
410
  if (doc === null) {
351
- throw new factory_1.factory.errors.NotFound(this.transactionModel.modelName, `${factory_1.factory.transactionType.PlaceOrder} ${factory_1.factory.transactionStatusType.InProgress} not found`);
352
- }
353
- const paymentMethodId = doc.object.paymentMethods?.paymentMethodId;
354
- if (typeof paymentMethodId === 'string') {
355
- // 注文ドキュメントにも発行済の場合、同一性を検証(2026-07-12~)
356
- const orderDoc = await this.orderModel.findOne({ identifier: { $eq: params.id } }, {
357
- paymentMethodId: 1,
358
- _id: 0
359
- })
360
- .lean()
361
- .exec();
362
- if (orderDoc === null) {
363
- throw new factory_1.factory.errors.NotFound('orderInTransaction');
364
- }
365
- const paymentMethodIdByOrder = orderDoc.paymentMethodId;
366
- if (typeof paymentMethodIdByOrder === 'string') {
367
- // console.log('paymentMethodId matched?', JSON.stringify(doc), JSON.stringify(orderDoc));
368
- if (paymentMethodId !== paymentMethodIdByOrder) {
369
- throw new factory_1.factory.errors.Internal('paymentMethodId not matched unexpectedly');
370
- }
371
- }
411
+ throw new factory_1.factory.errors.NotFound('orderInTransaction');
372
412
  }
413
+ const paymentMethodId = doc.paymentMethodId;
373
414
  return (typeof paymentMethodId === 'string') ? paymentMethodId : undefined;
374
415
  }
375
416
  async deleteByIdentifier(params) {
@@ -51,5 +51,5 @@ export declare function validateEventOffers(params: {
51
51
  * 承認アクションのresultに条件が保管されているはず(2026-07-06時点で)
52
52
  */
53
53
  authorizeOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[];
54
- unitPriceOfferConditions?: IPreparedUnitPriceOfferConditions[];
54
+ unitPriceOfferConditions: IPreparedUnitPriceOfferConditions[];
55
55
  }): void;
@@ -333,7 +333,9 @@ function validateEventOffers(params) {
333
333
  }
334
334
  }
335
335
  else {
336
- validatingAuthorizeOfferActions = [...params.authorizeOfferActions];
336
+ // unitPriceOfferConditionsの準備は必須化(2026-07-13~)
337
+ throw new factory_1.factory.errors.NotImplemented('unitPriceOfferConditions must be an array');
338
+ // validatingAuthorizeOfferActions = [...params.authorizeOfferActions];
337
339
  }
338
340
  const { paymentMethods } = params;
339
341
  const firstCreditCardPaymentMethodIdentifier = paymentMethods.find((referenceInvoice) => {
@@ -41,11 +41,6 @@ interface IConfirmOptions {
41
41
  * 注文における最大CreditCardIF決済方法数
42
42
  */
43
43
  maxNumCreditCardPaymentMethod: number;
44
- /**
45
- * 2026-07-06~
46
- * 実験的に
47
- */
48
- usePrepareUnitPriceOfferConditions?: boolean;
49
44
  }
50
45
  type IConfirmParams = PlaceOrderFactory.IConfirmParams;
51
46
  interface IConfirmResult {
@@ -118,15 +118,11 @@ function confirm(params, options) {
118
118
  }))
119
119
  .filter(({ serialNumber }) => typeof serialNumber === 'string' && serialNumbers.includes(serialNumber));
120
120
  // 単価オファーの全適用条件を検証するために、単価オファーを参照(2026-07-06~)
121
- let unitPriceOfferConditions;
122
- const { usePrepareUnitPriceOfferConditions } = options;
123
- if (usePrepareUnitPriceOfferConditions === true) {
124
- unitPriceOfferConditions = await (0, prepareUnitPriceOfferConditions_1.prepareUnitPriceOfferConditions)({
125
- project: { id: transaction.project.id, },
126
- acceptedOffers,
127
- authorizeEventServiceOfferActions
128
- })({ offer: repos.offer });
129
- }
121
+ const unitPriceOfferConditions = await (0, prepareUnitPriceOfferConditions_1.prepareUnitPriceOfferConditions)({
122
+ project: { id: transaction.project.id, },
123
+ acceptedOffers,
124
+ authorizeEventServiceOfferActions
125
+ })({ offer: repos.offer });
130
126
  // authorizePaymentActionsからpayTransactionsを参照(2024-06-20~)
131
127
  let payTransactions = [];
132
128
  // 決済承認アクションのinstrument依存をobject依存へ変更(2025-12-14~)
@@ -150,8 +146,8 @@ function confirm(params, options) {
150
146
  acceptPayActions,
151
147
  authorizePaymentActions, authorizeEventServiceOfferActions,
152
148
  acceptedOffers, payTransactions, customer,
149
+ unitPriceOfferConditions,
153
150
  ...(typeof code === 'string') ? { code } : undefined,
154
- ...((Array.isArray(unitPriceOfferConditions)) && { unitPriceOfferConditions }),
155
151
  paymentMethodIdByTransaction
156
152
  }, options);
157
153
  // ポストアクションを作成
@@ -337,7 +333,7 @@ function createResult(params, options) {
337
333
  order: { price },
338
334
  paymentMethods,
339
335
  authorizeOfferActions: params.authorizeEventServiceOfferActions,
340
- ...((Array.isArray(params.unitPriceOfferConditions)) && { unitPriceOfferConditions: params.unitPriceOfferConditions })
336
+ unitPriceOfferConditions: params.unitPriceOfferConditions
341
337
  });
342
338
  // 注文オファー検証
343
339
  (0, validation_1.validateAcceptedOffers)({
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  "postversion": "git push origin --tags",
92
92
  "prepublishOnly": "npm run clean && npm run build"
93
93
  },
94
- "version": "25.2.0-alpha.22"
94
+ "version": "25.2.0-alpha.24"
95
95
  }