@chevre/domain 24.1.0-alpha.30 → 24.1.0-alpha.31
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/mongoose/schemas/setting.d.ts +43 -0
- package/lib/chevre/repo/mongoose/schemas/setting.js +2 -1
- 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 +1 -1
|
@@ -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,
|
|
@@ -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[];
|
|
@@ -5,7 +5,7 @@ import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
|
5
5
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
import { ICheckResult } from './processPurchaseNumberAuth';
|
|
10
10
|
interface ICheckOperationRepos {
|
|
11
11
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
@@ -8,7 +8,7 @@ import type { PaymentServiceProviderRepo } from '../../../repo/paymentServicePro
|
|
|
8
8
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
9
9
|
import type { TaskRepo } from '../../../repo/task';
|
|
10
10
|
import { factory } from '../../../factory';
|
|
11
|
-
import { Settings } from '../../../
|
|
11
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
12
12
|
interface IPayOperationRepos {
|
|
13
13
|
action?: never;
|
|
14
14
|
actions: {
|
|
@@ -3,7 +3,7 @@ import type { IMinimizedIndividualEvent } from '../../../repo/event';
|
|
|
3
3
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
4
4
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
5
5
|
import { factory } from '../../../factory';
|
|
6
|
-
import { Settings } from '../../../
|
|
6
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
7
7
|
interface ICheckResult {
|
|
8
8
|
purchaseNumberAuthIn: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthIn;
|
|
9
9
|
purchaseNumberAuthResult: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
|
|
@@ -5,7 +5,7 @@ import type { CredentialsRepo } from '../../../repo/credentials';
|
|
|
5
5
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
6
6
|
import type { TaskRepo } from '../../../repo/task';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
interface IRefundOperationRepos {
|
|
10
10
|
action?: never;
|
|
11
11
|
actions: {
|
|
@@ -5,7 +5,7 @@ import type { CredentialsRepo } from '../../../repo/credentials';
|
|
|
5
5
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
6
6
|
import type { TaskRepo } from '../../../repo/task';
|
|
7
7
|
import { factory } from '../../../factory';
|
|
8
|
-
import { Settings } from '../../../
|
|
8
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
9
9
|
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
10
10
|
actions: {
|
|
11
11
|
pay: PayActionRepo;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onPendingReservationCanceled = onPendingReservationCanceled;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const factory_2 = require("../factory");
|
|
7
6
|
function onPendingReservationCanceled(params) {
|
|
8
7
|
return async (repos
|
|
@@ -9,7 +9,6 @@ exports.onReservationUsed = onReservationUsed;
|
|
|
9
9
|
*/
|
|
10
10
|
const moment_1 = __importDefault(require("moment"));
|
|
11
11
|
const factory_1 = require("../../../factory");
|
|
12
|
-
// import { Settings } from '../../../settings';
|
|
13
12
|
const factory_2 = require("../factory");
|
|
14
13
|
/**
|
|
15
14
|
* 予約使用
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.onReservationsCreated = onReservationsCreated;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const factory_2 = require("../factory");
|
|
7
6
|
/**
|
|
8
7
|
* 予約作成時イベント
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { 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 { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
5
5
|
import { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
6
6
|
import { ActionRepo } from '../../repo/action';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createInformHasPOSTasks = createInformHasPOSTasks;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
function createInformHasPOSTasks(params) {
|
|
7
6
|
return async (repos
|
|
8
7
|
// settings: Settings
|
|
@@ -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';
|
|
@@ -14,7 +14,7 @@ import type { ProjectRepo } from '../../../repo/project';
|
|
|
14
14
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
15
15
|
import type { TaskRepo } from '../../../repo/task';
|
|
16
16
|
import { factory } from '../../../factory';
|
|
17
|
-
import { Settings } from '../../../
|
|
17
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
18
18
|
interface IPayTask2payActionAttributesRepos {
|
|
19
19
|
checkMovieTicketAction: CheckMovieTicketActionRepo;
|
|
20
20
|
acceptedOffer: AcceptedOfferRepo;
|
|
@@ -11,7 +11,7 @@ import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccep
|
|
|
11
11
|
import type { TaskRepo } from '../../../repo/task';
|
|
12
12
|
import type { TransactionNumberRepo } from '../../../repo/transactionNumber';
|
|
13
13
|
import { factory } from '../../../factory';
|
|
14
|
-
import { Settings } from '../../../
|
|
14
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
15
15
|
declare function refundByTask(params: factory.task.refund.IData & {
|
|
16
16
|
sameAs?: {
|
|
17
17
|
id: string;
|
|
@@ -11,7 +11,7 @@ import type { ProjectRepo } from '../../../repo/project';
|
|
|
11
11
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
12
12
|
import type { TaskRepo } from '../../../repo/task';
|
|
13
13
|
import { factory } from '../../../factory';
|
|
14
|
-
import { Settings } from '../../../
|
|
14
|
+
import type { IntegrationSettingRepo as Settings } from '../../../repo/setting/integration';
|
|
15
15
|
declare function voidPaymentByTask(params: factory.task.voidPayment.IData): (repos: {
|
|
16
16
|
action: ActionRepo;
|
|
17
17
|
actions: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SendGridCredentials } from '../credentials/sendGrid';
|
|
2
2
|
import type { IExecuteSettings as IMinimumExecuteSettings, INextFunction, IReadyTask, IRunningTask } from '../eventEmitter/task';
|
|
3
3
|
import { factory } from '../factory';
|
|
4
|
-
import { Settings } from '../
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from '../repo/setting/integration';
|
|
5
5
|
import type { AggregationSettings } from '../taskSettings';
|
|
6
6
|
interface ICredentialSettings {
|
|
7
7
|
sendGrid: SendGridCredentials;
|
package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createSendEmailMessageActions = createSendEmailMessageActions;
|
|
4
4
|
const emailMessageBuilder_1 = require("../../../../../emailMessageBuilder");
|
|
5
5
|
const factory_1 = require("../../../../../factory");
|
|
6
|
-
// import { Settings } from '../../../../../settings';
|
|
7
6
|
async function createSendEmailMessageActions(params,
|
|
8
7
|
// settings: Settings
|
|
9
8
|
setting) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createPotentialActions = createPotentialActions;
|
|
4
|
-
// import { Settings } from '../../../../settings';
|
|
5
4
|
const sendEmailMessage_1 = require("./potentialActions/sendEmailMessage");
|
|
6
5
|
/**
|
|
7
6
|
* 取引のポストアクションを作成する
|
|
@@ -8,7 +8,6 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
8
8
|
const moment_1 = __importDefault(require("moment"));
|
|
9
9
|
const errorHandler_1 = require("../../../errorHandler");
|
|
10
10
|
const factory_1 = require("../../../factory");
|
|
11
|
-
// import { Settings } from '../../../settings';
|
|
12
11
|
const factory_2 = require("../../order/placeOrder/factory");
|
|
13
12
|
const orderedItem_1 = require("../../order/placeOrder/factory/orderedItem");
|
|
14
13
|
const result_1 = require("./confirm/factory/result");
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.exportTasksById = exportTasksById;
|
|
7
7
|
const moment_1 = __importDefault(require("moment"));
|
|
8
8
|
const factory_1 = require("../../../factory");
|
|
9
|
-
// import { Settings } from '../../../settings';
|
|
10
9
|
const factory_2 = require("./exportTasks/factory");
|
|
11
10
|
/**
|
|
12
11
|
* 取引のタスクを出力します
|
|
@@ -4,7 +4,6 @@ exports.updateAgent = updateAgent;
|
|
|
4
4
|
const google_libphonenumber_1 = require("google-libphonenumber");
|
|
5
5
|
const factory_1 = require("../../../factory");
|
|
6
6
|
const issueOrderNumberIfNotExist_1 = require("./issueOrderNumberIfNotExist");
|
|
7
|
-
// import { Settings } from '../settings';
|
|
8
7
|
// export type ITransactionOperation<T> = (repos: { transaction: TransactionRepo }) => Promise<T>;
|
|
9
8
|
function fixCustomer(params) {
|
|
10
9
|
return async (repos) => {
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.createTasks = createTasks;
|
|
7
7
|
const moment_1 = __importDefault(require("moment"));
|
|
8
8
|
const factory_1 = require("../../../../factory");
|
|
9
|
-
// import { Settings } from '../../../../settings';
|
|
10
9
|
/**
|
|
11
10
|
* 取引のタスクを作成する
|
|
12
11
|
*/
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createReturnPaymentMethodActions = createReturnPaymentMethodActions;
|
|
4
4
|
const emailMessageBuilder_1 = require("../../../../emailMessageBuilder");
|
|
5
5
|
const factory_1 = require("../../../../factory");
|
|
6
|
-
// import { Settings } from '../../../../settings';
|
|
7
6
|
async function createReturnInvoicePotentialActions(params,
|
|
8
7
|
// settings: Settings
|
|
9
8
|
setting) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createPotentialActions = createPotentialActions;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
// import { Settings } from '../../../settings';
|
|
6
5
|
const returnPaymentMethod_1 = require("./potentialActions/returnPaymentMethod");
|
|
7
6
|
const sendEmailMessage_1 = require("./potentialActions/sendEmailMessage");
|
|
8
7
|
async function createPotentialActions(params,
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -1,57 +1,3 @@
|
|
|
1
|
-
import type { Connection } from 'mongoose';
|
|
2
|
-
interface ISurfrockSettings {
|
|
3
|
-
/**
|
|
4
|
-
* 着券時タイムアウト
|
|
5
|
-
*/
|
|
6
|
-
timeoutPay: number;
|
|
7
|
-
/**
|
|
8
|
-
* 着券取消時タイムアウト
|
|
9
|
-
*/
|
|
10
|
-
timeoutRefund: number;
|
|
11
|
-
/**
|
|
12
|
-
* 認証時タイムアウト
|
|
13
|
-
*/
|
|
14
|
-
timeoutCheck: number;
|
|
15
|
-
/**
|
|
16
|
-
* 決済と返金の最小間隔(ms)
|
|
17
|
-
*/
|
|
18
|
-
minIntervalBetweenPayAndRefund: number;
|
|
19
|
-
/**
|
|
20
|
-
* surfrockクライアント認証情報保管期限
|
|
21
|
-
* 0の場合、保管しない
|
|
22
|
-
*/
|
|
23
|
-
credentialsExpireInSeconds?: number;
|
|
24
|
-
}
|
|
25
|
-
interface IOptions {
|
|
26
|
-
abortedTasksWithoutReport: string[];
|
|
27
|
-
numTryConfirmReserveTransaction: number;
|
|
28
|
-
deliverOrderLimit: number;
|
|
29
|
-
coa: {
|
|
30
|
-
timeoutReserve: number;
|
|
31
|
-
timeoutMaster: number;
|
|
32
|
-
};
|
|
33
|
-
gmo: {
|
|
34
|
-
timeout: number;
|
|
35
|
-
timeoutBackground: number;
|
|
36
|
-
};
|
|
37
|
-
movieticketReserve: ISurfrockSettings;
|
|
38
|
-
useExperimentalFeature: boolean;
|
|
39
|
-
}
|
|
40
|
-
interface IDBOptions {
|
|
41
|
-
connection: Connection;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* domain settings
|
|
45
|
-
*/
|
|
46
|
-
declare class Settings {
|
|
47
|
-
private readonly options;
|
|
48
|
-
constructor(options: IDBOptions);
|
|
49
|
-
/**
|
|
50
|
-
* 設定名称から設定を参照する
|
|
51
|
-
*/
|
|
52
|
-
getByKey<T extends keyof IOptions>(key: T): Promise<IOptions[T]>;
|
|
53
|
-
}
|
|
54
1
|
export declare const MONGO_MAX_TIME_MS: number;
|
|
55
2
|
export declare const MONGO_READ_PREFERENCE: string;
|
|
56
3
|
export declare const MONGO_AUTO_INDEX: boolean;
|
|
57
|
-
export { Settings };
|
package/lib/chevre/settings.js
CHANGED
|
@@ -1,68 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const factory_1 = require("./factory");
|
|
5
|
-
const defaultOptions = {
|
|
6
|
-
abortedTasksWithoutReport: [
|
|
7
|
-
factory_1.factory.taskName.ImportEventCapacitiesFromCOA,
|
|
8
|
-
factory_1.factory.taskName.ImportEventsFromCOA,
|
|
9
|
-
factory_1.factory.taskName.ImportOffersFromCOA,
|
|
10
|
-
],
|
|
11
|
-
numTryConfirmReserveTransaction: 10,
|
|
12
|
-
deliverOrderLimit: 10,
|
|
13
|
-
coa: {
|
|
14
|
-
timeoutReserve: 20000,
|
|
15
|
-
timeoutMaster: 30000
|
|
16
|
-
},
|
|
17
|
-
gmo: {
|
|
18
|
-
timeout: 4000,
|
|
19
|
-
timeoutBackground: 6000
|
|
20
|
-
},
|
|
21
|
-
movieticketReserve: {
|
|
22
|
-
timeoutPay: 5000,
|
|
23
|
-
timeoutRefund: 5000,
|
|
24
|
-
timeoutCheck: 4000,
|
|
25
|
-
minIntervalBetweenPayAndRefund: 10000,
|
|
26
|
-
credentialsExpireInSeconds: 600
|
|
27
|
-
},
|
|
28
|
-
useExperimentalFeature: false
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* domain settings
|
|
32
|
-
*/
|
|
33
|
-
class Settings {
|
|
34
|
-
// private readonly settingModel: IModel;
|
|
35
|
-
options;
|
|
36
|
-
constructor(options
|
|
37
|
-
// options: IOptions & IDBOptions
|
|
38
|
-
) {
|
|
39
|
-
const { connection: _connection, // ひとまず使用しない
|
|
40
|
-
// ...restOptions
|
|
41
|
-
} = options;
|
|
42
|
-
// this.settingModel = connection.model<IDocType, IModel>(modelName, createSchema());
|
|
43
|
-
this.options = defaultOptions;
|
|
44
|
-
// this.options = restOptions; // defaultOptionsでひとまず固定化(2026-05-23~)
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 設定名称から設定を参照する
|
|
48
|
-
*/
|
|
49
|
-
async getByKey(key) {
|
|
50
|
-
// const projection: Record<string, AnyExpression> = {
|
|
51
|
-
// _id: 0,
|
|
52
|
-
// [key]: 1
|
|
53
|
-
// // id: { $toString: '$_id' },
|
|
54
|
-
// };
|
|
55
|
-
// // とりあえず設定コレクションを参照するが、値を使用しない(2026-05-21~)
|
|
56
|
-
// await this.settingModel.findOne(
|
|
57
|
-
// { 'project.id': { $eq: '*' } },
|
|
58
|
-
// projection
|
|
59
|
-
// )
|
|
60
|
-
// .lean()
|
|
61
|
-
// .exec();
|
|
62
|
-
return this.options[key];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.Settings = Settings;
|
|
3
|
+
exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = void 0;
|
|
66
4
|
exports.MONGO_MAX_TIME_MS = (typeof process.env.MONGO_MAX_TIME_MS === 'string')
|
|
67
5
|
? Number(process.env.MONGO_MAX_TIME_MS)
|
|
68
6
|
: 10000;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SendGridCredentials } from './credentials/sendGrid';
|
|
2
2
|
import type { IExecuteSettings as IMinimumExecuteSettings } from './eventEmitter/task';
|
|
3
3
|
import { factory } from './factory';
|
|
4
|
-
import type { Settings } from './
|
|
4
|
+
import type { IntegrationSettingRepo as Settings } from './repo/setting/integration';
|
|
5
5
|
interface IOnOrderStatusChanged {
|
|
6
6
|
informOrder2hub?: factory.project.IInformParams[];
|
|
7
7
|
}
|
package/package.json
CHANGED