@cinerino/sdk 3.28.0-alpha.2 → 3.29.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 +11 -6
- package/example/src/person/manageProfile.ts +3 -2
- package/example/src/person/manageProfileAsAdmin.ts +3 -2
- package/example/src/person/manageReservationToken.ts +2 -1
- package/example/src/person/searchMyPaymentCards.ts +29 -27
- package/example/src/person/searchMyReservations.ts +2 -1
- package/example/src/transaction/processMoneyTransfer.ts +2 -1
- package/example/src/transaction/processPlaceOrderByAnonymousCreditCardAndMyMembership.ts +2 -1
- package/lib/bundle.js +523 -792
- package/package.json +2 -2
- package/CHANGELOG.md +0 -785
- package/example/.gitignore +0 -1
- package/example/playground/.gitignore +0 -15
- package/example/src/pecorino/account/close.ts +0 -32
- package/example/src/pecorino/account/open.ts +0 -50
- package/example/src/pecorino/account/search.ts +0 -41
- package/example/src/pecorino/account/searchMoneyTransferActions.ts +0 -59
|
@@ -13435,7 +13435,8 @@ var PersonService = /** @class */ (function (_super) {
|
|
|
13435
13435
|
return [2 /*return*/, this.fetch({
|
|
13436
13436
|
uri: "/people/" + id + "/profile",
|
|
13437
13437
|
method: 'GET',
|
|
13438
|
-
expectedStatusCodes: [http_status_1.OK]
|
|
13438
|
+
expectedStatusCodes: [http_status_1.OK],
|
|
13439
|
+
qs: { iss: params.iss }
|
|
13439
13440
|
})
|
|
13440
13441
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
13441
13442
|
return [2 /*return*/, response.json()];
|
|
@@ -13457,7 +13458,8 @@ var PersonService = /** @class */ (function (_super) {
|
|
|
13457
13458
|
uri: "/people/" + id + "/profile",
|
|
13458
13459
|
method: 'PATCH',
|
|
13459
13460
|
body: params,
|
|
13460
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
13461
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
13462
|
+
qs: { iss: params.iss }
|
|
13461
13463
|
})];
|
|
13462
13464
|
case 1:
|
|
13463
13465
|
_a.sent();
|
|
@@ -13536,7 +13538,8 @@ var PersonService = /** @class */ (function (_super) {
|
|
|
13536
13538
|
return [2 /*return*/, this.fetch({
|
|
13537
13539
|
uri: "/people/" + id,
|
|
13538
13540
|
method: 'GET',
|
|
13539
|
-
expectedStatusCodes: [http_status_1.OK]
|
|
13541
|
+
expectedStatusCodes: [http_status_1.OK],
|
|
13542
|
+
qs: { iss: params.iss }
|
|
13540
13543
|
})
|
|
13541
13544
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
13542
13545
|
return [2 /*return*/, response.json()];
|
|
@@ -13558,7 +13561,8 @@ var PersonService = /** @class */ (function (_super) {
|
|
|
13558
13561
|
uri: "/people/" + id,
|
|
13559
13562
|
method: 'DELETE',
|
|
13560
13563
|
body: params,
|
|
13561
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
13564
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
13565
|
+
qs: { iss: params.iss }
|
|
13562
13566
|
})];
|
|
13563
13567
|
case 1:
|
|
13564
13568
|
_a.sent();
|
|
@@ -13681,7 +13685,7 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
|
|
|
13681
13685
|
return [2 /*return*/, this.fetch({
|
|
13682
13686
|
uri: "/people/" + id + "/ownershipInfos/creditCards",
|
|
13683
13687
|
method: 'GET',
|
|
13684
|
-
qs: {},
|
|
13688
|
+
qs: { iss: params.iss },
|
|
13685
13689
|
expectedStatusCodes: [http_status_1.OK]
|
|
13686
13690
|
})
|
|
13687
13691
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13703,7 +13707,8 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
|
|
|
13703
13707
|
return [4 /*yield*/, this.fetch({
|
|
13704
13708
|
uri: "/people/" + id + "/ownershipInfos/creditCards/" + params.cardSeq,
|
|
13705
13709
|
method: 'DELETE',
|
|
13706
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
13710
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
13711
|
+
qs: { iss: params.iss }
|
|
13707
13712
|
})];
|
|
13708
13713
|
case 1:
|
|
13709
13714
|
_a.sent();
|
|
@@ -18,7 +18,7 @@ async function main() {
|
|
|
18
18
|
auth: authClient,
|
|
19
19
|
project
|
|
20
20
|
});
|
|
21
|
-
const profile = await personService.getProfile({});
|
|
21
|
+
const profile = await personService.getProfile({ iss: '' });
|
|
22
22
|
console.log(profile);
|
|
23
23
|
|
|
24
24
|
await personService.updateProfile({
|
|
@@ -34,7 +34,8 @@ async function main() {
|
|
|
34
34
|
name: 'custom:givenName',
|
|
35
35
|
value: 'Taro'
|
|
36
36
|
}
|
|
37
|
-
]
|
|
37
|
+
],
|
|
38
|
+
iss: ''
|
|
38
39
|
});
|
|
39
40
|
console.log('profile updated');
|
|
40
41
|
}
|
|
@@ -21,13 +21,14 @@ async function main() {
|
|
|
21
21
|
|
|
22
22
|
const userId = 'xxx';
|
|
23
23
|
|
|
24
|
-
const profile = await personService.getProfile({ id: userId });
|
|
24
|
+
const profile = await personService.getProfile({ id: userId, iss: '' });
|
|
25
25
|
console.log(profile);
|
|
26
26
|
|
|
27
27
|
await personService.updateProfile({
|
|
28
28
|
id: userId,
|
|
29
29
|
familyName: 'Cinerino',
|
|
30
|
-
givenName: 'Taro'
|
|
30
|
+
givenName: 'Taro',
|
|
31
|
+
iss: ''
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -39,7 +39,8 @@ async function main() {
|
|
|
39
39
|
.toDate(),
|
|
40
40
|
sort: {
|
|
41
41
|
ownedFrom: client.factory.sortType.Descending
|
|
42
|
-
}
|
|
42
|
+
},
|
|
43
|
+
iss: ''
|
|
43
44
|
});
|
|
44
45
|
console.log(searchMyReservationsResult.data.length, 'reservations returned');
|
|
45
46
|
const reservationOwnershipInfo = searchMyReservationsResult.data[0];
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as client from '../../../lib/index';
|
|
8
8
|
import * as auth from '../auth/auth';
|
|
9
9
|
|
|
10
|
-
const project = { id:
|
|
10
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
11
11
|
|
|
12
12
|
async function main() {
|
|
13
13
|
const authClient = await auth.login();
|
|
@@ -20,37 +20,39 @@ async function main() {
|
|
|
20
20
|
auth: authClient,
|
|
21
21
|
project
|
|
22
22
|
});
|
|
23
|
-
const tokenService = new client.service.Token({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
23
|
+
// const tokenService = new client.service.Token({
|
|
24
|
+
// endpoint: <string>process.env.API_ENDPOINT,
|
|
25
|
+
// auth: authClient,
|
|
26
|
+
// project
|
|
27
|
+
// });
|
|
28
28
|
|
|
29
29
|
const searchMyPaymentCardsResult = await personOwnershipInfoService.searchMyPaymentCards({
|
|
30
|
+
iss: ''
|
|
30
31
|
});
|
|
32
|
+
console.log(searchMyPaymentCardsResult.data.map((o) => `${o.typeOfGood.identifier} ${o.typeOfGood.paymentAccount?.status}`));
|
|
31
33
|
console.log(searchMyPaymentCardsResult.data.length, 'ownershipInfos returned');
|
|
32
34
|
|
|
33
|
-
const paymentCardOwnershipInfo = searchMyPaymentCardsResult.data[0];
|
|
34
|
-
const paymentCard = paymentCardOwnershipInfo.typeOfGood;
|
|
35
|
-
const { data } = await personOwnershipInfoService.searchAccountMoneyTransferActions({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
console.log(data.length, 'transferActions returned');
|
|
44
|
-
|
|
45
|
-
console.log('publishing code...');
|
|
46
|
-
const { code } = await personOwnershipInfoService.authorize({
|
|
47
|
-
|
|
48
|
-
});
|
|
49
|
-
console.log('code published', code);
|
|
50
|
-
|
|
51
|
-
console.log('publishing token...');
|
|
52
|
-
const { token } = await tokenService.getToken({ code });
|
|
53
|
-
console.log('token published', token);
|
|
35
|
+
// const paymentCardOwnershipInfo = searchMyPaymentCardsResult.data[0];
|
|
36
|
+
// const paymentCard = paymentCardOwnershipInfo.typeOfGood;
|
|
37
|
+
// const { data } = await personOwnershipInfoService.searchAccountMoneyTransferActions({
|
|
38
|
+
// limit: 10,
|
|
39
|
+
// page: 1,
|
|
40
|
+
// sort: {
|
|
41
|
+
// startDate: -1
|
|
42
|
+
// },
|
|
43
|
+
// accountNumber: paymentCard.paymentAccount?.accountNumber
|
|
44
|
+
// });
|
|
45
|
+
// console.log(data.length, 'transferActions returned');
|
|
46
|
+
|
|
47
|
+
// console.log('publishing code...');
|
|
48
|
+
// const { code } = await personOwnershipInfoService.authorize({
|
|
49
|
+
// ownershipInfoId: paymentCardOwnershipInfo.id
|
|
50
|
+
// });
|
|
51
|
+
// console.log('code published', code);
|
|
52
|
+
|
|
53
|
+
// console.log('publishing token...');
|
|
54
|
+
// const { token } = await tokenService.getToken({ code });
|
|
55
|
+
// console.log('token published', token);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
main()
|
|
@@ -74,7 +74,8 @@ async function main() {
|
|
|
74
74
|
const searchPaymentCardOwnershipInfosResult = await personOwnershipInfoService.searchMyPaymentCards({
|
|
75
75
|
limit: 1,
|
|
76
76
|
ownedFrom: now,
|
|
77
|
-
ownedThrough: now
|
|
77
|
+
ownedThrough: now,
|
|
78
|
+
iss: ''
|
|
78
79
|
});
|
|
79
80
|
const paymentCardOwnershipInfo = searchPaymentCardOwnershipInfosResult.data.shift();
|
|
80
81
|
if (paymentCardOwnershipInfo === undefined) {
|
|
@@ -365,7 +365,8 @@ function authorizeSeatReservationByEvent(params: {
|
|
|
365
365
|
const membershipOwnershipInfos = await ownershipInfoService.searchMyMemberships({
|
|
366
366
|
limit: 1,
|
|
367
367
|
ownedFrom: now,
|
|
368
|
-
ownedThrough: now
|
|
368
|
+
ownedThrough: now,
|
|
369
|
+
iss: ''
|
|
369
370
|
});
|
|
370
371
|
console.log(membershipOwnershipInfos.data.length, 'memberships found');
|
|
371
372
|
if (membershipOwnershipInfos.data.length < 1) {
|