@chevre/domain 25.2.0-alpha.21 → 25.2.0-alpha.23

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) {
@@ -1,5 +1,4 @@
1
1
  import { factory } from '../../../../factory';
2
- import { IMinimizedIndividualEvent } from '../../../../factory/event';
3
2
  declare function createReserveTransactionStartParams(params: {
4
3
  project: {
5
4
  id: string;
@@ -13,7 +12,6 @@ declare function createReserveTransactionStartParams(params: {
13
12
  transactionNumber: string;
14
13
  }): factory.assetTransaction.reserve.IStartParamsWithoutDetail;
15
14
  declare function createAuthorizeSeatReservationActionAttributes(params: {
16
- event: Pick<IMinimizedIndividualEvent, 'id'>;
17
15
  instrument: {
18
16
  /**
19
17
  * 予約取引番号
@@ -21,8 +19,6 @@ declare function createAuthorizeSeatReservationActionAttributes(params: {
21
19
  transactionNumber: string;
22
20
  };
23
21
  transaction: Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'agent' | 'id' | 'project' | 'seller' | 'typeOf'>;
24
- }, options: {
25
- useLegacyAuthorizeOfferObject: boolean;
26
22
  }): factory.action.authorize.offer.eventService.IAttributes;
27
23
  declare function acceptedOffers2amount(params: {
28
24
  acceptedOffers: Pick<IResultAcceptedOffer, 'priceSpecification' | 'id'>[];
@@ -80,16 +80,16 @@ function createReserveTransactionStartParams(params) {
80
80
  .toDate() // 余裕を持って
81
81
  };
82
82
  }
83
- function createAuthorizeSeatReservationActionAttributes(params, options) {
84
- const { useLegacyAuthorizeOfferObject } = options;
85
- const { event, transaction } = params;
86
- const authorizeObjectEvent = {
87
- id: event.id,
88
- typeOf: factory_1.factory.eventType.ScreeningEvent // fix(2024-07-17~)
89
- };
83
+ function createAuthorizeSeatReservationActionAttributes(params) {
84
+ // const { useLegacyAuthorizeOfferObject } = options;
85
+ const { transaction } = params;
86
+ // const authorizeObjectEvent: factory.action.authorize.offer.eventService.IEventInObject = {
87
+ // id: event.id,
88
+ // typeOf: factory.eventType.ScreeningEvent // fix(2024-07-17~)
89
+ // };
90
90
  const object = {
91
91
  typeOf: factory_1.factory.action.authorize.offer.eventService.ObjectType.SeatReservation,
92
- ...((useLegacyAuthorizeOfferObject) && { event: authorizeObjectEvent })
92
+ // ...((useLegacyAuthorizeOfferObject) && { event: authorizeObjectEvent })
93
93
  };
94
94
  const instrument = {
95
95
  typeOf: factory_1.factory.assetTransactionType.Reserve, // 変更(2024-03-08~)
@@ -63,10 +63,6 @@ interface IAuthorizeOptions {
63
63
  * 最大n日前から予約可能
64
64
  */
65
65
  maxReservationGracePeriodInDays: number;
66
- /**
67
- * 2026-07-04~
68
- */
69
- useLegacyAuthorizeOfferObject: boolean;
70
66
  /**
71
67
  * 2026-07-10~
72
68
  */
@@ -32,9 +32,9 @@ function authorize(params, options) {
32
32
  // まず取引番号発行
33
33
  const { transactionNumber } = await repos.transactionNumber.publishByTimestamp({ startDate: now });
34
34
  const actionAttributes = (0, factory_2.createAuthorizeSeatReservationActionAttributes)({
35
- event, transaction,
35
+ transaction,
36
36
  instrument: { transactionNumber }
37
- }, options);
37
+ });
38
38
  const action = await repos.authorizeOfferAction.start(actionAttributes);
39
39
  try {
40
40
  const processStartReserveResult = await (0, processStartReserve4chevre_1.processStartReserve4chevre)({
@@ -8,14 +8,13 @@ export declare function createAuthorizeSeatReservationActionAttributes(params: {
8
8
  acceptAction: {
9
9
  id: string;
10
10
  };
11
- event: {
12
- id: string;
13
- typeOf: factory.eventType.ScreeningEvent;
14
- };
15
11
  transaction: Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'agent' | 'id' | 'project' | 'seller' | 'typeOf'>;
16
- pendingTransaction: factory.action.authorize.offer.eventService.ICOAPendingTransaction;
17
- }, options: {
18
- useLegacyAuthorizeOfferObject: boolean;
12
+ /**
13
+ * 仮予約済のCOA予約取引
14
+ */
15
+ pendingTransaction: {
16
+ transactionNumber: string;
17
+ };
19
18
  }): factory.action.authorize.offer.eventService.IAttributes;
20
19
  /**
21
20
  * 供給情報から承認アクションの価格を導き出す
@@ -9,20 +9,20 @@ exports.responseBody2acceptedOffers4result = responseBody2acceptedOffers4result;
9
9
  const moment_1 = __importDefault(require("moment"));
10
10
  const util_1 = require("util");
11
11
  const factory_1 = require("../../../../factory");
12
- function createAuthorizeSeatReservationActionAttributes(params, options) {
13
- const { useLegacyAuthorizeOfferObject } = options;
12
+ function createAuthorizeSeatReservationActionAttributes(params) {
13
+ // const { useLegacyAuthorizeOfferObject } = options;
14
14
  const transaction = params.transaction;
15
- const authorizeObjectEvent = {
16
- id: params.event.id,
17
- typeOf: params.event.typeOf
18
- };
15
+ // const authorizeObjectEvent: factory.action.authorize.offer.eventService.IEventInObject = {
16
+ // id: params.event.id,
17
+ // typeOf: params.event.typeOf
18
+ // };
19
19
  const authorizeObject = {
20
20
  typeOf: factory_1.factory.action.authorize.offer.eventService.ObjectType.SeatReservation,
21
21
  id: params.acceptAction.id,
22
- ...((useLegacyAuthorizeOfferObject) && {
23
- event: authorizeObjectEvent,
24
- pendingTransaction: params.pendingTransaction
25
- })
22
+ // ...((useLegacyAuthorizeOfferObject) && {
23
+ // event: authorizeObjectEvent,
24
+ // pendingTransaction: params.pendingTransaction
25
+ // })
26
26
  };
27
27
  const instrument = {
28
28
  typeOf: factory_1.factory.assetTransactionType.COAReserveTransaction, // 変更(2024-03-08~)
@@ -53,11 +53,6 @@ export declare function authorize(params: {
53
53
  requestBody: IRequestBody;
54
54
  responseBody: IResponseBody;
55
55
  };
56
- }, options: {
57
- /**
58
- * 2026-07-04~
59
- */
60
- useLegacyAuthorizeOfferObject: boolean;
61
56
  }): IAuthorizeOperation<Pick<IAuthorizeOfferAction, 'id' | 'instrument'> & {
62
57
  result: IAuthorizeOfferAction['result'];
63
58
  }>;
@@ -12,7 +12,7 @@ const factory_2 = require("../../../factory");
12
12
  /**
13
13
  * COA興行オファー承認
14
14
  */
15
- function authorize(params, options) {
15
+ function authorize(params) {
16
16
  return async (repos) => {
17
17
  const transaction = await repos.placeOrder.findPlaceOrderInProgressById({
18
18
  typeOf: factory_2.factory.transactionType.PlaceOrder,
@@ -28,15 +28,18 @@ function authorize(params, options) {
28
28
  }
29
29
  let screeningEvent;
30
30
  let acceptedOffers;
31
+ // const pendingTransaction: factory.action.authorize.offer.eventService.ICOAPendingTransaction = {
32
+ // theaterCode: params.result.requestBody.theaterCode,
33
+ // dateJouei: params.result.requestBody.dateJouei,
34
+ // titleCode: params.result.requestBody.titleCode,
35
+ // titleBranchNum: params.result.requestBody.titleBranchNum,
36
+ // timeBegin: params.result.requestBody.timeBegin,
37
+ // tmpReserveNum: params.result.responseBody.tmpReserveNum,
38
+ // transactionNumber: params.result.responseBody.tmpReserveNum,
39
+ // typeOf: factory.assetTransactionType.COAReserveTransaction
40
+ // };
31
41
  const pendingTransaction = {
32
- theaterCode: params.result.requestBody.theaterCode,
33
- dateJouei: params.result.requestBody.dateJouei,
34
- titleCode: params.result.requestBody.titleCode,
35
- titleBranchNum: params.result.requestBody.titleBranchNum,
36
- timeBegin: params.result.requestBody.timeBegin,
37
- tmpReserveNum: params.result.responseBody.tmpReserveNum,
38
42
  transactionNumber: params.result.responseBody.tmpReserveNum,
39
- typeOf: factory_2.factory.assetTransactionType.COAReserveTransaction
40
43
  };
41
44
  try {
42
45
  screeningEvent = await repos.event.projectEventFieldsById({ id: params.object.event.id }, [
@@ -71,10 +74,10 @@ function authorize(params, options) {
71
74
  // アクション開始前に例外がthrowされてもCOA仮予約を取り消す機会をつくるためにFailedアクションを作成する(2023-09-12~)
72
75
  const failedActionAttributes = (0, factory_1.createAuthorizeSeatReservationActionAttributes)({
73
76
  acceptAction: params.object.acceptAction,
74
- event: { id: params.object.event.id, typeOf: factory_2.factory.eventType.ScreeningEvent },
77
+ // event: { id: params.object.event.id, typeOf: factory.eventType.ScreeningEvent },
75
78
  transaction,
76
79
  pendingTransaction
77
- }, options);
80
+ });
78
81
  const failedAction = await repos.action.start(failedActionAttributes);
79
82
  await repos.action.giveUp({ typeOf: failedAction.typeOf, id: failedAction.id, error });
80
83
  throw error;
@@ -88,10 +91,10 @@ function authorize(params, options) {
88
91
  // 承認アクションを開始
89
92
  const actionAttributes = (0, factory_1.createAuthorizeSeatReservationActionAttributes)({
90
93
  acceptAction: params.object.acceptAction,
91
- event: { id: screeningEvent.id, typeOf: screeningEvent.typeOf },
94
+ // event: { id: screeningEvent.id, typeOf: screeningEvent.typeOf },
92
95
  transaction,
93
96
  pendingTransaction
94
- }, options);
97
+ });
95
98
  const action = await repos.action.start(actionAttributes);
96
99
  try {
97
100
  // 座席仮予約からオファー情報を生成する
@@ -26,11 +26,6 @@ export declare function authorizeByAcceptAction(params: {
26
26
  */
27
27
  id: string;
28
28
  };
29
- }, options: {
30
- /**
31
- * 2026-07-04~
32
- */
33
- useLegacyAuthorizeOfferObject: boolean;
34
29
  }): IAuthorizeOperation<Pick<IAuthorizeOfferAction, 'id' | 'instrument'> & {
35
30
  result: IAuthorizeOfferAction['result'];
36
31
  }>;
@@ -7,7 +7,7 @@ const factory_1 = require("../../../factory");
7
7
  /**
8
8
  * 採用アクションからCOA興行オファー承認
9
9
  */
10
- function authorizeByAcceptAction(params, options) {
10
+ function authorizeByAcceptAction(params) {
11
11
  return async (repos) => {
12
12
  const acceptAction = await repos.accpetCOAOfferAction.findCompletedById({
13
13
  project: { id: params.project.id },
@@ -57,7 +57,7 @@ function authorizeByAcceptAction(params, options) {
57
57
  store: { id: params.store.id },
58
58
  result: { requestBody, responseBody }
59
59
  };
60
- action = await (0, authorize_1.authorize)(authorizeParams, options)(repos);
60
+ action = await (0, authorize_1.authorize)(authorizeParams)(repos);
61
61
  }
62
62
  return action;
63
63
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "9.5.0-alpha.6",
14
+ "@chevre/factory": "9.5.0-alpha.7",
15
15
  "@motionpicture/coa-service": "10.0.0",
16
16
  "@motionpicture/gmo-service": "6.1.0-alpha.0",
17
17
  "@sendgrid/client": "8.1.4",
@@ -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.21"
94
+ "version": "25.2.0-alpha.23"
95
95
  }