@cinerino/sdk 3.49.0 → 3.50.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.
@@ -20,11 +20,14 @@ export async function login() {
20
20
  const state = '12345';
21
21
  const codeVerifier = '12345';
22
22
 
23
- const authUrl = auth.generateAuthUrl({
23
+ let authUrl = auth.generateAuthUrl({
24
24
  scopes: scopes,
25
25
  state: state,
26
26
  codeVerifier: codeVerifier
27
27
  });
28
+ const signInUrl = new URL(authUrl);
29
+ authUrl = `${signInUrl.href}&identity_provider=`;
30
+
28
31
  console.log('authUrl:', authUrl);
29
32
 
30
33
  if (process.env.TEST_REFRESH_TOKEN !== undefined) {
@@ -43,6 +43,7 @@ async function main() {
43
43
  recipient: { typeOf: seller.typeOf, name: seller.name, id: seller.id, project: seller.project },
44
44
  object: {
45
45
  typeOf: client.factory.service.paymentService.PaymentServiceType.CreditCard,
46
+ id: '',
46
47
  paymentMethod: {
47
48
  typeOf: paymentMethodType,
48
49
  amount: 10,
@@ -42,6 +42,7 @@ async function main() {
42
42
  recipient: { typeOf: seller.typeOf, name: seller.name, id: seller.id, project: seller.project },
43
43
  object: {
44
44
  typeOf: client.factory.service.paymentService.PaymentServiceType.MovieTicket,
45
+ id: '',
45
46
  paymentMethod: {
46
47
  typeOf: paymentMethodType,
47
48
  amount: 0,
@@ -43,6 +43,7 @@ async function main() {
43
43
  recipient: { typeOf: seller.typeOf, name: seller.name, id: seller.id, project: seller.project },
44
44
  object: {
45
45
  typeOf: client.factory.service.paymentService.PaymentServiceType.MovieTicket,
46
+ id: '',
46
47
  paymentMethod: {
47
48
  typeOf: paymentMethodType,
48
49
  amount: 0,
@@ -42,6 +42,7 @@ async function main() {
42
42
  recipient: { typeOf: seller.typeOf, name: seller.name, id: seller.id, project: seller.project },
43
43
  object: {
44
44
  typeOf: client.factory.service.paymentService.PaymentServiceType.CreditCard,
45
+ id: '',
45
46
  paymentMethod: {
46
47
  typeOf: paymentMethodType,
47
48
  amount: 10,
@@ -0,0 +1,48 @@
1
+ // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
+ import * as httpStatus from 'http-status';
3
+
4
+ import * as client from '../../../lib/index';
5
+
6
+ const auth = new client.auth.ClientCredentials({
7
+ domain: <string>process.env.ST_AUTHORIZE_SERVER_DOMAIN,
8
+ clientId: <string>process.env.ST_CLIENT_ID,
9
+ clientSecret: <string>process.env.ST_CLIENT_SECRET,
10
+ scopes: [],
11
+ state: 'teststate'
12
+ });
13
+
14
+ const sellerService = new client.service.Seller({
15
+ endpoint: <string>process.env.ST_API_ENDPOINT,
16
+ auth: auth
17
+ });
18
+
19
+ const eventId = '220406001001010900';
20
+
21
+ // tslint:disable-next-line:max-func-body-length
22
+ async function main() {
23
+ console.log('座席を検索しています...');
24
+ const searchResult = await sellerService.fetch({
25
+ uri: `/events/ScreeningEvent/${eventId}/seats`,
26
+ method: 'GET',
27
+ qs: {
28
+ limit: 10
29
+ },
30
+ expectedStatusCodes: [httpStatus.OK]
31
+ })
32
+ .then(async (response) => {
33
+ return {
34
+ data: await response.json()
35
+ };
36
+ });
37
+ console.log(searchResult.data);
38
+ console.log(searchResult.data.length);
39
+ console.log(searchResult.data[0]?.offers);
40
+ }
41
+
42
+ main()
43
+ .then(() => {
44
+ console.log('main processed.');
45
+ })
46
+ .catch((err) => {
47
+ console.error(err);
48
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.49.0",
3
+ "version": "3.50.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -97,7 +97,7 @@
97
97
  "watchify": "^3.11.1"
98
98
  },
99
99
  "dependencies": {
100
- "@cinerino/api-abstract-client": "3.49.0",
100
+ "@cinerino/api-abstract-client": "3.50.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",