@chevre/domain 23.2.0-alpha.60 → 23.2.0-alpha.61
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/transactionNumber.js +1 -1
- package/lib/chevre/repo/confirmationNumber.js +1 -1
- package/lib/chevre/repo/event.d.ts +0 -15
- package/lib/chevre/repo/event.js +74 -75
- package/lib/chevre/repo/eventSeries.d.ts +1 -7
- package/lib/chevre/repo/eventSeries.js +50 -46
- package/lib/chevre/repo/mongoose/schemas/eventSeries.js +40 -13
- package/lib/chevre/repo/orderNumber.d.ts +0 -1
- package/lib/chevre/repo/orderNumber.js +21 -22
- package/lib/chevre/repo/task.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/fixInformAction.d.ts +3 -0
- package/lib/chevre/service/assetTransaction/fixInformAction.js +3 -0
- package/lib/chevre/service/assetTransaction/pay/cancel.d.ts +12 -0
- package/lib/chevre/service/assetTransaction/pay/cancel.js +25 -0
- package/lib/chevre/service/assetTransaction/pay/check.d.ts +23 -0
- package/lib/chevre/service/assetTransaction/pay/check.js +37 -0
- package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +24 -0
- package/lib/chevre/service/assetTransaction/pay/confirm.js +72 -0
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.d.ts +18 -0
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +111 -0
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +48 -0
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +164 -0
- package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +20 -0
- package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.js +59 -0
- package/lib/chevre/service/assetTransaction/pay/{account → start/account}/validation.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/pay/{account → start/account}/validation.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/{factory.d.ts → start/factory.d.ts} +1 -1
- package/lib/chevre/service/assetTransaction/pay/{factory.js → start/factory.js} +1 -1
- package/lib/chevre/service/assetTransaction/pay/{validateAcceptedPaymentMethodIfNeeded.d.ts → start/preStart/validateAcceptedPaymentMethodIfNeeded.d.ts} +4 -4
- package/lib/chevre/service/assetTransaction/pay/{validateAcceptedPaymentMethodIfNeeded.js → start/preStart/validateAcceptedPaymentMethodIfNeeded.js} +1 -4
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.d.ts +8 -0
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +54 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeAccount.d.ts +13 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeAccount.js +49 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +29 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.js +37 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +42 -0
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.js +31 -0
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +60 -0
- package/lib/chevre/service/assetTransaction/pay/start.js +145 -0
- package/lib/chevre/service/assetTransaction/pay.d.ts +8 -170
- package/lib/chevre/service/assetTransaction/pay.js +16 -623
- 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/onOrderReturned/factory.d.ts +1 -1
- package/package.json +3 -5
- package/example/src/chevre/orderNumber/decryptOrderNumber.ts +0 -14
- package/lib/chevre/service/task/createEvent/createEvent.d.ts +0 -25
- package/lib/chevre/service/task/createEvent/createEvent.js +0 -45
- package/lib/chevre/service/task/createEvent/createEventBySchedule/factory.d.ts +0 -22
- package/lib/chevre/service/task/createEvent/createEventBySchedule/factory.js +0 -190
- package/lib/chevre/service/task/createEvent/createEventBySchedule/schedule2events.d.ts +0 -15
- package/lib/chevre/service/task/createEvent/createEventBySchedule/schedule2events.js +0 -118
- package/lib/chevre/service/task/createEvent/createEventBySchedule.d.ts +0 -25
- package/lib/chevre/service/task/createEvent/createEventBySchedule.js +0 -107
- package/lib/chevre/service/task/createEvent/createEventSeries.d.ts +0 -13
- package/lib/chevre/service/task/createEvent/createEventSeries.js +0 -118
- package/lib/chevre/service/task/createEvent.d.ts +0 -6
- package/lib/chevre/service/task/createEvent.js +0 -46
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TransactionNumberFactory = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
|
-
const fpe2Module = require("node-fpe
|
|
5
|
+
const fpe2Module = require("node-fpe");
|
|
6
6
|
const factory = require("../factory");
|
|
7
7
|
// 型定義が新しいtypescriptに適合しないので、強制的に型変更
|
|
8
8
|
const fpe2 = fpe2Module;
|
|
@@ -13,7 +13,7 @@ exports.ConfirmationNumberRepo = void 0;
|
|
|
13
13
|
// import * as cdigit from 'cdigit';
|
|
14
14
|
const crypto_1 = require("crypto");
|
|
15
15
|
const moment = require("moment-timezone");
|
|
16
|
-
const fpe2Module = require("node-fpe
|
|
16
|
+
const fpe2Module = require("node-fpe");
|
|
17
17
|
// 型定義が新しいtypescriptに適合しないので、強制的に型変更
|
|
18
18
|
const fpe2 = fpe2Module;
|
|
19
19
|
// tslint:disable-next-line:no-require-imports no-var-requires
|
|
@@ -68,13 +68,6 @@ export declare class EventRepo {
|
|
|
68
68
|
*/
|
|
69
69
|
static CREATE_ID(): string;
|
|
70
70
|
static CREATE_MONGO_CONDITIONS(conditions: ISearchConditions): FilterQuery<factory.event.screeningEvent.IEvent>[];
|
|
71
|
-
/**
|
|
72
|
-
* 複数イベントを作成する
|
|
73
|
-
*/
|
|
74
|
-
createManyEvents(params: {
|
|
75
|
-
attributes: factory.event.screeningEvent.IAttributes[];
|
|
76
|
-
expectsNoContent: boolean;
|
|
77
|
-
}): Promise<string[] | void>;
|
|
78
71
|
/**
|
|
79
72
|
* イベントコードをキーにして冪等置換
|
|
80
73
|
*/
|
|
@@ -127,14 +120,6 @@ export declare class EventRepo {
|
|
|
127
120
|
$unset?: IUnset;
|
|
128
121
|
upsert: boolean;
|
|
129
122
|
}[]): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
* tttsイベントを識別子によって冪等作成する
|
|
132
|
-
*/
|
|
133
|
-
saveEventByIdentifier4ttts(params: {
|
|
134
|
-
attributes: ICreatingEvent4ttts;
|
|
135
|
-
}): Promise<{
|
|
136
|
-
id: string;
|
|
137
|
-
}>;
|
|
138
123
|
/**
|
|
139
124
|
* イベントを検索する(inclusion projection)
|
|
140
125
|
*/
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -264,33 +264,39 @@ class EventRepo {
|
|
|
264
264
|
}
|
|
265
265
|
return andConditions;
|
|
266
266
|
}
|
|
267
|
-
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
createManyEvents(params
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
267
|
+
// /**
|
|
268
|
+
// * 複数イベントを作成する
|
|
269
|
+
// */
|
|
270
|
+
// public async createManyEvents(params: {
|
|
271
|
+
// attributes: factory.event.screeningEvent.IAttributes[];
|
|
272
|
+
// expectsNoContent: boolean;
|
|
273
|
+
// }): Promise<string[] | void> { // optimize response(only id)(2024-08-02~)
|
|
274
|
+
// const insertingDocs: (factory.event.screeningEvent.IAttributes & { _id: string })[] =
|
|
275
|
+
// params.attributes.map((p) => {
|
|
276
|
+
// return {
|
|
277
|
+
// _id: EventRepo.CREATE_ID(),
|
|
278
|
+
// ...p
|
|
279
|
+
// };
|
|
280
|
+
// });
|
|
281
|
+
// try {
|
|
282
|
+
// await this.eventModel.insertMany<factory.event.screeningEvent.IAttributes & { _id: string }>(
|
|
283
|
+
// insertingDocs,
|
|
284
|
+
// { rawResult: true } // rawResult(2024-08-02~)
|
|
285
|
+
// );
|
|
286
|
+
// // console.dir(insertResult, { depth: null });
|
|
287
|
+
// } catch (error) {
|
|
288
|
+
// if (await isMongoError(error)) {
|
|
289
|
+
// if (error.code === MongoErrorCode.DuplicateKey) {
|
|
290
|
+
// throw new factory.errors.AlreadyInUse(factory.eventType.ScreeningEvent, ['offeredBy.member.identifier']);
|
|
291
|
+
// }
|
|
292
|
+
// }
|
|
293
|
+
// throw error;
|
|
294
|
+
// }
|
|
295
|
+
// if (params.expectsNoContent) {
|
|
296
|
+
// return;
|
|
297
|
+
// }
|
|
298
|
+
// return insertingDocs.map(({ _id }) => _id);
|
|
299
|
+
// }
|
|
294
300
|
/**
|
|
295
301
|
* イベントコードをキーにして冪等置換
|
|
296
302
|
*/
|
|
@@ -477,54 +483,47 @@ class EventRepo {
|
|
|
477
483
|
}
|
|
478
484
|
});
|
|
479
485
|
}
|
|
480
|
-
/**
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
saveEventByIdentifier4ttts(params
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
.exec();
|
|
522
|
-
if (doc === null) {
|
|
523
|
-
throw new factory.errors.NotFound(this.eventModel.modelName);
|
|
524
|
-
}
|
|
525
|
-
return { id: doc._id }; // optimize(2024-07-31~)
|
|
526
|
-
});
|
|
527
|
-
}
|
|
486
|
+
// /**
|
|
487
|
+
// * tttsイベントを識別子によって冪等作成する
|
|
488
|
+
// */
|
|
489
|
+
// public async saveEventByIdentifier4ttts(params: {
|
|
490
|
+
// // oldEventId: string;
|
|
491
|
+
// attributes: ICreatingEvent4ttts;
|
|
492
|
+
// }): Promise<{ id: string }> {
|
|
493
|
+
// // const { oldEventId } = params;
|
|
494
|
+
// const { project, typeOf, eventStatus, identifier, organizer, ...updateFields } = params.attributes;
|
|
495
|
+
// // const identifier = oldEventId;
|
|
496
|
+
// if (typeof identifier !== 'string' || identifier.length === 0) {
|
|
497
|
+
// throw new factory.errors.ArgumentNull('identifier');
|
|
498
|
+
// }
|
|
499
|
+
// const id = EventRepo.CREATE_ID();
|
|
500
|
+
// const doc = await this.eventModel.findOneAndUpdate(
|
|
501
|
+
// {
|
|
502
|
+
// 'project.id': { $eq: project.id },
|
|
503
|
+
// identifier: { $exists: true, $eq: identifier }
|
|
504
|
+
// },
|
|
505
|
+
// // upsertの場合、createがありうるので属性を除外しない
|
|
506
|
+
// {
|
|
507
|
+
// $setOnInsert: {
|
|
508
|
+
// _id: id,
|
|
509
|
+
// typeOf,
|
|
510
|
+
// project,
|
|
511
|
+
// eventStatus,
|
|
512
|
+
// organizer,
|
|
513
|
+
// identifier // イベントコードを必ず追加(2025-09-03~)
|
|
514
|
+
// // ...(typeof identifier === 'string' && identifier !== '') ? { identifier } : undefined
|
|
515
|
+
// },
|
|
516
|
+
// $set: updateFields
|
|
517
|
+
// },
|
|
518
|
+
// { upsert: true, new: true, projection: { _id: 1 } }
|
|
519
|
+
// )
|
|
520
|
+
// .lean<{ _id: string }>()
|
|
521
|
+
// .exec();
|
|
522
|
+
// if (doc === null) {
|
|
523
|
+
// throw new factory.errors.NotFound(this.eventModel.modelName);
|
|
524
|
+
// }
|
|
525
|
+
// return { id: doc._id }; // optimize(2024-07-31~)
|
|
526
|
+
// }
|
|
528
527
|
/**
|
|
529
528
|
* イベントを検索する(inclusion projection)
|
|
530
529
|
*/
|
|
@@ -13,12 +13,6 @@ export declare class EventSeriesRepo {
|
|
|
13
13
|
private readonly eventSeriesModel;
|
|
14
14
|
constructor(connection: Connection);
|
|
15
15
|
static CREATE_MONGO_CONDITIONS(conditions: ISearchConditions): FilterQuery<factory.eventSeries.IEvent>[];
|
|
16
|
-
/**
|
|
17
|
-
* コンテンツ+バージョンをキーにして、なければ作成する(複数対応)
|
|
18
|
-
*/
|
|
19
|
-
createIfNotExistByWorkPerformed(params: {
|
|
20
|
-
attributes: factory.eventSeries.IAttributes;
|
|
21
|
-
}[]): Promise<BulkWriteResult | void>;
|
|
22
16
|
/**
|
|
23
17
|
* 施設+コンテンツ+バージョンをキーにして冪等置換
|
|
24
18
|
*/
|
|
@@ -47,7 +41,7 @@ export declare class EventSeriesRepo {
|
|
|
47
41
|
/**
|
|
48
42
|
* イベントを検索する(inclusion projection)
|
|
49
43
|
*/
|
|
50
|
-
projectEventSeriesFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<
|
|
44
|
+
projectEventSeriesFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.eventSeries.IEvent[]>;
|
|
51
45
|
deleteEventSeriesById(params: {
|
|
52
46
|
project: {
|
|
53
47
|
id: string;
|
|
@@ -36,7 +36,8 @@ class EventSeriesRepo {
|
|
|
36
36
|
static CREATE_MONGO_CONDITIONS(conditions) {
|
|
37
37
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
38
38
|
const andConditions = [
|
|
39
|
-
|
|
39
|
+
// typeOfは必ずScreeningEventSeriesなので不要(2026-02-14~)
|
|
40
|
+
// { typeOf: { $eq: factory.eventType.ScreeningEventSeries } } // fix(2024-09-08~)
|
|
40
41
|
];
|
|
41
42
|
const projectIdEq = (_b = (_a = conditions.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
42
43
|
if (typeof projectIdEq === 'string') {
|
|
@@ -258,51 +259,54 @@ class EventSeriesRepo {
|
|
|
258
259
|
// }
|
|
259
260
|
// return insertingDocs.map(({ _id }) => _id);
|
|
260
261
|
// }
|
|
261
|
-
/**
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
createIfNotExistByWorkPerformed(params
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
262
|
+
// /**
|
|
263
|
+
// * コンテンツ+バージョンをキーにして、なければ作成する(複数対応)
|
|
264
|
+
// */
|
|
265
|
+
// public async createIfNotExistByWorkPerformed(params: {
|
|
266
|
+
// attributes: factory.eventSeries.IAttributes;
|
|
267
|
+
// }[]): Promise<BulkWriteResult | void> {
|
|
268
|
+
// const uniqid = await import('uniqid');
|
|
269
|
+
// const bulkWriteOps: AnyBulkWriteOperation<IDocType>[] = [];
|
|
270
|
+
// if (Array.isArray(params)) {
|
|
271
|
+
// params.forEach((creatingEventParams) => {
|
|
272
|
+
// const version = creatingEventParams.attributes.workPerformed.version;
|
|
273
|
+
// if (typeof version !== 'string') {
|
|
274
|
+
// throw new factory.errors.ArgumentNull('workPerformed.version');
|
|
275
|
+
// }
|
|
276
|
+
// const setOnInsertFields = creatingEventParams.attributes;
|
|
277
|
+
// bulkWriteOps.push({
|
|
278
|
+
// updateOne: {
|
|
279
|
+
// filter: {
|
|
280
|
+
// typeOf: creatingEventParams.attributes.typeOf,
|
|
281
|
+
// 'project.id': { $eq: creatingEventParams.attributes.project.id },
|
|
282
|
+
// 'location.branchCode': {
|
|
283
|
+
// $exists: true,
|
|
284
|
+
// $eq: creatingEventParams.attributes.location.branchCode
|
|
285
|
+
// },
|
|
286
|
+
// 'workPerformed.identifier': {
|
|
287
|
+
// $exists: true,
|
|
288
|
+
// $eq: creatingEventParams.attributes.workPerformed.identifier
|
|
289
|
+
// },
|
|
290
|
+
// 'workPerformed.version': {
|
|
291
|
+
// $exists: true,
|
|
292
|
+
// $eq: version
|
|
293
|
+
// }
|
|
294
|
+
// },
|
|
295
|
+
// update: {
|
|
296
|
+
// $setOnInsert: {
|
|
297
|
+
// ...setOnInsertFields,
|
|
298
|
+
// _id: uniqid()
|
|
299
|
+
// }
|
|
300
|
+
// },
|
|
301
|
+
// upsert: true
|
|
302
|
+
// }
|
|
303
|
+
// });
|
|
304
|
+
// });
|
|
305
|
+
// }
|
|
306
|
+
// if (bulkWriteOps.length > 0) {
|
|
307
|
+
// return this.eventSeriesModel.bulkWrite(bulkWriteOps, { ordered: false });
|
|
308
|
+
// }
|
|
309
|
+
// }
|
|
306
310
|
/**
|
|
307
311
|
* 施設+コンテンツ+バージョンをキーにして冪等置換
|
|
308
312
|
*/
|
|
@@ -8,10 +8,36 @@ const factory = require("../../../factory");
|
|
|
8
8
|
const settings_1 = require("../../../settings");
|
|
9
9
|
const modelName = 'EventSeries';
|
|
10
10
|
exports.modelName = modelName;
|
|
11
|
-
const schemaDefinition =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const schemaDefinition = {
|
|
12
|
+
project: { type: mongoose_1.SchemaTypes.Mixed, required: true },
|
|
13
|
+
organizer: { type: mongoose_1.SchemaTypes.Mixed, required: true },
|
|
14
|
+
_id: String,
|
|
15
|
+
typeOf: { type: String, required: true },
|
|
16
|
+
identifier: String,
|
|
17
|
+
name: mongoose_1.SchemaTypes.Mixed,
|
|
18
|
+
additionalProperty: mongoose_1.SchemaTypes.Mixed,
|
|
19
|
+
alternativeHeadline: mongoose_1.SchemaTypes.Mixed,
|
|
20
|
+
description: mongoose_1.SchemaTypes.Mixed,
|
|
21
|
+
duration: String,
|
|
22
|
+
endDate: { type: Date, required: true }, // required(2025-10-08~)
|
|
23
|
+
eventStatus: String,
|
|
24
|
+
headline: mongoose_1.SchemaTypes.Mixed,
|
|
25
|
+
location: mongoose_1.SchemaTypes.Mixed,
|
|
26
|
+
startDate: { type: Date, required: true }, // required(2025-10-08~)
|
|
27
|
+
subEvent: mongoose_1.SchemaTypes.Mixed, // support(2025-12-31~)
|
|
28
|
+
workPerformed: mongoose_1.SchemaTypes.Mixed,
|
|
29
|
+
soundFormat: mongoose_1.SchemaTypes.Mixed,
|
|
30
|
+
subtitleLanguage: mongoose_1.SchemaTypes.Mixed,
|
|
31
|
+
dubLanguage: mongoose_1.SchemaTypes.Mixed,
|
|
32
|
+
kanaName: String,
|
|
33
|
+
offers: mongoose_1.SchemaTypes.Mixed,
|
|
34
|
+
coaInfo: mongoose_1.SchemaTypes.Mixed
|
|
35
|
+
// discontinue(2026-02-14~)
|
|
36
|
+
// ...{
|
|
37
|
+
// // factory.eventSeries.IEventから廃止したので、ひとまずspread operatorで解決(2026-02-10~)
|
|
38
|
+
// videoFormat: SchemaTypes.Mixed
|
|
39
|
+
// }
|
|
40
|
+
};
|
|
15
41
|
const schemaOptions = {
|
|
16
42
|
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
17
43
|
autoCreate: false,
|
|
@@ -116,15 +142,16 @@ const indexes = [
|
|
|
116
142
|
}
|
|
117
143
|
}
|
|
118
144
|
],
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
145
|
+
// remove videoFormatTypeOf(2026-02-13~)
|
|
146
|
+
// [
|
|
147
|
+
// { 'videoFormat.typeOf': 1, startDate: 1 },
|
|
148
|
+
// {
|
|
149
|
+
// name: 'videoFormatTypeOf',
|
|
150
|
+
// partialFilterExpression: {
|
|
151
|
+
// 'videoFormat.typeOf': { $exists: true }
|
|
152
|
+
// }
|
|
153
|
+
// }
|
|
154
|
+
// ],
|
|
128
155
|
[
|
|
129
156
|
{ 'subEvent.videoFormat': 1, startDate: 1 },
|
|
130
157
|
{
|
|
@@ -10,10 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OrderNumberRepo = void 0;
|
|
13
|
-
const cdigit = require("cdigit");
|
|
14
13
|
const moment = require("moment-timezone");
|
|
15
|
-
// tslint:disable-next-line:no-require-imports no-var-requires
|
|
16
|
-
const fpe = require('node-fpe-v1');
|
|
17
14
|
const factory = require("../factory");
|
|
18
15
|
const transactionNumber_1 = require("../factory/transactionNumber");
|
|
19
16
|
const setting_1 = require("./mongoose/schemas/setting");
|
|
@@ -33,15 +30,15 @@ class OrderNumberRepo {
|
|
|
33
30
|
this.counterRepo = new transactionNumberCounter_1.TransactionNumberCounterRepo(params);
|
|
34
31
|
this.settingModel = params.connection.model(setting_1.modelName, (0, setting_1.createSchema)());
|
|
35
32
|
}
|
|
36
|
-
static GENERATE_VERSION0(timestamp, seq) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
33
|
+
// public static GENERATE_VERSION0(timestamp: string, seq: number): string {
|
|
34
|
+
// let orderNumber = `${timestamp}${seq}`;
|
|
35
|
+
// // checkdigit
|
|
36
|
+
// const cd = cdigit.luhn.compute(orderNumber);
|
|
37
|
+
// orderNumber = fpe({ password: cd })
|
|
38
|
+
// .encrypt(orderNumber);
|
|
39
|
+
// orderNumber = `${cd}${orderNumber}`;
|
|
40
|
+
// return orderNumber;
|
|
41
|
+
// }
|
|
45
42
|
/**
|
|
46
43
|
* タイムスタンプから発行する
|
|
47
44
|
*/
|
|
@@ -87,16 +84,18 @@ class OrderNumberRepo {
|
|
|
87
84
|
].join(ORDER_NUMBER_SEPARATOR)}`;
|
|
88
85
|
}
|
|
89
86
|
else {
|
|
90
|
-
|
|
91
|
-
orderNumber
|
|
92
|
-
orderNumber =
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
87
|
+
// discontinue version0(2026-02-13~)
|
|
88
|
+
throw new factory.errors.NotImplemented('orderNumber with no version discontinued');
|
|
89
|
+
// orderNumber = OrderNumberRepo.GENERATE_VERSION0(timestamp, incrReply);
|
|
90
|
+
// orderNumber = `${projectPrefix}${orderNumber}`;
|
|
91
|
+
// orderNumber = `${[
|
|
92
|
+
// // tslint:disable-next-line:no-magic-numbers
|
|
93
|
+
// orderNumber.slice(0, 4),
|
|
94
|
+
// // tslint:disable-next-line:no-magic-numbers
|
|
95
|
+
// orderNumber.slice(4, 11),
|
|
96
|
+
// // tslint:disable-next-line:no-magic-numbers
|
|
97
|
+
// orderNumber.slice(11)
|
|
98
|
+
// ].join(ORDER_NUMBER_SEPARATOR)}`;
|
|
100
99
|
}
|
|
101
100
|
return orderNumber;
|
|
102
101
|
});
|
|
@@ -34,7 +34,7 @@ type ICreatingTask = Pick<factory.task.IAttributes<factory.taskName>, 'data' | '
|
|
|
34
34
|
export declare class TaskRepo {
|
|
35
35
|
readonly taskModel: IModel;
|
|
36
36
|
constructor(connection: Connection);
|
|
37
|
-
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/confirmMoneyTransfer").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/
|
|
37
|
+
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): FilterQuery<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/confirmMoneyTransfer").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/returnMoneyTransfer").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/voidMoneyTransferTransaction").ITask | import("@chevre/factory/lib/task/voidPayTransaction").ITask | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/voidReserveTransaction").ITask>[];
|
|
38
38
|
runImmediately(params: Pick<factory.task.IAttributes<factory.taskName>, 'data' | 'expires' | 'name' | 'project' | 'remainingNumberOfTries' | 'runsAt'> & {
|
|
39
39
|
alternateName?: never;
|
|
40
40
|
identifier?: never;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import type { PotentialActionRepo } from '../../repo/potentialAction';
|
|
3
|
+
/**
|
|
4
|
+
* 決済取引あるいは返金取引の通知アクションを決定する
|
|
5
|
+
*/
|
|
3
6
|
declare function fixInformAction(params: {
|
|
4
7
|
paymentService?: Pick<factory.product.IProduct, 'availableChannel' | 'potentialAction'> | Pick<factory.service.paymentService.IService, 'availableChannel' | 'potentialAction'>;
|
|
5
8
|
project: {
|
|
@@ -11,6 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.fixInformAction = fixInformAction;
|
|
13
13
|
const factory = require("../../factory");
|
|
14
|
+
/**
|
|
15
|
+
* 決済取引あるいは返金取引の通知アクションを決定する
|
|
16
|
+
*/
|
|
14
17
|
function fixInformAction(params) {
|
|
15
18
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
16
19
|
var _a, _b;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
2
|
+
export interface ICancelRepos {
|
|
3
|
+
assetTransaction: AssetTransactionRepo;
|
|
4
|
+
}
|
|
5
|
+
export type ICancelOperation<T> = (repos: ICancelRepos) => Promise<T>;
|
|
6
|
+
/**
|
|
7
|
+
* 取引中止
|
|
8
|
+
*/
|
|
9
|
+
export declare function cancel(params: {
|
|
10
|
+
id?: string;
|
|
11
|
+
transactionNumber?: string;
|
|
12
|
+
}): ICancelOperation<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.cancel = cancel;
|
|
13
|
+
const factory = require("../../../factory");
|
|
14
|
+
/**
|
|
15
|
+
* 取引中止
|
|
16
|
+
*/
|
|
17
|
+
function cancel(params) {
|
|
18
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield repos.assetTransaction.cancel({
|
|
20
|
+
typeOf: factory.assetTransactionType.Pay,
|
|
21
|
+
id: params.id,
|
|
22
|
+
transactionNumber: params.transactionNumber
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as factory from '../../../factory';
|
|
2
|
+
import { Settings } from '../../../settings';
|
|
3
|
+
import type { ActionRepo } from '../../../repo/action';
|
|
4
|
+
import type { CredentialsRepo } from '../../../repo/credentials';
|
|
5
|
+
import type { EventRepo } from '../../../repo/event';
|
|
6
|
+
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
7
|
+
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
8
|
+
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
9
|
+
import * as MovieTicketPayment from '../../payment/movieTicket';
|
|
10
|
+
export type ICheckOperation<T> = (repos: {
|
|
11
|
+
action: ActionRepo;
|
|
12
|
+
credentials: CredentialsRepo;
|
|
13
|
+
event: EventRepo;
|
|
14
|
+
paymentAccepted: SellerPaymentAcceptedRepo;
|
|
15
|
+
paymentService: PaymentServiceRepo;
|
|
16
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
17
|
+
}, settings: Settings) => Promise<T>;
|
|
18
|
+
/**
|
|
19
|
+
* 決済方法認証
|
|
20
|
+
*/
|
|
21
|
+
export declare function check(params: factory.action.check.paymentMethod.movieTicket.IAttributes): ICheckOperation<{
|
|
22
|
+
result: MovieTicketPayment.ICheckResult;
|
|
23
|
+
}>;
|