@chevre/domain 24.1.0-alpha.30 → 24.1.0-alpha.32
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/repo/factory/reservation/createMongoConditions.d.ts +1 -1
- package/lib/chevre/repo/factory/reservation/createMongoConditions.js +171 -363
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +43 -0
- package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
- package/lib/chevre/repo/place/hasPOS.js +2 -1
- package/lib/chevre/repo/reservation.js +2 -2
- package/lib/chevre/repo/setting/integration.d.ts +19 -0
- package/lib/chevre/repo/setting/integration.js +72 -0
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +11 -0
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
- package/lib/chevre/service/assetTransaction/pay/check.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +1 -1
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/processing2inTransit.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +0 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +0 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +0 -1
- package/lib/chevre/service/order/onOrderUpdated.js +0 -1
- package/lib/chevre/service/order/payOrder.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder.d.ts +1 -1
- package/lib/chevre/service/order/returnOrder.js +0 -1
- package/lib/chevre/service/order/sendOrder.js +0 -1
- package/lib/chevre/service/payment/any/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/any/person2username.js +0 -1
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/searchGMOTrade.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +0 -1
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +1 -1
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +0 -1
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -1
- package/lib/chevre/service/task/payment/payByTask.d.ts +1 -1
- package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -1
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +1 -1
- package/lib/chevre/service/task.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +0 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -1
- package/lib/chevre/settings.d.ts +0 -54
- package/lib/chevre/settings.js +1 -63
- package/lib/chevre/taskSettings.d.ts +1 -1
- package/package.json +2 -2
|
@@ -147,6 +147,44 @@ export interface IServiceOutputIdentifierSetting {
|
|
|
147
147
|
*/
|
|
148
148
|
version: string;
|
|
149
149
|
}
|
|
150
|
+
interface ISurfrockSettings {
|
|
151
|
+
/**
|
|
152
|
+
* 着券時タイムアウト
|
|
153
|
+
*/
|
|
154
|
+
timeoutPay: number;
|
|
155
|
+
/**
|
|
156
|
+
* 着券取消時タイムアウト
|
|
157
|
+
*/
|
|
158
|
+
timeoutRefund: number;
|
|
159
|
+
/**
|
|
160
|
+
* 認証時タイムアウト
|
|
161
|
+
*/
|
|
162
|
+
timeoutCheck: number;
|
|
163
|
+
/**
|
|
164
|
+
* 決済と返金の最小間隔(ms)
|
|
165
|
+
*/
|
|
166
|
+
minIntervalBetweenPayAndRefund: number;
|
|
167
|
+
/**
|
|
168
|
+
* surfrockクライアント認証情報保管期限
|
|
169
|
+
* 0の場合、保管しない
|
|
170
|
+
*/
|
|
171
|
+
credentialsExpireInSeconds?: number;
|
|
172
|
+
}
|
|
173
|
+
export interface IIntegrationSettings {
|
|
174
|
+
abortedTasksWithoutReport: string[];
|
|
175
|
+
numTryConfirmReserveTransaction: number;
|
|
176
|
+
deliverOrderLimit: number;
|
|
177
|
+
coa: {
|
|
178
|
+
timeoutReserve: number;
|
|
179
|
+
timeoutMaster: number;
|
|
180
|
+
};
|
|
181
|
+
gmo: {
|
|
182
|
+
timeout: number;
|
|
183
|
+
timeoutBackground: number;
|
|
184
|
+
};
|
|
185
|
+
movieticketReserve: ISurfrockSettings;
|
|
186
|
+
useExperimentalFeature: boolean;
|
|
187
|
+
}
|
|
150
188
|
export interface ISetting {
|
|
151
189
|
defaultSenderEmail?: string;
|
|
152
190
|
jwt?: IJWTSetting;
|
|
@@ -180,6 +218,11 @@ export interface ISetting {
|
|
|
180
218
|
useMongo4confirmationNumberFrom?: Date;
|
|
181
219
|
useMongo4orderNumberFrom?: Date;
|
|
182
220
|
useMongo4transactionNumberFrom?: Date;
|
|
221
|
+
/**
|
|
222
|
+
* 外部連携設定
|
|
223
|
+
* 環境変数から移行(2026-05-23~)
|
|
224
|
+
*/
|
|
225
|
+
integration?: IIntegrationSettings;
|
|
183
226
|
}
|
|
184
227
|
type IDocType = ISetting;
|
|
185
228
|
type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
|
|
@@ -31,7 +31,8 @@ const schemaDefinition = {
|
|
|
31
31
|
useMongoAsStockHolderProjects: [String],
|
|
32
32
|
useMongo4confirmationNumberFrom: { type: Date, required: false },
|
|
33
33
|
useMongo4orderNumberFrom: { type: Date, required: false },
|
|
34
|
-
useMongo4transactionNumberFrom: { type: Date, required: false }
|
|
34
|
+
useMongo4transactionNumberFrom: { type: Date, required: false },
|
|
35
|
+
integration: { type: mongoose_1.SchemaTypes.Mixed, required: false } // 2026-05-23~
|
|
35
36
|
};
|
|
36
37
|
const schemaOptions = {
|
|
37
38
|
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
@@ -67,7 +67,8 @@ class HasPOSRepo {
|
|
|
67
67
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.placeType.MovieTheater);
|
|
68
68
|
}
|
|
69
69
|
const creatingPOS = {
|
|
70
|
-
|
|
70
|
+
// 互換性維持対応としてidを保管
|
|
71
|
+
id: params.branchCode, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
71
72
|
branchCode: params.branchCode,
|
|
72
73
|
name: params.name
|
|
73
74
|
};
|
|
@@ -19,7 +19,7 @@ class ReservationRepo {
|
|
|
19
19
|
* 汎用予約カウント
|
|
20
20
|
*/
|
|
21
21
|
async count(params) {
|
|
22
|
-
const conditions = (0, createMongoConditions_1.
|
|
22
|
+
const conditions = (0, createMongoConditions_1.createMongoConditions)(params);
|
|
23
23
|
return this.reservationModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
24
24
|
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
25
25
|
.exec();
|
|
@@ -28,7 +28,7 @@ class ReservationRepo {
|
|
|
28
28
|
* 予約検索
|
|
29
29
|
*/
|
|
30
30
|
async findReservations(params, inclusion) {
|
|
31
|
-
const conditions = (0, createMongoConditions_1.
|
|
31
|
+
const conditions = (0, createMongoConditions_1.createMongoConditions)(params);
|
|
32
32
|
let projection;
|
|
33
33
|
if (inclusion !== undefined && inclusion !== null) {
|
|
34
34
|
projection = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import { IIntegrationSettings } from '../mongoose/schemas/setting';
|
|
3
|
+
interface IDBOptions {
|
|
4
|
+
connection: Connection;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 外部連携設定リポジトリ
|
|
8
|
+
*/
|
|
9
|
+
export declare class IntegrationSettingRepo {
|
|
10
|
+
private readonly settingModel;
|
|
11
|
+
private readonly options;
|
|
12
|
+
constructor(options: IDBOptions);
|
|
13
|
+
/**
|
|
14
|
+
* 設定名称から設定を参照する
|
|
15
|
+
*/
|
|
16
|
+
getByKey<T extends keyof IIntegrationSettings>(key: T): Promise<IIntegrationSettings[T]>;
|
|
17
|
+
addIntegrationSettings(params: IIntegrationSettings): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntegrationSettingRepo = void 0;
|
|
4
|
+
const factory_1 = require("../../factory");
|
|
5
|
+
const setting_1 = require("../mongoose/schemas/setting");
|
|
6
|
+
const defaultOptions = {
|
|
7
|
+
abortedTasksWithoutReport: [
|
|
8
|
+
factory_1.factory.taskName.ImportEventCapacitiesFromCOA,
|
|
9
|
+
factory_1.factory.taskName.ImportEventsFromCOA,
|
|
10
|
+
factory_1.factory.taskName.ImportOffersFromCOA,
|
|
11
|
+
],
|
|
12
|
+
numTryConfirmReserveTransaction: 10,
|
|
13
|
+
deliverOrderLimit: 10,
|
|
14
|
+
coa: {
|
|
15
|
+
timeoutReserve: 20000,
|
|
16
|
+
timeoutMaster: 30000
|
|
17
|
+
},
|
|
18
|
+
gmo: {
|
|
19
|
+
timeout: 4000,
|
|
20
|
+
timeoutBackground: 6000
|
|
21
|
+
},
|
|
22
|
+
movieticketReserve: {
|
|
23
|
+
timeoutPay: 5000,
|
|
24
|
+
timeoutRefund: 5000,
|
|
25
|
+
timeoutCheck: 4000,
|
|
26
|
+
minIntervalBetweenPayAndRefund: 10000,
|
|
27
|
+
credentialsExpireInSeconds: 600
|
|
28
|
+
},
|
|
29
|
+
useExperimentalFeature: false
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 外部連携設定リポジトリ
|
|
33
|
+
*/
|
|
34
|
+
class IntegrationSettingRepo {
|
|
35
|
+
settingModel;
|
|
36
|
+
options;
|
|
37
|
+
constructor(options
|
|
38
|
+
// options: IOptions & IDBOptions
|
|
39
|
+
) {
|
|
40
|
+
const { connection
|
|
41
|
+
// ...restOptions
|
|
42
|
+
} = options;
|
|
43
|
+
this.settingModel = connection.model(setting_1.modelName, (0, setting_1.createSchema)());
|
|
44
|
+
this.options = defaultOptions;
|
|
45
|
+
// this.options = restOptions; // defaultOptionsでひとまず固定化(2026-05-23~)
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 設定名称から設定を参照する
|
|
49
|
+
*/
|
|
50
|
+
async getByKey(key) {
|
|
51
|
+
const projection = {
|
|
52
|
+
_id: 0,
|
|
53
|
+
[`integration.${key}`]: 1
|
|
54
|
+
};
|
|
55
|
+
const settingDoc = await this.settingModel.findOne({ 'project.id': { $eq: '*' } }, projection)
|
|
56
|
+
.lean()
|
|
57
|
+
.exec();
|
|
58
|
+
if (settingDoc?.integration !== undefined) {
|
|
59
|
+
return settingDoc.integration[key];
|
|
60
|
+
}
|
|
61
|
+
return this.options[key];
|
|
62
|
+
}
|
|
63
|
+
async addIntegrationSettings(params) {
|
|
64
|
+
return this.settingModel.updateOne({ 'project.id': { $eq: '*' } }, {
|
|
65
|
+
$set: {
|
|
66
|
+
integration: params
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
.exec();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.IntegrationSettingRepo = IntegrationSettingRepo;
|
|
@@ -79,6 +79,7 @@ import type { SellerPaymentAcceptedRepo } from './repo/sellerPaymentAccepted';
|
|
|
79
79
|
import type { SellerReturnPolicyRepo } from './repo/sellerReturnPolicy';
|
|
80
80
|
import type { ServiceAvailableHourRepo } from './repo/service/availableHour';
|
|
81
81
|
import type { SettingRepo } from './repo/setting';
|
|
82
|
+
import type { IntegrationSettingRepo } from './repo/setting/integration';
|
|
82
83
|
import type { JWTSettingRepo } from './repo/setting/jwt';
|
|
83
84
|
import type { StockHolderRepo } from './repo/stockHolder';
|
|
84
85
|
import type { TaskRepo } from './repo/task';
|
|
@@ -437,6 +438,10 @@ export declare namespace Setting {
|
|
|
437
438
|
function createInstance(...params: ConstructorParameters<typeof SettingRepo>): Promise<SettingRepo>;
|
|
438
439
|
}
|
|
439
440
|
export declare namespace setting {
|
|
441
|
+
type Integration = IntegrationSettingRepo;
|
|
442
|
+
namespace Integration {
|
|
443
|
+
function createInstance(...params: ConstructorParameters<typeof IntegrationSettingRepo>): Promise<IntegrationSettingRepo>;
|
|
444
|
+
}
|
|
440
445
|
type JWT = JWTSettingRepo;
|
|
441
446
|
namespace JWT {
|
|
442
447
|
function createInstance(...params: ConstructorParameters<typeof JWTSettingRepo>): Promise<JWTSettingRepo>;
|
package/lib/chevre/repository.js
CHANGED
|
@@ -911,6 +911,17 @@ var Setting;
|
|
|
911
911
|
})(Setting || (exports.Setting = Setting = {}));
|
|
912
912
|
var setting;
|
|
913
913
|
(function (setting) {
|
|
914
|
+
let Integration;
|
|
915
|
+
(function (Integration) {
|
|
916
|
+
let repo;
|
|
917
|
+
async function createInstance(...params) {
|
|
918
|
+
if (repo === undefined) {
|
|
919
|
+
repo = (await import('./repo/setting/integration.js')).IntegrationSettingRepo;
|
|
920
|
+
}
|
|
921
|
+
return new repo(...params);
|
|
922
|
+
}
|
|
923
|
+
Integration.createInstance = createInstance;
|
|
924
|
+
})(Integration = setting.Integration || (setting.Integration = {}));
|
|
914
925
|
let JWT;
|
|
915
926
|
(function (JWT) {
|
|
916
927
|
let repo;
|
|
@@ -10,7 +10,6 @@ exports.aggregateScreeningEvent = aggregateScreeningEvent;
|
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
12
12
|
const factory_1 = require("../../../factory");
|
|
13
|
-
// import { Settings } from '../../../settings';
|
|
14
13
|
const findEventOffers_1 = require("./findEventOffers");
|
|
15
14
|
const debug = (0, debug_1.default)('chevre-domain:service:aggregation');
|
|
16
15
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { CheckMovieTicketActionRepo } from '../../../repo/action/checkMovieTicket';
|
|
4
4
|
import type { CredentialsRepo } from '../../../repo/credentials';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
|
|
4
4
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 決済取引サービス
|
|
3
3
|
*/
|
|
4
4
|
import type { GMO } from '@motionpicture/gmo-service';
|
|
5
|
-
import { Settings } from '../../../
|
|
5
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
6
6
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
7
7
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
8
8
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../../repo/action/refund';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { AuthorizeInvoiceActionRepo } from '../../../../repo/action/authorizeInvoice';
|
|
4
4
|
import type { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
5
5
|
import type { PaymentServiceRepo } from '../../../../repo/paymentService';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../../repo/action/refund';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../repo/action/refund';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Settings } from '../../../
|
|
1
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
2
2
|
import type { ActionRepo } from '../../../repo/action';
|
|
3
3
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
4
4
|
import type { OfferRateLimitRepo } from '../../../repo/rateLimit/offer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { ActionRepo } from '../../../repo/action';
|
|
4
4
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
5
5
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
4
4
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
5
5
|
import type { EventRepo } from '../../../repo/event';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SendGridCredentials } from '../../credentials/sendGrid';
|
|
2
2
|
import type { TaskRepo } from '../../repo/task';
|
|
3
|
-
import { Settings } from '../../
|
|
3
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
4
4
|
/**
|
|
5
5
|
* 中止されたタスクリストをEメールで通知する
|
|
6
6
|
* add(2025-03-13~)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
4
4
|
import type { AuthorizationRepo } from '../../../../repo/authorization';
|
|
5
5
|
import type { EventRepo, IMinimizedIndividualEvent } from '../../../../repo/event';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AuthorizeOfferActionRepo } from '../../../repo/action/authorizeOffer';
|
|
4
4
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
5
5
|
import type { AuthorizationRepo } from '../../../repo/authorization';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../../factory';
|
|
2
|
-
import { Settings } from '../../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../../repo/setting/integration';
|
|
3
3
|
import type { ActionRepo } from '../../../../repo/action';
|
|
4
4
|
import type { AssetTransactionRepo } from '../../../../repo/assetTransaction';
|
|
5
5
|
import type { OrderInTransactionRepo } from '../../../../repo/orderInTransaction';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { COA } from '@motionpicture/coa-service';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
|
-
import { Settings } from '../../../
|
|
3
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
4
4
|
import type { ActionRepo } from '../../../repo/action';
|
|
5
5
|
import type { AcceptCOAOfferActionRepo } from '../../../repo/action/acceptCOAOffer';
|
|
6
6
|
import type { AuthorizeOfferActionRepo } from '../../../repo/action/authorizeOffer';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { COA } from '@motionpicture/coa-service';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
|
-
import { Settings } from '../../../
|
|
3
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
4
4
|
import type { ActionRepo } from '../../../repo/action';
|
|
5
5
|
import type { AuthorizeOfferActionRepo } from '../../../repo/action/authorizeOffer';
|
|
6
6
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { SettingRepo } from '../../../repo/setting';
|
|
|
5
5
|
import type { TaskRepo } from '../../../repo/task';
|
|
6
6
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
interface IOnPayTransactionConfirmedRepos {
|
|
10
10
|
acceptedOffer: AcceptedOfferRepo;
|
|
11
11
|
assetTransaction: AssetTransactionRepo;
|
package/lib/chevre/service/order/onAssetTransactionStatusChanged/onReserveTransactionConfirmed.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { SettingRepo } from '../../../repo/setting';
|
|
|
5
5
|
import type { TaskRepo } from '../../../repo/task';
|
|
6
6
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
interface IOnReserveTransactionConfirmedRepos {
|
|
10
10
|
acceptedOffer: AcceptedOfferRepo;
|
|
11
11
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -3,7 +3,7 @@ import type { OrderRepo } from '../../../repo/order';
|
|
|
3
3
|
import type { SettingRepo } from '../../../repo/setting';
|
|
4
4
|
import type { TaskRepo } from '../../../repo/task';
|
|
5
5
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
6
|
-
import { Settings } from '../../../
|
|
6
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
7
7
|
interface IPaymentDue2ProcessingRepos {
|
|
8
8
|
acceptedOffer: AcceptedOfferRepo;
|
|
9
9
|
order: OrderRepo;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OrderRepo } from '../../../repo/order';
|
|
2
2
|
import type { TaskRepo } from '../../../repo/task';
|
|
3
3
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
4
|
-
import { Settings } from '../../../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
5
5
|
declare function processing2inTransit(params: {
|
|
6
6
|
project: {
|
|
7
7
|
id: string;
|
|
@@ -7,7 +7,7 @@ import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
|
7
7
|
import { paymentDue2Processing } from './onAssetTransactionStatusChanged/paymentDue2Processing';
|
|
8
8
|
import { processing2inTransit } from './onAssetTransactionStatusChanged/processing2inTransit';
|
|
9
9
|
import { factory } from '../../factory';
|
|
10
|
-
import { Settings } from '../../
|
|
10
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
11
11
|
interface IOnAssetTransactionStatusChangedRepos {
|
|
12
12
|
acceptedOffer: AcceptedOfferRepo;
|
|
13
13
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -9,7 +9,6 @@ exports.onOrderDelivered = onOrderDelivered;
|
|
|
9
9
|
*/
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const factory_1 = require("../../../factory");
|
|
12
|
-
// import { Settings } from '../../../settings';
|
|
13
12
|
const factory_2 = require("./onOrderDelivered/factory");
|
|
14
13
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
15
14
|
function onOrderDelivered(params) {
|
|
@@ -9,7 +9,6 @@ exports.onOrderDeliveredPartially = onOrderDeliveredPartially;
|
|
|
9
9
|
*/
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const factory_1 = require("../../../factory");
|
|
12
|
-
// import { Settings } from '../../../settings';
|
|
13
12
|
const factory_2 = require("./onOrderDeliveredPartially/factory");
|
|
14
13
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
15
14
|
function onOrderDeliveredPartially(params) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TaskRepo } from '../../../repo/task';
|
|
2
2
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
3
3
|
import { factory } from '../../../factory';
|
|
4
|
-
import { Settings } from '../../../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
5
5
|
interface IOnOrderInTransitRepos {
|
|
6
6
|
task: TaskRepo;
|
|
7
7
|
placeOrder: PlaceOrderRepo;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SettingRepo } from '../../../repo/setting';
|
|
2
2
|
import type { TaskRepo } from '../../../repo/task';
|
|
3
3
|
import { factory } from '../../../factory';
|
|
4
|
-
import { Settings } from '../../../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
5
5
|
import { IExternalOrder, IProcessingOrder } from './onOrderProcessing/factory';
|
|
6
6
|
import { processOrder } from './onOrderProcessing/processOrder';
|
|
7
7
|
type IPlaceOrderTransaction = Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'typeOf' | 'potentialActions'>;
|
|
@@ -10,7 +10,6 @@ exports.onOrderReturned = onOrderReturned;
|
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const google_libphonenumber_1 = require("google-libphonenumber");
|
|
12
12
|
const factory_1 = require("../../../factory");
|
|
13
|
-
// import { Settings } from '../../../settings';
|
|
14
13
|
// import { createMaskedCustomer } from '../../../factory/order';
|
|
15
14
|
const factory_2 = require("./onOrderReturned/factory");
|
|
16
15
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onOrderUpdated = onOrderUpdated;
|
|
4
4
|
const factory_1 = require("../../factory");
|
|
5
|
-
// import { Settings } from '../../settings';
|
|
6
5
|
const factory_2 = require("./onOrderUpdated/factory");
|
|
7
6
|
function onOrderUpdated(params) {
|
|
8
7
|
return async (repos
|
|
@@ -4,7 +4,7 @@ import type { SettingRepo } from '../../repo/setting';
|
|
|
4
4
|
import type { TaskRepo } from '../../repo/task';
|
|
5
5
|
import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
6
6
|
import { factory } from '../../factory';
|
|
7
|
-
import { Settings } from '../../
|
|
7
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
8
8
|
/**
|
|
9
9
|
* 注文を決済する
|
|
10
10
|
*/
|
|
@@ -9,7 +9,7 @@ import type { SettingRepo } from '../../repo/setting';
|
|
|
9
9
|
import type { TaskRepo } from '../../repo/task';
|
|
10
10
|
import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
11
11
|
import { factory } from '../../factory';
|
|
12
|
-
import { Settings } from '../../
|
|
12
|
+
import type { IntegrationSettingRepo as Settings } from '../../repo/setting/integration';
|
|
13
13
|
interface IPlaceOrderRepos {
|
|
14
14
|
acceptedOffer: AcceptedOfferRepo;
|
|
15
15
|
accountingReport: AccountingReportRepo;
|
|
@@ -8,7 +8,6 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
8
8
|
// import { createMaskedCustomer } from '../../factory/order';
|
|
9
9
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
10
10
|
const factory_1 = require("../../factory");
|
|
11
|
-
// import { Settings } from '../../settings';
|
|
12
11
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
13
12
|
function createReturnPolicy(params) {
|
|
14
13
|
const { identifier, returnFees, restockingFee, typeOf } = params.returnOrderTransaction.object.returnPolicy;
|
|
@@ -10,7 +10,6 @@ const factory_1 = require("../delivery/factory");
|
|
|
10
10
|
// import { findPlaceOrderTransaction } from './findPlaceOrderTransaction';
|
|
11
11
|
const onOrderStatusChanged_1 = require("./onOrderStatusChanged");
|
|
12
12
|
const factory_2 = require("../../factory");
|
|
13
|
-
// import { Settings } from '../../settings';
|
|
14
13
|
const debug = (0, debug_1.default)('chevre-domain:service:order');
|
|
15
14
|
/**
|
|
16
15
|
* 注文を配送する
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AccountingReportRepo } from '../../../repo/accountingReport';
|
|
4
4
|
import type { PayActionRepo } from '../../../repo/action/pay';
|
|
5
5
|
import type { RefundActionRepo } from '../../../repo/action/refund';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.person2username = person2username;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const person_1 = require("../../../repo/person");
|
|
7
6
|
const SSKTS_PROVIDER_NAME = 'SSKTS';
|
|
8
7
|
async function person2username(person, cognitoIdentityServiceProvider, setting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
|
|
4
4
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
5
5
|
import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
4
4
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
5
5
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -6,7 +6,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
8
|
import { factory } from '../../../factory';
|
|
9
|
-
import { Settings } from '../../../
|
|
9
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
10
10
|
/**
|
|
11
11
|
* クレジットカード決済
|
|
12
12
|
*/
|
|
@@ -6,7 +6,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
8
|
import { factory } from '../../../factory';
|
|
9
|
-
import { Settings } from '../../../
|
|
9
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
10
10
|
/**
|
|
11
11
|
* refund CreditCard IF payment
|
|
12
12
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GMO } from '@motionpicture/gmo-service';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
|
-
import { Settings } from '../../../
|
|
3
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
4
4
|
/**
|
|
5
5
|
* 決済代行側の取引状態参照
|
|
6
6
|
* 存在しない場合NotFoundエラー
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
|
-
import { Settings } from '../../../
|
|
2
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
3
3
|
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
4
4
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
5
5
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -9,7 +9,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
9
9
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
10
10
|
import type { TaskRepo } from '../../../repo/task';
|
|
11
11
|
import { factory } from '../../../factory';
|
|
12
|
-
import { Settings } from '../../../
|
|
12
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
13
13
|
interface IAuthorizeResult {
|
|
14
14
|
accountId: string;
|
|
15
15
|
accountsReceivablesByServiceType: factory.assetTransaction.pay.IAccountsReceivableByServiceType[];
|