@chevre/domain 24.0.0-alpha.82 → 24.0.0-alpha.84
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/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.js +1 -19
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +1 -31
- 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/comment.d.ts +0 -42
- package/lib/chevre/repo/comment.js +0 -121
- 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/comments.d.ts +0 -11
- package/lib/chevre/repo/mongoose/schemas/comments.js +0 -103
- 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
|
@@ -219,10 +219,7 @@ class ProductRepo {
|
|
|
219
219
|
const { id, productID, project, typeOf, offers, ...setFields } = params.$set; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
220
220
|
switch (typeOf) {
|
|
221
221
|
case factory_1.factory.product.ProductType.EventService:
|
|
222
|
-
case factory_1.factory.product.ProductType.MembershipService:
|
|
223
|
-
case factory_1.factory.product.ProductType.PaymentCard:
|
|
224
222
|
case factory_1.factory.product.ProductType.Product:
|
|
225
|
-
case factory_1.factory.product.ProductType.Transportation:
|
|
226
223
|
doc = await this.productModel.findOneAndUpdate({
|
|
227
224
|
_id: { $eq: params.id },
|
|
228
225
|
typeOf: { $eq: typeOf }
|
|
@@ -136,10 +136,10 @@ export declare class TransactionRepo {
|
|
|
136
136
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
137
137
|
startDate: Date;
|
|
138
138
|
endDate?: Date | undefined;
|
|
139
|
-
status: factory.transactionStatusType;
|
|
140
139
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
141
140
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
142
141
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IPotentialActions | undefined;
|
|
142
|
+
status: factory.transactionStatusType;
|
|
143
143
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
144
144
|
} & {
|
|
145
145
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -155,10 +155,10 @@ export declare class TransactionRepo {
|
|
|
155
155
|
result?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IResult | undefined;
|
|
156
156
|
startDate: Date;
|
|
157
157
|
endDate?: Date | undefined;
|
|
158
|
-
status: factory.transactionStatusType;
|
|
159
158
|
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
160
159
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
161
160
|
recipient?: undefined;
|
|
161
|
+
status: factory.transactionStatusType;
|
|
162
162
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
163
163
|
} & {
|
|
164
164
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -174,10 +174,10 @@ export declare class TransactionRepo {
|
|
|
174
174
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
175
175
|
startDate: Date;
|
|
176
176
|
endDate?: Date | undefined;
|
|
177
|
-
status: factory.transactionStatusType;
|
|
178
177
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
179
178
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
180
179
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IPotentialActions | undefined;
|
|
180
|
+
status: factory.transactionStatusType;
|
|
181
181
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
182
182
|
} & {
|
|
183
183
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -193,10 +193,10 @@ export declare class TransactionRepo {
|
|
|
193
193
|
result?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IResult | undefined;
|
|
194
194
|
startDate: Date;
|
|
195
195
|
endDate?: Date | undefined;
|
|
196
|
-
status: factory.transactionStatusType;
|
|
197
196
|
agent: import("@chevre/factory/lib/chevre/transaction").IAgent;
|
|
198
197
|
potentialActions?: import("@chevre/factory/lib/chevre/transaction/returnOrder").IPotentialActions | undefined;
|
|
199
198
|
recipient?: undefined;
|
|
199
|
+
status: factory.transactionStatusType;
|
|
200
200
|
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
201
201
|
} & {
|
|
202
202
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
* リポジトリ
|
|
3
3
|
*/
|
|
4
4
|
import type { AcceptedOfferRepo } from './repo/acceptedOffer';
|
|
5
|
-
import type { AccountRepo } from './repo/account';
|
|
6
5
|
import type { AccountingReportRepo } from './repo/accountingReport';
|
|
7
6
|
import type { AccountTitleRepo } from './repo/accountTitle';
|
|
8
|
-
import type { AccountTransactionRepo } from './repo/accountTransaction';
|
|
9
7
|
import type { ActionRepo } from './repo/action';
|
|
10
8
|
import type { AcceptCOAOfferActionRepo } from './repo/action/acceptCOAOffer';
|
|
11
9
|
import type { AcceptPayActionRepo } from './repo/action/acceptPay';
|
|
@@ -28,7 +26,6 @@ import type { AssetTransactionRepo } from './repo/assetTransaction';
|
|
|
28
26
|
import type { ReserveTransactionRepo } from './repo/assetTransaction/reserve';
|
|
29
27
|
import type { AuthorizationRepo } from './repo/authorization';
|
|
30
28
|
import type { CategoryCodeRepo } from './repo/categoryCode';
|
|
31
|
-
import type { CommentRepo } from './repo/comment';
|
|
32
29
|
import type { CreativeWorkRepo } from './repo/creativeWork';
|
|
33
30
|
import type { CredentialsRepo } from './repo/credentials';
|
|
34
31
|
import type { CustomerRepo } from './repo/customer';
|
|
@@ -60,7 +57,6 @@ import type { PaymentServiceRepo } from './repo/paymentService';
|
|
|
60
57
|
import type { PaymentServiceChannelRepo } from './repo/paymentServiceChannel';
|
|
61
58
|
import type { PaymentServiceProviderRepo } from './repo/paymentServiceProvider';
|
|
62
59
|
import type { PendingReservationRepo } from './repo/pendingReservation';
|
|
63
|
-
import type { PermitRepo } from './repo/permit';
|
|
64
60
|
import type { EntranceGateRepo } from './repo/place/entranceGate';
|
|
65
61
|
import type { HasPOSRepo } from './repo/place/hasPOS';
|
|
66
62
|
import type { MovieTheaterRepo } from './repo/place/movieTheater';
|
|
@@ -84,8 +80,6 @@ import type { SellerMakesOfferRepo } from './repo/sellerMakesOffer';
|
|
|
84
80
|
import type { SellerPaymentAcceptedRepo } from './repo/sellerPaymentAccepted';
|
|
85
81
|
import type { SellerReturnPolicyRepo } from './repo/sellerReturnPolicy';
|
|
86
82
|
import type { ServiceAvailableHourRepo } from './repo/service/availableHour';
|
|
87
|
-
import type { ServiceOutputRepo } from './repo/serviceOutput';
|
|
88
|
-
import type { ServiceOutputIdentifierRepo } from './repo/serviceOutputIdentifier';
|
|
89
83
|
import type { SettingRepo } from './repo/setting';
|
|
90
84
|
import type { JWTSettingRepo } from './repo/setting/jwt';
|
|
91
85
|
import type { StockHolderRepo } from './repo/stockHolder';
|
|
@@ -104,10 +98,6 @@ export type AcceptedOffer = AcceptedOfferRepo;
|
|
|
104
98
|
export declare namespace AcceptedOffer {
|
|
105
99
|
function createInstance(...params: ConstructorParameters<typeof AcceptedOfferRepo>): Promise<AcceptedOfferRepo>;
|
|
106
100
|
}
|
|
107
|
-
export type Account = AccountRepo;
|
|
108
|
-
export declare namespace Account {
|
|
109
|
-
function createInstance(...params: ConstructorParameters<typeof AccountRepo>): Promise<AccountRepo>;
|
|
110
|
-
}
|
|
111
101
|
export type AccountingReport = AccountingReportRepo;
|
|
112
102
|
export declare namespace AccountingReport {
|
|
113
103
|
function createInstance(...params: ConstructorParameters<typeof AccountingReportRepo>): Promise<AccountingReportRepo>;
|
|
@@ -116,10 +106,6 @@ export type AccountTitle = AccountTitleRepo;
|
|
|
116
106
|
export declare namespace AccountTitle {
|
|
117
107
|
function createInstance(...params: ConstructorParameters<typeof AccountTitleRepo>): Promise<AccountTitleRepo>;
|
|
118
108
|
}
|
|
119
|
-
export type AccountTransaction = AccountTransactionRepo;
|
|
120
|
-
export declare namespace AccountTransaction {
|
|
121
|
-
function createInstance(...params: ConstructorParameters<typeof AccountTransactionRepo>): Promise<AccountTransactionRepo>;
|
|
122
|
-
}
|
|
123
109
|
export type Action = ActionRepo;
|
|
124
110
|
export declare namespace Action {
|
|
125
111
|
function createInstance(...params: ConstructorParameters<typeof ActionRepo>): Promise<ActionRepo>;
|
|
@@ -212,10 +198,6 @@ export type Authorization = AuthorizationRepo;
|
|
|
212
198
|
export declare namespace Authorization {
|
|
213
199
|
function createInstance(...params: ConstructorParameters<typeof AuthorizationRepo>): Promise<AuthorizationRepo>;
|
|
214
200
|
}
|
|
215
|
-
export type Comment = CommentRepo;
|
|
216
|
-
export declare namespace Comment {
|
|
217
|
-
function createInstance(...params: ConstructorParameters<typeof CommentRepo>): Promise<CommentRepo>;
|
|
218
|
-
}
|
|
219
201
|
export type ConfirmationNumber = ConfirmationNumberRepo;
|
|
220
202
|
export declare namespace ConfirmationNumber {
|
|
221
203
|
function createInstance(...params: ConstructorParameters<typeof ConfirmationNumberRepo>): Promise<ConfirmationNumberRepo>;
|
|
@@ -352,10 +334,6 @@ export type Person = PersonRepo;
|
|
|
352
334
|
export declare namespace Person {
|
|
353
335
|
function createInstance(...params: ConstructorParameters<typeof PersonRepo>): Promise<PersonRepo>;
|
|
354
336
|
}
|
|
355
|
-
export type Permit = PermitRepo;
|
|
356
|
-
export declare namespace Permit {
|
|
357
|
-
function createInstance(...params: ConstructorParameters<typeof PermitRepo>): Promise<PermitRepo>;
|
|
358
|
-
}
|
|
359
337
|
export declare namespace place {
|
|
360
338
|
type EntranceGate = EntranceGateRepo;
|
|
361
339
|
/**
|
|
@@ -464,14 +442,6 @@ export type ServiceAvailableHour = ServiceAvailableHourRepo;
|
|
|
464
442
|
export declare namespace ServiceAvailableHour {
|
|
465
443
|
function createInstance(...params: ConstructorParameters<typeof ServiceAvailableHourRepo>): Promise<ServiceAvailableHourRepo>;
|
|
466
444
|
}
|
|
467
|
-
export type ServiceOutput = ServiceOutputRepo;
|
|
468
|
-
export declare namespace ServiceOutput {
|
|
469
|
-
function createInstance(...params: ConstructorParameters<typeof ServiceOutputRepo>): Promise<ServiceOutputRepo>;
|
|
470
|
-
}
|
|
471
|
-
export type ServiceOutputIdentifier = ServiceOutputIdentifierRepo;
|
|
472
|
-
export declare namespace ServiceOutputIdentifier {
|
|
473
|
-
function createInstance(...params: ConstructorParameters<typeof ServiceOutputIdentifierRepo>): Promise<ServiceOutputIdentifierRepo>;
|
|
474
|
-
}
|
|
475
445
|
export type Setting = SettingRepo;
|
|
476
446
|
export declare namespace Setting {
|
|
477
447
|
function createInstance(...params: ConstructorParameters<typeof SettingRepo>): Promise<SettingRepo>;
|
package/lib/chevre/repository.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentServiceChannel = exports.PaymentService = exports.Passport = exports.OwnershipInfo = exports.OrderNumber = exports.OrderInTransaction = exports.Order = exports.Offer = exports.OfferItemCondition = exports.OfferCatalogItem = exports.OfferCatalog = exports.NoteAboutOrder = exports.Note = exports.MovieTicketType = exports.Message = exports.MerchantReturnPolicy = exports.MemberProgram = exports.Member = exports.Issuer = exports.IdentityProvider = exports.Identity = exports.EventSeries = exports.EventSellerMakesOffer = exports.EventOffer = exports.Event = exports.EmailMessage = exports.CustomerType = exports.Customer = exports.Credentials = exports.CreativeWork = exports.ConfirmationNumber = exports.
|
|
4
|
-
exports.WebSite = exports.rateLimit = exports.TransactionProcess = exports.TransactionNumber = exports.transaction = exports.Transaction = exports.Ticket = exports.Task = exports.StockHolder = exports.setting = exports.Setting = exports.
|
|
3
|
+
exports.Person = exports.PendingReservation = exports.PaymentServiceProvider = exports.PaymentServiceChannel = exports.PaymentService = exports.Passport = exports.OwnershipInfo = exports.OrderNumber = exports.OrderInTransaction = exports.Order = exports.Offer = exports.OfferItemCondition = exports.OfferCatalogItem = exports.OfferCatalog = exports.NoteAboutOrder = exports.Note = exports.MovieTicketType = exports.Message = exports.MerchantReturnPolicy = exports.MemberProgram = exports.Member = exports.Issuer = exports.IdentityProvider = exports.Identity = exports.EventSeries = exports.EventSellerMakesOffer = exports.EventOffer = exports.Event = exports.EmailMessage = exports.CustomerType = exports.Customer = exports.Credentials = exports.CreativeWork = exports.ConfirmationNumber = exports.Authorization = exports.CategoryCode = exports.assetTransaction = exports.AssetTransaction = exports.Aggregation = exports.AggregateReservation = exports.AggregateOrder = exports.AggregateOffer = exports.AggregateAction = exports.AdvanceBookingRequirement = exports.AdditionalProperty = exports.action = exports.Action = exports.AccountTitle = exports.AccountingReport = exports.AcceptedOffer = void 0;
|
|
4
|
+
exports.WebSite = exports.rateLimit = exports.TransactionProcess = exports.TransactionNumber = exports.transaction = exports.Transaction = exports.Ticket = exports.Task = exports.StockHolder = exports.setting = exports.Setting = exports.ServiceAvailableHour = exports.SellerReturnPolicy = exports.SellerPaymentAccepted = exports.SellerMakesOffer = exports.Seller = exports.Schedule = exports.Role = exports.ReserveInterface = exports.Reservation = exports.ProjectMakesOffer = exports.Project = exports.ProductModel = exports.ProductHasOfferCatalog = exports.Product = exports.PriceSpecification = exports.PotentialAction = exports.place = void 0;
|
|
5
5
|
var AcceptedOffer;
|
|
6
6
|
(function (AcceptedOffer) {
|
|
7
7
|
let repo;
|
|
@@ -13,17 +13,6 @@ var AcceptedOffer;
|
|
|
13
13
|
}
|
|
14
14
|
AcceptedOffer.createInstance = createInstance;
|
|
15
15
|
})(AcceptedOffer || (exports.AcceptedOffer = AcceptedOffer = {}));
|
|
16
|
-
var Account;
|
|
17
|
-
(function (Account) {
|
|
18
|
-
let repo;
|
|
19
|
-
async function createInstance(...params) {
|
|
20
|
-
if (repo === undefined) {
|
|
21
|
-
repo = (await import('./repo/account.js')).AccountRepo;
|
|
22
|
-
}
|
|
23
|
-
return new repo(...params);
|
|
24
|
-
}
|
|
25
|
-
Account.createInstance = createInstance;
|
|
26
|
-
})(Account || (exports.Account = Account = {}));
|
|
27
16
|
var AccountingReport;
|
|
28
17
|
(function (AccountingReport) {
|
|
29
18
|
let repo;
|
|
@@ -46,17 +35,6 @@ var AccountTitle;
|
|
|
46
35
|
}
|
|
47
36
|
AccountTitle.createInstance = createInstance;
|
|
48
37
|
})(AccountTitle || (exports.AccountTitle = AccountTitle = {}));
|
|
49
|
-
var AccountTransaction;
|
|
50
|
-
(function (AccountTransaction) {
|
|
51
|
-
let repo;
|
|
52
|
-
async function createInstance(...params) {
|
|
53
|
-
if (repo === undefined) {
|
|
54
|
-
repo = (await import('./repo/accountTransaction.js')).AccountTransactionRepo;
|
|
55
|
-
}
|
|
56
|
-
return new repo(...params);
|
|
57
|
-
}
|
|
58
|
-
AccountTransaction.createInstance = createInstance;
|
|
59
|
-
})(AccountTransaction || (exports.AccountTransaction = AccountTransaction = {}));
|
|
60
38
|
var Action;
|
|
61
39
|
(function (Action) {
|
|
62
40
|
let repo;
|
|
@@ -305,17 +283,6 @@ var Authorization;
|
|
|
305
283
|
}
|
|
306
284
|
Authorization.createInstance = createInstance;
|
|
307
285
|
})(Authorization || (exports.Authorization = Authorization = {}));
|
|
308
|
-
var Comment;
|
|
309
|
-
(function (Comment) {
|
|
310
|
-
let repo;
|
|
311
|
-
async function createInstance(...params) {
|
|
312
|
-
if (repo === undefined) {
|
|
313
|
-
repo = (await import('./repo/comment.js')).CommentRepo;
|
|
314
|
-
}
|
|
315
|
-
return new repo(...params);
|
|
316
|
-
}
|
|
317
|
-
Comment.createInstance = createInstance;
|
|
318
|
-
})(Comment || (exports.Comment = Comment = {}));
|
|
319
286
|
var ConfirmationNumber;
|
|
320
287
|
(function (ConfirmationNumber) {
|
|
321
288
|
let repo;
|
|
@@ -690,17 +657,6 @@ var Person;
|
|
|
690
657
|
}
|
|
691
658
|
Person.createInstance = createInstance;
|
|
692
659
|
})(Person || (exports.Person = Person = {}));
|
|
693
|
-
var Permit;
|
|
694
|
-
(function (Permit) {
|
|
695
|
-
let repo;
|
|
696
|
-
async function createInstance(...params) {
|
|
697
|
-
if (repo === undefined) {
|
|
698
|
-
repo = (await import('./repo/permit.js')).PermitRepo;
|
|
699
|
-
}
|
|
700
|
-
return new repo(...params);
|
|
701
|
-
}
|
|
702
|
-
Permit.createInstance = createInstance;
|
|
703
|
-
})(Permit || (exports.Permit = Permit = {}));
|
|
704
660
|
var place;
|
|
705
661
|
(function (place) {
|
|
706
662
|
/**
|
|
@@ -964,28 +920,6 @@ var ServiceAvailableHour;
|
|
|
964
920
|
}
|
|
965
921
|
ServiceAvailableHour.createInstance = createInstance;
|
|
966
922
|
})(ServiceAvailableHour || (exports.ServiceAvailableHour = ServiceAvailableHour = {}));
|
|
967
|
-
var ServiceOutput;
|
|
968
|
-
(function (ServiceOutput) {
|
|
969
|
-
let repo;
|
|
970
|
-
async function createInstance(...params) {
|
|
971
|
-
if (repo === undefined) {
|
|
972
|
-
repo = (await import('./repo/serviceOutput.js')).ServiceOutputRepo;
|
|
973
|
-
}
|
|
974
|
-
return new repo(...params);
|
|
975
|
-
}
|
|
976
|
-
ServiceOutput.createInstance = createInstance;
|
|
977
|
-
})(ServiceOutput || (exports.ServiceOutput = ServiceOutput = {}));
|
|
978
|
-
var ServiceOutputIdentifier;
|
|
979
|
-
(function (ServiceOutputIdentifier) {
|
|
980
|
-
let repo;
|
|
981
|
-
async function createInstance(...params) {
|
|
982
|
-
if (repo === undefined) {
|
|
983
|
-
repo = (await import('./repo/serviceOutputIdentifier.js')).ServiceOutputIdentifierRepo;
|
|
984
|
-
}
|
|
985
|
-
return new repo(...params);
|
|
986
|
-
}
|
|
987
|
-
ServiceOutputIdentifier.createInstance = createInstance;
|
|
988
|
-
})(ServiceOutputIdentifier || (exports.ServiceOutputIdentifier = ServiceOutputIdentifier = {}));
|
|
989
923
|
var Setting;
|
|
990
924
|
(function (Setting) {
|
|
991
925
|
let repo;
|
|
@@ -387,25 +387,7 @@ function validateProgramMembershipUsed(params) {
|
|
|
387
387
|
const issuedThroughTypeOf = requestedProgramMembershipUsed?.issuedThrough?.typeOf;
|
|
388
388
|
if (typeof programMembershipUsedIdentifier === 'string') {
|
|
389
389
|
let permitIssuedThrough;
|
|
390
|
-
|
|
391
|
-
if (issuedThroughTypeOf === factory_1.factory.product.ProductType.MembershipService) {
|
|
392
|
-
const issuedThroughId = requestedProgramMembershipUsed?.issuedThrough?.id;
|
|
393
|
-
if (typeof issuedThroughId !== 'string' || issuedThroughId === '') {
|
|
394
|
-
throw new factory_1.factory.errors.ArgumentNull('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed.issuedThrough.id');
|
|
395
|
-
}
|
|
396
|
-
permitIssuedThrough = (await repos.product.projectFields({
|
|
397
|
-
limit: 1,
|
|
398
|
-
page: 1,
|
|
399
|
-
id: { $eq: issuedThroughId },
|
|
400
|
-
typeOf: { $eq: factory_1.factory.product.ProductType.MembershipService }
|
|
401
|
-
}, ['typeOf', 'project', 'serviceType', 'serviceOutput']
|
|
402
|
-
// []
|
|
403
|
-
)).shift();
|
|
404
|
-
if (permitIssuedThrough === undefined) {
|
|
405
|
-
throw new factory_1.factory.errors.NotFound(factory_1.factory.product.ProductType.MembershipService);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
else if (issuedThroughTypeOf === factory_1.factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
390
|
+
if (issuedThroughTypeOf === factory_1.factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
409
391
|
const issuedThroughId = requestedProgramMembershipUsed?.issuedThrough?.id;
|
|
410
392
|
if (typeof issuedThroughId !== 'string' || issuedThroughId === '') {
|
|
411
393
|
throw new factory_1.factory.errors.ArgumentNull('acceptedOffer.itemOffered.serviceOutput.programMembershipUsed.issuedThrough.id');
|
|
@@ -39,37 +39,7 @@ function requestedProgramMembershipUsed2permit(params) {
|
|
|
39
39
|
}
|
|
40
40
|
const permitOwnershipInfo = object;
|
|
41
41
|
const ownedGoodType = permitOwnershipInfo.typeOfGood?.typeOf;
|
|
42
|
-
if (ownedGoodType === factory_1.factory.
|
|
43
|
-
// discontinue(2025-11-14~)
|
|
44
|
-
throw new factory_1.factory.errors.Argument('programMembershipUsed', `ownershipInfo.typeOfGood.typeOf: ${ownedGoodType} discontinued`);
|
|
45
|
-
// const issuedThroughTypeOf = permitOwnershipInfo.typeOfGood.issuedThrough?.typeOf;
|
|
46
|
-
// if (issuedThroughTypeOf === factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
47
|
-
// programMembershipUsedAsPermit = {
|
|
48
|
-
// identifier: permitOwnershipInfo.typeOfGood.identifier,
|
|
49
|
-
// issuedThrough: { typeOf: issuedThroughTypeOf },
|
|
50
|
-
// typeOf: factory.permit.PermitType.Permit
|
|
51
|
-
// };
|
|
52
|
-
// } else if (issuedThroughTypeOf === factory.product.ProductType.MembershipService
|
|
53
|
-
// || issuedThroughTypeOf === factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
54
|
-
// if (typeof permitOwnershipInfo.typeOfGood.issuedThrough?.id !== 'string') {
|
|
55
|
-
// throw new factory.errors.Argument(
|
|
56
|
-
// 'programMembershipUsed',
|
|
57
|
-
// 'ownershipInfo.typeOfGood.issuedThrough.id undefined'
|
|
58
|
-
// );
|
|
59
|
-
// }
|
|
60
|
-
// programMembershipUsedAsPermit = {
|
|
61
|
-
// identifier: permitOwnershipInfo.typeOfGood.identifier,
|
|
62
|
-
// issuedThrough: { id: permitOwnershipInfo.typeOfGood.issuedThrough.id, typeOf: issuedThroughTypeOf },
|
|
63
|
-
// typeOf: factory.permit.PermitType.Permit
|
|
64
|
-
// };
|
|
65
|
-
// } else {
|
|
66
|
-
// throw new factory.errors.Argument(
|
|
67
|
-
// 'programMembershipUsed',
|
|
68
|
-
// `invalid issuedThrough.typeOf: ${issuedThroughTypeOf}`
|
|
69
|
-
// );
|
|
70
|
-
// }
|
|
71
|
-
}
|
|
72
|
-
else if (ownedGoodType === factory_1.factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
42
|
+
if (ownedGoodType === factory_1.factory.service.paymentService.PaymentServiceType.FaceToFace) {
|
|
73
43
|
const paymentMethodId = permitOwnershipInfo.typeOfGood.serviceOutput.paymentMethodId;
|
|
74
44
|
if (typeof paymentMethodId !== 'string' || paymentMethodId === '') {
|
|
75
45
|
throw new factory_1.factory.errors.Argument('programMembershipUsed', 'paymentMethodId required');
|
|
@@ -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.6",
|
|
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.84"
|
|
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
|
-
}
|