@chevre/domain 24.0.0-alpha.83 → 24.0.0-alpha.85
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/aggregateOffer.js +0 -16
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +0 -18
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +0 -2
- package/lib/chevre/repo/product.js +0 -3
- package/lib/chevre/repo/transaction.d.ts +4 -4
- package/lib/chevre/repository.d.ts +0 -30
- package/lib/chevre/repository.js +2 -68
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.d.ts +0 -2
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +3 -102
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +0 -2
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +1 -31
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +0 -2
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -2
- package/lib/chevre/service/offer/factory.js +1 -4
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +1 -5
- package/lib/chevre/service/task/deletePerson.js +0 -2
- package/lib/chevre/service/task/onResourceDeleted.js +0 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +4 -4
- package/lib/chevre/service.d.ts +0 -12
- package/lib/chevre/service.js +1 -35
- package/package.json +2 -2
- package/lib/chevre/factory/availableProductTypes.d.ts +0 -1
- package/lib/chevre/factory/availableProductTypes.js +0 -8
- package/lib/chevre/repo/account.d.ts +0 -129
- package/lib/chevre/repo/account.js +0 -391
- package/lib/chevre/repo/accountTransaction.d.ts +0 -65
- package/lib/chevre/repo/accountTransaction.js +0 -277
- package/lib/chevre/repo/advanceBookingRequirement.d.ts +0 -35
- package/lib/chevre/repo/advanceBookingRequirement.js +0 -108
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/account.js +0 -118
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +0 -149
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.js +0 -84
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +0 -144
- package/lib/chevre/repo/permit.d.ts +0 -42
- package/lib/chevre/repo/permit.js +0 -77
- package/lib/chevre/repo/serviceOutput.d.ts +0 -36
- package/lib/chevre/repo/serviceOutput.js +0 -167
- package/lib/chevre/repo/serviceOutputIdentifier.d.ts +0 -18
- package/lib/chevre/repo/serviceOutputIdentifier.js +0 -74
- package/lib/chevre/service/account.d.ts +0 -59
- package/lib/chevre/service/account.js +0 -108
- package/lib/chevre/service/accountTransaction/deposit.d.ts +0 -14
- package/lib/chevre/service/accountTransaction/deposit.js +0 -57
- package/lib/chevre/service/accountTransaction/factory.d.ts +0 -10
- package/lib/chevre/service/accountTransaction/factory.js +0 -101
- package/lib/chevre/service/accountTransaction/transfer.d.ts +0 -14
- package/lib/chevre/service/accountTransaction/transfer.js +0 -87
- package/lib/chevre/service/accountTransaction/withdraw.d.ts +0 -14
- package/lib/chevre/service/accountTransaction/withdraw.js +0 -68
- package/lib/chevre/service/accountTransaction.d.ts +0 -20
- package/lib/chevre/service/accountTransaction.js +0 -81
- package/lib/chevre/service/permit.d.ts +0 -45
- package/lib/chevre/service/permit.js +0 -158
- package/lib/chevre/service/product.d.ts +0 -9
- package/lib/chevre/service/product.js +0 -77
- package/lib/chevre/service/task/registerService.d.ts +0 -6
- package/lib/chevre/service/task/registerService.js +0 -22
|
@@ -35,11 +35,7 @@ function verifyTicketTokenAsNeeded(params) {
|
|
|
35
35
|
}
|
|
36
36
|
if (authorizedObject.typeOf === 'OwnershipInfo') {
|
|
37
37
|
const { typeOfGood } = authorizedObject;
|
|
38
|
-
if (typeOfGood.typeOf === factory_1.factory.
|
|
39
|
-
// discontinue(2025-11-14~)
|
|
40
|
-
throw new factory_1.factory.errors.Argument('ticketToken', `typeOfGood.typeOf ${typeOfGood.typeOf} discontinued`);
|
|
41
|
-
}
|
|
42
|
-
else if (typeOfGood.typeOf === factory_1.factory.service.paymentService.PaymentServiceType.CreditCard
|
|
38
|
+
if (typeOfGood.typeOf === factory_1.factory.service.paymentService.PaymentServiceType.CreditCard
|
|
43
39
|
|| typeOfGood.typeOf === factory_1.factory.service.paymentService.PaymentServiceType.MovieTicket
|
|
44
40
|
|| typeOfGood.typeOf === factory_1.factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
45
41
|
// 決済方法所有権を受け入れる(2025-11-11~)
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.call = call;
|
|
7
7
|
const debug_1 = __importDefault(require("debug"));
|
|
8
8
|
const factory_1 = require("../../factory");
|
|
9
|
-
const account_1 = require("../../repo/account");
|
|
10
9
|
const action_1 = require("../../repo/action");
|
|
11
10
|
const ownershipInfo_1 = require("../../repo/ownershipInfo");
|
|
12
11
|
const paymentService_1 = require("../../repo/paymentService");
|
|
@@ -50,7 +49,6 @@ function call(params) {
|
|
|
50
49
|
...params.data,
|
|
51
50
|
project: { id: params.project.id }
|
|
52
51
|
})({
|
|
53
|
-
account: new account_1.AccountRepo(connection),
|
|
54
52
|
action: new action_1.ActionRepo(connection),
|
|
55
53
|
ownershipInfo: new ownershipInfo_1.OwnershipInfoRepo(connection),
|
|
56
54
|
paymentService: paymentServiceRepo,
|
|
@@ -128,9 +128,6 @@ function onResourceDeleted(params) {
|
|
|
128
128
|
break;
|
|
129
129
|
case factory_1.factory.product.ProductType.EventService:
|
|
130
130
|
case factory_1.factory.product.ProductType.Product:
|
|
131
|
-
case factory_1.factory.product.ProductType.Transportation:
|
|
132
|
-
case factory_1.factory.product.ProductType.MembershipService:
|
|
133
|
-
case factory_1.factory.product.ProductType.PaymentCard:
|
|
134
131
|
await (0, deleteResourcesByProduct_1.deleteResourcesByProduct)({
|
|
135
132
|
project: { id: params.project.id },
|
|
136
133
|
ids: params.id,
|
|
@@ -382,10 +382,10 @@ function validateEventOffers(params) {
|
|
|
382
382
|
const satisfyProgramMembershipRequirement = programMembershipRequired.every(({ identifier, issuedThrough }) => {
|
|
383
383
|
let satisfyThisRequirement = false;
|
|
384
384
|
switch (issuedThrough.typeOf) {
|
|
385
|
-
case
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
385
|
+
// case factory.product.ProductType.MembershipService:
|
|
386
|
+
// // 検証の必要なし
|
|
387
|
+
// satisfyThisRequirement = true;
|
|
388
|
+
// break;
|
|
389
389
|
case factory_1.factory.service.paymentService.PaymentServiceType.CreditCard:
|
|
390
390
|
satisfyThisRequirement = paymentMethods.some((paymentMethod) => paymentMethod.paymentMethodId === identifier
|
|
391
391
|
&& paymentMethod.issuedThrough.id === issuedThrough.id
|
package/lib/chevre/service.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ import * as OrderFactory from './factory/order';
|
|
|
7
7
|
import * as ReservedAgentIdentifireNamesFactory from './factory/reservedAgentIdentifireNames';
|
|
8
8
|
import * as TaskIdentifierFactory from './factory/taskIdentifier';
|
|
9
9
|
import * as TransactionFactory from './factory/transaction';
|
|
10
|
-
import type * as AccountService from './service/account';
|
|
11
|
-
import type * as AccountTransactionService from './service/accountTransaction';
|
|
12
10
|
import type * as AggregationService from './service/aggregation';
|
|
13
11
|
import type * as AssetTransactionService from './service/assetTransaction';
|
|
14
12
|
import type * as EventService from './service/event';
|
|
@@ -17,17 +15,10 @@ import type * as NotificationService from './service/notification';
|
|
|
17
15
|
import type * as OfferService from './service/offer';
|
|
18
16
|
import type * as OrderService from './service/order';
|
|
19
17
|
import type * as AnyPaymentService from './service/payment/any';
|
|
20
|
-
import type * as PermitService from './service/permit';
|
|
21
18
|
import type * as ProjectService from './service/project';
|
|
22
19
|
import type * as ReserveService from './service/reserve';
|
|
23
20
|
import type * as TaskService from './service/task';
|
|
24
21
|
import type * as TransactionService from './service/transaction';
|
|
25
|
-
export declare namespace account {
|
|
26
|
-
function createService(): Promise<typeof AccountService>;
|
|
27
|
-
}
|
|
28
|
-
export declare namespace accountTransaction {
|
|
29
|
-
function createService(): Promise<typeof AccountTransactionService>;
|
|
30
|
-
}
|
|
31
22
|
export declare namespace aggregation {
|
|
32
23
|
function createService(): Promise<typeof AggregationService>;
|
|
33
24
|
}
|
|
@@ -54,9 +45,6 @@ export declare namespace payment {
|
|
|
54
45
|
function createService(): Promise<typeof AnyPaymentService>;
|
|
55
46
|
}
|
|
56
47
|
}
|
|
57
|
-
export declare namespace permit {
|
|
58
|
-
function createService(): Promise<typeof PermitService>;
|
|
59
|
-
}
|
|
60
48
|
export declare namespace project {
|
|
61
49
|
function createService(): Promise<typeof ProjectService>;
|
|
62
50
|
}
|
package/lib/chevre/service.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.factory = exports.transaction = exports.task = exports.reserve = exports.project = exports.
|
|
36
|
+
exports.factory = exports.transaction = exports.task = exports.reserve = exports.project = exports.payment = exports.order = exports.offer = exports.notification = exports.iam = exports.event = exports.assetTransaction = exports.aggregation = void 0;
|
|
37
37
|
/**
|
|
38
38
|
* service module
|
|
39
39
|
*/
|
|
@@ -43,29 +43,6 @@ const OrderFactory = __importStar(require("./factory/order"));
|
|
|
43
43
|
const ReservedAgentIdentifireNamesFactory = __importStar(require("./factory/reservedAgentIdentifireNames"));
|
|
44
44
|
const TaskIdentifierFactory = __importStar(require("./factory/taskIdentifier"));
|
|
45
45
|
const TransactionFactory = __importStar(require("./factory/transaction"));
|
|
46
|
-
// import all lazily(2023-10-11~)
|
|
47
|
-
var account;
|
|
48
|
-
(function (account) {
|
|
49
|
-
let service;
|
|
50
|
-
async function createService() {
|
|
51
|
-
if (service === undefined) {
|
|
52
|
-
service = await import('./service/account.js');
|
|
53
|
-
}
|
|
54
|
-
return service;
|
|
55
|
-
}
|
|
56
|
-
account.createService = createService;
|
|
57
|
-
})(account || (exports.account = account = {}));
|
|
58
|
-
var accountTransaction;
|
|
59
|
-
(function (accountTransaction) {
|
|
60
|
-
let service;
|
|
61
|
-
async function createService() {
|
|
62
|
-
if (service === undefined) {
|
|
63
|
-
service = await import('./service/accountTransaction.js');
|
|
64
|
-
}
|
|
65
|
-
return service;
|
|
66
|
-
}
|
|
67
|
-
accountTransaction.createService = createService;
|
|
68
|
-
})(accountTransaction || (exports.accountTransaction = accountTransaction = {}));
|
|
69
46
|
var aggregation;
|
|
70
47
|
(function (aggregation) {
|
|
71
48
|
let service;
|
|
@@ -157,17 +134,6 @@ var payment;
|
|
|
157
134
|
any.createService = createService;
|
|
158
135
|
})(any = payment.any || (payment.any = {}));
|
|
159
136
|
})(payment || (exports.payment = payment = {}));
|
|
160
|
-
var permit;
|
|
161
|
-
(function (permit) {
|
|
162
|
-
let service;
|
|
163
|
-
async function createService() {
|
|
164
|
-
if (service === undefined) {
|
|
165
|
-
service = await import('./service/permit.js');
|
|
166
|
-
}
|
|
167
|
-
return service;
|
|
168
|
-
}
|
|
169
|
-
permit.createService = createService;
|
|
170
|
-
})(permit || (exports.permit = permit = {}));
|
|
171
137
|
var project;
|
|
172
138
|
(function (project) {
|
|
173
139
|
let service;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "8.0.0-alpha.
|
|
14
|
+
"@chevre/factory": "8.0.0-alpha.7",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"postversion": "git push origin --tags",
|
|
92
92
|
"prepublishOnly": "npm run clean && npm run build"
|
|
93
93
|
},
|
|
94
|
-
"version": "24.0.0-alpha.
|
|
94
|
+
"version": "24.0.0-alpha.85"
|
|
95
95
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const availableProductTypes: string[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.availableProductTypes = void 0;
|
|
4
|
-
const factory_1 = require("../factory");
|
|
5
|
-
exports.availableProductTypes = [
|
|
6
|
-
factory_1.factory.product.ProductType.PaymentCard,
|
|
7
|
-
factory_1.factory.product.ProductType.MembershipService
|
|
8
|
-
];
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import type { Connection } from 'mongoose';
|
|
2
|
-
import { factory } from '../factory';
|
|
3
|
-
/**
|
|
4
|
-
* 口座リポジトリ
|
|
5
|
-
*/
|
|
6
|
-
export declare class AccountRepo {
|
|
7
|
-
private readonly accountModel;
|
|
8
|
-
constructor(connection: Connection);
|
|
9
|
-
static CREATE_MONGO_CONDITIONS(params: factory.account.ISearchConditions): any[];
|
|
10
|
-
/**
|
|
11
|
-
* 口座を開設する
|
|
12
|
-
*/
|
|
13
|
-
open(params: {
|
|
14
|
-
project: {
|
|
15
|
-
typeOf: factory.organizationType.Project;
|
|
16
|
-
id: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 口座種別
|
|
20
|
-
*/
|
|
21
|
-
typeOf: string;
|
|
22
|
-
/**
|
|
23
|
-
* 口座タイプ
|
|
24
|
-
*/
|
|
25
|
-
accountType: string;
|
|
26
|
-
/**
|
|
27
|
-
* 口座名義
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
/**
|
|
31
|
-
* 口座番号
|
|
32
|
-
*/
|
|
33
|
-
accountNumber: string;
|
|
34
|
-
/**
|
|
35
|
-
* 初期金額
|
|
36
|
-
*/
|
|
37
|
-
initialBalance: number;
|
|
38
|
-
/**
|
|
39
|
-
* 開設日時
|
|
40
|
-
*/
|
|
41
|
-
openDate: Date;
|
|
42
|
-
}[]): Promise<factory.account.IAccount[]>;
|
|
43
|
-
/**
|
|
44
|
-
* 口座を解約する
|
|
45
|
-
*/
|
|
46
|
-
/**
|
|
47
|
-
* 口座番号で検索する
|
|
48
|
-
*/
|
|
49
|
-
findByAccountNumber(params: {
|
|
50
|
-
/**
|
|
51
|
-
* 口座番号
|
|
52
|
-
*/
|
|
53
|
-
accountNumber: string;
|
|
54
|
-
}): Promise<factory.account.IAccount>;
|
|
55
|
-
/**
|
|
56
|
-
* 金額を確保する
|
|
57
|
-
* https://en.wikipedia.org/wiki/Authorization_hold
|
|
58
|
-
*/
|
|
59
|
-
authorizeAmount(params: {
|
|
60
|
-
/**
|
|
61
|
-
* 口座番号
|
|
62
|
-
*/
|
|
63
|
-
accountNumber: string;
|
|
64
|
-
/**
|
|
65
|
-
* 金額
|
|
66
|
-
*/
|
|
67
|
-
amount: number;
|
|
68
|
-
/**
|
|
69
|
-
* 進行取引
|
|
70
|
-
*/
|
|
71
|
-
transaction: factory.account.IPendingTransaction;
|
|
72
|
-
/**
|
|
73
|
-
* 利用可能金額確認をしない場合、force: true
|
|
74
|
-
*/
|
|
75
|
-
force?: boolean;
|
|
76
|
-
}): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* 取引を開始する
|
|
79
|
-
*/
|
|
80
|
-
startTransaction(params: {
|
|
81
|
-
/**
|
|
82
|
-
* 口座番号
|
|
83
|
-
*/
|
|
84
|
-
accountNumber: string;
|
|
85
|
-
/**
|
|
86
|
-
* 進行取引
|
|
87
|
-
*/
|
|
88
|
-
transaction: factory.account.IPendingTransaction;
|
|
89
|
-
}): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* 決済処理を実行する
|
|
92
|
-
* 口座上で進行中の取引について、実際に金額移動処理を実行します。
|
|
93
|
-
*/
|
|
94
|
-
settleTransaction(params: {
|
|
95
|
-
fromAccountNumber?: string;
|
|
96
|
-
toAccountNumber?: string;
|
|
97
|
-
amount: number;
|
|
98
|
-
transactionId: string;
|
|
99
|
-
}): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* 取引を取り消す
|
|
102
|
-
* 口座上で進行中の取引を中止します。
|
|
103
|
-
* https://www.investopedia.com/terms/v/void-transaction.asp
|
|
104
|
-
*/
|
|
105
|
-
voidTransaction(params: {
|
|
106
|
-
fromAccountNumber?: string;
|
|
107
|
-
toAccountNumber?: string;
|
|
108
|
-
amount: number;
|
|
109
|
-
transactionId: string;
|
|
110
|
-
}): Promise<void>;
|
|
111
|
-
/**
|
|
112
|
-
* 通貨転送返金
|
|
113
|
-
*/
|
|
114
|
-
returnTransaction(params: {
|
|
115
|
-
fromAccountNumber?: string;
|
|
116
|
-
toAccountNumber?: string;
|
|
117
|
-
amount: number;
|
|
118
|
-
transactionId: string;
|
|
119
|
-
}): Promise<void>;
|
|
120
|
-
count(params: factory.account.ISearchConditions): Promise<number>;
|
|
121
|
-
/**
|
|
122
|
-
* 口座を検索する
|
|
123
|
-
*/
|
|
124
|
-
search(params: factory.account.ISearchConditions): Promise<factory.account.IAccount[]>;
|
|
125
|
-
unsetUnnecessaryFields(params: {
|
|
126
|
-
filter: any;
|
|
127
|
-
$unset: any;
|
|
128
|
-
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
129
|
-
}
|