@chevre/domain 20.1.0-alpha.5 → 20.1.0-alpha.50

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.
Files changed (119) hide show
  1. package/example/src/chevre/deleteReservationTicketUnderNames.ts +20 -0
  2. package/example/src/chevre/migrateAccountTitleAdditionalProperties.ts +157 -0
  3. package/example/src/chevre/migrateCreativeWorkAdditionalProperties.ts +116 -0
  4. package/example/src/chevre/migrateEventOffersSellerMakesOffer.ts +139 -0
  5. package/example/src/chevre/migrateEventProjectAttributes.ts +57 -0
  6. package/example/src/chevre/migratePlaceAdditionalProperties.ts +162 -0
  7. package/example/src/chevre/migrateSSKTEventCOAEndpoint.ts +64 -0
  8. package/example/src/chevre/searchEvents.ts +36 -16
  9. package/example/src/chevre/transaction/callOrderMembershipServiceTask.ts +0 -4
  10. package/example/src/chevre/transaction/orderMembershipService.ts +0 -4
  11. package/lib/chevre/factory/reservedAgentIdentifireNames.d.ts +1 -0
  12. package/lib/chevre/factory/reservedAgentIdentifireNames.js +12 -0
  13. package/lib/chevre/repo/accountAction.d.ts +0 -18
  14. package/lib/chevre/repo/accountAction.js +402 -355
  15. package/lib/chevre/repo/accountTitle.d.ts +1 -0
  16. package/lib/chevre/repo/accountTitle.js +6 -1
  17. package/lib/chevre/repo/additionalProperty.d.ts +35 -0
  18. package/lib/chevre/repo/additionalProperty.js +205 -0
  19. package/lib/chevre/repo/categoryCode.d.ts +1 -0
  20. package/lib/chevre/repo/categoryCode.js +15 -1
  21. package/lib/chevre/repo/creativeWork.js +10 -1
  22. package/lib/chevre/repo/customer.d.ts +1 -0
  23. package/lib/chevre/repo/customer.js +5 -0
  24. package/lib/chevre/repo/event.d.ts +12 -4
  25. package/lib/chevre/repo/event.js +84 -48
  26. package/lib/chevre/repo/merchantReturnPolicy.d.ts +1 -0
  27. package/lib/chevre/repo/merchantReturnPolicy.js +5 -0
  28. package/lib/chevre/repo/mongoose/model/additionalProperty.d.ts +7 -0
  29. package/lib/chevre/repo/mongoose/model/additionalProperty.js +81 -0
  30. package/lib/chevre/repo/mongoose/model/categoryCode.js +18 -2
  31. package/lib/chevre/repo/mongoose/model/creativeWork.js +6 -0
  32. package/lib/chevre/repo/mongoose/model/event.js +53 -0
  33. package/lib/chevre/repo/mongoose/model/offer.js +7 -1
  34. package/lib/chevre/repo/mongoose/model/offerCatalog.js +21 -2
  35. package/lib/chevre/repo/mongoose/model/ownershipInfo.js +3 -15
  36. package/lib/chevre/repo/mongoose/model/place.js +42 -0
  37. package/lib/chevre/repo/offer.js +10 -1
  38. package/lib/chevre/repo/offerCatalog.js +10 -10
  39. package/lib/chevre/repo/person.js +4 -1
  40. package/lib/chevre/repo/place.d.ts +1 -0
  41. package/lib/chevre/repo/place.js +54 -7
  42. package/lib/chevre/repo/reservation.d.ts +17 -2
  43. package/lib/chevre/repo/reservation.js +41 -1
  44. package/lib/chevre/repo/transaction.js +20 -5
  45. package/lib/chevre/repository.d.ts +6 -3
  46. package/lib/chevre/repository.js +10 -5
  47. package/lib/chevre/service/account.d.ts +0 -4
  48. package/lib/chevre/service/account.js +24 -22
  49. package/lib/chevre/service/accountTransaction/deposit.d.ts +0 -2
  50. package/lib/chevre/service/accountTransaction/deposit.js +3 -3
  51. package/lib/chevre/service/accountTransaction/transfer.d.ts +0 -2
  52. package/lib/chevre/service/accountTransaction/transfer.js +3 -3
  53. package/lib/chevre/service/accountTransaction/withdraw.d.ts +0 -2
  54. package/lib/chevre/service/accountTransaction/withdraw.js +3 -3
  55. package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +86 -42
  56. package/lib/chevre/service/assetTransaction/pay/potentialActions.js +9 -19
  57. package/lib/chevre/service/assetTransaction/reserve/factory.js +119 -115
  58. package/lib/chevre/service/assetTransaction/reserve.js +41 -95
  59. package/lib/chevre/service/delivery/factory.js +2 -1
  60. package/lib/chevre/service/event.js +20 -6
  61. package/lib/chevre/service/offer/event/authorize.d.ts +4 -0
  62. package/lib/chevre/service/offer/event/authorize.js +65 -27
  63. package/lib/chevre/service/offer/event/factory.d.ts +1 -1
  64. package/lib/chevre/service/offer/event/factory.js +17 -12
  65. package/lib/chevre/service/offer/eventServiceByCOA/factory.js +19 -9
  66. package/lib/chevre/service/offer/factory.js +7 -20
  67. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +11 -3
  68. package/lib/chevre/service/order/onOrderStatusChanged.js +3 -2
  69. package/lib/chevre/service/order/placeOrder.js +13 -5
  70. package/lib/chevre/service/order/returnOrder.js +2 -1
  71. package/lib/chevre/service/order/sendOrder.js +2 -1
  72. package/lib/chevre/service/reserve/cancelReservation.d.ts +5 -5
  73. package/lib/chevre/service/reserve/cancelReservation.js +260 -107
  74. package/lib/chevre/service/reserve/confirmReservation.js +65 -33
  75. package/lib/chevre/service/reserve/factory.d.ts +14 -2
  76. package/lib/chevre/service/reserve/factory.js +13 -6
  77. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +1 -1
  78. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +85 -30
  79. package/lib/chevre/service/task/confirmReserveTransaction.js +1 -1
  80. package/lib/chevre/service/transaction/orderProgramMembership.js +15 -31
  81. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +1 -0
  82. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +20 -4
  83. package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +9 -4
  84. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +2 -1
  85. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +2 -1
  86. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +2 -1
  87. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +2 -1
  88. package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +2 -1
  89. package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +10 -6
  90. package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -4
  91. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateSeller.d.ts +3 -1
  92. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateSeller.js +3 -2
  93. package/lib/chevre/service/transaction/placeOrderInProgress.js +16 -2
  94. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -1
  95. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +6 -3
  96. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -1
  97. package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +2 -1
  98. package/lib/chevre/service/transaction/returnOrder.js +10 -1
  99. package/lib/chevre/service/transaction.js +1 -14
  100. package/lib/chevre/service.d.ts +2 -0
  101. package/lib/chevre/service.js +2 -0
  102. package/package.json +4 -4
  103. package/example/src/chevre/accountBlanceTest.ts +0 -24
  104. package/example/src/chevre/checkOffersAppliesToMovieTicket.ts +0 -56
  105. package/example/src/chevre/createSeats.ts +0 -59
  106. package/example/src/chevre/deleteEvents.ts +0 -50
  107. package/example/src/chevre/manageOwnedByOfOwnershipInfo.ts +0 -35
  108. package/example/src/chevre/migrateEventOffersItemOfferedName.ts +0 -82
  109. package/example/src/chevre/migrateMovieTicketChargePriceSpecs.ts +0 -92
  110. package/example/src/chevre/migrateSellerMakesOffers.ts +0 -84
  111. package/example/src/chevre/migrateTTTSOldEventId.ts +0 -68
  112. package/example/src/chevre/publishConfirmationNumber.ts +0 -30
  113. package/example/src/chevre/publishServiceOutputIdentifier.ts +0 -28
  114. package/example/src/chevre/publishTransactionNumber.ts +0 -28
  115. package/example/src/chevre/renameTransaction.ts +0 -22
  116. package/lib/chevre/service/task/accountMoneyTransfer.d.ts +0 -3
  117. package/lib/chevre/service/task/accountMoneyTransfer.js +0 -31
  118. package/lib/chevre/service/task/cancelAccountMoneyTransfer.d.ts +0 -3
  119. package/lib/chevre/service/task/cancelAccountMoneyTransfer.js +0 -33
@@ -1,22 +0,0 @@
1
- // tslint:disable:no-console
2
- // import * as redis from 'redis';
3
- import * as mongoose from 'mongoose';
4
-
5
- // import { chevre } from '../../../lib/index';
6
-
7
- async function main() {
8
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
9
-
10
- // Access the underlying database object provided by the MongoDB driver.
11
- const db = mongoose.connection.db;
12
-
13
- // Rename the `test` collection to `foobar`
14
- const result = await db.collection('transactions')
15
- .rename('assetTransactions', { dropTarget: true });
16
-
17
- console.log(result);
18
- }
19
-
20
- main()
21
- .then(console.log)
22
- .catch(console.error);
@@ -1,3 +0,0 @@
1
- import * as factory from '../../factory';
2
- import { IOperation } from '../task';
3
- export declare function call(data: factory.task.accountMoneyTransfer.IData): IOperation<void>;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.call = void 0;
13
- const account_1 = require("../../repo/account");
14
- const accountAction_1 = require("../../repo/accountAction");
15
- const accountTransaction_1 = require("../../repo/accountTransaction");
16
- const AccountService = require("../account");
17
- // tslint:disable-next-line:no-single-line-block-comment
18
- /* istanbul ignore next */
19
- function call(data) {
20
- return (settings) => __awaiter(this, void 0, void 0, function* () {
21
- const accountRepo = new account_1.MongoRepository(settings.connection);
22
- const accountActionRepo = new accountAction_1.MongoRepository(settings.connection);
23
- const accountTransactionRepo = new accountTransaction_1.MongoRepository(settings.connection);
24
- yield AccountService.transferMoney(data.actionAttributes)({
25
- account: accountRepo,
26
- accountAction: accountActionRepo,
27
- accountTransaction: accountTransactionRepo
28
- });
29
- });
30
- }
31
- exports.call = call;
@@ -1,3 +0,0 @@
1
- import * as factory from '../../factory';
2
- import { IOperation } from '../task';
3
- export declare function call(data: factory.task.cancelAccountMoneyTransfer.IData): IOperation<void>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.call = void 0;
13
- const account_1 = require("../../repo/account");
14
- const accountAction_1 = require("../../repo/accountAction");
15
- const accountTransaction_1 = require("../../repo/accountTransaction");
16
- const AccountService = require("../account");
17
- // tslint:disable-next-line:no-single-line-block-comment
18
- /* istanbul ignore next */
19
- function call(data) {
20
- return (settings) => __awaiter(this, void 0, void 0, function* () {
21
- const accountRepo = new account_1.MongoRepository(settings.connection);
22
- const actionRepo = new accountAction_1.MongoRepository(settings.connection);
23
- const transactionRepo = new accountTransaction_1.MongoRepository(settings.connection);
24
- yield AccountService.cancelMoneyTransfer({
25
- transaction: data.transaction
26
- })({
27
- account: accountRepo,
28
- accountAction: actionRepo,
29
- accountTransaction: transactionRepo
30
- });
31
- });
32
- }
33
- exports.call = call;