@cinerino/sdk 10.22.0-alpha.2 → 11.0.0-alpha.1
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 +8153 -6839
- package/example/src/chevre/{adminSearchTickets.ts → adminSearchOrderActions.ts} +7 -6
- package/example/src/findEventById.ts +2 -1
- package/example/src/st/processPlaceOrderByPOS.ts +1 -1
- package/example/src/st/v2/searchEventsByTokenGrant.ts +54 -0
- package/lib/abstract/chevre/event.d.ts +1 -1
- package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.d.ts +0 -3
- package/lib/abstract/chevreAdmin/assetTransaction/cancelReservation.js +0 -12
- package/lib/abstract/chevreAdmin/authorization.d.ts +0 -4
- package/lib/abstract/chevreAdmin/authorization.js +0 -19
- package/lib/abstract/chevreAdmin/creativeWork.d.ts +1 -16
- package/lib/abstract/chevreAdmin/creativeWork.js +0 -89
- package/lib/abstract/chevreAdmin/customer.d.ts +1 -20
- package/lib/abstract/chevreAdmin/customer.js +0 -58
- package/lib/abstract/chevreAdmin/event.d.ts +0 -35
- package/lib/abstract/chevreAdmin/event.js +0 -82
- package/lib/abstract/chevreAdmin/eventSeries.d.ts +0 -60
- package/lib/abstract/chevreAdmin/eventSeries.js +0 -112
- package/lib/abstract/chevreAdmin/me.d.ts +0 -8
- package/lib/abstract/chevreAdmin/me.js +0 -18
- package/lib/abstract/chevreAdmin/member.d.ts +0 -14
- package/lib/abstract/chevreAdmin/member.js +0 -66
- package/lib/abstract/chevreAdmin/offer.d.ts +0 -12
- package/lib/abstract/chevreAdmin/offer.js +0 -39
- package/lib/abstract/chevreAdmin/offerCatalog.d.ts +0 -70
- package/lib/abstract/chevreAdmin/offerCatalog.js +0 -160
- package/lib/abstract/chevreAdmin/offerCatalogItem.d.ts +0 -40
- package/lib/abstract/chevreAdmin/offerCatalogItem.js +0 -98
- package/lib/abstract/chevreAdmin/order.d.ts +1 -79
- package/lib/abstract/chevreAdmin/order.js +0 -125
- package/lib/abstract/chevreAdmin/product.d.ts +0 -36
- package/lib/abstract/chevreAdmin/product.js +0 -129
- package/lib/abstract/chevreAdmin/reservation.d.ts +1 -10
- package/lib/abstract/chevreAdmin/reservation.js +0 -20
- package/lib/abstract/chevreAdmin.d.ts +0 -504
- package/lib/abstract/chevreAdmin.js +60 -1177
- package/lib/abstract/chevreAuth/identity.d.ts +25 -0
- package/lib/abstract/chevreAuth/identity.js +152 -0
- package/lib/abstract/chevreAuth.d.ts +9 -0
- package/lib/abstract/chevreAuth.js +20 -0
- package/lib/abstract/chevreConsole/authorization.d.ts +72 -0
- package/lib/abstract/chevreConsole/authorization.js +86 -0
- package/lib/abstract/chevreConsole/creativeWork.d.ts +22 -0
- package/lib/abstract/chevreConsole/creativeWork.js +156 -0
- package/lib/abstract/chevreConsole/customer.d.ts +31 -0
- package/lib/abstract/chevreConsole/customer.js +125 -0
- package/lib/abstract/chevreConsole/event.d.ts +43 -0
- package/lib/abstract/chevreConsole/event.js +149 -0
- package/lib/abstract/chevreConsole/eventSeries.d.ts +67 -0
- package/lib/abstract/chevreConsole/eventSeries.js +180 -0
- package/lib/abstract/chevreConsole/me.d.ts +28 -0
- package/lib/abstract/chevreConsole/me.js +124 -0
- package/lib/abstract/chevreConsole/member.d.ts +22 -0
- package/lib/abstract/chevreConsole/member.js +134 -0
- package/lib/abstract/chevreConsole/offer.d.ts +34 -0
- package/lib/abstract/chevreConsole/offer.js +125 -0
- package/lib/abstract/chevreConsole/offerCatalog.d.ts +77 -0
- package/lib/abstract/chevreConsole/offerCatalog.js +227 -0
- package/lib/abstract/chevreConsole/offerCatalogItem.d.ts +63 -0
- package/lib/abstract/chevreConsole/offerCatalogItem.js +181 -0
- package/lib/abstract/chevreConsole/order.d.ts +86 -0
- package/lib/abstract/chevreConsole/order.js +192 -0
- package/lib/abstract/chevreConsole/product.d.ts +45 -0
- package/lib/abstract/chevreConsole/product.js +196 -0
- package/lib/abstract/chevreConsole/reservation.d.ts +15 -0
- package/lib/abstract/chevreConsole/reservation.js +87 -0
- package/lib/abstract/chevreConsole.d.ts +634 -0
- package/lib/abstract/chevreConsole.js +1445 -0
- package/lib/abstract/cinerino/service/event.d.ts +1 -1
- package/lib/abstract/cloud/admin/order.d.ts +1 -1
- package/lib/abstract/cloud/admin/reservation.d.ts +1 -1
- package/lib/abstract/index.d.ts +3 -1
- package/lib/abstract/index.js +24 -1
- package/lib/bundle.js +8365 -6877
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -1
- package/package.json +2 -2
- package/example/src/chevre/adminMovies.ts +0 -45
- package/example/src/chevre/adminProjectHasMerchantReturnPolicy.ts +0 -30
- package/example/src/chevre/adminSearchIssuers.ts +0 -32
- package/example/src/chevre/adminSearchSellers.ts +0 -32
- package/example/src/chevre/assetTransaction/processMoneyTransfer.ts +0 -74
- package/example/src/chevre/assetTransaction/processRegisterService.ts +0 -70
- package/example/src/chevre/assetTransaction/processReserve.ts +0 -193
- package/example/src/chevre/findPerson.ts +0 -33
- package/example/src/chevre/searchMessages.ts +0 -34
- package/example/src/chevre/searchTransactions.ts +0 -36
- /package/lib/abstract/{chevreAdmin → chevreConsole}/account.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/account.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTitle.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTitle.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTransaction.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/accountTransaction.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/accountingReport.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/accountingReport.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/action.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/action.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/additionalProperty.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/additionalProperty.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/advanceBookingRequirement.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/advanceBookingRequirement.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateOffer.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateOffer.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateReservation.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregateReservation.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregation.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/aggregation.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/moneyTransfer.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/moneyTransfer.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/pay.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/pay.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/registerService.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/registerService.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/reserve.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction/reserve.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/assetTransaction.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/categoryCode.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/categoryCode.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/comment.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/comment.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/customerType.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/customerType.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/emailMessage.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/emailMessage.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/event/factory.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/event/factory.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/eventOffer.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/eventOffer.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/hasMerchantReturnPolicy.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/hasMerchantReturnPolicy.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/iam.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/iam.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/identity.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/identity.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/identityProvider.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/identityProvider.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/issuer.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/issuer.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/memberProgram.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/memberProgram.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/merchantReturnPolicy.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/merchantReturnPolicy.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/message.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/message.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/offerItemCondition.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/offerItemCondition.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/order/factory.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/order/factory.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/ownershipInfo.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/ownershipInfo.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentService.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentService.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentServiceChannel.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/paymentServiceChannel.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/pendingReservation.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/pendingReservation.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/permission.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/permission.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/permit.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/permit.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/person/ownershipInfo.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/person/ownershipInfo.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/person.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/person.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/place/hasPOS.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/place/hasPOS.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/place.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/place.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/priceSpecification.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/priceSpecification.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/productModel.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/productModel.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/project.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/project.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/projectMakesOffer.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/projectMakesOffer.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/reservation/factory.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/reservation/factory.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/seller/factory.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/seller/factory.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/seller.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/seller.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/sellerReturnPolicy.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/sellerReturnPolicy.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/task.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/task.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/ticket.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/ticket.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/token.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/token.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/moneyTransfer.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/moneyTransfer.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/placeOrder.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/placeOrder.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/returnOrder.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction/returnOrder.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transaction.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transactionNumber.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/transactionNumber.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/trip.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/trip.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/userPool.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/userPool.js +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/webSite.d.ts +0 -0
- /package/lib/abstract/{chevreAdmin → chevreConsole}/webSite.js +0 -0
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Node.js Client
|
|
3
3
|
*/
|
|
4
|
-
import { chevre, chevreAdmin, chevreAsset, chevreAuth, chevrePay, chevreTxc, chevreTxn, cloudAdmin, cloudAsset, cloudPay, cloudTxc, cloudTxn, factory, loadChevre, loadChevreAdmin, loadChevreAsset, loadChevreAuth, loadChevrePay, loadChevreTxc, loadChevreTxn, loadCloudAdmin, loadCloudAsset, loadCloudPay, loadCloudTxc, loadCloudTxn, loadPecorino, loadService, loadWaiterAdmin, pecorino, service, transporters, waiterAdmin } from './abstract';
|
|
4
|
+
import { chevre, chevreAdmin, chevreAsset, chevreAuth, chevreConsole, chevrePay, chevreTxc, chevreTxn, cloudAdmin, cloudAsset, cloudPay, cloudTxc, cloudTxn, factory, loadChevre, loadChevreAdmin, loadChevreAsset, loadChevreAuth, loadChevreConsole, loadChevrePay, loadChevreTxc, loadChevreTxn, loadCloudAdmin, loadCloudAsset, loadCloudPay, loadCloudTxc, loadCloudTxn, loadPecorino, loadService, loadWaiterAdmin, pecorino, service, transporters, waiterAdmin } from './abstract';
|
|
5
5
|
import type ClientCredentialsClient from './auth/clientCredentialsClient';
|
|
6
6
|
import type { ImplicitGrantClient, IOptions as IImplicitGrantClientOptions } from './auth/implicitGrantClient';
|
|
7
7
|
import type OAuth2client from './auth/oAuth2client';
|
|
8
|
-
export { loadChevre, loadChevreAdmin, loadChevreAsset, loadChevreAuth, loadChevrePay, loadChevreTxc, loadChevreTxn, loadCloudAdmin, loadCloudAsset, loadCloudPay, loadCloudTxc, loadCloudTxn, loadPecorino, loadService, loadWaiterAdmin, chevre, chevreAdmin, chevreAsset, chevreAuth, chevrePay, chevreTxc, chevreTxn, cloudAdmin, cloudAsset, cloudPay, cloudTxc, cloudTxn, pecorino, service, factory, transporters, waiterAdmin };
|
|
8
|
+
export { loadChevre, loadChevreAdmin, loadChevreAsset, loadChevreAuth, loadChevreConsole, loadChevrePay, loadChevreTxc, loadChevreTxn, loadCloudAdmin, loadCloudAsset, loadCloudPay, loadCloudTxc, loadCloudTxn, loadPecorino, loadService, loadWaiterAdmin, chevre, chevreAdmin, chevreAsset, chevreAuth, chevreConsole, chevrePay, chevreTxc, chevreTxn, cloudAdmin, cloudAsset, cloudPay, cloudTxc, cloudTxn, pecorino, service, factory, transporters, waiterAdmin };
|
|
9
9
|
/**
|
|
10
10
|
* each OAuth2 clients
|
|
11
11
|
*/
|
package/lib/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
41
41
|
return to;
|
|
42
42
|
};
|
|
43
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.createAuthInstance = exports.auth = exports.transporters = exports.factory = exports.loadWaiterAdmin = exports.loadService = exports.loadPecorino = exports.loadCloudTxn = exports.loadCloudTxc = exports.loadCloudPay = exports.loadCloudAsset = exports.loadCloudAdmin = exports.loadChevreTxn = exports.loadChevreTxc = exports.loadChevrePay = exports.loadChevreAuth = exports.loadChevreAsset = exports.loadChevreAdmin = exports.loadChevre = void 0;
|
|
44
|
+
exports.createAuthInstance = exports.auth = exports.transporters = exports.factory = exports.loadWaiterAdmin = exports.loadService = exports.loadPecorino = exports.loadCloudTxn = exports.loadCloudTxc = exports.loadCloudPay = exports.loadCloudAsset = exports.loadCloudAdmin = exports.loadChevreTxn = exports.loadChevreTxc = exports.loadChevrePay = exports.loadChevreConsole = exports.loadChevreAuth = exports.loadChevreAsset = exports.loadChevreAdmin = exports.loadChevre = void 0;
|
|
45
45
|
/**
|
|
46
46
|
* API Node.js Client
|
|
47
47
|
*/
|
|
@@ -51,6 +51,7 @@ Object.defineProperty(exports, "loadChevre", { enumerable: true, get: function (
|
|
|
51
51
|
Object.defineProperty(exports, "loadChevreAdmin", { enumerable: true, get: function () { return abstract_1.loadChevreAdmin; } });
|
|
52
52
|
Object.defineProperty(exports, "loadChevreAsset", { enumerable: true, get: function () { return abstract_1.loadChevreAsset; } });
|
|
53
53
|
Object.defineProperty(exports, "loadChevreAuth", { enumerable: true, get: function () { return abstract_1.loadChevreAuth; } });
|
|
54
|
+
Object.defineProperty(exports, "loadChevreConsole", { enumerable: true, get: function () { return abstract_1.loadChevreConsole; } });
|
|
54
55
|
Object.defineProperty(exports, "loadChevrePay", { enumerable: true, get: function () { return abstract_1.loadChevrePay; } });
|
|
55
56
|
Object.defineProperty(exports, "loadChevreTxc", { enumerable: true, get: function () { return abstract_1.loadChevreTxc; } });
|
|
56
57
|
Object.defineProperty(exports, "loadChevreTxn", { enumerable: true, get: function () { return abstract_1.loadChevreTxn; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0-alpha.1",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"watchify": "^3.11.1"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@chevre/factory": "4.395.0-alpha.
|
|
95
|
+
"@chevre/factory": "4.395.0-alpha.1",
|
|
96
96
|
"debug": "3.2.7",
|
|
97
97
|
"http-status": "1.7.4",
|
|
98
98
|
"idtoken-verifier": "2.0.3",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
-
// import * as moment from 'moment';
|
|
4
|
-
import { factory, loadChevreAdmin } from '../../../lib/index';
|
|
5
|
-
import * as auth from '../auth/authAsAdmin';
|
|
6
|
-
|
|
7
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
-
|
|
9
|
-
async function main() {
|
|
10
|
-
const authClient = await auth.login();
|
|
11
|
-
await authClient.refreshAccessToken();
|
|
12
|
-
const loginTicket = authClient.verifyIdToken({});
|
|
13
|
-
console.log('username is', loginTicket.getUsername());
|
|
14
|
-
|
|
15
|
-
const creativeWorkService = await (await loadChevreAdmin({
|
|
16
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
17
|
-
auth: authClient
|
|
18
|
-
})).createCreativeWorkInstance({
|
|
19
|
-
project,
|
|
20
|
-
seller: { id: '' }
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const result = await creativeWorkService.searchMovies({});
|
|
24
|
-
console.log(result.data.length, 'movies found');
|
|
25
|
-
|
|
26
|
-
await creativeWorkService.upsertMoviesByIdentifier([
|
|
27
|
-
{
|
|
28
|
-
identifier: '00001xxx',
|
|
29
|
-
// identifier: 'Order',
|
|
30
|
-
typeOf: factory.creativeWorkType.Movie,
|
|
31
|
-
duration: 'PT2H',
|
|
32
|
-
name: { ja: '00001xxx' },
|
|
33
|
-
offers: {
|
|
34
|
-
},
|
|
35
|
-
additionalProperty: []
|
|
36
|
-
}
|
|
37
|
-
]);
|
|
38
|
-
console.log('upserted');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
main()
|
|
42
|
-
.then(() => {
|
|
43
|
-
console.log('success!');
|
|
44
|
-
})
|
|
45
|
-
.catch(console.error);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-null-keyword no-console
|
|
2
|
-
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
-
import { loadChevreAdmin } from '../../../lib/index';
|
|
4
|
-
import * as auth from '../auth/authAsAdmin';
|
|
5
|
-
|
|
6
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
const authClient = await auth.login();
|
|
10
|
-
await authClient.refreshAccessToken();
|
|
11
|
-
const loginTicket = authClient.verifyIdToken({});
|
|
12
|
-
console.log('username is', loginTicket.getUsername());
|
|
13
|
-
|
|
14
|
-
const hasMerchantReturnPolicyService = await (await loadChevreAdmin({
|
|
15
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
16
|
-
auth: authClient
|
|
17
|
-
})).createHasMerchantReturnPolicyInstance({
|
|
18
|
-
project: { id: project.id },
|
|
19
|
-
seller: { id: '' }
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const policies = await hasMerchantReturnPolicyService.search();
|
|
23
|
-
console.dir(policies, { depth: null });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
main()
|
|
27
|
-
.then(() => {
|
|
28
|
-
console.log('success!');
|
|
29
|
-
})
|
|
30
|
-
.catch(console.error);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
-
import { loadChevreAdmin } from '../../../lib/index';
|
|
4
|
-
import * as auth from '../auth/authAsAdmin';
|
|
5
|
-
|
|
6
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
const authClient = await auth.login();
|
|
10
|
-
await authClient.refreshAccessToken();
|
|
11
|
-
const loginTicket = authClient.verifyIdToken({});
|
|
12
|
-
console.log('username is', loginTicket.getUsername());
|
|
13
|
-
|
|
14
|
-
const issuerService = await (await loadChevreAdmin({
|
|
15
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
16
|
-
auth: authClient
|
|
17
|
-
})).createIssuerInstance({
|
|
18
|
-
project,
|
|
19
|
-
seller: { id: '' }
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const result = await issuerService.projectPublicFields({
|
|
23
|
-
});
|
|
24
|
-
console.log(result);
|
|
25
|
-
console.log(result.length, 'issuers found');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
main()
|
|
29
|
-
.then(() => {
|
|
30
|
-
console.log('success!');
|
|
31
|
-
})
|
|
32
|
-
.catch(console.error);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
-
import { loadChevreAdmin } from '../../../lib/index';
|
|
4
|
-
import * as auth from '../auth/authAsAdmin';
|
|
5
|
-
|
|
6
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
const authClient = await auth.login();
|
|
10
|
-
await authClient.refreshAccessToken();
|
|
11
|
-
const loginTicket = authClient.verifyIdToken({});
|
|
12
|
-
console.log('username is', loginTicket.getUsername());
|
|
13
|
-
|
|
14
|
-
const sellerService = await (await loadChevreAdmin({
|
|
15
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
16
|
-
auth: authClient
|
|
17
|
-
})).createSellerInstance({
|
|
18
|
-
project
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const result = await sellerService.search({
|
|
22
|
-
$projection: {}
|
|
23
|
-
});
|
|
24
|
-
console.log(result);
|
|
25
|
-
console.log(result.data.length, 'members found');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
main()
|
|
29
|
-
.then(() => {
|
|
30
|
-
console.log('success!');
|
|
31
|
-
})
|
|
32
|
-
.catch(console.error);
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
-
import * as moment from 'moment';
|
|
3
|
-
|
|
4
|
-
import * as client from '../../../../lib/';
|
|
5
|
-
|
|
6
|
-
const project = { id: 'cinerino' };
|
|
7
|
-
|
|
8
|
-
const transactionNumber = `CIN${(new Date()).valueOf()}`;
|
|
9
|
-
|
|
10
|
-
async function main() {
|
|
11
|
-
const auth = await client.auth.ClientCredentials.createInstance({
|
|
12
|
-
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
13
|
-
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
14
|
-
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
15
|
-
scopes: [],
|
|
16
|
-
state: ''
|
|
17
|
-
});
|
|
18
|
-
const moneyTransferService = await (await client.loadChevreAdmin({
|
|
19
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
20
|
-
auth: auth
|
|
21
|
-
})).createMoneyTransferAssetTransactionInstance({
|
|
22
|
-
project,
|
|
23
|
-
seller: { id: '' }
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
await moneyTransferService.start({
|
|
27
|
-
typeOf: client.factory.assetTransactionType.MoneyTransfer,
|
|
28
|
-
transactionNumber: transactionNumber,
|
|
29
|
-
project: { typeOf: client.factory.organizationType.Project, id: project.id },
|
|
30
|
-
agent: { typeOf: client.factory.personType.Person, name: 'Agent', id: 'id' },
|
|
31
|
-
recipient: { typeOf: client.factory.personType.Person, name: 'Recipient', id: 'id' },
|
|
32
|
-
object: {
|
|
33
|
-
amount: {
|
|
34
|
-
typeOf: 'MonetaryAmount',
|
|
35
|
-
value: 1,
|
|
36
|
-
currency: ''
|
|
37
|
-
},
|
|
38
|
-
// fromLocation: {
|
|
39
|
-
// name: 'fromLocation'
|
|
40
|
-
// },
|
|
41
|
-
fromLocation: {
|
|
42
|
-
typeOf: 'PrepaidPaymentCard',
|
|
43
|
-
identifier: 'CIN158937572108700'
|
|
44
|
-
},
|
|
45
|
-
// toLocation: {
|
|
46
|
-
// name: 'toLocation'
|
|
47
|
-
// },
|
|
48
|
-
toLocation: {
|
|
49
|
-
typeOf: 'PrepaidPaymentCard',
|
|
50
|
-
identifier: 'CIN158910858422100'
|
|
51
|
-
},
|
|
52
|
-
description: 'sample',
|
|
53
|
-
pendingTransaction: {
|
|
54
|
-
typeOf: client.factory.account.transactionType.Deposit
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
expires: moment()
|
|
58
|
-
.add(5, 'minutes')
|
|
59
|
-
.toDate()
|
|
60
|
-
});
|
|
61
|
-
console.log('transaction started', transactionNumber);
|
|
62
|
-
|
|
63
|
-
// 確定
|
|
64
|
-
await moneyTransferService.confirm({
|
|
65
|
-
transactionNumber: transactionNumber
|
|
66
|
-
});
|
|
67
|
-
console.log('transaction confirmed');
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
main()
|
|
71
|
-
.then(() => {
|
|
72
|
-
console.log('main processed.');
|
|
73
|
-
})
|
|
74
|
-
.catch(console.error);
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
-
import * as moment from 'moment';
|
|
3
|
-
|
|
4
|
-
import * as client from '../../../../lib/';
|
|
5
|
-
|
|
6
|
-
const project = { id: 'cinerino' };
|
|
7
|
-
|
|
8
|
-
const identifier = `CIN${(new Date()).valueOf()}`;
|
|
9
|
-
const accessCode = '123';
|
|
10
|
-
|
|
11
|
-
async function main() {
|
|
12
|
-
const auth = await client.auth.ClientCredentials.createInstance({
|
|
13
|
-
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
14
|
-
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
15
|
-
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
16
|
-
scopes: [],
|
|
17
|
-
state: ''
|
|
18
|
-
});
|
|
19
|
-
const registerService = await (await client.loadChevreAdmin({
|
|
20
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
21
|
-
auth: auth
|
|
22
|
-
})).createRegisterServiceAssetTransactionInstance({
|
|
23
|
-
project,
|
|
24
|
-
seller: { id: '' }
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
console.log('starting transaction...identifier:', identifier);
|
|
28
|
-
const transaction = await registerService.start({
|
|
29
|
-
project: { typeOf: client.factory.organizationType.Project, id: project.id },
|
|
30
|
-
typeOf: client.factory.assetTransactionType.RegisterService,
|
|
31
|
-
transactionNumber: 'xxx',
|
|
32
|
-
agent: {
|
|
33
|
-
typeOf: client.factory.personType.Person,
|
|
34
|
-
id: 'xxx',
|
|
35
|
-
name: 'agent name'
|
|
36
|
-
},
|
|
37
|
-
object: [{
|
|
38
|
-
typeOf: client.factory.offerType.Offer,
|
|
39
|
-
id: '7k740xps6',
|
|
40
|
-
itemOffered: {
|
|
41
|
-
// project: { typeOf: client.factory.organizationType.Project, id: project.id },
|
|
42
|
-
// typeOf: client.factory.product.ProductType.PaymentCard,
|
|
43
|
-
id: '5eaf98ecbcba1736247577b0',
|
|
44
|
-
serviceOutput: {
|
|
45
|
-
project: { typeOf: client.factory.organizationType.Project, id: project.id },
|
|
46
|
-
typeOf: client.factory.permit.PermitType.Permit,
|
|
47
|
-
identifier: identifier,
|
|
48
|
-
accessCode: accessCode,
|
|
49
|
-
name: 'プリペ'
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}],
|
|
53
|
-
expires: moment()
|
|
54
|
-
.add(5, 'minutes')
|
|
55
|
-
.toDate()
|
|
56
|
-
});
|
|
57
|
-
console.log('transaction started', transaction.id);
|
|
58
|
-
|
|
59
|
-
// 確定
|
|
60
|
-
await registerService.confirm({
|
|
61
|
-
id: transaction.id
|
|
62
|
-
});
|
|
63
|
-
console.log('transaction confirmed');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
main()
|
|
67
|
-
.then(() => {
|
|
68
|
-
console.log('main processed.');
|
|
69
|
-
})
|
|
70
|
-
.catch(console.error);
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
-
import * as moment from 'moment';
|
|
3
|
-
|
|
4
|
-
import * as client from '../../../../lib/';
|
|
5
|
-
|
|
6
|
-
const project = { id: 'cinerino' };
|
|
7
|
-
|
|
8
|
-
// tslint:disable-next-line:max-func-body-length
|
|
9
|
-
async function main() {
|
|
10
|
-
const auth = await client.auth.ClientCredentials.createInstance({
|
|
11
|
-
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
12
|
-
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
13
|
-
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
14
|
-
scopes: [],
|
|
15
|
-
state: ''
|
|
16
|
-
});
|
|
17
|
-
const eventService = await (await client.loadChevre({
|
|
18
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
19
|
-
auth: auth
|
|
20
|
-
})).createEventInstance({
|
|
21
|
-
project,
|
|
22
|
-
seller: { id: '' }
|
|
23
|
-
});
|
|
24
|
-
const reserveService = await (await client.loadChevreAdmin({
|
|
25
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
26
|
-
auth: auth
|
|
27
|
-
})).createReserveAssetTransactionInstance({
|
|
28
|
-
project,
|
|
29
|
-
seller: { id: '' }
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
console.log('searching events...');
|
|
33
|
-
const events = await eventService.projectFields({
|
|
34
|
-
typeOf: client.factory.eventType.ScreeningEvent,
|
|
35
|
-
inSessionFrom: new Date(),
|
|
36
|
-
inSessionThrough: moment()
|
|
37
|
-
.add(1, 'month')
|
|
38
|
-
.toDate()
|
|
39
|
-
});
|
|
40
|
-
console.log(events.length, 'events found');
|
|
41
|
-
const selectedEvent = events[0];
|
|
42
|
-
// const selectedEvent = { id: '7iri100jqrrpxy1' };
|
|
43
|
-
|
|
44
|
-
console.log('searching ticket types...');
|
|
45
|
-
const ticketOffers = await eventService.searchTicketOffers({
|
|
46
|
-
id: selectedEvent.id,
|
|
47
|
-
priceSpecification: {},
|
|
48
|
-
includedInDataCatalog: {}
|
|
49
|
-
});
|
|
50
|
-
console.log(ticketOffers.length, 'ticketOffers found');
|
|
51
|
-
console.log('チケットオファーは以下の通りです');
|
|
52
|
-
console.log(ticketOffers.map((o) => {
|
|
53
|
-
const unitPriceSpecification = o.priceSpecification.priceComponent
|
|
54
|
-
.filter((s) => s.typeOf === client.factory.priceSpecificationType.UnitPriceSpecification)
|
|
55
|
-
.shift();
|
|
56
|
-
const categoryCodeCharge = o.priceSpecification.priceComponent
|
|
57
|
-
.filter((s) => s.typeOf === client.factory.priceSpecificationType.CategoryCodeChargeSpecification)
|
|
58
|
-
.map((s) => `+${(<client.factory.priceSpecification.IPriceSpecification<client.factory.priceSpecificationType.CategoryCodeChargeSpecification>>s).appliesToCategoryCode[0].codeValue}チャージ:${s.price} ${s.priceCurrency}`)
|
|
59
|
-
.join(' ');
|
|
60
|
-
const mvtkCharge = o.priceSpecification.priceComponent
|
|
61
|
-
.filter((s) => s.typeOf === client.factory.priceSpecificationType.MovieTicketTypeChargeSpecification)
|
|
62
|
-
.map((s) => `+${(<client.factory.priceSpecification.IPriceSpecification<client.factory.priceSpecificationType.MovieTicketTypeChargeSpecification>>s).appliesToVideoFormat}チャージ:${s.price} ${s.priceCurrency}`)
|
|
63
|
-
.join(' ');
|
|
64
|
-
|
|
65
|
-
return `${o.id} ${(<client.factory.multilingualString>o.name).ja} ${unitPriceSpecification?.price} ${categoryCodeCharge} ${mvtkCharge}`;
|
|
66
|
-
})
|
|
67
|
-
.join('\n'));
|
|
68
|
-
|
|
69
|
-
console.log('searching offers...');
|
|
70
|
-
const searchSeatsResult = await eventService.searchSeats({ id: selectedEvent.id });
|
|
71
|
-
console.log(searchSeatsResult.length, 'seats found');
|
|
72
|
-
const seatOffers = searchSeatsResult;
|
|
73
|
-
console.log(seatOffers.length, 'seatOffers found');
|
|
74
|
-
const availableSeatOffers = seatOffers.filter((o) => o.offers?.shift()?.availability === client.factory.itemAvailability.InStock);
|
|
75
|
-
console.log(availableSeatOffers.length, 'availableSeatOffers found');
|
|
76
|
-
|
|
77
|
-
// const selectedSectionOffer = offers[0];
|
|
78
|
-
// const selectedSeatOffer = availableSeatOffers[0];
|
|
79
|
-
const selectedSeatOffers = availableSeatOffers.slice(0, 2);
|
|
80
|
-
// tslint:disable-next-line:insecure-random
|
|
81
|
-
// const selectedTicketOffer = ticketOffers[Math.floor(ticketOffers.length * Math.random())];
|
|
82
|
-
const selectedTicketOffer = ticketOffers[0];
|
|
83
|
-
console.log(
|
|
84
|
-
'reserving...',
|
|
85
|
-
selectedEvent.id,
|
|
86
|
-
selectedSeatOffers[0].containedInPlace?.branchCode,
|
|
87
|
-
selectedSeatOffers.map((o) => o.branchCode),
|
|
88
|
-
selectedTicketOffer.id
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
console.log('starting transaction...');
|
|
92
|
-
let transaction = await reserveService.start({
|
|
93
|
-
project: { typeOf: client.factory.organizationType.Project, id: project.id },
|
|
94
|
-
typeOf: client.factory.assetTransactionType.Reserve,
|
|
95
|
-
transactionNumber: 'xxx',
|
|
96
|
-
agent: {
|
|
97
|
-
typeOf: client.factory.personType.Person,
|
|
98
|
-
id: 'xxx',
|
|
99
|
-
name: 'agent name'
|
|
100
|
-
},
|
|
101
|
-
object: {
|
|
102
|
-
reservationFor: { id: selectedEvent.id },
|
|
103
|
-
acceptedOffer: selectedSeatOffers.map((o) => {
|
|
104
|
-
return {
|
|
105
|
-
id: String(selectedTicketOffer.id),
|
|
106
|
-
itemOffered: {
|
|
107
|
-
serviceOutput: {
|
|
108
|
-
typeOf: client.factory.reservationType.EventReservation,
|
|
109
|
-
additionalTicketText: 'test from samples',
|
|
110
|
-
reservedTicket: {
|
|
111
|
-
typeOf: 'Ticket',
|
|
112
|
-
ticketedSeat: {
|
|
113
|
-
typeOf: client.factory.placeType.Seat,
|
|
114
|
-
seatNumber: o.branchCode,
|
|
115
|
-
seatSection: String(o.containedInPlace?.branchCode),
|
|
116
|
-
seatRow: ''
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
})
|
|
124
|
-
},
|
|
125
|
-
expires: moment()
|
|
126
|
-
.add(5, 'minutes')
|
|
127
|
-
.toDate()
|
|
128
|
-
});
|
|
129
|
-
console.log('transaction started', transaction.id);
|
|
130
|
-
|
|
131
|
-
await wait(1000);
|
|
132
|
-
|
|
133
|
-
// 中止
|
|
134
|
-
await reserveService.cancel({
|
|
135
|
-
id: transaction.id
|
|
136
|
-
});
|
|
137
|
-
console.log('transaction canceled');
|
|
138
|
-
|
|
139
|
-
transaction = await reserveService.start({
|
|
140
|
-
project: { id: project.id, typeOf: client.factory.organizationType.Project },
|
|
141
|
-
typeOf: client.factory.assetTransactionType.Reserve,
|
|
142
|
-
transactionNumber: 'xxx',
|
|
143
|
-
agent: {
|
|
144
|
-
typeOf: client.factory.personType.Person,
|
|
145
|
-
id: 'xxx',
|
|
146
|
-
name: 'agent name'
|
|
147
|
-
},
|
|
148
|
-
object: {
|
|
149
|
-
reservationFor: { id: selectedEvent.id },
|
|
150
|
-
acceptedOffer: selectedSeatOffers.map((o) => {
|
|
151
|
-
return {
|
|
152
|
-
id: String(selectedTicketOffer.id),
|
|
153
|
-
itemOffered: {
|
|
154
|
-
serviceOutput: {
|
|
155
|
-
typeOf: client.factory.reservationType.EventReservation,
|
|
156
|
-
additionalTicketText: 'test from samples',
|
|
157
|
-
reservedTicket: {
|
|
158
|
-
typeOf: 'Ticket',
|
|
159
|
-
ticketedSeat: {
|
|
160
|
-
typeOf: client.factory.placeType.Seat,
|
|
161
|
-
seatNumber: o.branchCode,
|
|
162
|
-
seatSection: String(o.containedInPlace?.branchCode),
|
|
163
|
-
seatRow: ''
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
})
|
|
171
|
-
},
|
|
172
|
-
expires: moment()
|
|
173
|
-
.add(5, 'minutes')
|
|
174
|
-
.toDate()
|
|
175
|
-
});
|
|
176
|
-
console.log('transaction started', transaction.id);
|
|
177
|
-
|
|
178
|
-
// 確定
|
|
179
|
-
await reserveService.confirm({
|
|
180
|
-
id: transaction.id
|
|
181
|
-
});
|
|
182
|
-
console.log('transaction confirmed');
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
async function wait(waitInMilliseconds: number) {
|
|
186
|
-
return new Promise((resolve) => setTimeout(resolve, waitInMilliseconds));
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
main()
|
|
190
|
-
.then(() => {
|
|
191
|
-
console.log('main processed.');
|
|
192
|
-
})
|
|
193
|
-
.catch(console.error);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
-
import * as client from '../../../lib/';
|
|
3
|
-
|
|
4
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
5
|
-
|
|
6
|
-
async function main() {
|
|
7
|
-
const authClient = await client.auth.ClientCredentials.createInstance({
|
|
8
|
-
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
9
|
-
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
10
|
-
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
11
|
-
scopes: [],
|
|
12
|
-
state: ''
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const personService = await (await client.loadChevreAdmin({
|
|
16
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
17
|
-
auth: authClient
|
|
18
|
-
})).createPersonInstance({
|
|
19
|
-
project
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const data = await personService.findById({
|
|
23
|
-
iss: '',
|
|
24
|
-
id: '708b007c-79e2-4a3f-8f7a-4bcfc56f4583'
|
|
25
|
-
});
|
|
26
|
-
console.log(data);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
main()
|
|
30
|
-
.then(() => {
|
|
31
|
-
console.log('main processed.');
|
|
32
|
-
})
|
|
33
|
-
.catch(console.error);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
import { loadChevreAdmin } from '../../../lib/index';
|
|
3
|
-
import * as auth from '../auth/authAsAdmin';
|
|
4
|
-
|
|
5
|
-
const project = { id: String(process.env.PROJECT_ID) };
|
|
6
|
-
|
|
7
|
-
async function main() {
|
|
8
|
-
const authClient = await auth.login();
|
|
9
|
-
await authClient.refreshAccessToken();
|
|
10
|
-
const loginTicket = authClient.verifyIdToken({});
|
|
11
|
-
console.log('username is', loginTicket.getUsername());
|
|
12
|
-
|
|
13
|
-
const messageService = await (await loadChevreAdmin({
|
|
14
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
15
|
-
auth: authClient
|
|
16
|
-
})).createMessageInstance({
|
|
17
|
-
project,
|
|
18
|
-
seller: { id: '' }
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const messages = await messageService.search({
|
|
22
|
-
mainEntity: { orderNumber: { $eq: 'CIN3-0703394-7833190' } },
|
|
23
|
-
inclusion: [],
|
|
24
|
-
exclusion: ['text']
|
|
25
|
-
});
|
|
26
|
-
console.log(messages);
|
|
27
|
-
console.log(messages.length, 'messages found');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
main()
|
|
31
|
-
.then(() => {
|
|
32
|
-
console.log('success!');
|
|
33
|
-
})
|
|
34
|
-
.catch(console.error);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
-
import * as client from '../../../lib/';
|
|
3
|
-
|
|
4
|
-
const project = { id: 'cinerino' };
|
|
5
|
-
|
|
6
|
-
async function main() {
|
|
7
|
-
const authClient = await client.auth.ClientCredentials.createInstance({
|
|
8
|
-
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
9
|
-
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
10
|
-
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
11
|
-
scopes: [],
|
|
12
|
-
state: ''
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const transactionService = await (await client.loadChevreAdmin({
|
|
16
|
-
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
17
|
-
auth: authClient
|
|
18
|
-
})).createAssetTransactionInstance({
|
|
19
|
-
project,
|
|
20
|
-
seller: { id: '' }
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const { data } = await transactionService.search({
|
|
24
|
-
project: { id: { $eq: 'cinerino' } },
|
|
25
|
-
typeOf: client.factory.assetTransactionType.RegisterService,
|
|
26
|
-
transactionNumber: { $eq: 'CIN864922685165506' }
|
|
27
|
-
});
|
|
28
|
-
console.log(data);
|
|
29
|
-
console.log(data.length);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
main()
|
|
33
|
-
.then(() => {
|
|
34
|
-
console.log('main processed.');
|
|
35
|
-
})
|
|
36
|
-
.catch(console.error);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|