@cinerino/sdk 3.28.0 → 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.
@@ -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: 'cinerino' };
10
+ const project = { id: String(process.env.PROJECT_ID) };
11
11
 
12
12
  async function main() {
13
13
  const authClient = await auth.login();
@@ -20,38 +20,39 @@ async function main() {
20
20
  auth: authClient,
21
21
  project
22
22
  });
23
- const tokenService = new client.service.Token({
24
- endpoint: <string>process.env.API_ENDPOINT,
25
- auth: authClient,
26
- project
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
30
  iss: ''
31
31
  });
32
+ console.log(searchMyPaymentCardsResult.data.map((o) => `${o.typeOfGood.identifier} ${o.typeOfGood.paymentAccount?.status}`));
32
33
  console.log(searchMyPaymentCardsResult.data.length, 'ownershipInfos returned');
33
34
 
34
- const paymentCardOwnershipInfo = searchMyPaymentCardsResult.data[0];
35
- const paymentCard = paymentCardOwnershipInfo.typeOfGood;
36
- const { data } = await personOwnershipInfoService.searchAccountMoneyTransferActions({
37
- limit: 10,
38
- page: 1,
39
- sort: {
40
- startDate: -1
41
- },
42
- accountNumber: paymentCard.paymentAccount?.accountNumber
43
- });
44
- console.log(data.length, 'transferActions returned');
45
-
46
- console.log('publishing code...');
47
- const { code } = await personOwnershipInfoService.authorize({
48
- ownershipInfoId: paymentCardOwnershipInfo.id
49
- });
50
- console.log('code published', code);
51
-
52
- console.log('publishing token...');
53
- const { token } = await tokenService.getToken({ code });
54
- 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);
55
56
  }
56
57
 
57
58
  main()