@chevre/domain 24.0.0-alpha.32 → 24.0.0-alpha.33
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.
- package/lib/chevre/factory/transaction.d.ts +0 -3
- package/lib/chevre/repo/action/actionProcess.d.ts +1 -1
- package/lib/chevre/repo/action.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +1 -2
- package/lib/chevre/repo/passport.d.ts +1 -1
- package/lib/chevre/repo/task.d.ts +1 -1
- package/lib/chevre/repo/transaction.d.ts +1 -39
- package/lib/chevre/repository.d.ts +0 -10
- package/lib/chevre/repository.js +0 -22
- package/lib/chevre/service/delivery/factory.js +4 -4
- package/lib/chevre/service/offer/any.d.ts +1 -1
- package/lib/chevre/service/offer.d.ts +1 -2
- package/lib/chevre/service/offer.js +1 -3
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +54 -36
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +78 -64
- package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +0 -1
- package/lib/chevre/service/order/placeOrder/factory/orderedItem.js +3 -8
- package/lib/chevre/service/order/placeOrder/factory.js +5 -5
- package/lib/chevre/service/task/deletePerson.js +0 -1
- package/lib/chevre/service/task/deleteTransaction.js +0 -2
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +0 -2
- package/lib/chevre/service/transaction/deleteTransaction.js +2 -47
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +0 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validatePrice.js +2 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +3 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +12 -17
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +1 -15
- package/lib/chevre/service/transaction.d.ts +0 -4
- package/lib/chevre/service/transaction.js +1 -11
- package/lib/chevre/service/validation/validateOrder.js +2 -2
- package/package.json +3 -3
- package/lib/chevre/repo/action/authorizeMoneyTransferOffer.d.ts +0 -40
- package/lib/chevre/repo/action/authorizeMoneyTransferOffer.js +0 -61
- package/lib/chevre/repo/transaction/moneyTransfer.d.ts +0 -61
- package/lib/chevre/repo/transaction/moneyTransfer.js +0 -379
- package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +0 -38
- package/lib/chevre/service/offer/moneyTransfer/authorize.js +0 -250
- package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.d.ts +0 -16
- package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.js +0 -96
- package/lib/chevre/service/offer/moneyTransfer/settleTransaction.d.ts +0 -9
- package/lib/chevre/service/offer/moneyTransfer/settleTransaction.js +0 -91
- package/lib/chevre/service/offer/moneyTransfer/voidTransaction.d.ts +0 -10
- package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +0 -81
- package/lib/chevre/service/offer/moneyTransfer.d.ts +0 -5
- package/lib/chevre/service/offer/moneyTransfer.js +0 -11
- package/lib/chevre/service/task/confirmMoneyTransfer.d.ts +0 -6
- package/lib/chevre/service/task/confirmMoneyTransfer.js +0 -19
- package/lib/chevre/service/task/returnMoneyTransfer.d.ts +0 -6
- package/lib/chevre/service/task/returnMoneyTransfer.js +0 -55
- package/lib/chevre/service/task/voidMoneyTransferTransaction.d.ts +0 -6
- package/lib/chevre/service/task/voidMoneyTransferTransaction.js +0 -27
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.d.ts +0 -9
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +0 -138
- package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +0 -2
- package/lib/chevre/service/transaction/moneyTransfer/factory.js +0 -55
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.d.ts +0 -9
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.js +0 -65
- package/lib/chevre/service/transaction/moneyTransfer.d.ts +0 -72
- package/lib/chevre/service/transaction/moneyTransfer.js +0 -649
|
@@ -2,9 +2,6 @@ import * as factory from '../factory';
|
|
|
2
2
|
export type IPassportValidator = (params: {
|
|
3
3
|
passport: factory.waiter.passport.IPassport;
|
|
4
4
|
}) => boolean;
|
|
5
|
-
export declare namespace moneyTransfer {
|
|
6
|
-
type IStartParams = factory.transaction.moneyTransfer.IStartParamsWithoutDetail & {};
|
|
7
|
-
}
|
|
8
5
|
export declare namespace placeOrder {
|
|
9
6
|
type IStartParams = factory.transaction.placeOrder.IStartParamsWithoutDetail & {
|
|
10
7
|
broker?: factory.order.IBroker;
|
|
@@ -2,7 +2,7 @@ import { Connection } from 'mongoose';
|
|
|
2
2
|
import * as factory from '../../factory';
|
|
3
3
|
import { IModel as IActionModel } from '../mongoose/schemas/action';
|
|
4
4
|
import { IModel as IActionRecipeModel } from '../mongoose/schemas/actionRecipe';
|
|
5
|
-
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.offer.
|
|
5
|
+
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.offer.product.IAction | factory.action.authorize.paymentMethod.any.IAction) : never;
|
|
6
6
|
export type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AcceptAction ? IAction4transaction<factory.actionType.AcceptAction> : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : T extends factory.actionType.CheckAction ? (factory.action.check.paymentMethod.movieTicket.IAction | factory.action.check.thing.IAction) : T extends factory.actionType.CreateAction ? factory.action.create.IAction : T extends factory.actionType.MoneyTransfer ? factory.action.transfer.moneyTransfer.IAction : T extends factory.actionType.AddAction ? factory.action.update.add.IAction : T extends factory.actionType.ReplaceAction ? factory.action.update.replace.IAction : T extends factory.actionType.UpdateAction ? factory.action.update.update.IAction : T extends factory.actionType.InformAction ? factory.action.interact.inform.IAction<factory.action.interact.inform.IAttributes<factory.action.interact.inform.IObject>> & {
|
|
7
7
|
error?: any;
|
|
8
8
|
purpose?: never;
|
|
@@ -2,7 +2,7 @@ import { FilterQuery, UpdateQuery } from 'mongoose';
|
|
|
2
2
|
import * as factory from '../factory';
|
|
3
3
|
import type { IDocType } from './mongoose/schemas/action';
|
|
4
4
|
import { IAction, IKeyOfProjection, ActionProcessRepo, ICancelActionAction, IActionRecipe } from './action/actionProcess';
|
|
5
|
-
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.offer.
|
|
5
|
+
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.offer.product.IAction | factory.action.authorize.paymentMethod.any.IAction) : never;
|
|
6
6
|
export { ICancelActionAction };
|
|
7
7
|
/**
|
|
8
8
|
* 汎用アクションリポジトリで開始可能なアクションタイプ
|
|
@@ -3,8 +3,7 @@ import { IVirtuals } from '../virtuals';
|
|
|
3
3
|
import * as factory from '../../../factory';
|
|
4
4
|
type IPlaceOrder = Omit<factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
5
5
|
type IReturnOrder = Omit<factory.transaction.returnOrder.ITransaction, 'id'>;
|
|
6
|
-
type
|
|
7
|
-
type IDocType = IPlaceOrder | IReturnOrder | IMoneyTransfer;
|
|
6
|
+
type IDocType = IPlaceOrder | IReturnOrder;
|
|
8
7
|
type IModel = Model<IDocType, {}, {}, IVirtuals>;
|
|
9
8
|
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
10
9
|
type ISchema = Schema<IDocType, IModel, {}, {}, IVirtuals, {}, ISchemaDefinition, IDocType>;
|
|
@@ -20,7 +20,7 @@ interface IOptions {
|
|
|
20
20
|
secret: string;
|
|
21
21
|
passportValidator?: IPassportValidator;
|
|
22
22
|
}
|
|
23
|
-
type IStartParams = (factory.transaction.placeOrder.IStartParamsWithoutDetail
|
|
23
|
+
type IStartParams = (factory.transaction.placeOrder.IStartParamsWithoutDetail) & {};
|
|
24
24
|
/**
|
|
25
25
|
* 取引許可証リポジトリ
|
|
26
26
|
*/
|
|
@@ -31,7 +31,7 @@ type ICreatingTask = Pick<factory.task.IAttributes<factory.taskName>, 'data' | '
|
|
|
31
31
|
export declare class TaskRepo {
|
|
32
32
|
readonly taskModel: IModel;
|
|
33
33
|
constructor(connection: Connection);
|
|
34
|
-
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/
|
|
34
|
+
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/confirmRegisterService").ITask | import("@chevre/factory/lib/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/task/createAccountingReport").ITask | import("@chevre/factory/lib/task/deletePerson").ITask | import("@chevre/factory/lib/task/deleteTransaction").ITask | import("@chevre/factory/lib/task/givePointAward").ITask | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/task/onEventChanged").ITask | import("@chevre/factory/lib/task/onResourceDeleted").ITask | import("@chevre/factory/lib/task/onResourceUpdated").ITask | import("@chevre/factory/lib/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/task/placeOrder").ITask | import("@chevre/factory/lib/task/returnOrder").ITask | import("@chevre/factory/lib/task/returnPayTransaction").ITask | import("@chevre/factory/lib/task/returnPointAward").ITask | import("@chevre/factory/lib/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/task/sendEmailMessage").ITask | import("@chevre/factory/lib/task/sendOrder").ITask | import("@chevre/factory/lib/task/triggerWebhook").ITask | import("@chevre/factory/lib/task/useReservation").ITask | import("@chevre/factory/lib/task/voidPayTransaction").ITask | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/voidReserveTransaction").ITask>[];
|
|
35
35
|
runImmediately(params: Pick<factory.task.IAttributes<factory.taskName>, 'data' | 'expires' | 'name' | 'project' | 'remainingNumberOfTries' | 'runsAt'> & {
|
|
36
36
|
alternateName?: never;
|
|
37
37
|
identifier?: never;
|
|
@@ -73,7 +73,7 @@ export declare class TransactionRepo {
|
|
|
73
73
|
$in: factory.transactionStatusType[];
|
|
74
74
|
};
|
|
75
75
|
limit: number;
|
|
76
|
-
}): Promise<Pick<import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/
|
|
76
|
+
}): Promise<Pick<import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
77
77
|
/**
|
|
78
78
|
* set task status exported by transaction id
|
|
79
79
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -164,25 +164,6 @@ export declare class TransactionRepo {
|
|
|
164
164
|
_id: import("mongoose").Types.ObjectId;
|
|
165
165
|
} & {
|
|
166
166
|
__v: number;
|
|
167
|
-
}) | ({
|
|
168
|
-
object: import("@chevre/factory/lib/transaction/moneyTransfer").IObject;
|
|
169
|
-
error?: any;
|
|
170
|
-
project: import("@chevre/factory/lib/transaction").IProject;
|
|
171
|
-
seller: import("@chevre/factory/lib/transaction").ISeller;
|
|
172
|
-
typeOf: factory.transactionType.MoneyTransfer;
|
|
173
|
-
expires: Date;
|
|
174
|
-
result?: any;
|
|
175
|
-
startDate: Date;
|
|
176
|
-
endDate?: Date | undefined;
|
|
177
|
-
status: factory.transactionStatusType;
|
|
178
|
-
agent: import("@chevre/factory/lib/transaction").IAgent;
|
|
179
|
-
potentialActions?: import("@chevre/factory/lib/transaction/moneyTransfer").IPotentialActions | undefined;
|
|
180
|
-
recipient: import("@chevre/factory/lib/transaction/moneyTransfer").IRecipient;
|
|
181
|
-
tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
|
|
182
|
-
} & {
|
|
183
|
-
_id: import("mongoose").Types.ObjectId;
|
|
184
|
-
} & {
|
|
185
|
-
__v: number;
|
|
186
167
|
}), "id"> & import("./mongoose/virtuals").IVirtuals, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, {}, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<({
|
|
187
168
|
object: import("@chevre/factory/lib/transaction/placeOrder").IObject;
|
|
188
169
|
error?: any;
|
|
@@ -221,25 +202,6 @@ export declare class TransactionRepo {
|
|
|
221
202
|
_id: import("mongoose").Types.ObjectId;
|
|
222
203
|
} & {
|
|
223
204
|
__v: number;
|
|
224
|
-
}) | ({
|
|
225
|
-
object: import("@chevre/factory/lib/transaction/moneyTransfer").IObject;
|
|
226
|
-
error?: any;
|
|
227
|
-
project: import("@chevre/factory/lib/transaction").IProject;
|
|
228
|
-
seller: import("@chevre/factory/lib/transaction").ISeller;
|
|
229
|
-
typeOf: factory.transactionType.MoneyTransfer;
|
|
230
|
-
expires: Date;
|
|
231
|
-
result?: any;
|
|
232
|
-
startDate: Date;
|
|
233
|
-
endDate?: Date | undefined;
|
|
234
|
-
status: factory.transactionStatusType;
|
|
235
|
-
agent: import("@chevre/factory/lib/transaction").IAgent;
|
|
236
|
-
potentialActions?: import("@chevre/factory/lib/transaction/moneyTransfer").IPotentialActions | undefined;
|
|
237
|
-
recipient: import("@chevre/factory/lib/transaction/moneyTransfer").IRecipient;
|
|
238
|
-
tasksExportAction?: import("@chevre/factory/lib/transaction").ITasksExportAction | undefined;
|
|
239
|
-
} & {
|
|
240
|
-
_id: import("mongoose").Types.ObjectId;
|
|
241
|
-
} & {
|
|
242
|
-
__v: number;
|
|
243
205
|
}), "id"> & import("./mongoose/virtuals").IVirtuals) | null>;
|
|
244
206
|
aggregatePlaceOrder(params: {
|
|
245
207
|
project?: {
|
|
@@ -11,7 +11,6 @@ import type { ActionRepo } from './repo/action';
|
|
|
11
11
|
import type { AcceptCOAOfferActionRepo } from './repo/action/acceptCOAOffer';
|
|
12
12
|
import type { AcceptPayActionRepo } from './repo/action/acceptPay';
|
|
13
13
|
import type { AuthorizeInvoiceActionRepo } from './repo/action/authorizeInvoice';
|
|
14
|
-
import type { AuthorizeMoneyTransferOfferActionRepo } from './repo/action/authorizeMoneyTransferOffer';
|
|
15
14
|
import type { AuthorizeOfferActionRepo } from './repo/action/authorizeOffer';
|
|
16
15
|
import type { AuthorizeProductOfferActionRepo } from './repo/action/authorizeProductOffer';
|
|
17
16
|
import type { AuthorizePaymentMethodActionRepo } from './repo/action/authorizePaymentMethod';
|
|
@@ -95,7 +94,6 @@ import type { TicketRepo } from './repo/ticket';
|
|
|
95
94
|
import type { TransactionRepo } from './repo/transaction';
|
|
96
95
|
import type { PlaceOrderRepo } from './repo/transaction/placeOrder';
|
|
97
96
|
import type { ReturnOrderRepo } from './repo/transaction/returnOrder';
|
|
98
|
-
import type { MoneyTransferRepo } from './repo/transaction/moneyTransfer';
|
|
99
97
|
import type { TransactionNumberRepo } from './repo/transactionNumber';
|
|
100
98
|
import type { TransactionProcessRepo } from './repo/transactionProcess';
|
|
101
99
|
import type { TripRepo } from './repo/trip';
|
|
@@ -145,10 +143,6 @@ export declare namespace action {
|
|
|
145
143
|
namespace AuthorizeInvoice {
|
|
146
144
|
function createInstance(...params: ConstructorParameters<typeof AuthorizeInvoiceActionRepo>): Promise<AuthorizeInvoiceActionRepo>;
|
|
147
145
|
}
|
|
148
|
-
type AuthorizeMoneyTransferOffer = AuthorizeMoneyTransferOfferActionRepo;
|
|
149
|
-
namespace AuthorizeMoneyTransferOffer {
|
|
150
|
-
function createInstance(...params: ConstructorParameters<typeof AuthorizeMoneyTransferOfferActionRepo>): Promise<AuthorizeMoneyTransferOfferActionRepo>;
|
|
151
|
-
}
|
|
152
146
|
type AuthorizeOffer = AuthorizeOfferActionRepo;
|
|
153
147
|
namespace AuthorizeOffer {
|
|
154
148
|
function createInstance(...params: ConstructorParameters<typeof AuthorizeOfferActionRepo>): Promise<AuthorizeOfferActionRepo>;
|
|
@@ -525,10 +519,6 @@ export declare namespace transaction {
|
|
|
525
519
|
namespace ReturnOrder {
|
|
526
520
|
function createInstance(...params: ConstructorParameters<typeof ReturnOrderRepo>): Promise<ReturnOrderRepo>;
|
|
527
521
|
}
|
|
528
|
-
type MoneyTransfer = MoneyTransferRepo;
|
|
529
|
-
namespace MoneyTransfer {
|
|
530
|
-
function createInstance(...params: ConstructorParameters<typeof MoneyTransferRepo>): Promise<MoneyTransferRepo>;
|
|
531
|
-
}
|
|
532
522
|
}
|
|
533
523
|
export type TransactionNumber = TransactionNumberRepo;
|
|
534
524
|
export declare namespace TransactionNumber {
|
package/lib/chevre/repository.js
CHANGED
|
@@ -137,17 +137,6 @@ var action;
|
|
|
137
137
|
}
|
|
138
138
|
AuthorizeInvoice.createInstance = createInstance;
|
|
139
139
|
})(AuthorizeInvoice = action.AuthorizeInvoice || (action.AuthorizeInvoice = {}));
|
|
140
|
-
let AuthorizeMoneyTransferOffer;
|
|
141
|
-
(function (AuthorizeMoneyTransferOffer) {
|
|
142
|
-
let repo;
|
|
143
|
-
async function createInstance(...params) {
|
|
144
|
-
if (repo === undefined) {
|
|
145
|
-
repo = (await Promise.resolve().then(() => __importStar(require('./repo/action/authorizeMoneyTransferOffer')))).AuthorizeMoneyTransferOfferActionRepo;
|
|
146
|
-
}
|
|
147
|
-
return new repo(...params);
|
|
148
|
-
}
|
|
149
|
-
AuthorizeMoneyTransferOffer.createInstance = createInstance;
|
|
150
|
-
})(AuthorizeMoneyTransferOffer = action.AuthorizeMoneyTransferOffer || (action.AuthorizeMoneyTransferOffer = {}));
|
|
151
140
|
let AuthorizeOffer;
|
|
152
141
|
(function (AuthorizeOffer) {
|
|
153
142
|
let repo;
|
|
@@ -1127,17 +1116,6 @@ var transaction;
|
|
|
1127
1116
|
}
|
|
1128
1117
|
ReturnOrder.createInstance = createInstance;
|
|
1129
1118
|
})(ReturnOrder = transaction.ReturnOrder || (transaction.ReturnOrder = {}));
|
|
1130
|
-
let MoneyTransfer;
|
|
1131
|
-
(function (MoneyTransfer) {
|
|
1132
|
-
let repo;
|
|
1133
|
-
async function createInstance(...params) {
|
|
1134
|
-
if (repo === undefined) {
|
|
1135
|
-
repo = (await Promise.resolve().then(() => __importStar(require('./repo/transaction/moneyTransfer')))).MoneyTransferRepo;
|
|
1136
|
-
}
|
|
1137
|
-
return new repo(...params);
|
|
1138
|
-
}
|
|
1139
|
-
MoneyTransfer.createInstance = createInstance;
|
|
1140
|
-
})(MoneyTransfer = transaction.MoneyTransfer || (transaction.MoneyTransfer = {}));
|
|
1141
1119
|
})(transaction || (exports.transaction = transaction = {}));
|
|
1142
1120
|
var TransactionNumber;
|
|
1143
1121
|
(function (TransactionNumber) {
|
|
@@ -81,10 +81,10 @@ function createOwnershipInfosFromOrder(params) {
|
|
|
81
81
|
acquiredFrom: acquiredFrom
|
|
82
82
|
});
|
|
83
83
|
break;
|
|
84
|
-
case factory.actionType.MoneyTransfer:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
// case factory.actionType.MoneyTransfer:
|
|
85
|
+
// // no op
|
|
86
|
+
// // 所有権は発生しない
|
|
87
|
+
// break;
|
|
88
88
|
default:
|
|
89
89
|
throw new factory.errors.NotImplemented(`Offered item type ${itemOfferedType} not implemented`);
|
|
90
90
|
}
|
|
@@ -4,7 +4,7 @@ interface IAcceptOfferOperationRepos {
|
|
|
4
4
|
orderInTransaction: OrderInTransactionRepo;
|
|
5
5
|
}
|
|
6
6
|
type IAcceptOfferOperation<T> = (repos: IAcceptOfferOperationRepos) => Promise<T>;
|
|
7
|
-
export type IAuthorizeActionWithInstrument = Pick<factory.action.authorize.offer.
|
|
7
|
+
export type IAuthorizeActionWithInstrument = Pick<factory.action.authorize.offer.product.IAction | factory.action.authorize.offer.eventService.IAction, 'instrument'>;
|
|
8
8
|
export declare function acceptOffer(params: {
|
|
9
9
|
orderNumber: string;
|
|
10
10
|
project: {
|
|
@@ -5,9 +5,8 @@ import type { StockHolderRepo } from '../repo/stockHolder';
|
|
|
5
5
|
import * as factory from '../factory';
|
|
6
6
|
import * as EventOfferService from './offer/event';
|
|
7
7
|
import * as EventServiceByCOAOfferService from './offer/eventServiceByCOA';
|
|
8
|
-
import * as MoneyTransferOfferService from './offer/moneyTransfer';
|
|
9
8
|
import * as ProductOfferService from './offer/product';
|
|
10
|
-
export { EventOfferService as event, EventServiceByCOAOfferService as eventServiceByCOA,
|
|
9
|
+
export { EventOfferService as event, EventServiceByCOAOfferService as eventServiceByCOA, ProductOfferService as product };
|
|
11
10
|
type ISeatAsEventOffer = Pick<factory.place.seat.IPlaceWithOffer, 'branchCode' | 'name' | 'seatingType'> & {
|
|
12
11
|
containedInPlace?: {
|
|
13
12
|
branchCode?: string;
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.product = exports.
|
|
29
|
+
exports.product = exports.eventServiceByCOA = exports.event = void 0;
|
|
30
30
|
exports.searchEventSeatOffersWithPaging = searchEventSeatOffersWithPaging;
|
|
31
31
|
exports.findEventSeatOffersBySection = findEventSeatOffersBySection;
|
|
32
32
|
const moment_1 = __importDefault(require("moment"));
|
|
@@ -35,8 +35,6 @@ const EventOfferService = __importStar(require("./offer/event"));
|
|
|
35
35
|
exports.event = EventOfferService;
|
|
36
36
|
const EventServiceByCOAOfferService = __importStar(require("./offer/eventServiceByCOA"));
|
|
37
37
|
exports.eventServiceByCOA = EventServiceByCOAOfferService;
|
|
38
|
-
const MoneyTransferOfferService = __importStar(require("./offer/moneyTransfer"));
|
|
39
|
-
exports.moneyTransfer = MoneyTransferOfferService;
|
|
40
38
|
const ProductOfferService = __importStar(require("./offer/product"));
|
|
41
39
|
exports.product = ProductOfferService;
|
|
42
40
|
/**
|
|
@@ -7,5 +7,5 @@ import * as factory from '../../../../factory';
|
|
|
7
7
|
*/
|
|
8
8
|
declare function createOnOrderCancelledTasksByTransaction(params: {
|
|
9
9
|
transaction: Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf'>;
|
|
10
|
-
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/
|
|
10
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
11
11
|
export { createOnOrderCancelledTasksByTransaction };
|
package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ declare function createInformTasks(params: {
|
|
|
13
13
|
}, setting: Pick<ISetting, 'onOrderStatusChanged'> | null): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
|
|
14
14
|
declare function createNextSendOrderTasks(params: {
|
|
15
15
|
order: IInTransitOrder;
|
|
16
|
-
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/
|
|
16
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
17
17
|
export { createInformTasks, createNextSendOrderTasks, IInTransitOrder };
|
|
@@ -50,10 +50,10 @@ function processOrder(params) {
|
|
|
50
50
|
// priceCurrency: params.order.priceCurrency,
|
|
51
51
|
orderDate: params.order.orderDate
|
|
52
52
|
};
|
|
53
|
-
if (params.order.itemOfferedTypeOf === factory.actionType.MoneyTransfer) {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
53
|
+
// if (params.order.itemOfferedTypeOf === factory.actionType.MoneyTransfer) {
|
|
54
|
+
// await createConfirmMoneyTransferTasksIfNotExist(params.order, simpleOrder)(repos);
|
|
55
|
+
// } else
|
|
56
|
+
if (params.order.itemOfferedTypeOf === factory.reservationType.EventReservation) {
|
|
57
57
|
// 冗長なconfirmReserveTransactionタスク作成を回避(2023-08-25~)
|
|
58
58
|
await createConfirmReserveTransactionTasksIfNotExist(params.order, simpleOrder, params.options)(repos);
|
|
59
59
|
}
|
|
@@ -114,38 +114,56 @@ function createConfirmReserveTransactionTasksIfNotExist(order, simpleOrder, opti
|
|
|
114
114
|
}));
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function createConfirmMoneyTransferTasksIfNotExist(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
117
|
+
// function createConfirmMoneyTransferTasksIfNotExist(
|
|
118
|
+
// order: Pick<IProcessingOrder, 'orderNumber' | 'project'> & {
|
|
119
|
+
// serialNumbers: string[];
|
|
120
|
+
// },
|
|
121
|
+
// simpleOrder: factory.order.ISimpleOrder
|
|
122
|
+
// ) {
|
|
123
|
+
// return async (repos: {
|
|
124
|
+
// task: TaskRepo;
|
|
125
|
+
// }): Promise<void> => {
|
|
126
|
+
// const taskRunsAt = new Date();
|
|
127
|
+
// await Promise.all(order.serialNumbers.map(async (moneyTransferTransactionNumber) => {
|
|
128
|
+
// const data: factory.task.IData<factory.taskName.ConfirmMoneyTransfer> = {
|
|
129
|
+
// project: order.project,
|
|
130
|
+
// typeOf: factory.actionType.ConfirmAction,
|
|
131
|
+
// object: {
|
|
132
|
+
// // pendingTransaction: { id: '' }, // 空文字であれば、transactionNumberで処理される
|
|
133
|
+
// transactionNumber: moneyTransferTransactionNumber,
|
|
134
|
+
// typeOf: factory.assetTransactionType.MoneyTransfer
|
|
135
|
+
// },
|
|
136
|
+
// agent: order.project,
|
|
137
|
+
// purpose: simpleOrder
|
|
138
|
+
// };
|
|
139
|
+
// const taskIdentifier: string = util.format(
|
|
140
|
+
// '%s:%s:%s:%s:%s:%s',
|
|
141
|
+
// data.project.id,
|
|
142
|
+
// factory.taskName.ConfirmMoneyTransfer,
|
|
143
|
+
// data.purpose.typeOf,
|
|
144
|
+
// simpleOrder.orderNumber,
|
|
145
|
+
// data.object.typeOf,
|
|
146
|
+
// data.object.transactionNumber
|
|
147
|
+
// );
|
|
148
|
+
// const confirmMoneyTransferTransactionTask: factory.task.IAttributes<factory.taskName.ConfirmMoneyTransfer> & {
|
|
149
|
+
// alternateName: string;
|
|
150
|
+
// identifier: string;
|
|
151
|
+
// } = {
|
|
152
|
+
// alternateName: taskIdentifier,
|
|
153
|
+
// identifier: taskIdentifier,
|
|
154
|
+
// project: order.project,
|
|
155
|
+
// name: factory.taskName.ConfirmMoneyTransfer,
|
|
156
|
+
// status: factory.taskStatus.Ready,
|
|
157
|
+
// runsAt: taskRunsAt,
|
|
158
|
+
// remainingNumberOfTries: 10,
|
|
159
|
+
// numberOfTried: 0,
|
|
160
|
+
// executionResults: [],
|
|
161
|
+
// data
|
|
162
|
+
// };
|
|
163
|
+
// await repos.task.createIfNotExistByAlternateName(confirmMoneyTransferTransactionTask, { emitImmediately: true });
|
|
164
|
+
// }));
|
|
165
|
+
// };
|
|
166
|
+
// }
|
|
149
167
|
function createConfirmRegisterServiceTasksIfNotExist(order, simpleOrder) {
|
|
150
168
|
return async (repos) => {
|
|
151
169
|
const taskRunsAt = new Date();
|
|
@@ -11,5 +11,5 @@ declare function createInformTasks(order: IReturnedOrder, returnOrderAction: IRe
|
|
|
11
11
|
declare function createOnOrderReturnedTasksByTransaction(params: {
|
|
12
12
|
order: Pick<factory.order.IOrder, 'project' | 'typeOf' | 'orderNumber' | 'customer' | 'price' | 'priceCurrency' | 'orderDate'>;
|
|
13
13
|
potentialActions?: factory.action.transfer.returnAction.order.IPotentialActions;
|
|
14
|
-
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/
|
|
14
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
15
15
|
export { createInformTasks, createOnOrderReturnedTasksByTransaction, IReturnAction };
|
|
@@ -63,8 +63,14 @@ function onOrderReturned(params) {
|
|
|
63
63
|
const potentialActionsByTransaction = params.returnOrderTransaction?.potentialActions?.returnOrder?.find((returnOrderActionByTransaction) => {
|
|
64
64
|
return returnOrderActionByTransaction.object.orderNumber === params.order.orderNumber;
|
|
65
65
|
})?.potentialActions;
|
|
66
|
-
const itemOfferedTypeOfs = await repos.acceptedOffer.distinctValues(
|
|
67
|
-
|
|
66
|
+
// const itemOfferedTypeOfs = <factory.order.IItemOffered['typeOf'][]>await repos.acceptedOffer.distinctValues(
|
|
67
|
+
// { orderNumber: { $in: [params.order.orderNumber] } },
|
|
68
|
+
// 'acceptedOffers.itemOffered.typeOf'
|
|
69
|
+
// );
|
|
70
|
+
// const serialNumbers = await repos.acceptedOffer.distinctValues(
|
|
71
|
+
// { orderNumber: { $in: [params.order.orderNumber] } },
|
|
72
|
+
// 'acceptedOffers.serialNumber'
|
|
73
|
+
// );
|
|
68
74
|
const reservationNumbers = await repos.acceptedOffer.distinctValues({ orderNumber: { $in: [params.order.orderNumber] } }, 'acceptedOffers.itemOffered.reservationNumber');
|
|
69
75
|
const offeredThroughIdentifier = (await repos.acceptedOffer.distinctValues({ orderNumber: { $in: [params.order.orderNumber] } }, 'acceptedOffers.offeredThrough.identifier'))[0];
|
|
70
76
|
const reservationForSuperEventLocationBranchCodes = await repos.acceptedOffer.distinctValues({ orderNumber: { $in: [params.order.orderNumber] } }, 'acceptedOffers.itemOffered.reservationFor.superEvent.location.branchCode');
|
|
@@ -80,12 +86,15 @@ function onOrderReturned(params) {
|
|
|
80
86
|
...createReturnPayTransactionTasks({ orderNumber: params.order.orderNumber, project: params.order.project }, params.returnOrderTransaction),
|
|
81
87
|
// 取引のpotentialActionsを適用(2023-08-19~)
|
|
82
88
|
...(0, factory_1.createOnOrderReturnedTasksByTransaction)({ order: params.order, potentialActions: potentialActionsByTransaction }),
|
|
83
|
-
...(itemOfferedTypeOfs[0] === factory.actionType.MoneyTransfer)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
// ...(itemOfferedTypeOfs[0] === factory.actionType.MoneyTransfer)
|
|
90
|
+
// ? createReturnMoneyTransferTasks(
|
|
91
|
+
// {
|
|
92
|
+
// ...params.order,
|
|
93
|
+
// serialNumbers
|
|
94
|
+
// },
|
|
95
|
+
// simpleOrder
|
|
96
|
+
// )
|
|
97
|
+
// : []
|
|
89
98
|
];
|
|
90
99
|
break;
|
|
91
100
|
default:
|
|
@@ -169,62 +178,67 @@ function createReturnReserveTransactionTasks(order, simpleOrder) {
|
|
|
169
178
|
}
|
|
170
179
|
return tasks;
|
|
171
180
|
}
|
|
172
|
-
function createReturnMoneyTransferTasks(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
181
|
+
// function createReturnMoneyTransferTasks(
|
|
182
|
+
// order: Pick<factory.order.IOrder, 'seller' | 'customer' | 'project' | 'orderDate'> & {
|
|
183
|
+
// serialNumbers: string[];
|
|
184
|
+
// },
|
|
185
|
+
// simpleOrder: factory.order.ISimpleOrder
|
|
186
|
+
// ): factory.task.IAttributes<factory.taskName.ReturnMoneyTransfer>[] {
|
|
187
|
+
// const taskRunsAt = new Date();
|
|
188
|
+
// const tasks: factory.task.IAttributes<factory.taskName.ReturnMoneyTransfer>[] = [];
|
|
189
|
+
// for (const transactionNumber of order.serialNumbers) {
|
|
190
|
+
// const returnMoneyTransferActionObject: factory.action.transfer.returnAction.moneyTransfer.IObject = {
|
|
191
|
+
// // project: order.project,
|
|
192
|
+
// typeOf: factory.actionType.MoneyTransfer,
|
|
193
|
+
// // actionStatus: factory.actionStatusType.CompletedActionStatus,
|
|
194
|
+
// // startDate: order.orderDate,
|
|
195
|
+
// // id: '',
|
|
196
|
+
// // amount: {
|
|
197
|
+
// // typeOf: 'MonetaryAmount',
|
|
198
|
+
// // currency: '' // この時点で不明でも動作する
|
|
199
|
+
// // },
|
|
200
|
+
// object: {
|
|
201
|
+
// typeOf: factory.account.transactionType.Deposit,
|
|
202
|
+
// // いったんtransactionNumberさえあれば返却可能
|
|
203
|
+
// transactionNumber
|
|
204
|
+
// }
|
|
205
|
+
// // agent: order.project,
|
|
206
|
+
// // recipient: {
|
|
207
|
+
// // typeOf: order.customer.typeOf,
|
|
208
|
+
// // id: order.customer.id,
|
|
209
|
+
// // name: String(order.customer.name)
|
|
210
|
+
// // },
|
|
211
|
+
// // fromLocation: <any>{},
|
|
212
|
+
// // toLocation: <any>{},
|
|
213
|
+
// // purpose: <any>{}
|
|
214
|
+
// };
|
|
215
|
+
// const returnMoneyTransferAction: factory.task.IData<factory.taskName.ReturnMoneyTransfer> = {
|
|
216
|
+
// project: order.project,
|
|
217
|
+
// typeOf: factory.actionType.ReturnAction,
|
|
218
|
+
// object: returnMoneyTransferActionObject,
|
|
219
|
+
// agent: order.project,
|
|
220
|
+
// recipient: {
|
|
221
|
+
// typeOf: order.seller.typeOf,
|
|
222
|
+
// id: order.seller.id,
|
|
223
|
+
// name: order.seller.name
|
|
224
|
+
// },
|
|
225
|
+
// potentialActions: {},
|
|
226
|
+
// purpose: simpleOrder,
|
|
227
|
+
// instrument: { typeOf: 'WebAPI', identifier: factory.service.webAPI.Identifier.Chevre }
|
|
228
|
+
// };
|
|
229
|
+
// tasks.push({
|
|
230
|
+
// project: order.project,
|
|
231
|
+
// name: factory.taskName.ReturnMoneyTransfer,
|
|
232
|
+
// status: factory.taskStatus.Ready,
|
|
233
|
+
// runsAt: taskRunsAt, // なるはやで実行
|
|
234
|
+
// remainingNumberOfTries: 10,
|
|
235
|
+
// numberOfTried: 0,
|
|
236
|
+
// executionResults: [],
|
|
237
|
+
// data: returnMoneyTransferAction
|
|
238
|
+
// });
|
|
239
|
+
// }
|
|
240
|
+
// return tasks;
|
|
241
|
+
// }
|
|
228
242
|
function createReturnPayTransactionTasks(order, returnOrderTransaction) {
|
|
229
243
|
const taskRunsAt = new Date();
|
|
230
244
|
// const taskRunsAt = moment(order.dateReturned)
|
|
@@ -5,6 +5,5 @@ import * as factory from '../../../../factory';
|
|
|
5
5
|
declare function acceptedOffers2orderedItem(params: {
|
|
6
6
|
eventReservationAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IReservation>[];
|
|
7
7
|
productAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IPermit>[];
|
|
8
|
-
moneyTransferAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IMoneyTransfer>[];
|
|
9
8
|
}): factory.order.IOrderedItem[];
|
|
10
9
|
export { acceptedOffers2orderedItem };
|