@cinerino/sdk 5.0.0-alpha.9 → 5.1.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/example/playground/public/lib/bundle.js +395 -880
- package/example/src/chevre/assetTransaction/processCancelReservation.ts +3 -2
- package/example/src/chevre/assetTransaction/processMoneyTransfer.ts +3 -2
- package/example/src/chevre/assetTransaction/processPayMovieTicket.ts +6 -4
- package/example/src/chevre/assetTransaction/processPublishPaymentUrl.ts +6 -4
- package/example/src/chevre/assetTransaction/processRefundCreditCard.ts +6 -4
- package/example/src/chevre/assetTransaction/processRegisterService.ts +3 -2
- package/example/src/chevre/assetTransaction/processReserve.ts +6 -4
- package/example/src/chevre/authorizeOrder.ts +3 -2
- package/example/src/chevre/createEvents.ts +3 -2
- package/example/src/chevre/findOrderByConfirmationNumber.ts +3 -2
- package/example/src/chevre/findPerson.ts +3 -2
- package/example/src/chevre/publishServiceOutputIdentifier.ts +3 -2
- package/example/src/chevre/searchAcceptedOffersByConfirmationNumber.ts +3 -2
- package/example/src/chevre/searchEventOffers.ts +3 -2
- package/example/src/chevre/searchEvents.ts +2 -3
- package/example/src/chevre/searchProjects.ts +2 -2
- package/example/src/chevre/searchReservations.ts +3 -2
- package/example/src/chevre/searchSellerPaymentAccepted.ts +4 -5
- package/example/src/transaction/processPlaceOrderByAnonymousCreditCardAndMembership.ts +2 -2
- package/example/src/transaction/processPlaceOrderByAnonymousCreditCardAndMyMembership.ts +2 -2
- package/example/src/transaction/processPlaceOrderByCash.ts +5 -2
- package/lib/abstract/chevre/order/factory.d.ts +1 -16
- package/lib/abstract/chevre/order.d.ts +6 -6
- package/lib/abstract/chevre.d.ts +0 -20
- package/lib/abstract/chevre.js +0 -43
- package/lib/abstract/chevreAdmin/order/factory.d.ts +0 -5
- package/lib/abstract/chevreAdmin/order.d.ts +3 -3
- package/lib/abstract/chevreAdmin/project.d.ts +2 -6
- package/lib/abstract/chevreAdmin/project.js +0 -24
- package/lib/abstract/chevreTxn/payment/factory.d.ts +0 -1
- package/lib/abstract/chevreTxn/payment.d.ts +9 -1
- package/lib/abstract/chevreTxn/payment.js +19 -0
- package/lib/abstract/chevreTxn/transaction/placeOrder/factory.d.ts +9 -3
- package/lib/abstract/chevreTxn/transaction/placeOrder.d.ts +7 -3
- package/lib/abstract/default.d.ts +1 -1
- package/lib/abstract/default.js +1 -1
- package/lib/abstract/service/offer.d.ts +0 -30
- package/lib/abstract/service/offer.js +0 -58
- package/lib/abstract/service/order.d.ts +2 -1
- package/lib/abstract/service/permit.d.ts +0 -3
- package/lib/abstract/service/permit.js +0 -17
- package/lib/abstract/service/person.d.ts +1 -1
- package/lib/abstract/service/transaction/placeOrder.d.ts +24 -4
- package/lib/abstract/service/transaction/placeOrder.js +19 -0
- package/lib/bundle.js +478 -794
- package/package.json +2 -2
- package/example/src/chevre/assetTransaction/processPayMGTicket.ts +0 -101
- package/example/src/chevre/authorizePermit.ts +0 -34
- package/example/src/createCommentOnOrder.ts +0 -42
- package/example/src/transaction/processOrderMoneyTransferByCash.ts +0 -198
- package/example/src/transaction/processOrderMoneyTransferByCreditCard.ts +0 -204
- package/example/src/transaction/processPlaceOrderByMovieTicket.ts +0 -478
- package/example/src/transaction/processPlaceOrderByNewMembershipCoupon4COA.ts +0 -221
- package/example/src/transaction/processPlaceOrderByPaymentCard.ts +0 -400
- package/lib/abstract/chevre/assetTransaction/pay.d.ts +0 -15
- package/lib/abstract/chevre/assetTransaction/pay.js +0 -87
- package/lib/abstract/chevre/me.d.ts +0 -20
- package/lib/abstract/chevre/me.js +0 -106
- package/lib/abstract/service/order/factory.d.ts +0 -1
- package/lib/abstract/service/order/factory.js +0 -13
|
@@ -13,9 +13,10 @@ async function main() {
|
|
|
13
13
|
scopes: [],
|
|
14
14
|
state: ''
|
|
15
15
|
});
|
|
16
|
-
const cancelReservationService = await (await client.loadChevreAdmin(
|
|
16
|
+
const cancelReservationService = await (await client.loadChevreAdmin({
|
|
17
17
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
18
|
-
auth: auth
|
|
18
|
+
auth: auth
|
|
19
|
+
})).createCancelReservationAssetTransactionInstance({
|
|
19
20
|
project,
|
|
20
21
|
seller: { id: '' }
|
|
21
22
|
});
|
|
@@ -15,9 +15,10 @@ async function main() {
|
|
|
15
15
|
scopes: [],
|
|
16
16
|
state: ''
|
|
17
17
|
});
|
|
18
|
-
const moneyTransferService = await (await client.loadChevreAdmin(
|
|
18
|
+
const moneyTransferService = await (await client.loadChevreAdmin({
|
|
19
19
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
20
|
-
auth: auth
|
|
20
|
+
auth: auth
|
|
21
|
+
})).createMoneyTransferAssetTransactionInstance({
|
|
21
22
|
project,
|
|
22
23
|
seller: { id: '' }
|
|
23
24
|
});
|
|
@@ -14,16 +14,18 @@ async function main() {
|
|
|
14
14
|
state: ''
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const payService = await (await client.loadChevreAdmin(
|
|
17
|
+
const payService = await (await client.loadChevreAdmin({
|
|
18
18
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
19
|
-
auth: auth
|
|
19
|
+
auth: auth
|
|
20
|
+
})).createPayAssetTransactionInstance({
|
|
20
21
|
project,
|
|
21
22
|
seller: { id: '' }
|
|
22
23
|
});
|
|
23
24
|
|
|
24
|
-
const sellerService = await (await client.loadChevre(
|
|
25
|
+
const sellerService = await (await client.loadChevre({
|
|
25
26
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
26
|
-
auth: auth
|
|
27
|
+
auth: auth
|
|
28
|
+
})).createSellerInstance({
|
|
27
29
|
project
|
|
28
30
|
});
|
|
29
31
|
|
|
@@ -14,16 +14,18 @@ async function main() {
|
|
|
14
14
|
state: ''
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const payService = await (await client.loadChevreAdmin(
|
|
17
|
+
const payService = await (await client.loadChevreAdmin({
|
|
18
18
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
19
|
-
auth: auth
|
|
19
|
+
auth: auth
|
|
20
|
+
})).createPayAssetTransactionInstance({
|
|
20
21
|
project,
|
|
21
22
|
seller: { id: '' }
|
|
22
23
|
});
|
|
23
24
|
|
|
24
|
-
const sellerService = await (await client.loadChevre(
|
|
25
|
+
const sellerService = await (await client.loadChevre({
|
|
25
26
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
26
|
-
auth: auth
|
|
27
|
+
auth: auth
|
|
28
|
+
})).createSellerInstance({
|
|
27
29
|
project
|
|
28
30
|
});
|
|
29
31
|
|
|
@@ -14,16 +14,18 @@ async function main() {
|
|
|
14
14
|
state: ''
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const refundService = await (await client.loadChevreAdmin(
|
|
17
|
+
const refundService = await (await client.loadChevreAdmin({
|
|
18
18
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
19
|
-
auth: auth
|
|
19
|
+
auth: auth
|
|
20
|
+
})).createRefundAssetTransactionInstance({
|
|
20
21
|
project,
|
|
21
22
|
seller: { id: '' }
|
|
22
23
|
});
|
|
23
24
|
|
|
24
|
-
const sellerService = await (await client.loadChevre(
|
|
25
|
+
const sellerService = await (await client.loadChevre({
|
|
25
26
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
26
|
-
auth: auth
|
|
27
|
+
auth: auth
|
|
28
|
+
})).createSellerInstance({
|
|
27
29
|
project
|
|
28
30
|
});
|
|
29
31
|
|
|
@@ -16,9 +16,10 @@ async function main() {
|
|
|
16
16
|
scopes: [],
|
|
17
17
|
state: ''
|
|
18
18
|
});
|
|
19
|
-
const registerService = await (await client.loadChevreAdmin(
|
|
19
|
+
const registerService = await (await client.loadChevreAdmin({
|
|
20
20
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
21
|
-
auth: auth
|
|
21
|
+
auth: auth
|
|
22
|
+
})).createRegisterServiceAssetTransactionInstance({
|
|
22
23
|
project,
|
|
23
24
|
seller: { id: '' }
|
|
24
25
|
});
|
|
@@ -14,15 +14,17 @@ async function main() {
|
|
|
14
14
|
scopes: [],
|
|
15
15
|
state: ''
|
|
16
16
|
});
|
|
17
|
-
const eventService = await (await client.loadChevre(
|
|
17
|
+
const eventService = await (await client.loadChevre({
|
|
18
18
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
19
|
-
auth: auth
|
|
19
|
+
auth: auth
|
|
20
|
+
})).createEventInstance({
|
|
20
21
|
project,
|
|
21
22
|
seller: { id: '' }
|
|
22
23
|
});
|
|
23
|
-
const reserveService = await (await client.loadChevreAdmin(
|
|
24
|
+
const reserveService = await (await client.loadChevreAdmin({
|
|
24
25
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
25
|
-
auth: auth
|
|
26
|
+
auth: auth
|
|
27
|
+
})).createReserveAssetTransactionInstance({
|
|
26
28
|
project,
|
|
27
29
|
seller: { id: '' }
|
|
28
30
|
});
|
|
@@ -10,9 +10,10 @@ async function main() {
|
|
|
10
10
|
const loginTicket = authClient.verifyIdToken({});
|
|
11
11
|
console.log('username is', loginTicket.getUsername());
|
|
12
12
|
|
|
13
|
-
const orderService = await (await client.loadChevre(
|
|
13
|
+
const orderService = await (await client.loadChevre({
|
|
14
14
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
15
|
-
auth: authClient
|
|
15
|
+
auth: authClient
|
|
16
|
+
})).createOrderInstance({
|
|
16
17
|
project,
|
|
17
18
|
seller: { id: '' }
|
|
18
19
|
});
|
|
@@ -10,9 +10,10 @@ async function main() {
|
|
|
10
10
|
const loginTicket = authClient.verifyIdToken({});
|
|
11
11
|
console.log('username is', loginTicket.getUsername());
|
|
12
12
|
|
|
13
|
-
const eventService = await (await loadChevreAdmin(
|
|
13
|
+
const eventService = await (await loadChevreAdmin({
|
|
14
14
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
15
|
-
auth: authClient
|
|
15
|
+
auth: authClient
|
|
16
|
+
})).createEventInstance({
|
|
16
17
|
project,
|
|
17
18
|
seller: { id: '' }
|
|
18
19
|
});
|
|
@@ -17,9 +17,10 @@ async function main() {
|
|
|
17
17
|
// state: ''
|
|
18
18
|
// });
|
|
19
19
|
|
|
20
|
-
const orderService = await (await client.loadChevre(
|
|
20
|
+
const orderService = await (await client.loadChevre({
|
|
21
21
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
22
|
-
auth: authClient
|
|
22
|
+
auth: authClient
|
|
23
|
+
})).createOrderInstance({
|
|
23
24
|
project,
|
|
24
25
|
seller: { id: '' }
|
|
25
26
|
});
|
|
@@ -12,9 +12,10 @@ async function main() {
|
|
|
12
12
|
state: ''
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
const personService = await (await client.loadChevreAdmin(
|
|
15
|
+
const personService = await (await client.loadChevreAdmin({
|
|
16
16
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
17
|
-
auth: authClient
|
|
17
|
+
auth: authClient
|
|
18
|
+
})).createPersonInstance({
|
|
18
19
|
project
|
|
19
20
|
});
|
|
20
21
|
|
|
@@ -11,9 +11,10 @@ async function main() {
|
|
|
11
11
|
scopes: [],
|
|
12
12
|
state: ''
|
|
13
13
|
});
|
|
14
|
-
const permitService = await (await client.loadChevre(
|
|
14
|
+
const permitService = await (await client.loadChevre({
|
|
15
15
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
16
|
-
auth: authClient
|
|
16
|
+
auth: authClient
|
|
17
|
+
})).createPermitInstance({
|
|
17
18
|
project,
|
|
18
19
|
seller: { id: '' }
|
|
19
20
|
});
|
|
@@ -17,9 +17,10 @@ async function main() {
|
|
|
17
17
|
// state: ''
|
|
18
18
|
// });
|
|
19
19
|
|
|
20
|
-
const orderService = await (await client.loadChevre(
|
|
20
|
+
const orderService = await (await client.loadChevre({
|
|
21
21
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
22
|
-
auth: authClient
|
|
22
|
+
auth: authClient
|
|
23
|
+
})).createOrderInstance({
|
|
23
24
|
project,
|
|
24
25
|
seller: { id: '' }
|
|
25
26
|
});
|
|
@@ -10,9 +10,10 @@ async function main() {
|
|
|
10
10
|
const loginTicket = authClient.verifyIdToken({});
|
|
11
11
|
console.log('username is', loginTicket.getUsername());
|
|
12
12
|
|
|
13
|
-
const eventService = await (await client.loadChevre(
|
|
13
|
+
const eventService = await (await client.loadChevre({
|
|
14
14
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
15
|
-
auth: authClient
|
|
15
|
+
auth: authClient
|
|
16
|
+
})).createEventInstance({
|
|
16
17
|
project: { id: PROJECT_ID },
|
|
17
18
|
seller: { id: '' }
|
|
18
19
|
});
|
|
@@ -49,7 +49,7 @@ async function main() {
|
|
|
49
49
|
diff = process.hrtime(startTime);
|
|
50
50
|
console.log(`creating service instance took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
|
|
51
51
|
|
|
52
|
-
const result = await eventService.search({
|
|
52
|
+
const result = await eventService.search<client.factory.eventType.ScreeningEvent>({
|
|
53
53
|
page: 1,
|
|
54
54
|
limit: 100,
|
|
55
55
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
@@ -63,8 +63,7 @@ async function main() {
|
|
|
63
63
|
$projection: {
|
|
64
64
|
checkInCount: 0,
|
|
65
65
|
maximumAttendeeCapacity: 0,
|
|
66
|
-
remainingAttendeeCapacity: 0
|
|
67
|
-
hasOfferCatalog: 0
|
|
66
|
+
remainingAttendeeCapacity: 0
|
|
68
67
|
}
|
|
69
68
|
});
|
|
70
69
|
// console.log(result.data);
|
|
@@ -10,10 +10,10 @@ async function main() {
|
|
|
10
10
|
const loginTicket = authClient.verifyIdToken({});
|
|
11
11
|
console.log('username is', loginTicket.getUsername());
|
|
12
12
|
|
|
13
|
-
const meService = await (await client.
|
|
13
|
+
const meService = await (await client.loadChevreAdmin({
|
|
14
14
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
15
15
|
auth: authClient
|
|
16
|
-
});
|
|
16
|
+
})).createMeInstance();
|
|
17
17
|
|
|
18
18
|
const { data } = await meService.searchProjects({
|
|
19
19
|
limit: 10,
|
|
@@ -12,16 +12,17 @@ async function main() {
|
|
|
12
12
|
state: ''
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
const reservationService = await (await client.loadChevreAdmin(
|
|
15
|
+
const reservationService = await (await client.loadChevreAdmin({
|
|
16
16
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
17
17
|
auth: authClient,
|
|
18
|
+
})).createReservationInstance({
|
|
18
19
|
project,
|
|
19
20
|
seller: { id: '' }
|
|
20
21
|
});
|
|
21
22
|
|
|
22
23
|
const { data } = await reservationService.search({
|
|
23
24
|
typeOf: client.factory.reservationType.EventReservation,
|
|
24
|
-
$projection: { underName:
|
|
25
|
+
$projection: { underName: 0 }
|
|
25
26
|
});
|
|
26
27
|
console.log(data);
|
|
27
28
|
console.log(data.length);
|
|
@@ -12,11 +12,10 @@ async function main() {
|
|
|
12
12
|
state: ''
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
const sellerService = await (await client.loadChevre())
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
15
|
+
const sellerService = await (await client.loadChevre({ endpoint: <string>process.env.CHEVRE_ENDPOINT, auth: authClient }))
|
|
16
|
+
.createSellerInstance({
|
|
17
|
+
project
|
|
18
|
+
});
|
|
20
19
|
|
|
21
20
|
const { data } = await sellerService.searchPaymentAccepted({
|
|
22
21
|
id: 'xxx',
|
|
@@ -133,7 +133,7 @@ async function main() {
|
|
|
133
133
|
const screeningEvent = availableEvents[Math.floor(availableEvents.length * Math.random())];
|
|
134
134
|
const authorizeSeatReservationResult = await authorizeSeatReservationByEvent({
|
|
135
135
|
event: screeningEvent,
|
|
136
|
-
seller: seller,
|
|
136
|
+
// seller: seller,
|
|
137
137
|
transaction: transaction
|
|
138
138
|
});
|
|
139
139
|
amount += authorizeSeatReservationResult.price;
|
|
@@ -263,7 +263,7 @@ export type IAuthorizeReservationAction
|
|
|
263
263
|
// tslint:disable-next-line:max-func-body-length
|
|
264
264
|
async function authorizeSeatReservationByEvent(params: {
|
|
265
265
|
event: client.factory.event.screeningEvent.IEvent;
|
|
266
|
-
seller: client.factory.seller.ISeller;
|
|
266
|
+
// seller: client.factory.seller.ISeller;
|
|
267
267
|
transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
268
268
|
}): Promise<client.factory.action.authorize.offer.seatReservation.IResult<client.factory.service.webAPI.Identifier.Chevre>> {
|
|
269
269
|
const eventService = new (await client.loadService()).Event({
|
|
@@ -150,7 +150,7 @@ async function main() {
|
|
|
150
150
|
const screeningEvent = availableEvents[Math.floor(availableEvents.length * Math.random())];
|
|
151
151
|
const authorizeSeatReservationResult = await authorizeSeatReservationByEvent({
|
|
152
152
|
event: screeningEvent,
|
|
153
|
-
seller: seller,
|
|
153
|
+
// seller: seller,
|
|
154
154
|
transaction: { id: transaction.id }
|
|
155
155
|
})(eventService, placeOrderService, ownershipInfoService, tokenService);
|
|
156
156
|
amount += authorizeSeatReservationResult.price;
|
|
@@ -279,7 +279,7 @@ export type IAuthorizeReservationAction
|
|
|
279
279
|
|
|
280
280
|
function authorizeSeatReservationByEvent(params: {
|
|
281
281
|
event: client.factory.event.screeningEvent.IEvent;
|
|
282
|
-
seller: client.factory.seller.ISeller;
|
|
282
|
+
// seller: client.factory.seller.ISeller;
|
|
283
283
|
transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
284
284
|
}) {
|
|
285
285
|
// tslint:disable-next-line:max-func-body-length
|
|
@@ -323,10 +323,13 @@ async function main() {
|
|
|
323
323
|
// console.log('取引を中止しました。');
|
|
324
324
|
|
|
325
325
|
console.log('confirming transaction...');
|
|
326
|
-
const confirmResult = await placeOrderService.confirm({
|
|
326
|
+
// const confirmResult = await placeOrderService.confirm({
|
|
327
|
+
// id: transaction.id,
|
|
328
|
+
// sendEmailMessage: true
|
|
329
|
+
// });
|
|
330
|
+
const confirmResult = await placeOrderService.confirmWithMiminalResponse({
|
|
327
331
|
id: transaction.id,
|
|
328
332
|
sendEmailMessage: true
|
|
329
|
-
// expectsReservationIds: true
|
|
330
333
|
});
|
|
331
334
|
const order = confirmResult.order;
|
|
332
335
|
console.log('transaction confirmed', confirmResult);
|
|
@@ -9,19 +9,4 @@ export interface ISearchOrdersOptions {
|
|
|
9
9
|
$unwindAcceptedOffers?: '1';
|
|
10
10
|
}
|
|
11
11
|
export declare type IAcceptedOffer = factory.order.IAcceptedOffer<factory.order.IItemOffered>;
|
|
12
|
-
export declare type
|
|
13
|
-
export declare type IOptimizedOrder = Omit<factory.order.IOrder, IOmittedParams>;
|
|
14
|
-
export declare type IReturner = Pick<factory.iam.IMemberOfRole, 'typeOf' | 'id' | 'name'>;
|
|
15
|
-
export declare type IExternalOrder = Pick<factory.order.IOrder, 'project' | 'typeOf' | 'seller' | 'customer' | 'confirmationNumber' | 'orderNumber' | 'price' | 'priceCurrency' | 'orderDate' | 'name' | 'orderStatus' | 'orderedItem' | 'paymentMethods'>;
|
|
16
|
-
export interface IUpdateChangeableAttributesParams {
|
|
17
|
-
confirmationNumber: string;
|
|
18
|
-
orderNumber: string;
|
|
19
|
-
/**
|
|
20
|
-
* 追加特性
|
|
21
|
-
*/
|
|
22
|
-
additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
|
|
23
|
-
/**
|
|
24
|
-
* 名称
|
|
25
|
-
*/
|
|
26
|
-
name?: string;
|
|
27
|
-
}
|
|
12
|
+
export declare type IOptimizedOrder = Pick<factory.order.IOrder, 'confirmationNumber' | 'customer' | 'dateReturned' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'orderedItem' | 'paymentMethods' | 'price' | 'priceCurrency' | 'project' | 'seller' | 'typeOf'>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
|
-
import { IAcceptedOffer, IAuthorizeResult } from './order/factory';
|
|
2
|
+
import { IAcceptedOffer, IAuthorizeResult, IOptimizedOrder } from './order/factory';
|
|
3
3
|
import { Service } from '../service';
|
|
4
4
|
declare type IKeyOfProjection = keyof factory.order.IOrder | '_id';
|
|
5
5
|
declare type IProjection = {
|
|
6
|
-
[key in IKeyOfProjection]?: 0
|
|
6
|
+
[key in IKeyOfProjection]?: 0;
|
|
7
7
|
};
|
|
8
8
|
interface IProjectionSearchConditions {
|
|
9
9
|
$projection?: IProjection;
|
|
@@ -38,7 +38,7 @@ export declare class OrderService extends Service {
|
|
|
38
38
|
orderDateFrom?: Date;
|
|
39
39
|
orderDateThrough?: Date;
|
|
40
40
|
orderNumber?: string;
|
|
41
|
-
} & IProjectionSearchConditions): Promise<
|
|
41
|
+
} & IProjectionSearchConditions): Promise<IOptimizedOrder[]>;
|
|
42
42
|
/**
|
|
43
43
|
* イベントIDと確認番号で検索
|
|
44
44
|
*/
|
|
@@ -58,7 +58,7 @@ export declare class OrderService extends Service {
|
|
|
58
58
|
$in: string[];
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
} & IProjectionSearchConditions): Promise<
|
|
61
|
+
} & IProjectionSearchConditions): Promise<IOptimizedOrder[]>;
|
|
62
62
|
/**
|
|
63
63
|
* 予約番号と電話番号で注文情報を取得する(sskts専用)
|
|
64
64
|
*/
|
|
@@ -66,7 +66,7 @@ export declare class OrderService extends Service {
|
|
|
66
66
|
theaterCode: string;
|
|
67
67
|
confirmationNumber: string;
|
|
68
68
|
telephone: string;
|
|
69
|
-
} & IProjectionSearchConditions): Promise<
|
|
69
|
+
} & IProjectionSearchConditions): Promise<IOptimizedOrder[]>;
|
|
70
70
|
/**
|
|
71
71
|
* 注文番号と何かしらで注文照会
|
|
72
72
|
*/
|
|
@@ -75,7 +75,7 @@ export declare class OrderService extends Service {
|
|
|
75
75
|
customer?: {
|
|
76
76
|
telephone?: string;
|
|
77
77
|
};
|
|
78
|
-
} & IProjectionSearchConditions): Promise<
|
|
78
|
+
} & IProjectionSearchConditions): Promise<IOptimizedOrder>;
|
|
79
79
|
/**
|
|
80
80
|
* 注文配送
|
|
81
81
|
*/
|
package/lib/abstract/chevre.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { IAdditionalOptions, IOptions, IUnset as IUnsetOnService } from './service';
|
|
2
|
-
import type { PayAssetTransactionService } from './chevre/assetTransaction/pay';
|
|
3
2
|
import type { CategoryCodeService } from './chevre/categoryCode';
|
|
4
3
|
import type { CreativeWorkService } from './chevre/creativeWork';
|
|
5
4
|
import type { EmailMessageService } from './chevre/emailMessage';
|
|
6
5
|
import type { EventService } from './chevre/event';
|
|
7
|
-
import type { MeService } from './chevre/me';
|
|
8
6
|
import type { OrderService } from './chevre/order';
|
|
9
7
|
import type { PermitService } from './chevre/permit';
|
|
10
8
|
import type { PersonService } from './chevre/person';
|
|
@@ -45,13 +43,6 @@ export declare namespace service {
|
|
|
45
43
|
namespace Event {
|
|
46
44
|
let svc: typeof EventService | undefined;
|
|
47
45
|
}
|
|
48
|
-
/**
|
|
49
|
-
* 管理者サービス
|
|
50
|
-
*/
|
|
51
|
-
type Me = MeService;
|
|
52
|
-
namespace Me {
|
|
53
|
-
let svc: typeof MeService | undefined;
|
|
54
|
-
}
|
|
55
46
|
/**
|
|
56
47
|
* 注文サービス
|
|
57
48
|
*/
|
|
@@ -112,15 +103,6 @@ export declare namespace service {
|
|
|
112
103
|
namespace Seller {
|
|
113
104
|
let svc: typeof SellerService | undefined;
|
|
114
105
|
}
|
|
115
|
-
namespace assetTransaction {
|
|
116
|
-
/**
|
|
117
|
-
* 決済取引サービス
|
|
118
|
-
*/
|
|
119
|
-
type Pay = PayAssetTransactionService;
|
|
120
|
-
namespace Pay {
|
|
121
|
-
let svc: typeof PayAssetTransactionService | undefined;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
106
|
/**
|
|
125
107
|
* トークンサービス
|
|
126
108
|
*/
|
|
@@ -146,7 +128,6 @@ export declare class Chevre {
|
|
|
146
128
|
createCreativeWorkInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CreativeWorkService>;
|
|
147
129
|
createEmailMessageInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EmailMessageService>;
|
|
148
130
|
createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
|
|
149
|
-
createMeInstance(): Promise<MeService>;
|
|
150
131
|
createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
|
|
151
132
|
createPersonInstance(params: Pick<IOptions, 'project'>): Promise<PersonService>;
|
|
152
133
|
createPermitInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PermitService>;
|
|
@@ -155,7 +136,6 @@ export declare class Chevre {
|
|
|
155
136
|
createHasPOSInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<HasPOSService>;
|
|
156
137
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
157
138
|
createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
|
|
158
|
-
createPayAssetTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PayAssetTransactionService>;
|
|
159
139
|
createTokenInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<TokenService>;
|
|
160
140
|
createTripInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<TripService>;
|
|
161
141
|
}
|
package/lib/abstract/chevre.js
CHANGED
|
@@ -62,9 +62,6 @@ var service;
|
|
|
62
62
|
var Event;
|
|
63
63
|
(function (Event) {
|
|
64
64
|
})(Event = service.Event || (service.Event = {}));
|
|
65
|
-
var Me;
|
|
66
|
-
(function (Me) {
|
|
67
|
-
})(Me = service.Me || (service.Me = {}));
|
|
68
65
|
var Order;
|
|
69
66
|
(function (Order) {
|
|
70
67
|
})(Order = service.Order || (service.Order = {}));
|
|
@@ -96,12 +93,6 @@ var service;
|
|
|
96
93
|
var Seller;
|
|
97
94
|
(function (Seller) {
|
|
98
95
|
})(Seller = service.Seller || (service.Seller = {}));
|
|
99
|
-
var assetTransaction;
|
|
100
|
-
(function (assetTransaction) {
|
|
101
|
-
var Pay;
|
|
102
|
-
(function (Pay) {
|
|
103
|
-
})(Pay = assetTransaction.Pay || (assetTransaction.Pay = {}));
|
|
104
|
-
})(assetTransaction = service.assetTransaction || (service.assetTransaction = {}));
|
|
105
96
|
var Token;
|
|
106
97
|
(function (Token) {
|
|
107
98
|
})(Token = service.Token || (service.Token = {}));
|
|
@@ -184,23 +175,6 @@ var Chevre = /** @class */ (function () {
|
|
|
184
175
|
});
|
|
185
176
|
});
|
|
186
177
|
};
|
|
187
|
-
Chevre.prototype.createMeInstance = function () {
|
|
188
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
189
|
-
var _a;
|
|
190
|
-
return __generator(this, function (_b) {
|
|
191
|
-
switch (_b.label) {
|
|
192
|
-
case 0:
|
|
193
|
-
if (!(service.Me.svc === undefined)) return [3 /*break*/, 2];
|
|
194
|
-
_a = service.Me;
|
|
195
|
-
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevre/me'); })];
|
|
196
|
-
case 1:
|
|
197
|
-
_a.svc = (_b.sent()).MeService;
|
|
198
|
-
_b.label = 2;
|
|
199
|
-
case 2: return [2 /*return*/, new service.Me.svc(__assign({}, this.options))];
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
178
|
Chevre.prototype.createOrderInstance = function (params) {
|
|
205
179
|
return __awaiter(this, void 0, void 0, function () {
|
|
206
180
|
var _a;
|
|
@@ -337,23 +311,6 @@ var Chevre = /** @class */ (function () {
|
|
|
337
311
|
});
|
|
338
312
|
});
|
|
339
313
|
};
|
|
340
|
-
Chevre.prototype.createPayAssetTransactionInstance = function (params) {
|
|
341
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
342
|
-
var _a;
|
|
343
|
-
return __generator(this, function (_b) {
|
|
344
|
-
switch (_b.label) {
|
|
345
|
-
case 0:
|
|
346
|
-
if (!(service.assetTransaction.Pay.svc === undefined)) return [3 /*break*/, 2];
|
|
347
|
-
_a = service.assetTransaction.Pay;
|
|
348
|
-
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevre/assetTransaction/pay'); })];
|
|
349
|
-
case 1:
|
|
350
|
-
_a.svc = (_b.sent()).PayAssetTransactionService;
|
|
351
|
-
_b.label = 2;
|
|
352
|
-
case 2: return [2 /*return*/, new service.assetTransaction.Pay.svc(__assign(__assign({}, this.options), params))];
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
});
|
|
356
|
-
};
|
|
357
314
|
Chevre.prototype.createTokenInstance = function (params) {
|
|
358
315
|
return __awaiter(this, void 0, void 0, function () {
|
|
359
316
|
var _a;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
|
-
export interface IAuthorizeResult {
|
|
3
|
-
code: string;
|
|
4
|
-
}
|
|
5
2
|
export interface ISearchOrdersOptions {
|
|
6
3
|
/**
|
|
7
4
|
* オファーを展開するかどうか
|
|
@@ -9,8 +6,6 @@ export interface ISearchOrdersOptions {
|
|
|
9
6
|
$unwindAcceptedOffers?: '1';
|
|
10
7
|
}
|
|
11
8
|
export declare type IAcceptedOffer = factory.order.IAcceptedOffer<factory.order.IItemOffered>;
|
|
12
|
-
export declare type IOmittedParams = 'acceptedOffers' | 'discounts' | 'identifier' | 'isGift' | 'url';
|
|
13
|
-
export declare type IOptimizedOrder = Omit<factory.order.IOrder, IOmittedParams>;
|
|
14
9
|
export declare type IReturner = Pick<factory.iam.IMemberOfRole, 'typeOf' | 'id' | 'name'>;
|
|
15
10
|
export declare type IExternalOrder = Pick<factory.order.IOrder, 'project' | 'typeOf' | 'seller' | 'customer' | 'confirmationNumber' | 'orderNumber' | 'price' | 'priceCurrency' | 'orderDate' | 'name' | 'orderStatus' | 'orderedItem' | 'paymentMethods'>;
|
|
16
11
|
export interface IUpdateChangeableAttributesParams {
|
|
@@ -3,7 +3,7 @@ import { IAcceptedOffer, IExternalOrder, IReturner, ISearchOrdersOptions, IUpdat
|
|
|
3
3
|
import { ISearchResult, Service } from '../service';
|
|
4
4
|
declare type IKeyOfProjection = keyof factory.order.IOrder | '_id';
|
|
5
5
|
declare type IProjection = {
|
|
6
|
-
[key in IKeyOfProjection]?: 0
|
|
6
|
+
[key in IKeyOfProjection]?: 0;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* 注文サービス
|
|
@@ -71,7 +71,7 @@ export declare class OrderService extends Service {
|
|
|
71
71
|
*/
|
|
72
72
|
search(params: Omit<factory.order.ISearchConditions, 'project' | 'provider'> & {
|
|
73
73
|
$projection?: IProjection;
|
|
74
|
-
} & ISearchOrdersOptions): Promise<ISearchResult<factory.order.IOrder[]>>;
|
|
74
|
+
} & ISearchOrdersOptions): Promise<ISearchResult<Omit<factory.order.IOrder, 'discounts' | 'isGift' | 'returner'>[]>>;
|
|
75
75
|
/**
|
|
76
76
|
* 注文取得
|
|
77
77
|
*/
|
|
@@ -82,7 +82,7 @@ export declare class OrderService extends Service {
|
|
|
82
82
|
orderNumber: string;
|
|
83
83
|
}, options: {
|
|
84
84
|
$projection?: IProjection;
|
|
85
|
-
}): Promise<factory.order.IOrder
|
|
85
|
+
}): Promise<Omit<factory.order.IOrder, 'acceptedOffers' | 'discounts' | 'isGift' | 'returner'>>;
|
|
86
86
|
/**
|
|
87
87
|
* 返品者検索
|
|
88
88
|
*/
|
|
@@ -8,11 +8,7 @@ export declare class ProjectService extends Service<IOptions> {
|
|
|
8
8
|
/**
|
|
9
9
|
* プロジェクト作成
|
|
10
10
|
*/
|
|
11
|
-
create(params: factory.project.IProject): Promise<factory.project.IProject>;
|
|
12
|
-
/**
|
|
13
|
-
* プロジェクト検索
|
|
14
|
-
* 廃止(2023-07-26~)
|
|
15
|
-
*/
|
|
11
|
+
create(params: Pick<factory.project.IProject, 'alternateName' | 'logo' | 'id' | 'name' | 'settings'>): Promise<factory.project.IProject>;
|
|
16
12
|
/**
|
|
17
13
|
* プロジェクト設定検索
|
|
18
14
|
*/
|
|
@@ -22,7 +18,7 @@ export declare class ProjectService extends Service<IOptions> {
|
|
|
22
18
|
/**
|
|
23
19
|
* プロジェクト更新
|
|
24
20
|
*/
|
|
25
|
-
update(params: factory.project.IProject): Promise<void>;
|
|
21
|
+
update(params: Pick<factory.project.IProject, 'alternateName' | 'id' | 'logo' | 'hasMerchantReturnPolicy' | 'name' | 'settings'>): Promise<void>;
|
|
26
22
|
/**
|
|
27
23
|
* プロジェクトリソース削除
|
|
28
24
|
*/
|