@chevre/domain 24.0.0-alpha.26 → 24.0.0-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/lib/chevre/errorHandler.js +1 -1
  2. package/lib/chevre/repo/accountTitle.d.ts +7 -3
  3. package/lib/chevre/repo/action/acceptCOAOffer.js +0 -2
  4. package/lib/chevre/repo/action/acceptPay.d.ts +4 -0
  5. package/lib/chevre/repo/action/acceptPay.js +40 -52
  6. package/lib/chevre/repo/action/actionProcess.d.ts +31 -1
  7. package/lib/chevre/repo/action/actionProcess.js +499 -4
  8. package/lib/chevre/repo/action/authorizeInvoice.d.ts +14 -1
  9. package/lib/chevre/repo/action/authorizeInvoice.js +36 -0
  10. package/lib/chevre/repo/action/authorizePaymentMethod.js +9 -47
  11. package/lib/chevre/repo/action.d.ts +8 -8
  12. package/lib/chevre/repo/action.js +2 -510
  13. package/lib/chevre/repo/aggregateOffer.d.ts +7 -3
  14. package/lib/chevre/repo/assetTransaction.d.ts +48 -22
  15. package/lib/chevre/repo/categoryCode.d.ts +8 -3
  16. package/lib/chevre/repo/comment.d.ts +7 -3
  17. package/lib/chevre/repo/creativeWork.d.ts +8 -7
  18. package/lib/chevre/repo/customer.d.ts +8 -3
  19. package/lib/chevre/repo/event.d.ts +11 -23
  20. package/lib/chevre/repo/event.js +22 -23
  21. package/lib/chevre/repo/eventSeries.d.ts +10 -4
  22. package/lib/chevre/repo/identity.d.ts +12 -3
  23. package/lib/chevre/repo/identityProvider.d.ts +7 -18
  24. package/lib/chevre/repo/issuer.d.ts +8 -8
  25. package/lib/chevre/repo/member.d.ts +7 -3
  26. package/lib/chevre/repo/merchantReturnPolicy.d.ts +7 -3
  27. package/lib/chevre/repo/message.js +1 -1
  28. package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +1 -1
  29. package/lib/chevre/repo/mongoose/schemas/action.d.ts +1 -1
  30. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +2 -2
  31. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +1 -1
  32. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +1 -1
  33. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +2 -2
  34. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +2 -2
  35. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +2 -2
  36. package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +2 -2
  37. package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +1 -1
  38. package/lib/chevre/repo/mongoose/schemas/identity.d.ts +1 -1
  39. package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +1 -1
  40. package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -1
  41. package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +1 -1
  42. package/lib/chevre/repo/mongoose/schemas/message.d.ts +2 -2
  43. package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +1 -1
  44. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +1 -1
  45. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -1
  46. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +2 -2
  47. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +2 -2
  48. package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +1 -1
  49. package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
  50. package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +1 -1
  51. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +3 -1
  52. package/lib/chevre/repo/mongoose/schemas/product.d.ts +1 -1
  53. package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +1 -1
  54. package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -1
  55. package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +1 -1
  56. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +1 -1
  57. package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +1 -1
  58. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +1 -1
  59. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +1 -1
  60. package/lib/chevre/repo/mongoose/schemas/task.d.ts +1 -1
  61. package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +1 -1
  62. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +5 -2
  63. package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +1 -1
  64. package/lib/chevre/repo/movieTicketType.d.ts +2 -1
  65. package/lib/chevre/repo/offerCatalog.d.ts +8 -4
  66. package/lib/chevre/repo/order.d.ts +10 -4
  67. package/lib/chevre/repo/ownershipInfo.d.ts +8 -7
  68. package/lib/chevre/repo/paymentService.d.ts +8 -8
  69. package/lib/chevre/repo/place/movieTheater.d.ts +7 -3
  70. package/lib/chevre/repo/place/screeningRoom.d.ts +7 -3
  71. package/lib/chevre/repo/potentialAction.d.ts +7 -26
  72. package/lib/chevre/repo/priceSpecification.d.ts +47 -22
  73. package/lib/chevre/repo/priceSpecification.js +0 -6
  74. package/lib/chevre/repo/product.d.ts +7 -3
  75. package/lib/chevre/repo/project.d.ts +8 -11
  76. package/lib/chevre/repo/reservation.d.ts +18 -6
  77. package/lib/chevre/repo/reserveInterface.js +4 -4
  78. package/lib/chevre/repo/role.d.ts +39 -3
  79. package/lib/chevre/repo/schedule.js +1 -1
  80. package/lib/chevre/repo/seller.d.ts +7 -50
  81. package/lib/chevre/repo/task.d.ts +7 -67
  82. package/lib/chevre/repo/transaction.d.ts +103 -13
  83. package/lib/chevre/service/order/sendOrder.js +0 -1
  84. package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +9 -8
  85. package/lib/chevre/service/payment/creditCard/voidTransaction.js +15 -7
  86. package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +2 -0
  87. package/lib/chevre/service/task/voidPayment.js +2 -0
  88. package/package.json +3 -3
@@ -34,48 +34,73 @@ export declare class PriceSpecificationRepo {
34
34
  id: string;
35
35
  };
36
36
  }): Promise<void>;
37
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType> & ((import("@chevre/factory/lib/priceSpecification/categoryCodeChargeSpecification").IPriceSpecification & {
38
- validFrom?: Date;
39
- validThrough?: Date;
37
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, {}, {}> & (({
38
+ project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
39
+ name?: (string | import("@chevre/factory/lib/multilingualString").IMultilingualString) | undefined;
40
+ price: number;
41
+ priceCurrency: factory.priceCurrency;
42
+ typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
43
+ valueAddedTaxIncluded: boolean;
44
+ accounting?: never | undefined;
45
+ appliesToCategoryCode: import("@chevre/factory/lib/priceSpecification/categoryCodeChargeSpecification").IAppliesToCategoryCode[];
40
46
  } & {
41
- _id: import("mongoose").Types.ObjectId;
42
- }) | (import("@chevre/factory/lib/priceSpecification/movieTicketTypeChargeSpecification").IPriceSpecification & {
43
47
  validFrom?: Date;
44
48
  validThrough?: Date;
45
49
  } & {
46
50
  _id: import("mongoose").Types.ObjectId;
47
- }) | (import("@chevre/factory/lib/priceSpecification/unitPriceSpecification").IPriceSpecification & {
48
- validFrom?: Date;
49
- validThrough?: Date;
50
51
  } & {
51
- _id: import("mongoose").Types.ObjectId;
52
- }) | (import("@chevre/factory/lib/priceSpecification").IPriceSpecification<factory.priceSpecificationType> & {
53
- validFrom?: Date;
54
- validThrough?: Date;
52
+ __v: number;
53
+ }) | ({
54
+ project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
55
+ name?: (string | import("@chevre/factory/lib/multilingualString").IMultilingualString) | undefined;
56
+ price: number;
57
+ priceCurrency: factory.priceCurrency;
58
+ typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
59
+ valueAddedTaxIncluded: boolean;
60
+ accounting?: never | undefined;
61
+ appliesToMovieTicket: import("@chevre/factory/lib/priceSpecification/movieTicketTypeChargeSpecification").IAppliesToMovieTicket;
62
+ appliesToVideoFormat: string;
55
63
  } & {
56
- _id: import("mongoose").Types.ObjectId;
57
- })), import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, IDocType> & ((import("@chevre/factory/lib/priceSpecification/categoryCodeChargeSpecification").IPriceSpecification & {
58
64
  validFrom?: Date;
59
65
  validThrough?: Date;
60
66
  } & {
61
67
  _id: import("mongoose").Types.ObjectId;
62
- }) | (import("@chevre/factory/lib/priceSpecification/movieTicketTypeChargeSpecification").IPriceSpecification & {
63
- validFrom?: Date;
64
- validThrough?: Date;
65
68
  } & {
66
- _id: import("mongoose").Types.ObjectId;
67
- }) | (import("@chevre/factory/lib/priceSpecification/unitPriceSpecification").IPriceSpecification & {
69
+ __v: number;
70
+ })), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, {}, {}> & (({
71
+ project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
72
+ name?: (string | import("@chevre/factory/lib/multilingualString").IMultilingualString) | undefined;
73
+ price: number;
74
+ priceCurrency: factory.priceCurrency;
75
+ typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
76
+ valueAddedTaxIncluded: boolean;
77
+ accounting?: never | undefined;
78
+ appliesToCategoryCode: import("@chevre/factory/lib/priceSpecification/categoryCodeChargeSpecification").IAppliesToCategoryCode[];
79
+ } & {
68
80
  validFrom?: Date;
69
81
  validThrough?: Date;
70
82
  } & {
71
83
  _id: import("mongoose").Types.ObjectId;
72
- }) | (import("@chevre/factory/lib/priceSpecification").IPriceSpecification<factory.priceSpecificationType> & {
84
+ } & {
85
+ __v: number;
86
+ }) | ({
87
+ project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
88
+ name?: (string | import("@chevre/factory/lib/multilingualString").IMultilingualString) | undefined;
89
+ price: number;
90
+ priceCurrency: factory.priceCurrency;
91
+ typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
92
+ valueAddedTaxIncluded: boolean;
93
+ accounting?: never | undefined;
94
+ appliesToMovieTicket: import("@chevre/factory/lib/priceSpecification/movieTicketTypeChargeSpecification").IAppliesToMovieTicket;
95
+ appliesToVideoFormat: string;
96
+ } & {
73
97
  validFrom?: Date;
74
98
  validThrough?: Date;
75
99
  } & {
76
100
  _id: import("mongoose").Types.ObjectId;
77
- }))>>;
78
- reIndex(): Promise<import("bson").Document>;
101
+ } & {
102
+ __v: number;
103
+ }))) | null>;
79
104
  unsetUnnecessaryFields(params: {
80
105
  filter: any;
81
106
  $unset: any;
@@ -260,12 +260,6 @@ class PriceSpecificationRepo {
260
260
  .sort({ price: factory.sortType.Ascending })
261
261
  .cursor();
262
262
  }
263
- async reIndex() {
264
- // return this.priceSpecificationModel.collection.name;
265
- return this.priceSpecificationModel.db.db.command({
266
- reIndex: this.priceSpecificationModel.collection.name
267
- });
268
- }
269
263
  async unsetUnnecessaryFields(params) {
270
264
  return this.priceSpecificationModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
271
265
  .exec();
@@ -103,11 +103,15 @@ export declare class ProductRepo {
103
103
  id: string;
104
104
  };
105
105
  }): Promise<void>;
106
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer> & IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
106
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("./mongoose/schemas/product").IDocType, {}, {}> & IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
107
107
  _id: Types.ObjectId;
108
- }, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer> & IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
108
+ } & {
109
+ __v: number;
110
+ }, import("mongoose").QueryOptions<import("./mongoose/schemas/product").IDocType>, (import("mongoose").Document<unknown, {}, import("./mongoose/schemas/product").IDocType, {}, {}> & IDocTypeAsProduct & import("./mongoose/schemas/product").IDocTypeAsProductOffer & {
109
111
  _id: Types.ObjectId;
110
- }>>;
112
+ } & {
113
+ __v: number;
114
+ }) | null>;
111
115
  unsetUnnecessaryFields(params: {
112
116
  filter: FilterQuery<factory.product.IProduct>;
113
117
  $unset: any;
@@ -1,4 +1,5 @@
1
1
  import type { Connection, FilterQuery } from 'mongoose';
2
+ import { IDocType } from './mongoose/schemas/project';
2
3
  import * as factory from '../factory';
3
4
  type IKeyOfProjection = keyof factory.project.IProject;
4
5
  /**
@@ -49,27 +50,23 @@ export declare class ProjectRepo {
49
50
  deleteById(params: {
50
51
  id: string;
51
52
  }): Promise<void>;
52
- getCursor(conditions: FilterQuery<factory.project.IProject>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, Omit<factory.project.IProject, "id"> & {
53
- _id: string;
54
- aggregateReservation?: any;
55
- makesOffer?: factory.project.IMakesOffer[];
56
- }> & Omit<factory.project.IProject, "id"> & {
53
+ getCursor(conditions: FilterQuery<factory.project.IProject>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, {}, {}> & Omit<factory.project.IProject, "id"> & {
57
54
  _id: string;
58
55
  aggregateReservation?: any;
59
56
  makesOffer?: factory.project.IMakesOffer[];
60
57
  } & Required<{
61
58
  _id: string;
62
- }>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, Omit<factory.project.IProject, "id"> & {
63
- _id: string;
64
- aggregateReservation?: any;
65
- makesOffer?: factory.project.IMakesOffer[];
66
- }> & Omit<factory.project.IProject, "id"> & {
59
+ }> & {
60
+ __v: number;
61
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, {}, {}> & Omit<factory.project.IProject, "id"> & {
67
62
  _id: string;
68
63
  aggregateReservation?: any;
69
64
  makesOffer?: factory.project.IMakesOffer[];
70
65
  } & Required<{
71
66
  _id: string;
72
- }>>>;
67
+ }> & {
68
+ __v: number;
69
+ }) | null>;
73
70
  unsetUnnecessaryFields(params: {
74
71
  filter: any;
75
72
  $unset: any;
@@ -129,35 +129,47 @@ export declare class ReservationRepo {
129
129
  _id: string;
130
130
  bookingAgent?: any;
131
131
  previousReservationStatus?: factory.reservationStatusType;
132
- }> & ((Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> & {
132
+ }, {}, {}> & ((Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> & {
133
133
  _id: string;
134
134
  bookingAgent?: any;
135
135
  previousReservationStatus?: factory.reservationStatusType;
136
136
  } & Required<{
137
137
  _id: string;
138
- }>) | (Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id"> & {
138
+ }> & {
139
+ __v: number;
140
+ }) | (Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id"> & {
139
141
  _id: string;
140
142
  bookingAgent?: any;
141
143
  previousReservationStatus?: factory.reservationStatusType;
142
144
  } & Required<{
143
145
  _id: string;
144
- }>)), import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, (Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> | Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id">) & {
146
+ }> & {
147
+ __v: number;
148
+ })), import("mongoose").QueryOptions<(Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> | Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id">) & {
145
149
  _id: string;
146
150
  bookingAgent?: any;
147
151
  previousReservationStatus?: factory.reservationStatusType;
148
- }> & ((Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> & {
152
+ }>, (import("mongoose").Document<unknown, {}, (Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> | Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id">) & {
153
+ _id: string;
154
+ bookingAgent?: any;
155
+ previousReservationStatus?: factory.reservationStatusType;
156
+ }, {}, {}> & ((Omit<import("@chevre/factory/lib/reservation/busReservation").IReservation, "id"> & {
149
157
  _id: string;
150
158
  bookingAgent?: any;
151
159
  previousReservationStatus?: factory.reservationStatusType;
152
160
  } & Required<{
153
161
  _id: string;
154
- }>) | (Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id"> & {
162
+ }> & {
163
+ __v: number;
164
+ }) | (Omit<import("@chevre/factory/lib/reservation/event").IReservation, "id"> & {
155
165
  _id: string;
156
166
  bookingAgent?: any;
157
167
  previousReservationStatus?: factory.reservationStatusType;
158
168
  } & Required<{
159
169
  _id: string;
160
- }>))>>;
170
+ }> & {
171
+ __v: number;
172
+ }))) | null>;
161
173
  unsetUnnecessaryFields(params: {
162
174
  filter: any;
163
175
  $unset: any;
@@ -29,9 +29,9 @@ class ReserveInterfaceRepo {
29
29
  return this.reserveInterface.findOne(filterQuery, {
30
30
  _id: 0,
31
31
  id: { $toString: '$_id' },
32
- project: '$project',
33
- availableChannel: '$availableChannel',
34
- typeOf: '$typeOf'
32
+ project: 1,
33
+ availableChannel: 1,
34
+ typeOf: 1
35
35
  })
36
36
  .lean()
37
37
  .exec();
@@ -40,7 +40,7 @@ class ReserveInterfaceRepo {
40
40
  return this.reserveInterface.findOne({}, {
41
41
  _id: 0,
42
42
  id: { $toString: '$_id' },
43
- project: '$project'
43
+ project: 1
44
44
  })
45
45
  .lean()
46
46
  .exec();
@@ -24,19 +24,55 @@ export declare class RoleRepo {
24
24
  $eq: factory.role.organizationRole.RoleName;
25
25
  };
26
26
  permission: string;
27
- }): Promise<(import("mongoose").FlattenMaps<IDocType> & {
27
+ }): Promise<(import("mongoose").FlattenMaps<{
28
+ typeOf: import("@chevre/factory/lib/role").RoleType;
29
+ memberOf: {
30
+ typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
31
+ };
32
+ member: {
33
+ typeOf: import("@chevre/factory/lib/role/organizationRole").IMemberType;
34
+ };
35
+ roleName: import("@chevre/factory/lib/role/organizationRole").RoleName;
36
+ permissions: string[];
37
+ }> & {
28
38
  _id: import("mongoose").Types.ObjectId;
39
+ } & {
40
+ __v: number;
29
41
  }) | null>;
30
42
  removePermissionIfExists(params: {
31
43
  roleName: {
32
44
  $eq: factory.role.organizationRole.RoleName;
33
45
  };
34
46
  permission: string;
35
- }): Promise<(import("mongoose").FlattenMaps<IDocType> & {
47
+ }): Promise<(import("mongoose").FlattenMaps<{
48
+ typeOf: import("@chevre/factory/lib/role").RoleType;
49
+ memberOf: {
50
+ typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
51
+ };
52
+ member: {
53
+ typeOf: import("@chevre/factory/lib/role/organizationRole").IMemberType;
54
+ };
55
+ roleName: import("@chevre/factory/lib/role/organizationRole").RoleName;
56
+ permissions: string[];
57
+ }> & {
36
58
  _id: import("mongoose").Types.ObjectId;
59
+ } & {
60
+ __v: number;
37
61
  }) | null>;
38
- addMember(params: Pick<IRole, 'member' | 'memberOf' | 'roleName'>): Promise<(import("mongoose").FlattenMaps<IDocType> & {
62
+ addMember(params: Pick<IRole, 'member' | 'memberOf' | 'roleName'>): Promise<(import("mongoose").FlattenMaps<{
63
+ typeOf: import("@chevre/factory/lib/role").RoleType;
64
+ memberOf: {
65
+ typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
66
+ };
67
+ member: {
68
+ typeOf: import("@chevre/factory/lib/role/organizationRole").IMemberType;
69
+ };
70
+ roleName: import("@chevre/factory/lib/role/organizationRole").RoleName;
71
+ permissions: string[];
72
+ }> & {
39
73
  _id: import("mongoose").Types.ObjectId;
74
+ } & {
75
+ __v: number;
40
76
  }) | null>;
41
77
  create(params: Pick<IRole, 'member' | 'memberOf' | 'permissions' | 'roleName'>): Promise<{
42
78
  id: string;
@@ -34,7 +34,7 @@ class ScheduleRepo {
34
34
  return this.scheduleModel.findOne({}, {
35
35
  _id: 0,
36
36
  id: { $toString: '$_id' },
37
- project: '$project'
37
+ project: 1
38
38
  })
39
39
  .lean()
40
40
  .exec();
@@ -1,4 +1,5 @@
1
1
  import { AnyExpression, Connection, FilterQuery, QueryOptions, Types } from 'mongoose';
2
+ import { IDocType } from './mongoose/schemas/seller';
2
3
  import * as factory from '../factory';
3
4
  export type ISellerWithId = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
4
5
  id: string;
@@ -75,59 +76,15 @@ export declare class SellerRepo {
75
76
  id: string;
76
77
  makesOffer: factory.seller.IMakesOffer;
77
78
  }): Promise<void>;
78
- getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
79
- url?: string | undefined;
80
- project: Pick<factory.project.IProject, "id" | "typeOf">;
81
- name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
82
- typeOf: factory.organizationType.Corporation;
83
- additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
84
- location?: factory.organization.ILocation | undefined;
85
- telephone?: string | undefined;
86
- branchCode: string;
87
- hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
88
- makesOffer?: factory.seller.IMakesOffer[] | undefined;
89
- paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
90
- }> & {
91
- url?: string | undefined;
92
- project: Pick<factory.project.IProject, "id" | "typeOf">;
93
- name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
94
- typeOf: factory.organizationType.Corporation;
95
- additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
96
- location?: factory.organization.ILocation | undefined;
97
- telephone?: string | undefined;
98
- branchCode: string;
99
- hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
100
- makesOffer?: factory.seller.IMakesOffer[] | undefined;
101
- paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
102
- } & {
79
+ getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, {}, {}> & IDocType & {
103
80
  _id: Types.ObjectId;
104
- }, QueryOptions<import("mongoose").Document<unknown, {}, {
105
- url?: string | undefined;
106
- project: Pick<factory.project.IProject, "id" | "typeOf">;
107
- name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
108
- typeOf: factory.organizationType.Corporation;
109
- additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
110
- location?: factory.organization.ILocation | undefined;
111
- telephone?: string | undefined;
112
- branchCode: string;
113
- hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
114
- makesOffer?: factory.seller.IMakesOffer[] | undefined;
115
- paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
116
- }> & {
117
- url?: string | undefined;
118
- project: Pick<factory.project.IProject, "id" | "typeOf">;
119
- name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
120
- typeOf: factory.organizationType.Corporation;
121
- additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
122
- location?: factory.organization.ILocation | undefined;
123
- telephone?: string | undefined;
124
- branchCode: string;
125
- hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
126
- makesOffer?: factory.seller.IMakesOffer[] | undefined;
127
- paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
128
81
  } & {
82
+ __v: number;
83
+ }, QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, {}, {}> & IDocType & {
129
84
  _id: Types.ObjectId;
130
- }>>;
85
+ } & {
86
+ __v: number;
87
+ }) | null>;
131
88
  unsetUnnecessaryFields(params: {
132
89
  filter: any;
133
90
  $unset: any;
@@ -1,7 +1,7 @@
1
1
  import type { AnyKeys, Connection, FilterQuery, ProjectionType, UpdateWriteOpResult } from 'mongoose';
2
2
  import { INextFunction } from '../eventEmitter/task';
3
3
  import * as factory from '../factory';
4
- import { IModel } from './mongoose/schemas/task';
4
+ import { IModel, IDocType } from './mongoose/schemas/task';
5
5
  import type { IExecutableTask } from '../taskSettings';
6
6
  interface IAggregationByStatus {
7
7
  taskCount: number;
@@ -229,75 +229,15 @@ export declare class TaskRepo {
229
229
  }): Promise<{
230
230
  count: number;
231
231
  }>;
232
- getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
233
- project: Pick<factory.project.IProject, "id" | "typeOf">;
234
- identifier?: string | undefined;
235
- name: factory.taskName;
236
- description?: string | undefined;
237
- alternateName?: string | undefined;
238
- expires?: Date | undefined;
239
- data: import("@chevre/factory/lib/task").IData;
240
- status: factory.taskStatus;
241
- runsAt: Date;
242
- dateAborted?: Date | undefined;
243
- remainingNumberOfTries: number;
244
- lastTriedAt?: Date | undefined;
245
- numberOfTried: number;
246
- executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
247
- executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
248
- }> & {
249
- project: Pick<factory.project.IProject, "id" | "typeOf">;
250
- identifier?: string | undefined;
251
- name: factory.taskName;
252
- description?: string | undefined;
253
- alternateName?: string | undefined;
254
- expires?: Date | undefined;
255
- data: import("@chevre/factory/lib/task").IData;
256
- status: factory.taskStatus;
257
- runsAt: Date;
258
- dateAborted?: Date | undefined;
259
- remainingNumberOfTries: number;
260
- lastTriedAt?: Date | undefined;
261
- numberOfTried: number;
262
- executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
263
- executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
264
- } & {
232
+ getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType, {}, {}> & IDocType & {
265
233
  _id: import("mongoose").Types.ObjectId;
266
- }, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, {
267
- project: Pick<factory.project.IProject, "id" | "typeOf">;
268
- identifier?: string | undefined;
269
- name: factory.taskName;
270
- description?: string | undefined;
271
- alternateName?: string | undefined;
272
- expires?: Date | undefined;
273
- data: import("@chevre/factory/lib/task").IData;
274
- status: factory.taskStatus;
275
- runsAt: Date;
276
- dateAborted?: Date | undefined;
277
- remainingNumberOfTries: number;
278
- lastTriedAt?: Date | undefined;
279
- numberOfTried: number;
280
- executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
281
- executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
282
- }> & {
283
- project: Pick<factory.project.IProject, "id" | "typeOf">;
284
- identifier?: string | undefined;
285
- name: factory.taskName;
286
- description?: string | undefined;
287
- alternateName?: string | undefined;
288
- expires?: Date | undefined;
289
- data: import("@chevre/factory/lib/task").IData;
290
- status: factory.taskStatus;
291
- runsAt: Date;
292
- dateAborted?: Date | undefined;
293
- remainingNumberOfTries: number;
294
- lastTriedAt?: Date | undefined;
295
- numberOfTried: number;
296
- executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
297
- executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
298
234
  } & {
235
+ __v: number;
236
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, {}, {}> & IDocType & {
299
237
  _id: import("mongoose").Types.ObjectId;
300
- }>>;
238
+ } & {
239
+ __v: number;
240
+ }) | null>;
301
241
  unsetUnnecessaryFields(params: {
302
242
  filter: FilterQuery<factory.task.ITask<factory.taskName>>;
303
243
  $unset: AnyKeys<factory.task.ITask<factory.taskName>>;
@@ -125,31 +125,121 @@ export declare class TransactionRepo {
125
125
  $lt: Date;
126
126
  };
127
127
  }): Promise<import("mongodb").DeleteResult>;
128
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & ((import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
129
- id: string;
128
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("./mongoose/schemas/transaction").IDocType, {}, {}> & (({
129
+ object: import("@chevre/factory/lib/transaction/placeOrder").IObject;
130
+ error?: any;
131
+ project: import("@chevre/factory/lib/transaction").IProject;
132
+ seller: import("@chevre/factory/lib/transaction/placeOrder").ISeller;
133
+ typeOf: factory.transactionType.PlaceOrder;
134
+ expires: Date;
135
+ result?: import("@chevre/factory/lib/transaction/placeOrder").IResult | undefined;
136
+ startDate: Date;
137
+ endDate?: Date | undefined;
138
+ status: factory.transactionStatusType;
139
+ agent: import("@chevre/factory/lib/transaction/placeOrder").IAgent;
140
+ instrument?: import("@chevre/factory/lib/transaction/placeOrder").IInstrument | undefined;
141
+ potentialActions?: import("@chevre/factory/lib/transaction/placeOrder").IPotentialActions | undefined;
142
+ tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
130
143
  } & {
131
144
  _id: import("mongoose").Types.ObjectId;
132
- }) | (import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
133
- id: string;
145
+ } & {
146
+ __v: number;
147
+ }) | ({
148
+ object: import("@chevre/factory/lib/transaction/returnOrder").IObject;
149
+ error?: any;
150
+ project: import("@chevre/factory/lib/transaction").IProject;
151
+ seller: import("@chevre/factory/lib/transaction").ISeller;
152
+ typeOf: factory.transactionType.ReturnOrder;
153
+ expires: Date;
154
+ result?: import("@chevre/factory/lib/transaction/returnOrder").IResult | undefined;
155
+ startDate: Date;
156
+ endDate?: Date | undefined;
157
+ status: factory.transactionStatusType;
158
+ agent: import("@chevre/factory/lib/transaction").IAgent;
159
+ potentialActions?: import("@chevre/factory/lib/transaction/returnOrder").IPotentialActions | undefined;
160
+ recipient?: undefined;
161
+ tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
134
162
  } & {
135
163
  _id: import("mongoose").Types.ObjectId;
136
- }) | (import("@chevre/factory/lib/transaction/returnOrder").IAttributes & {
137
- id: string;
164
+ } & {
165
+ __v: number;
166
+ }) | ({
167
+ object: import("@chevre/factory/lib/transaction/moneyTransfer").IObject;
168
+ error?: any;
169
+ project: import("@chevre/factory/lib/transaction").IProject;
170
+ seller: import("@chevre/factory/lib/transaction").ISeller;
171
+ typeOf: factory.transactionType.MoneyTransfer;
172
+ expires: Date;
173
+ result?: any;
174
+ startDate: Date;
175
+ endDate?: Date | undefined;
176
+ status: factory.transactionStatusType;
177
+ agent: import("@chevre/factory/lib/transaction").IAgent;
178
+ potentialActions?: import("@chevre/factory/lib/transaction/moneyTransfer").IPotentialActions | undefined;
179
+ recipient: import("@chevre/factory/lib/transaction/moneyTransfer").IRecipient;
180
+ tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
138
181
  } & {
139
182
  _id: import("mongoose").Types.ObjectId;
140
- })), import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & ((import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
141
- id: string;
183
+ } & {
184
+ __v: number;
185
+ })), import("mongoose").QueryOptions<import("./mongoose/schemas/transaction").IDocType>, (import("mongoose").Document<unknown, {}, import("./mongoose/schemas/transaction").IDocType, {}, {}> & (({
186
+ object: import("@chevre/factory/lib/transaction/placeOrder").IObject;
187
+ error?: any;
188
+ project: import("@chevre/factory/lib/transaction").IProject;
189
+ seller: import("@chevre/factory/lib/transaction/placeOrder").ISeller;
190
+ typeOf: factory.transactionType.PlaceOrder;
191
+ expires: Date;
192
+ result?: import("@chevre/factory/lib/transaction/placeOrder").IResult | undefined;
193
+ startDate: Date;
194
+ endDate?: Date | undefined;
195
+ status: factory.transactionStatusType;
196
+ agent: import("@chevre/factory/lib/transaction/placeOrder").IAgent;
197
+ instrument?: import("@chevre/factory/lib/transaction/placeOrder").IInstrument | undefined;
198
+ potentialActions?: import("@chevre/factory/lib/transaction/placeOrder").IPotentialActions | undefined;
199
+ tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
142
200
  } & {
143
201
  _id: import("mongoose").Types.ObjectId;
144
- }) | (import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
145
- id: string;
202
+ } & {
203
+ __v: number;
204
+ }) | ({
205
+ object: import("@chevre/factory/lib/transaction/returnOrder").IObject;
206
+ error?: any;
207
+ project: import("@chevre/factory/lib/transaction").IProject;
208
+ seller: import("@chevre/factory/lib/transaction").ISeller;
209
+ typeOf: factory.transactionType.ReturnOrder;
210
+ expires: Date;
211
+ result?: import("@chevre/factory/lib/transaction/returnOrder").IResult | undefined;
212
+ startDate: Date;
213
+ endDate?: Date | undefined;
214
+ status: factory.transactionStatusType;
215
+ agent: import("@chevre/factory/lib/transaction").IAgent;
216
+ potentialActions?: import("@chevre/factory/lib/transaction/returnOrder").IPotentialActions | undefined;
217
+ recipient?: undefined;
218
+ tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
146
219
  } & {
147
220
  _id: import("mongoose").Types.ObjectId;
148
- }) | (import("@chevre/factory/lib/transaction/returnOrder").IAttributes & {
149
- id: string;
221
+ } & {
222
+ __v: number;
223
+ }) | ({
224
+ object: import("@chevre/factory/lib/transaction/moneyTransfer").IObject;
225
+ error?: any;
226
+ project: import("@chevre/factory/lib/transaction").IProject;
227
+ seller: import("@chevre/factory/lib/transaction").ISeller;
228
+ typeOf: factory.transactionType.MoneyTransfer;
229
+ expires: Date;
230
+ result?: any;
231
+ startDate: Date;
232
+ endDate?: Date | undefined;
233
+ status: factory.transactionStatusType;
234
+ agent: import("@chevre/factory/lib/transaction").IAgent;
235
+ potentialActions?: import("@chevre/factory/lib/transaction/moneyTransfer").IPotentialActions | undefined;
236
+ recipient: import("@chevre/factory/lib/transaction/moneyTransfer").IRecipient;
237
+ tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
150
238
  } & {
151
239
  _id: import("mongoose").Types.ObjectId;
152
- }))>>;
240
+ } & {
241
+ __v: number;
242
+ }))) | null>;
153
243
  aggregatePlaceOrder(params: {
154
244
  project?: {
155
245
  id?: {
@@ -128,7 +128,6 @@ function sendOrder(params) {
128
128
  });
129
129
  acceptedOffers = searchSlicedAcceptedOffersResult.acceptedOffers;
130
130
  debug('delivering...', order.orderNumber, acceptedOffers.map((offer) => `${offer.itemOffered.id}`), params.object.acceptedOffers, 'offerIndexBase:', offerIndexBase);
131
- console.log('createOwnerships:', createOwnerships);
132
131
  // 所有権作成
133
132
  if (createOwnerships) {
134
133
  creatingOwnershipInfos = (0, factory_1.createOwnershipInfosFromOrder)({