@chevre/domain 23.2.0 → 24.0.0-alpha.0
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/index.d.ts +2 -1
- package/lib/chevre/index.js +3 -1
- package/lib/chevre/repo/assetTransaction.d.ts +1 -1
- package/lib/chevre/repo/identityProvider.d.ts +4 -4
- package/lib/chevre/repo/potentialAction.d.ts +4 -4
- package/lib/chevre/repo/seller.d.ts +8 -8
- package/lib/chevre/repo/task.d.ts +25 -28
- package/lib/chevre/repo/transaction.d.ts +5 -5
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +3 -2
- package/lib/chevre/service/assetTransaction/reserve/start/factory/addOffers2seat.d.ts +14 -0
- package/lib/chevre/service/assetTransaction/reserve/start/factory/addOffers2seat.js +63 -0
- package/lib/chevre/service/assetTransaction/reserve/start.js +2 -2
- package/lib/chevre/service/offer.d.ts +0 -12
- package/lib/chevre/service/offer.js +0 -37
- package/lib/chevre/service/task.d.ts +1 -1
- package/lib/chevre/service/taskHandler/onOperationFailed/informTaskIfNeeded.d.ts +2 -1
- package/lib/chevre/service/taskHandler/onOperationFailed.d.ts +2 -1
- package/lib/chevre/service/taskHandler.d.ts +2 -20
- package/lib/chevre/settings.d.ts +1 -2
- package/lib/chevre/settings.js +1 -3
- package/lib/chevre/taskSettings.d.ts +58 -0
- package/package.json +14 -16
- package/example/src/chevre/acceptedPaymentMethodOffer/adminAcceptedPaymentMethodOffers.ts +0 -76
- package/example/src/chevre/actions/checkAcceptPayActions.ts +0 -60
- package/example/src/chevre/actions/checkAuthorizePaymentActions.ts +0 -55
- package/example/src/chevre/activateOptionalAggregationSettings.ts +0 -19
- package/example/src/chevre/adminIdentities.ts +0 -71
- package/example/src/chevre/aggreateOwnershipInfosByOrder.ts +0 -24
- package/example/src/chevre/aggregateEventPublicFields.ts +0 -47
- package/example/src/chevre/aggregateOfferCatalogItemList.ts +0 -36
- package/example/src/chevre/aggregateScreeningEventMaxVersion.ts +0 -36
- package/example/src/chevre/aggregation/aggregateOffersOnEvent.ts +0 -86
- package/example/src/chevre/aggregation/aggregateOrderOfCustomer.ts +0 -138
- package/example/src/chevre/aggregation/aggregateOrderOfCustomerGlobally.ts +0 -34
- package/example/src/chevre/aggregation/aggregateOrderOfSeatByRoyalCustomers.ts +0 -172
- package/example/src/chevre/aggregation/aggregateOrderOnSystem.ts +0 -40
- package/example/src/chevre/aggregation/aggregateReservationByProject.ts +0 -79
- package/example/src/chevre/aggregation/aggregateSystem.ts +0 -201
- package/example/src/chevre/aggregation/aggregateTasks.ts +0 -41
- package/example/src/chevre/aggregation/createAggregateEventTasks.ts +0 -71
- package/example/src/chevre/aggregation/searchAggregateReservations.ts +0 -33
- package/example/src/chevre/assetTransaction/checkPayTransactionsTicketToken.ts +0 -67
- package/example/src/chevre/assetTransaction/processReserve.ts +0 -149
- package/example/src/chevre/attendIfNotAttended.ts +0 -31
- package/example/src/chevre/authorizeEventServiceOffer.ts +0 -122
- package/example/src/chevre/categoryCode/checkUniqueness.ts +0 -69
- package/example/src/chevre/changeOrderStatus.ts +0 -29
- package/example/src/chevre/checkCustomerAttributesLength.ts +0 -109
- package/example/src/chevre/checkEventDuration.ts +0 -59
- package/example/src/chevre/checkPaymentServiceUniqueness.ts +0 -79
- package/example/src/chevre/checkProjectMembers.ts +0 -55
- package/example/src/chevre/checkReserveTransactionSizes.ts +0 -46
- package/example/src/chevre/cleanActions.ts +0 -23
- package/example/src/chevre/cleanReservations.ts +0 -69
- package/example/src/chevre/cleanTransactions.ts +0 -39
- package/example/src/chevre/concurrentLock/lockOfferRateLimit.ts +0 -64
- package/example/src/chevre/concurrentLock/lockTransactionProcess.ts +0 -44
- package/example/src/chevre/confirmationNumber/testRandomness.ts +0 -49
- package/example/src/chevre/countPotentiallyExportTasks.ts +0 -42
- package/example/src/chevre/countTransactions.ts +0 -30
- package/example/src/chevre/createProject.ts +0 -19
- package/example/src/chevre/createTaskIfNotExistByAlternateName.ts +0 -57
- package/example/src/chevre/db/stats.ts +0 -35
- package/example/src/chevre/deleteDiscontinuedPeople.ts +0 -153
- package/example/src/chevre/deleteDiscontinuedPeopleByFetch.ts +0 -38
- package/example/src/chevre/deleteOwnershipInfosByOwnedThrough.ts +0 -79
- package/example/src/chevre/deleteStartDatePassedCertainPeriod.ts +0 -27
- package/example/src/chevre/deleteTasksByName.ts +0 -30
- package/example/src/chevre/emailMessage/createEmailMessageText.ts +0 -63
- package/example/src/chevre/event/checkEventAdditionalPropertyUniqueness.ts +0 -108
- package/example/src/chevre/event/importEventSeriesFromCOAByTitle.ts +0 -83
- package/example/src/chevre/event/importEventsFromCOAByTitle.ts +0 -148
- package/example/src/chevre/event/migrateEventAdditionalProperty2identifier.ts +0 -121
- package/example/src/chevre/event/migrateEventMaximumPhysicalAttendeeCapacity.ts +0 -76
- package/example/src/chevre/event/unsetSuperEventVideoFormat.ts +0 -30
- package/example/src/chevre/event/updateSellerMakesOffersByIdentifier.ts +0 -106
- package/example/src/chevre/eventSeries/unsetVideoFormat.ts +0 -31
- package/example/src/chevre/eventSeries/upsertScreeningEventSeriesByVersion.ts +0 -106
- package/example/src/chevre/findAnyEventById.ts +0 -24
- package/example/src/chevre/findAuthorizePaymentAction.ts +0 -34
- package/example/src/chevre/findAvailableChannelMovieTicket.ts +0 -25
- package/example/src/chevre/findCheckAction.ts +0 -34
- package/example/src/chevre/findCustomerByOrderNumber.ts +0 -19
- package/example/src/chevre/findItemListElementByCatalogId.ts +0 -30
- package/example/src/chevre/findItemListElementById.ts +0 -23
- package/example/src/chevre/findJWTSetting.ts +0 -19
- package/example/src/chevre/findOneAvailableHours.ts +0 -39
- package/example/src/chevre/findReservationByCode.ts +0 -64
- package/example/src/chevre/findSchedule.ts +0 -43
- package/example/src/chevre/giveUpStartDatePassedCertainPeriod.ts +0 -56
- package/example/src/chevre/identity/getCommonClients.ts +0 -126
- package/example/src/chevre/identity/migrateClients2oauth.ts +0 -200
- package/example/src/chevre/importCategoryCodesFromCOA.ts +0 -34
- package/example/src/chevre/importEventsFromCOA.ts +0 -66
- package/example/src/chevre/investigateEvents.ts +0 -86
- package/example/src/chevre/investigateTransaction.ts +0 -66
- package/example/src/chevre/isPaymentAcceptedBySeller.ts +0 -24
- package/example/src/chevre/issuer/adminMemberProgramTiers.ts +0 -55
- package/example/src/chevre/issuer/migrateIssuerUrls.ts +0 -62
- package/example/src/chevre/issuer/renameIssuerIdentifier.ts +0 -61
- package/example/src/chevre/maintenance/checkTransactionStatuses.ts +0 -105
- package/example/src/chevre/makeExpiredManyTasks.ts +0 -27
- package/example/src/chevre/makeTransactionExpired.ts +0 -28
- package/example/src/chevre/member/migrateMemberIdentifier.ts +0 -99
- package/example/src/chevre/migrateAuthorizeEventServiceOfferChevre.ts +0 -84
- package/example/src/chevre/migrateCancelReservationObject.ts +0 -71
- package/example/src/chevre/migrateCognitoUser.ts +0 -153
- package/example/src/chevre/migrateCustomerAdditionalProperties.ts +0 -116
- package/example/src/chevre/migrateEventSellerMakesOfferAvailableAt.ts +0 -101
- package/example/src/chevre/migrateIdentities.ts +0 -69
- package/example/src/chevre/migrateProjectSettings.ts +0 -64
- package/example/src/chevre/migrateRoomAdditionalProperties.ts +0 -118
- package/example/src/chevre/migrateRoomSectionAdditionalProperties.ts +0 -121
- package/example/src/chevre/note/findNotes.ts +0 -34
- package/example/src/chevre/note/upsertNotesByIdentifier.ts +0 -63
- package/example/src/chevre/notifyAbortedTasksByEmail.ts +0 -56
- package/example/src/chevre/notifyByEmail.ts +0 -43
- package/example/src/chevre/offerCatalog/updateManyOfferCatalogsByIds.ts +0 -49
- package/example/src/chevre/offerCatalog/upsertOfferCatalogItemsByIdentifier.ts +0 -49
- package/example/src/chevre/offerCatalog/upsertOfferCatalogsByIdentifier.ts +0 -51
- package/example/src/chevre/offers/checkIncludedInCatalogCount.ts +0 -47
- package/example/src/chevre/offers/projectItemListElement.ts +0 -54
- package/example/src/chevre/offers/searchAvaialbleAppliesToMovieTicketByOfferCatalogId.ts +0 -51
- package/example/src/chevre/offers/searchByOfferCatalogIdWithSortIndex.ts +0 -44
- package/example/src/chevre/offers/searchOfferCatalogItemAvailability.ts +0 -68
- package/example/src/chevre/offers/upsertOffersByIdentifier.ts +0 -63
- package/example/src/chevre/optimizeActions.ts +0 -61
- package/example/src/chevre/orderNumber/testRandomness.ts +0 -54
- package/example/src/chevre/orders/searchOrders.ts +0 -28
- package/example/src/chevre/orders/searchWithUnwoundAcceptedOffers.ts +0 -73
- package/example/src/chevre/paymentServices/findPaymentServices.ts +0 -37
- package/example/src/chevre/pendingReservation/findEventSeatOffersBySection.ts +0 -46
- package/example/src/chevre/person/checkUserPoolClients.ts +0 -120
- package/example/src/chevre/person/cleanUpCognitoUsers.ts +0 -140
- package/example/src/chevre/person/cleanUpCognitoUsersByFetch.ts +0 -162
- package/example/src/chevre/person/cleanUpCreditCard.ts +0 -113
- package/example/src/chevre/person/updateProfile.ts +0 -56
- package/example/src/chevre/place/adminEntranceGates.ts +0 -69
- package/example/src/chevre/place/adminHasPOS.ts +0 -44
- package/example/src/chevre/place/aggregateSeatingTypes.ts +0 -29
- package/example/src/chevre/place/checkEntranceGatesCount.ts +0 -82
- package/example/src/chevre/place/checkSectionCount.ts +0 -27
- package/example/src/chevre/place/findRooms.ts +0 -24
- package/example/src/chevre/place/findSections.ts +0 -28
- package/example/src/chevre/place/findSectionsByRoom.ts +0 -50
- package/example/src/chevre/place/migrateSectionIdentifier.ts +0 -92
- package/example/src/chevre/place/seatsJson2csv.ts +0 -63
- package/example/src/chevre/place/upsertMovieTheatersByBranchCode.ts +0 -41
- package/example/src/chevre/place/upsertRoomsByBranchCode.ts +0 -40
- package/example/src/chevre/place/upsertSeatSectionsByBranchCode.ts +0 -56
- package/example/src/chevre/processAction.ts +0 -44
- package/example/src/chevre/processOrder.ts +0 -90
- package/example/src/chevre/product/findHasOfferCatalog.ts +0 -31
- package/example/src/chevre/productOffer/publishMemberTierToken.ts +0 -92
- package/example/src/chevre/project/unsetProjectSettings.ts +0 -73
- package/example/src/chevre/projectEventFieldsById.ts +0 -23
- package/example/src/chevre/projectFields.ts +0 -28
- package/example/src/chevre/projectFieldsById.ts +0 -30
- package/example/src/chevre/projectOwnershipInfoFieldsById.ts +0 -24
- package/example/src/chevre/pushIncludedInDataCatalog.ts +0 -47
- package/example/src/chevre/reExportAction.ts +0 -40
- package/example/src/chevre/reIndex.ts +0 -20
- package/example/src/chevre/recreateRefundTasks.ts +0 -187
- package/example/src/chevre/roles/addAdminAcceptedPaymentMethodReadPermissionIfNotExists.ts +0 -33
- package/example/src/chevre/roles/addAdminAcceptedPaymentMethodWritePermissionIfNotExists.ts +0 -33
- package/example/src/chevre/roles/addAdminEventSeriesReadPermissionIfNotExists.ts +0 -49
- package/example/src/chevre/roles/addAdminMovieReadPermissionIfNotExists.ts +0 -49
- package/example/src/chevre/roles/addAdminNotePermissionIfNotExists.ts +0 -48
- package/example/src/chevre/roles/addAdminPaymentServiceReadPermissionIfNotExists.ts +0 -49
- package/example/src/chevre/roles/addAdminProductHasOfferCatalogReadPermissionIfNotExists.ts +0 -33
- package/example/src/chevre/roles/addAdminRoomReadPermissionIfNotExists.ts +0 -34
- package/example/src/chevre/roles/addAdminRoomWritePermissionIfNotExists.ts +0 -34
- package/example/src/chevre/roles/addAdminSellerEventOfferIfNotExists.ts +0 -48
- package/example/src/chevre/roles/addProjectCreatorRole.ts +0 -48
- package/example/src/chevre/roles/assignGlobalRoles.ts +0 -72
- package/example/src/chevre/roles/findPermissions.ts +0 -84
- package/example/src/chevre/roles/findRoleNames.ts +0 -117
- package/example/src/chevre/roles/removeConsolePermissionIfExists.ts +0 -34
- package/example/src/chevre/roles/removePermissionFromAPIRoles.ts +0 -46
- package/example/src/chevre/roles/removePermissionIfExists.ts +0 -34
- package/example/src/chevre/saveOfferCatalogItem.ts +0 -40
- package/example/src/chevre/saveWebSite.ts +0 -56
- package/example/src/chevre/searchAcceptedOfferIds.ts +0 -57
- package/example/src/chevre/searchActionsByOrderNumber.ts +0 -29
- package/example/src/chevre/searchActionsByPurpose.ts +0 -38
- package/example/src/chevre/searchActionsBySameAs.ts +0 -27
- package/example/src/chevre/searchAggregateOffers.ts +0 -51
- package/example/src/chevre/searchAggregations.ts +0 -50
- package/example/src/chevre/searchAuthorizations.ts +0 -36
- package/example/src/chevre/searchCheckMovieTicketResultYkknInfo.ts +0 -56
- package/example/src/chevre/searchEventHasOfferCatalog.ts +0 -43
- package/example/src/chevre/searchEventSeats.ts +0 -45
- package/example/src/chevre/searchIdsByReservationNumber.ts +0 -16
- package/example/src/chevre/searchMembers.ts +0 -55
- package/example/src/chevre/searchOfferCatalogItemListElement.ts +0 -26
- package/example/src/chevre/searchOffers.ts +0 -68
- package/example/src/chevre/searchProducts.ts +0 -28
- package/example/src/chevre/searchProjects.ts +0 -36
- package/example/src/chevre/searchReservationsByOrder.ts +0 -42
- package/example/src/chevre/searchSellersByAggregate.ts +0 -33
- package/example/src/chevre/searchSlicedAcceptedOffersByOrderNumber.ts +0 -31
- package/example/src/chevre/seller/adminMakesOffer.ts +0 -113
- package/example/src/chevre/sendEmailMessage.ts +0 -60
- package/example/src/chevre/sendGrid/filterEmailActivity.ts +0 -31
- package/example/src/chevre/settings/addOrderNumberSetting.ts +0 -44
- package/example/src/chevre/settings/addTransactionNumberSetting.ts +0 -40
- package/example/src/chevre/stockHolder/findSeatsBySection.ts +0 -59
- package/example/src/chevre/stockHolder/getSize.ts +0 -97
- package/example/src/chevre/stockHolder/projectPendingReservation.ts +0 -43
- package/example/src/chevre/stockHolder/searchSeats.ts +0 -61
- package/example/src/chevre/task/countPotentiallyRunning.ts +0 -41
- package/example/src/chevre/task/countTasks.ts +0 -51
- package/example/src/chevre/task/deleteRunsAtPassedCertainPeriod.ts +0 -43
- package/example/src/chevre/task/deleteUnexpectedTasks.ts +0 -23
- package/example/src/chevre/task/emitRunning.ts +0 -89
- package/example/src/chevre/transaction/processPlaceOrder.ts +0 -57
- package/example/src/chevre/transaction/processReturnOrder.ts +0 -43
- package/example/src/chevre/transaction/startExportTasks.ts +0 -21
- package/example/src/chevre/transactionNumber/publishByTimestamp.ts +0 -23
- package/example/src/chevre/transactionNumber/testRandomness.ts +0 -42
- package/example/src/chevre/unsetUnnecessaryFields.ts +0 -35
- package/example/src/chevre/updateEventPartiallyById.ts +0 -22
- package/example/src/chevre/updateProjectAggregateReservation.ts +0 -21
- package/example/src/chevre/validateCheckMovieTicketActions.ts +0 -70
- package/example/src/customSearch.ts +0 -48
- package/example/src/duration.ts +0 -22
- package/example/src/fetch.ts +0 -45
- package/example/src/moment.ts +0 -22
- package/example/src/mongoConnectionList.ts +0 -81
- package/example/src/mvtkMessage.ts +0 -11
- package/example/src/objectId.ts +0 -12
- package/example/src/redisClientList.ts +0 -80
- package/example/src/redisMulti.ts +0 -63
- package/example/src/regex.ts +0 -31
- package/example/src/signPayload.ts +0 -50
- package/example/src/verifyToken.ts +0 -44
- package/lib/chevre/repo/mongoose/onIndexCreated.d.ts +0 -2
- package/lib/chevre/repo/mongoose/onIndexCreated.js +0 -10
- package/lib/chevre/settings/aggregation.d.ts +0 -35
- /package/lib/chevre/{settings/aggregation.js → taskSettings.js} +0 -0
package/lib/chevre/index.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ import * as factory from './factory';
|
|
|
11
11
|
import * as repository from './repository';
|
|
12
12
|
import * as service from './service';
|
|
13
13
|
import * as settings from './settings';
|
|
14
|
-
|
|
14
|
+
import * as taskSettings from './taskSettings';
|
|
15
|
+
export { credentials, errorHandler, eventEmitter, factory, repository, service, settings, taskSettings };
|
|
15
16
|
export declare function loadPecorinoapi(): Promise<typeof Pecorinoapi>;
|
|
16
17
|
export type COA = typeof COAService;
|
|
17
18
|
export declare function loadCOA(): Promise<typeof COAService>;
|
package/lib/chevre/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.settings = exports.service = exports.repository = exports.factory = exports.eventEmitter = exports.errorHandler = exports.credentials = void 0;
|
|
26
|
+
exports.taskSettings = exports.settings = exports.service = exports.repository = exports.factory = exports.eventEmitter = exports.errorHandler = exports.credentials = void 0;
|
|
27
27
|
exports.loadPecorinoapi = loadPecorinoapi;
|
|
28
28
|
exports.loadCOA = loadCOA;
|
|
29
29
|
exports.loadGMO = loadGMO;
|
|
@@ -41,6 +41,8 @@ const service = __importStar(require("./service"));
|
|
|
41
41
|
exports.service = service;
|
|
42
42
|
const settings = __importStar(require("./settings"));
|
|
43
43
|
exports.settings = settings;
|
|
44
|
+
const taskSettings = __importStar(require("./taskSettings"));
|
|
45
|
+
exports.taskSettings = taskSettings;
|
|
44
46
|
let pecorinoapi;
|
|
45
47
|
async function loadPecorinoapi() {
|
|
46
48
|
if (pecorinoapi === undefined) {
|
|
@@ -123,7 +123,7 @@ export declare class AssetTransactionRepo {
|
|
|
123
123
|
$in: factory.transactionStatusType[];
|
|
124
124
|
};
|
|
125
125
|
limit: number;
|
|
126
|
-
}): Promise<Pick<import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction, "id" | "
|
|
126
|
+
}): Promise<Pick<import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
127
127
|
/**
|
|
128
128
|
* set task status exported by transaction id
|
|
129
129
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -33,22 +33,22 @@ export declare class IdentityProviderRepo {
|
|
|
33
33
|
};
|
|
34
34
|
}): Promise<void>;
|
|
35
35
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
|
|
36
|
-
identifier: string;
|
|
37
36
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
37
|
+
identifier: string;
|
|
38
38
|
typeOf: factory.organizationType.Organization;
|
|
39
39
|
}> & {
|
|
40
|
-
identifier: string;
|
|
41
40
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
41
|
+
identifier: string;
|
|
42
42
|
typeOf: factory.organizationType.Organization;
|
|
43
43
|
} & {
|
|
44
44
|
_id: import("mongoose").Types.ObjectId;
|
|
45
45
|
}, QueryOptions<import("mongoose").Document<unknown, {}, {
|
|
46
|
-
identifier: string;
|
|
47
46
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
47
|
+
identifier: string;
|
|
48
48
|
typeOf: factory.organizationType.Organization;
|
|
49
49
|
}> & {
|
|
50
|
-
identifier: string;
|
|
51
50
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
51
|
+
identifier: string;
|
|
52
52
|
typeOf: factory.organizationType.Organization;
|
|
53
53
|
} & {
|
|
54
54
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -24,28 +24,28 @@ export declare class PotentialActionRepo {
|
|
|
24
24
|
}>;
|
|
25
25
|
projectFields(conditions: factory.potentialAction.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.potentialAction.IPotentialAction[]>;
|
|
26
26
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
|
|
27
|
-
identifier: string;
|
|
28
27
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
28
|
+
identifier: string;
|
|
29
29
|
typeOf: factory.actionType.InformAction;
|
|
30
30
|
recipient: factory.potentialAction.IInformRecipient;
|
|
31
31
|
target: factory.entryPoint.IEntryPoint;
|
|
32
32
|
}> & {
|
|
33
|
-
identifier: string;
|
|
34
33
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
34
|
+
identifier: string;
|
|
35
35
|
typeOf: factory.actionType.InformAction;
|
|
36
36
|
recipient: factory.potentialAction.IInformRecipient;
|
|
37
37
|
target: factory.entryPoint.IEntryPoint;
|
|
38
38
|
} & {
|
|
39
39
|
_id: import("mongoose").Types.ObjectId;
|
|
40
40
|
}, QueryOptions<import("mongoose").Document<unknown, {}, {
|
|
41
|
-
identifier: string;
|
|
42
41
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
42
|
+
identifier: string;
|
|
43
43
|
typeOf: factory.actionType.InformAction;
|
|
44
44
|
recipient: factory.potentialAction.IInformRecipient;
|
|
45
45
|
target: factory.entryPoint.IEntryPoint;
|
|
46
46
|
}> & {
|
|
47
|
-
identifier: string;
|
|
48
47
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
48
|
+
identifier: string;
|
|
49
49
|
typeOf: factory.actionType.InformAction;
|
|
50
50
|
recipient: factory.potentialAction.IInformRecipient;
|
|
51
51
|
target: factory.entryPoint.IEntryPoint;
|
|
@@ -80,10 +80,10 @@ export declare class SellerRepo {
|
|
|
80
80
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
81
81
|
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
82
82
|
typeOf: factory.organizationType.Corporation;
|
|
83
|
-
location?: factory.organization.ILocation | undefined;
|
|
84
83
|
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
85
|
-
|
|
84
|
+
location?: factory.organization.ILocation | undefined;
|
|
86
85
|
telephone?: string | undefined;
|
|
86
|
+
branchCode: string;
|
|
87
87
|
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
88
88
|
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
89
89
|
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
@@ -92,10 +92,10 @@ export declare class SellerRepo {
|
|
|
92
92
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
93
93
|
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
94
94
|
typeOf: factory.organizationType.Corporation;
|
|
95
|
-
location?: factory.organization.ILocation | undefined;
|
|
96
95
|
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
97
|
-
|
|
96
|
+
location?: factory.organization.ILocation | undefined;
|
|
98
97
|
telephone?: string | undefined;
|
|
98
|
+
branchCode: string;
|
|
99
99
|
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
100
100
|
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
101
101
|
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
@@ -106,10 +106,10 @@ export declare class SellerRepo {
|
|
|
106
106
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
107
107
|
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
108
108
|
typeOf: factory.organizationType.Corporation;
|
|
109
|
-
location?: factory.organization.ILocation | undefined;
|
|
110
109
|
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
111
|
-
|
|
110
|
+
location?: factory.organization.ILocation | undefined;
|
|
112
111
|
telephone?: string | undefined;
|
|
112
|
+
branchCode: string;
|
|
113
113
|
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
114
114
|
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
115
115
|
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
@@ -118,10 +118,10 @@ export declare class SellerRepo {
|
|
|
118
118
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
119
119
|
name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
|
|
120
120
|
typeOf: factory.organizationType.Corporation;
|
|
121
|
-
location?: factory.organization.ILocation | undefined;
|
|
122
121
|
additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
|
|
123
|
-
|
|
122
|
+
location?: factory.organization.ILocation | undefined;
|
|
124
123
|
telephone?: string | undefined;
|
|
124
|
+
branchCode: string;
|
|
125
125
|
hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
|
|
126
126
|
makesOffer?: factory.seller.IMakesOffer[] | undefined;
|
|
127
127
|
paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
|
|
@@ -2,6 +2,7 @@ import type { AnyKeys, Connection, FilterQuery, ProjectionType, UpdateWriteOpRes
|
|
|
2
2
|
import { INextFunction } from '../eventEmitter/task';
|
|
3
3
|
import * as factory from '../factory';
|
|
4
4
|
import { IModel } from './mongoose/schemas/task';
|
|
5
|
+
import type { IExecutableTask } from '../taskSettings';
|
|
5
6
|
interface IAggregationByStatus {
|
|
6
7
|
taskCount: number;
|
|
7
8
|
avgLatency: number;
|
|
@@ -22,10 +23,6 @@ export interface IAggregateTask {
|
|
|
22
23
|
interface IOptionOnCreate {
|
|
23
24
|
emitImmediately: boolean;
|
|
24
25
|
}
|
|
25
|
-
export type IExecutableTaskKeys = 'data' | 'id' | 'name' | 'status' | 'numberOfTried' | 'project' | 'remainingNumberOfTries' | 'runsAt' | 'expires';
|
|
26
|
-
export type IExecutableTask<T extends factory.taskName> = Pick<factory.task.ITask<T>, IExecutableTaskKeys> & {
|
|
27
|
-
status: factory.taskStatus.Running;
|
|
28
|
-
};
|
|
29
26
|
type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
|
|
30
27
|
type ICreatingTask = Pick<factory.task.IAttributes<factory.taskName>, 'data' | 'executionResults' | 'name' | 'numberOfTried' | 'project' | 'remainingNumberOfTries' | 'runsAt' | 'status' | 'identifier' | 'description'>;
|
|
31
28
|
/**
|
|
@@ -233,71 +230,71 @@ export declare class TaskRepo {
|
|
|
233
230
|
count: number;
|
|
234
231
|
}>;
|
|
235
232
|
getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
|
|
236
|
-
alternateName?: string | undefined;
|
|
237
|
-
identifier?: string | undefined;
|
|
238
|
-
description?: string | undefined;
|
|
239
233
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
234
|
+
identifier?: string | undefined;
|
|
240
235
|
name: factory.taskName;
|
|
236
|
+
description?: string | undefined;
|
|
237
|
+
alternateName?: string | undefined;
|
|
238
|
+
expires?: Date | undefined;
|
|
239
|
+
data: import("@chevre/factory/lib/task").IData;
|
|
241
240
|
status: factory.taskStatus;
|
|
242
241
|
runsAt: Date;
|
|
242
|
+
dateAborted?: Date | undefined;
|
|
243
243
|
remainingNumberOfTries: number;
|
|
244
244
|
lastTriedAt?: Date | undefined;
|
|
245
245
|
numberOfTried: number;
|
|
246
246
|
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
247
247
|
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
248
|
-
data: import("@chevre/factory/lib/task").IData;
|
|
249
|
-
dateAborted?: Date | undefined;
|
|
250
|
-
expires?: Date | undefined;
|
|
251
248
|
}> & {
|
|
252
|
-
alternateName?: string | undefined;
|
|
253
|
-
identifier?: string | undefined;
|
|
254
|
-
description?: string | undefined;
|
|
255
249
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
250
|
+
identifier?: string | undefined;
|
|
256
251
|
name: factory.taskName;
|
|
252
|
+
description?: string | undefined;
|
|
253
|
+
alternateName?: string | undefined;
|
|
254
|
+
expires?: Date | undefined;
|
|
255
|
+
data: import("@chevre/factory/lib/task").IData;
|
|
257
256
|
status: factory.taskStatus;
|
|
258
257
|
runsAt: Date;
|
|
258
|
+
dateAborted?: Date | undefined;
|
|
259
259
|
remainingNumberOfTries: number;
|
|
260
260
|
lastTriedAt?: Date | undefined;
|
|
261
261
|
numberOfTried: number;
|
|
262
262
|
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
263
263
|
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
264
|
-
data: import("@chevre/factory/lib/task").IData;
|
|
265
|
-
dateAborted?: Date | undefined;
|
|
266
|
-
expires?: Date | undefined;
|
|
267
264
|
} & {
|
|
268
265
|
_id: import("mongoose").Types.ObjectId;
|
|
269
266
|
}, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, {
|
|
270
|
-
alternateName?: string | undefined;
|
|
271
|
-
identifier?: string | undefined;
|
|
272
|
-
description?: string | undefined;
|
|
273
267
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
268
|
+
identifier?: string | undefined;
|
|
274
269
|
name: factory.taskName;
|
|
270
|
+
description?: string | undefined;
|
|
271
|
+
alternateName?: string | undefined;
|
|
272
|
+
expires?: Date | undefined;
|
|
273
|
+
data: import("@chevre/factory/lib/task").IData;
|
|
275
274
|
status: factory.taskStatus;
|
|
276
275
|
runsAt: Date;
|
|
276
|
+
dateAborted?: Date | undefined;
|
|
277
277
|
remainingNumberOfTries: number;
|
|
278
278
|
lastTriedAt?: Date | undefined;
|
|
279
279
|
numberOfTried: number;
|
|
280
280
|
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
281
281
|
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
282
|
-
data: import("@chevre/factory/lib/task").IData;
|
|
283
|
-
dateAborted?: Date | undefined;
|
|
284
|
-
expires?: Date | undefined;
|
|
285
282
|
}> & {
|
|
286
|
-
alternateName?: string | undefined;
|
|
287
|
-
identifier?: string | undefined;
|
|
288
|
-
description?: string | undefined;
|
|
289
283
|
project: Pick<factory.project.IProject, "id" | "typeOf">;
|
|
284
|
+
identifier?: string | undefined;
|
|
290
285
|
name: factory.taskName;
|
|
286
|
+
description?: string | undefined;
|
|
287
|
+
alternateName?: string | undefined;
|
|
288
|
+
expires?: Date | undefined;
|
|
289
|
+
data: import("@chevre/factory/lib/task").IData;
|
|
291
290
|
status: factory.taskStatus;
|
|
292
291
|
runsAt: Date;
|
|
292
|
+
dateAborted?: Date | undefined;
|
|
293
293
|
remainingNumberOfTries: number;
|
|
294
294
|
lastTriedAt?: Date | undefined;
|
|
295
295
|
numberOfTried: number;
|
|
296
296
|
executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
|
|
297
297
|
executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
|
|
298
|
-
data: import("@chevre/factory/lib/task").IData;
|
|
299
|
-
dateAborted?: Date | undefined;
|
|
300
|
-
expires?: Date | undefined;
|
|
301
298
|
} & {
|
|
302
299
|
_id: import("mongoose").Types.ObjectId;
|
|
303
300
|
}>>;
|
|
@@ -156,7 +156,7 @@ export declare class TransactionRepo {
|
|
|
156
156
|
$in: factory.transactionStatusType[];
|
|
157
157
|
};
|
|
158
158
|
limit: number;
|
|
159
|
-
}): Promise<Pick<import("@chevre/factory/lib/transaction/
|
|
159
|
+
}): Promise<Pick<import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction, "id" | "typeOf" | "status">[]>;
|
|
160
160
|
/**
|
|
161
161
|
* set task status exported by transaction id
|
|
162
162
|
* IDでタスクをエクスポート済に変更する
|
|
@@ -249,11 +249,11 @@ export declare class TransactionRepo {
|
|
|
249
249
|
$lt: Date;
|
|
250
250
|
};
|
|
251
251
|
}): Promise<import("mongodb").DeleteResult>;
|
|
252
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/
|
|
252
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & ((import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
|
|
253
253
|
id: string;
|
|
254
254
|
} & {
|
|
255
255
|
_id: import("mongoose").Types.ObjectId;
|
|
256
|
-
}) | (import("@chevre/factory/lib/transaction/
|
|
256
|
+
}) | (import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
|
|
257
257
|
id: string;
|
|
258
258
|
} & {
|
|
259
259
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -261,11 +261,11 @@ export declare class TransactionRepo {
|
|
|
261
261
|
id: string;
|
|
262
262
|
} & {
|
|
263
263
|
_id: import("mongoose").Types.ObjectId;
|
|
264
|
-
})), import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/
|
|
264
|
+
})), import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & ((import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
|
|
265
265
|
id: string;
|
|
266
266
|
} & {
|
|
267
267
|
_id: import("mongoose").Types.ObjectId;
|
|
268
|
-
}) | (import("@chevre/factory/lib/transaction/
|
|
268
|
+
}) | (import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
|
|
269
269
|
id: string;
|
|
270
270
|
} & {
|
|
271
271
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -31,7 +31,8 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
31
31
|
const moment_1 = __importDefault(require("moment"));
|
|
32
32
|
const factory = __importStar(require("../../../../factory"));
|
|
33
33
|
const pecorinoapi = __importStar(require("../../../../pecorinoapi"));
|
|
34
|
-
|
|
34
|
+
// import * as OfferService from '../../../offer';
|
|
35
|
+
const ProductOfferService = __importStar(require("../../../offer/product"));
|
|
35
36
|
const createReservation_1 = require("./factory/createReservation");
|
|
36
37
|
const debug = (0, debug_1.default)('chevre-domain:service:assetTransaction:reserve');
|
|
37
38
|
function createSubReservations(params) {
|
|
@@ -211,7 +212,7 @@ function searchAvailableAddOns(params) {
|
|
|
211
212
|
if (Array.isArray(params.ticketOffer.addOn)) {
|
|
212
213
|
const addOnProductIds = [...new Set(params.ticketOffer.addOn.map((o) => String(o.itemOffered.id)))];
|
|
213
214
|
for (const addOnProductId of addOnProductIds) {
|
|
214
|
-
const { offers, product } = await
|
|
215
|
+
const { offers, product } = await ProductOfferService.search({
|
|
215
216
|
ids: params.ids,
|
|
216
217
|
project: { id: params.project.id },
|
|
217
218
|
itemOffered: { id: addOnProductId },
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as factory from '../../../../../factory';
|
|
2
|
+
type ICategoryCodeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.CategoryCodeChargeSpecification>;
|
|
3
|
+
/**
|
|
4
|
+
* 座席にオファー情報を付加する
|
|
5
|
+
*/
|
|
6
|
+
export declare function addOffers2Seat(params: {
|
|
7
|
+
seat: factory.place.seat.IPlace;
|
|
8
|
+
availability: factory.itemAvailability;
|
|
9
|
+
/**
|
|
10
|
+
* 座席区分加算料金
|
|
11
|
+
*/
|
|
12
|
+
priceSpecs: ICategoryCodeChargeSpecification[];
|
|
13
|
+
}): factory.place.seat.IPlaceWithOffer;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.addOffers2Seat = addOffers2Seat;
|
|
27
|
+
const factory = __importStar(require("../../../../../factory"));
|
|
28
|
+
/**
|
|
29
|
+
* 座席にオファー情報を付加する
|
|
30
|
+
*/
|
|
31
|
+
function addOffers2Seat(params) {
|
|
32
|
+
// 座席タイプが指定されていれば、適用される価格仕様を構成要素に追加
|
|
33
|
+
const seatingTypes = (Array.isArray(params.seat.seatingType))
|
|
34
|
+
? params.seat.seatingType
|
|
35
|
+
: (typeof params.seat.seatingType === 'string' && params.seat.seatingType.length > 0) ? [params.seat.seatingType] : [];
|
|
36
|
+
const priceComponent = params.priceSpecs.filter(({ appliesToCategoryCode }) => {
|
|
37
|
+
// 適用カテゴリーコードに座席タイプが含まれる価格仕様を検索
|
|
38
|
+
return (Array.isArray(appliesToCategoryCode))
|
|
39
|
+
&& appliesToCategoryCode.some(({ codeValue }) => seatingTypes.includes(codeValue));
|
|
40
|
+
})
|
|
41
|
+
.map(({ appliesToCategoryCode, name, price, priceCurrency, typeOf, valueAddedTaxIncluded }) => {
|
|
42
|
+
return {
|
|
43
|
+
// optimize appliesToCategoryCode(2024-08-02~)
|
|
44
|
+
appliesToCategoryCode: appliesToCategoryCode.map(({ codeValue, inCodeSet }) => ({ codeValue, inCodeSet, typeOf: 'CategoryCode' })),
|
|
45
|
+
name, price, priceCurrency, typeOf, valueAddedTaxIncluded
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const priceSpecification = {
|
|
49
|
+
typeOf: factory.priceSpecificationType.CompoundPriceSpecification,
|
|
50
|
+
priceComponent
|
|
51
|
+
};
|
|
52
|
+
let availability = factory.itemAvailability.InStock;
|
|
53
|
+
if (typeof params.availability === 'string') {
|
|
54
|
+
availability = params.availability;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
...params.seat,
|
|
58
|
+
offers: [{
|
|
59
|
+
availability,
|
|
60
|
+
...(priceSpecification.priceComponent.length > 0) ? { priceSpecification } : undefined // priceComponentの存在する場合のみ追加(2023-11-08~)
|
|
61
|
+
}]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -32,13 +32,13 @@ const moment_1 = __importDefault(require("moment"));
|
|
|
32
32
|
const factory = __importStar(require("../../../factory"));
|
|
33
33
|
const pecorinoapi = __importStar(require("../../../pecorinoapi"));
|
|
34
34
|
const seat_1 = require("../../../repo/place/seat");
|
|
35
|
-
const OfferService = __importStar(require("../../offer"));
|
|
36
35
|
const searchOffersByIds_1 = require("../../offer/event/searchOffersByIds");
|
|
37
36
|
const cancelReservation_1 = require("../../reserve/cancelReservation");
|
|
38
37
|
const onReservationsCreated_1 = require("../../reserve/potentialActions/onReservationsCreated");
|
|
39
38
|
const createSubReservations_1 = require("./start/createSubReservations");
|
|
40
39
|
const createPointAward_1 = require("./start/factory/createPointAward");
|
|
41
40
|
const createStartParams_1 = require("./start/factory/createStartParams");
|
|
41
|
+
const addOffers2seat_1 = require("./start/factory/addOffers2seat");
|
|
42
42
|
const validateStartRequest_1 = require("./validateStartRequest");
|
|
43
43
|
const debug = (0, debug_1.default)('chevre-domain:service:assetTransaction:reserve');
|
|
44
44
|
const ONE_MONTH_IN_DAYS = 31;
|
|
@@ -305,7 +305,7 @@ function searchEventSeatOffers(params) {
|
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
offers = seats.map((seat, index) => {
|
|
308
|
-
return
|
|
308
|
+
return (0, addOffers2seat_1.addOffers2Seat)({
|
|
309
309
|
seat,
|
|
310
310
|
// unavailableOffers: [],
|
|
311
311
|
// availability: availabilities[index].availability,
|
|
@@ -7,19 +7,7 @@ import * as EventOfferService from './offer/event';
|
|
|
7
7
|
import * as EventServiceByCOAOfferService from './offer/eventServiceByCOA';
|
|
8
8
|
import * as MoneyTransferOfferService from './offer/moneyTransfer';
|
|
9
9
|
import * as ProductOfferService from './offer/product';
|
|
10
|
-
type ICategoryCodeChargeSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.CategoryCodeChargeSpecification>;
|
|
11
10
|
export { EventOfferService as event, EventServiceByCOAOfferService as eventServiceByCOA, MoneyTransferOfferService as moneyTransfer, ProductOfferService as product };
|
|
12
|
-
/**
|
|
13
|
-
* 座席にオファー情報を付加する
|
|
14
|
-
*/
|
|
15
|
-
export declare function addOffers2Seat(params: {
|
|
16
|
-
seat: factory.place.seat.IPlace;
|
|
17
|
-
availability: factory.itemAvailability;
|
|
18
|
-
/**
|
|
19
|
-
* 座席区分加算料金
|
|
20
|
-
*/
|
|
21
|
-
priceSpecs: ICategoryCodeChargeSpecification[];
|
|
22
|
-
}): factory.place.seat.IPlaceWithOffer;
|
|
23
11
|
type ISeatAsEventOffer = Pick<factory.place.seat.IPlaceWithOffer, 'branchCode' | 'name' | 'seatingType'> & {
|
|
24
12
|
containedInPlace?: {
|
|
25
13
|
branchCode?: string;
|
|
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.product = exports.moneyTransfer = exports.eventServiceByCOA = exports.event = void 0;
|
|
30
|
-
exports.addOffers2Seat = addOffers2Seat;
|
|
31
30
|
exports.searchEventSeatOffersWithPaging = searchEventSeatOffersWithPaging;
|
|
32
31
|
exports.findEventSeatOffersBySection = findEventSeatOffersBySection;
|
|
33
32
|
const moment_1 = __importDefault(require("moment"));
|
|
@@ -40,42 +39,6 @@ const MoneyTransferOfferService = __importStar(require("./offer/moneyTransfer"))
|
|
|
40
39
|
exports.moneyTransfer = MoneyTransferOfferService;
|
|
41
40
|
const ProductOfferService = __importStar(require("./offer/product"));
|
|
42
41
|
exports.product = ProductOfferService;
|
|
43
|
-
/**
|
|
44
|
-
* 座席にオファー情報を付加する
|
|
45
|
-
*/
|
|
46
|
-
function addOffers2Seat(params) {
|
|
47
|
-
// 座席タイプが指定されていれば、適用される価格仕様を構成要素に追加
|
|
48
|
-
const seatingTypes = (Array.isArray(params.seat.seatingType))
|
|
49
|
-
? params.seat.seatingType
|
|
50
|
-
: (typeof params.seat.seatingType === 'string' && params.seat.seatingType.length > 0) ? [params.seat.seatingType] : [];
|
|
51
|
-
const priceComponent = params.priceSpecs.filter(({ appliesToCategoryCode }) => {
|
|
52
|
-
// 適用カテゴリーコードに座席タイプが含まれる価格仕様を検索
|
|
53
|
-
return (Array.isArray(appliesToCategoryCode))
|
|
54
|
-
&& appliesToCategoryCode.some(({ codeValue }) => seatingTypes.includes(codeValue));
|
|
55
|
-
})
|
|
56
|
-
.map(({ appliesToCategoryCode, name, price, priceCurrency, typeOf, valueAddedTaxIncluded }) => {
|
|
57
|
-
return {
|
|
58
|
-
// optimize appliesToCategoryCode(2024-08-02~)
|
|
59
|
-
appliesToCategoryCode: appliesToCategoryCode.map(({ codeValue, inCodeSet }) => ({ codeValue, inCodeSet, typeOf: 'CategoryCode' })),
|
|
60
|
-
name, price, priceCurrency, typeOf, valueAddedTaxIncluded
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
const priceSpecification = {
|
|
64
|
-
typeOf: factory.priceSpecificationType.CompoundPriceSpecification,
|
|
65
|
-
priceComponent
|
|
66
|
-
};
|
|
67
|
-
let availability = factory.itemAvailability.InStock;
|
|
68
|
-
if (typeof params.availability === 'string') {
|
|
69
|
-
availability = params.availability;
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
...params.seat,
|
|
73
|
-
offers: [{
|
|
74
|
-
availability,
|
|
75
|
-
...(priceSpecification.priceComponent.length > 0) ? { priceSpecification } : undefined // priceComponentの存在する場合のみ追加(2023-11-08~)
|
|
76
|
-
}]
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
42
|
/**
|
|
80
43
|
* イベントに対する座席オファーを検索する
|
|
81
44
|
*/
|
|
@@ -2,7 +2,7 @@ import { SendGridCredentials } from '../credentials/sendGrid';
|
|
|
2
2
|
import type { IExecuteSettings as IMinimumExecuteSettings, INextFunction, IReadyTask, IRunningTask } from '../eventEmitter/task';
|
|
3
3
|
import * as factory from '../factory';
|
|
4
4
|
import { Settings } from '../settings';
|
|
5
|
-
import { AggregationSettings } from '../
|
|
5
|
+
import type { AggregationSettings } from '../taskSettings';
|
|
6
6
|
interface ICredentialSettings {
|
|
7
7
|
sendGrid: SendGridCredentials;
|
|
8
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import type { SettingRepo } from '../../../repo/setting';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TaskRepo } from '../../../repo/task';
|
|
4
|
+
import type { IExecutableTask } from '../../../taskSettings';
|
|
4
5
|
declare function informTaskIfNeeded(params: {
|
|
5
6
|
task: IExecutableTask<factory.taskName>;
|
|
6
7
|
executionEndDate: Date;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { INextFunction } from '../../eventEmitter/task';
|
|
2
2
|
import * as factory from '../../factory';
|
|
3
3
|
import type { SettingRepo } from '../../repo/setting';
|
|
4
|
-
import type {
|
|
4
|
+
import type { TaskRepo } from '../../repo/task';
|
|
5
|
+
import type { IExecutableTask } from '../../taskSettings';
|
|
5
6
|
/**
|
|
6
7
|
* タスク実行失敗時処理
|
|
7
8
|
*/
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IExecuteSettings as IMinimumExecuteSettings, INextFunction } from '../eventEmitter/task';
|
|
1
|
+
import type { INextFunction } from '../eventEmitter/task';
|
|
3
2
|
import * as factory from '../factory';
|
|
4
|
-
import type { IExecutableTask, IExecutableTaskKeys } from '../
|
|
5
|
-
import type { Settings } from '../settings';
|
|
6
|
-
import type { AggregationSettings } from '../settings/aggregation';
|
|
7
|
-
interface ICredentialSettings {
|
|
8
|
-
sendGrid: SendGridCredentials;
|
|
9
|
-
}
|
|
10
|
-
interface IExecuteSettings extends IMinimumExecuteSettings {
|
|
11
|
-
credentials: ICredentialSettings;
|
|
12
|
-
settings: Settings;
|
|
13
|
-
aggregationSettings?: AggregationSettings;
|
|
14
|
-
}
|
|
15
|
-
interface IExecuteOptions {
|
|
16
|
-
executeById: boolean;
|
|
17
|
-
executeByName: boolean;
|
|
18
|
-
}
|
|
19
|
-
type IOperationExecute<T> = (settings: IExecuteSettings, options: IExecuteOptions) => Promise<T>;
|
|
20
|
-
type ICallResult = void | Pick<factory.task.IExecutionResult, 'error'>;
|
|
21
|
-
type ICallableTaskOperation = (task: IExecutableTask<factory.taskName>) => IOperationExecute<ICallResult>;
|
|
3
|
+
import type { ICallResult, ICallableTaskOperation, IExecutableTask, IExecutableTaskKeys, IOperationExecute } from '../taskSettings';
|
|
22
4
|
/**
|
|
23
5
|
* タスクを実行する
|
|
24
6
|
*/
|
package/lib/chevre/settings.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AggregationSettings, ICallableTaskOperation, ICallResult, IOperationExecute } from './settings/aggregation';
|
|
2
1
|
interface ISurfrockSettings {
|
|
3
2
|
/**
|
|
4
3
|
* 着券時タイムアウト
|
|
@@ -58,4 +57,4 @@ declare class Settings {
|
|
|
58
57
|
export declare const MONGO_MAX_TIME_MS: number;
|
|
59
58
|
export declare const MONGO_READ_PREFERENCE: string;
|
|
60
59
|
export declare const MONGO_AUTO_INDEX: boolean;
|
|
61
|
-
export {
|
|
60
|
+
export { Settings };
|
package/lib/chevre/settings.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Settings = exports.
|
|
4
|
-
const aggregation_1 = require("./settings/aggregation");
|
|
5
|
-
Object.defineProperty(exports, "AggregationSettings", { enumerable: true, get: function () { return aggregation_1.AggregationSettings; } });
|
|
3
|
+
exports.Settings = exports.MONGO_AUTO_INDEX = exports.MONGO_READ_PREFERENCE = exports.MONGO_MAX_TIME_MS = void 0;
|
|
6
4
|
/**
|
|
7
5
|
* domain settings
|
|
8
6
|
*/
|