@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
package/example/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dst
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
/**
|
|
3
|
-
* 口座解約サンプル
|
|
4
|
-
*/
|
|
5
|
-
// import * as util from 'util';
|
|
6
|
-
|
|
7
|
-
import * as client from '../../../../lib/';
|
|
8
|
-
|
|
9
|
-
const auth = new client.auth.ClientCredentials({
|
|
10
|
-
domain: <string>process.env.PECORINO_AUTHORIZE_SERVER_DOMAIN,
|
|
11
|
-
clientId: <string>process.env.PECORINO_CLIENT_ID,
|
|
12
|
-
clientSecret: <string>process.env.PECORINO_CLIENT_SECRET,
|
|
13
|
-
scopes: [],
|
|
14
|
-
state: ''
|
|
15
|
-
});
|
|
16
|
-
const accountService = new client.pecorino.service.Account({
|
|
17
|
-
endpoint: <string>process.env.PECORINO_API_ENDPOINT,
|
|
18
|
-
auth: auth
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
async function main() {
|
|
22
|
-
await accountService.close({
|
|
23
|
-
accountNumber: '1574640851'
|
|
24
|
-
});
|
|
25
|
-
console.log('解約しました。');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
main()
|
|
29
|
-
.then(() => {
|
|
30
|
-
console.log('main processed.');
|
|
31
|
-
})
|
|
32
|
-
.catch(console.error);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console no-implicit-dependencies
|
|
2
|
-
/**
|
|
3
|
-
* 口座開設サンプル
|
|
4
|
-
*/
|
|
5
|
-
import * as moment from 'moment';
|
|
6
|
-
|
|
7
|
-
import * as client from '../../../../lib/';
|
|
8
|
-
|
|
9
|
-
const auth = new client.auth.ClientCredentials({
|
|
10
|
-
domain: <string>process.env.PECORINO_AUTHORIZE_SERVER_DOMAIN,
|
|
11
|
-
clientId: <string>process.env.PECORINO_CLIENT_ID,
|
|
12
|
-
clientSecret: <string>process.env.PECORINO_CLIENT_SECRET,
|
|
13
|
-
scopes: [],
|
|
14
|
-
state: ''
|
|
15
|
-
});
|
|
16
|
-
const accountService = new client.pecorino.service.Account({
|
|
17
|
-
endpoint: <string>process.env.PECORINO_API_ENDPOINT,
|
|
18
|
-
auth: auth
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
async function main() {
|
|
22
|
-
const timestamp = moment()
|
|
23
|
-
.valueOf();
|
|
24
|
-
|
|
25
|
-
const accounts = await accountService.open([
|
|
26
|
-
{
|
|
27
|
-
typeOf: client.factory.accountType.Account,
|
|
28
|
-
project: { typeOf: client.factory.organizationType.Project, id: 'cinerino' },
|
|
29
|
-
accountType: 'Point',
|
|
30
|
-
accountNumber: `${timestamp}-01`,
|
|
31
|
-
name: 'MOTION TARO'
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
typeOf: client.factory.accountType.Account,
|
|
35
|
-
project: { typeOf: client.factory.organizationType.Project, id: 'cinerino' },
|
|
36
|
-
accountType: 'Point',
|
|
37
|
-
accountNumber: `${timestamp}-02`,
|
|
38
|
-
name: 'MOTION TARO'
|
|
39
|
-
}
|
|
40
|
-
]);
|
|
41
|
-
console.log('口座を開設しました。', (Array.isArray(accounts))
|
|
42
|
-
? accounts.map((account) => account.accountNumber)
|
|
43
|
-
: accounts.accountNumber);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
main()
|
|
47
|
-
.then(() => {
|
|
48
|
-
console.log('main processed.');
|
|
49
|
-
})
|
|
50
|
-
.catch(console.error);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
/**
|
|
3
|
-
* 口座検索サンプル
|
|
4
|
-
*/
|
|
5
|
-
import * as client from '../../../../lib/';
|
|
6
|
-
|
|
7
|
-
const auth = new client.auth.ClientCredentials({
|
|
8
|
-
domain: <string>process.env.PECORINO_AUTHORIZE_SERVER_DOMAIN,
|
|
9
|
-
clientId: <string>process.env.PECORINO_CLIENT_ID,
|
|
10
|
-
clientSecret: <string>process.env.PECORINO_CLIENT_SECRET,
|
|
11
|
-
scopes: [],
|
|
12
|
-
state: ''
|
|
13
|
-
});
|
|
14
|
-
const accountService = new client.pecorino.service.Account({
|
|
15
|
-
endpoint: <string>process.env.PECORINO_API_ENDPOINT,
|
|
16
|
-
auth: auth
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
async function main() {
|
|
20
|
-
const { data } = await accountService.search({
|
|
21
|
-
// project: { id: { $eq: '' } },
|
|
22
|
-
accountType: 'Point',
|
|
23
|
-
// name: 'TARO',
|
|
24
|
-
// accountNumbers: ['61201118800'],
|
|
25
|
-
// statuses: [client.factory.accountStatusType.Opened],
|
|
26
|
-
limit: 10,
|
|
27
|
-
page: 1,
|
|
28
|
-
sort: {
|
|
29
|
-
// accountNumber: 1
|
|
30
|
-
openDate: -1
|
|
31
|
-
// balance: 1
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
console.log(data.length, 'accounts returned.');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
main()
|
|
38
|
-
.then(() => {
|
|
39
|
-
console.log('main processed.');
|
|
40
|
-
})
|
|
41
|
-
.catch(console.error);
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
/**
|
|
3
|
-
* 取引履歴検索サンプル
|
|
4
|
-
*/
|
|
5
|
-
import * as util from 'util';
|
|
6
|
-
|
|
7
|
-
import * as client from '../../../../lib/';
|
|
8
|
-
|
|
9
|
-
const auth = new client.auth.ClientCredentials({
|
|
10
|
-
domain: <string>process.env.PECORINO_AUTHORIZE_SERVER_DOMAIN,
|
|
11
|
-
clientId: <string>process.env.PECORINO_CLIENT_ID,
|
|
12
|
-
clientSecret: <string>process.env.PECORINO_CLIENT_SECRET,
|
|
13
|
-
scopes: [],
|
|
14
|
-
state: ''
|
|
15
|
-
});
|
|
16
|
-
const accountService = new client.pecorino.service.Account({
|
|
17
|
-
endpoint: <string>process.env.PECORINO_API_ENDPOINT,
|
|
18
|
-
auth: auth
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
async function main() {
|
|
22
|
-
const accountNumber = '60108118500';
|
|
23
|
-
console.log('searching actions...account:', accountNumber);
|
|
24
|
-
const { data } = await accountService.searchMoneyTransferActions({
|
|
25
|
-
amount: { currency: { $eq: 'Point' } },
|
|
26
|
-
accountNumber: accountNumber,
|
|
27
|
-
limit: 10,
|
|
28
|
-
page: 1,
|
|
29
|
-
sort: {
|
|
30
|
-
startDate: -1
|
|
31
|
-
// amount: -1
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
console.log('取引履歴は以下の通りです。');
|
|
35
|
-
console.log(data.map((a) => {
|
|
36
|
-
return util.format(
|
|
37
|
-
'%s %s %s %s[%s] -> %s[%s] @%s',
|
|
38
|
-
a.endDate,
|
|
39
|
-
a.typeOf,
|
|
40
|
-
a.amount,
|
|
41
|
-
a.fromLocation.name,
|
|
42
|
-
((<client.factory.account.IAccount>a.fromLocation).accountNumber !== undefined)
|
|
43
|
-
? (<client.factory.account.IAccount>a.fromLocation).accountNumber
|
|
44
|
-
: '',
|
|
45
|
-
a.toLocation.name,
|
|
46
|
-
((<client.factory.account.IAccount>a.toLocation).accountNumber !== undefined)
|
|
47
|
-
? (<client.factory.account.IAccount>a.toLocation).accountNumber
|
|
48
|
-
: '',
|
|
49
|
-
a.purpose.typeOf
|
|
50
|
-
);
|
|
51
|
-
})
|
|
52
|
-
.join('\n'));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
main()
|
|
56
|
-
.then(() => {
|
|
57
|
-
console.log('main processed.');
|
|
58
|
-
})
|
|
59
|
-
.catch(console.error);
|