@cinerino/sdk 12.13.0-alpha.8 → 12.13.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/src/chevre/admin/adminEntranceGates.ts +73 -0
- package/example/src/chevre/admin/adminEventSeries.ts +16 -6
- package/example/src/chevre/admin/adminFindEvents.ts +9 -6
- package/example/src/chevre/admin/adminRooms.ts +54 -0
- package/example/src/chevre/admin/adminSeatSections.ts +52 -0
- package/example/src/chevre/admin/deleteSeats.ts +52 -0
- package/example/src/chevre/admin/findRooms.ts +45 -0
- package/example/src/chevre/default/findMovieTheaters.ts +44 -0
- package/example/src/cloud/admin/adminEventsByIdentifier.ts +39 -26
- package/example/src/cloud/transaction/processPlaceOrder4ttts.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderCOAEventByCreditCard.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderCOAEventByMovieTicket.ts +1 -1
- package/example/src/{searchHasPOS.ts → findMovieTheaters.ts} +11 -11
- package/example/src/st/v2/findMovieTheaters.ts +51 -0
- package/lib/abstract/chevre/place.d.ts +14 -0
- package/lib/abstract/chevre/place.js +21 -0
- package/lib/abstract/chevreAdmin/eventSeries.d.ts +1 -1
- package/lib/abstract/chevreAdmin/movieTheater.d.ts +63 -0
- package/lib/abstract/chevreAdmin/movieTheater.js +170 -0
- package/lib/abstract/chevreAdmin/room.d.ts +42 -0
- package/lib/abstract/chevreAdmin/room.js +117 -0
- package/lib/abstract/chevreAdmin/seat.d.ts +26 -1
- package/lib/abstract/chevreAdmin/seat.js +66 -1
- package/lib/abstract/chevreAdmin/seatSection.d.ts +43 -0
- package/lib/abstract/chevreAdmin/seatSection.js +117 -0
- package/lib/abstract/chevreAdmin.d.ts +39 -0
- package/lib/abstract/chevreAdmin.js +72 -0
- package/lib/abstract/chevreConsole/aggregateReservation.d.ts +1 -2
- package/lib/abstract/chevreConsole/creativeWork.d.ts +0 -7
- package/lib/abstract/chevreConsole/creativeWork.js +26 -19
- package/lib/abstract/chevreConsole/eventSeries.d.ts +0 -22
- package/lib/abstract/chevreConsole/eventSeries.js +0 -20
- package/lib/abstract/chevreConsole/place.d.ts +27 -69
- package/lib/abstract/chevreConsole/place.js +254 -236
- package/lib/abstract/cinerino/service/event.d.ts +7 -3
- package/lib/abstract/cinerino/service/event.js +0 -1
- package/lib/abstract/cinerino/service/seller.d.ts +5 -1
- package/lib/abstract/cinerino/service/seller.js +11 -0
- package/lib/abstract/service.d.ts +3 -1
- package/lib/abstract/service.js +4 -2
- package/lib/bundle.js +1615 -1026
- package/package.json +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
+
import * as client from '../../../../lib/index';
|
|
4
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
// import { auth } from '../../auth/clientCredentials';
|
|
6
|
+
|
|
7
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
8
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
9
|
+
// const SELLER_ID = 'x';
|
|
10
|
+
const movieTheaterId = '5bfb841d5a78d7948369979a';
|
|
11
|
+
// const movieTheaterId = '69570e0390234418ce0a4a45';
|
|
12
|
+
const identifier = 'sampleGate';
|
|
13
|
+
|
|
14
|
+
// tslint:disable-next-line:max-func-body-length
|
|
15
|
+
async function main() {
|
|
16
|
+
const authClient = await auth.login();
|
|
17
|
+
await authClient.refreshAccessToken();
|
|
18
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
19
|
+
console.log('username is', loginTicket.getUsername());
|
|
20
|
+
|
|
21
|
+
const movieTheaterService = await (await client.loadChevreAdmin({
|
|
22
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
23
|
+
auth: authClient
|
|
24
|
+
// auth: await auth()
|
|
25
|
+
})).createMovieTheaterInstance({
|
|
26
|
+
project: { id: PROJECT_ID },
|
|
27
|
+
seller: { id: SELLER_ID }
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
let gates = await movieTheaterService.findEntranceGates({
|
|
31
|
+
movieTheaterId,
|
|
32
|
+
limit: 10,
|
|
33
|
+
page: 1
|
|
34
|
+
});
|
|
35
|
+
console.log(gates);
|
|
36
|
+
|
|
37
|
+
let result = await movieTheaterService.upsertEntranceGatesByIdentifier(
|
|
38
|
+
[
|
|
39
|
+
{ identifier, name: { ja: 'sampleName' } }
|
|
40
|
+
// { identifier, name: { ja: 'sampleName' } }
|
|
41
|
+
],
|
|
42
|
+
{ movieTheaterId }
|
|
43
|
+
);
|
|
44
|
+
console.log('upserted.', result);
|
|
45
|
+
|
|
46
|
+
gates = await movieTheaterService.findEntranceGates({
|
|
47
|
+
movieTheaterId,
|
|
48
|
+
limit: 10,
|
|
49
|
+
page: 1
|
|
50
|
+
});
|
|
51
|
+
console.log(gates);
|
|
52
|
+
|
|
53
|
+
result = await movieTheaterService.deleteEntranceGatesByIdentifier(
|
|
54
|
+
[
|
|
55
|
+
{ identifier }
|
|
56
|
+
],
|
|
57
|
+
{ movieTheaterId }
|
|
58
|
+
);
|
|
59
|
+
console.log('deleted.', result);
|
|
60
|
+
|
|
61
|
+
gates = await movieTheaterService.findEntranceGates({
|
|
62
|
+
movieTheaterId,
|
|
63
|
+
limit: 10,
|
|
64
|
+
page: 1
|
|
65
|
+
});
|
|
66
|
+
console.log(gates);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
main()
|
|
70
|
+
.then(() => {
|
|
71
|
+
console.log('success!');
|
|
72
|
+
})
|
|
73
|
+
.catch(console.error);
|
|
@@ -17,14 +17,17 @@ async function main() {
|
|
|
17
17
|
auth: authClient
|
|
18
18
|
})).createEventSeriesInstance({
|
|
19
19
|
project,
|
|
20
|
-
seller: { id: '' }
|
|
20
|
+
seller: { id: '59d20831e53ebc2b4e774466' }
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
await adminEventSeriesService.upsertByVersion([
|
|
24
24
|
{
|
|
25
25
|
eventStatus: factory.eventStatusType.EventScheduled,
|
|
26
26
|
videoFormat: [
|
|
27
|
-
|
|
27
|
+
{ typeOf: '2D' }
|
|
28
|
+
// { typeOf: '2Ds' },
|
|
29
|
+
// { typeOf: '2D' },
|
|
30
|
+
// { typeOf: '2Dx' }
|
|
28
31
|
],
|
|
29
32
|
kanaName: '',
|
|
30
33
|
startDate: moment('2023-12-09T12:00:00Z')
|
|
@@ -47,22 +50,29 @@ async function main() {
|
|
|
47
50
|
},
|
|
48
51
|
{
|
|
49
52
|
eventStatus: factory.eventStatusType.EventScheduled,
|
|
50
|
-
videoFormat: [
|
|
53
|
+
videoFormat: [
|
|
54
|
+
// { typeOf: '2D' },
|
|
55
|
+
// { typeOf: '2Ds' },
|
|
56
|
+
// { typeOf: '2D' },
|
|
57
|
+
// { typeOf: '2Dx' }
|
|
58
|
+
],
|
|
51
59
|
kanaName: '',
|
|
52
60
|
startDate: moment('2023-12-09T12:00:00Z')
|
|
53
61
|
.toDate(),
|
|
54
62
|
endDate: moment('2024-12-09T15:00:00Z')
|
|
55
63
|
.toDate(),
|
|
56
64
|
typeOf: factory.eventType.ScreeningEventSeries,
|
|
57
|
-
duration: '
|
|
65
|
+
duration: 'PT2H',
|
|
58
66
|
name: { ja: 'name by sample', en: 'name by sample' },
|
|
59
|
-
additionalProperty: [
|
|
67
|
+
additionalProperty: [
|
|
68
|
+
// { name: 'sortNumber', value: '' }
|
|
69
|
+
],
|
|
60
70
|
location: {
|
|
61
71
|
id: '5bfb841d5a78d7948369979a'
|
|
62
72
|
},
|
|
63
73
|
workPerformed: {
|
|
64
74
|
identifier: '071953',
|
|
65
|
-
version: '
|
|
75
|
+
version: '3'
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
]);
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
// tslint:disable:no-console
|
|
2
2
|
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
3
|
import * as client from '../../../../lib/index';
|
|
4
|
-
import * as auth from '../../auth/authAsAdmin';
|
|
4
|
+
// import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
import { auth } from '../../auth/clientCredentials';
|
|
5
6
|
|
|
6
7
|
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
7
8
|
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
9
|
+
// const SELLER_ID = 'x';
|
|
8
10
|
|
|
9
11
|
// tslint:disable-next-line:max-func-body-length
|
|
10
12
|
async function main() {
|
|
11
|
-
const authClient = await auth.login();
|
|
12
|
-
await authClient.refreshAccessToken();
|
|
13
|
-
const loginTicket = authClient.verifyIdToken({});
|
|
14
|
-
console.log('username is', loginTicket.getUsername());
|
|
13
|
+
// const authClient = await auth.login();
|
|
14
|
+
// await authClient.refreshAccessToken();
|
|
15
|
+
// const loginTicket = authClient.verifyIdToken({});
|
|
16
|
+
// console.log('username is', loginTicket.getUsername());
|
|
15
17
|
|
|
16
18
|
const eventService = await (await client.loadChevreAdmin({
|
|
17
19
|
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
18
|
-
auth: authClient
|
|
20
|
+
// auth: authClient
|
|
21
|
+
auth: await auth()
|
|
19
22
|
})).createEventInstance({
|
|
20
23
|
project: { id: PROJECT_ID },
|
|
21
24
|
seller: { id: SELLER_ID }
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
+
import * as client from '../../../../lib/index';
|
|
4
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
// import { auth } from '../../auth/clientCredentials';
|
|
6
|
+
|
|
7
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
8
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
9
|
+
// const SELLER_ID = 'x';
|
|
10
|
+
const movieTheaterId = '5bfb841d5a78d7948369979a';
|
|
11
|
+
// const movieTheaterId = '69570e0390234418ce0a4a45';
|
|
12
|
+
const branchCode = 'SAMPLE';
|
|
13
|
+
|
|
14
|
+
// tslint:disable-next-line:max-func-body-length
|
|
15
|
+
async function main() {
|
|
16
|
+
const authClient = await auth.login();
|
|
17
|
+
await authClient.refreshAccessToken();
|
|
18
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
19
|
+
console.log('username is', loginTicket.getUsername());
|
|
20
|
+
|
|
21
|
+
const adminRoomService = await (await client.loadChevreAdmin({
|
|
22
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
23
|
+
auth: authClient
|
|
24
|
+
// auth: await auth()
|
|
25
|
+
})).createRoomInstance({
|
|
26
|
+
project: { id: PROJECT_ID },
|
|
27
|
+
seller: { id: SELLER_ID }
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const result = await adminRoomService.upsertRoomsByBranchCode(
|
|
31
|
+
[
|
|
32
|
+
{
|
|
33
|
+
branchCode,
|
|
34
|
+
name: { ja: 'sampleNameJa', en: 'sampleNameEn' },
|
|
35
|
+
address: { ja: 'sampleAddressJa', en: 'sampleAddressEn' },
|
|
36
|
+
additionalProperty: [],
|
|
37
|
+
// additionalProperty: [
|
|
38
|
+
// { name: 'seatSelectImage', value: '' },
|
|
39
|
+
// { name: 'seatingChartURL', value: '' },
|
|
40
|
+
// { name: 'seatSelectImage', value: '' }
|
|
41
|
+
// ],
|
|
42
|
+
openSeatingAllowed: true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
{ movieTheaterId }
|
|
46
|
+
);
|
|
47
|
+
console.log('upserted.', result);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
main()
|
|
51
|
+
.then(() => {
|
|
52
|
+
console.log('success!');
|
|
53
|
+
})
|
|
54
|
+
.catch(console.error);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
+
import * as client from '../../../../lib/index';
|
|
4
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
// import { auth } from '../../auth/clientCredentials';
|
|
6
|
+
|
|
7
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
8
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
9
|
+
// const SELLER_ID = 'x';
|
|
10
|
+
const movieTheaterId = '5bfb841d5a78d7948369979a';
|
|
11
|
+
// const movieTheaterId = '69570e0390234418ce0a4a45';
|
|
12
|
+
const roomCode = '10';
|
|
13
|
+
const branchCode = 'SAMPLE';
|
|
14
|
+
|
|
15
|
+
// tslint:disable-next-line:max-func-body-length
|
|
16
|
+
async function main() {
|
|
17
|
+
const authClient = await auth.login();
|
|
18
|
+
await authClient.refreshAccessToken();
|
|
19
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
20
|
+
console.log('username is', loginTicket.getUsername());
|
|
21
|
+
|
|
22
|
+
const adminSeatSectionService = await (await client.loadChevreAdmin({
|
|
23
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
24
|
+
auth: authClient
|
|
25
|
+
// auth: await auth()
|
|
26
|
+
})).createSeatSectionInstance({
|
|
27
|
+
project: { id: PROJECT_ID },
|
|
28
|
+
seller: { id: SELLER_ID }
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const result = await adminSeatSectionService.upsertSeatSectionsByBranchCode(
|
|
32
|
+
[
|
|
33
|
+
{
|
|
34
|
+
branchCode,
|
|
35
|
+
name: { ja: 'sectionNameJa', en: 'sampleNameEn' },
|
|
36
|
+
additionalProperty: []
|
|
37
|
+
// additionalProperty: [
|
|
38
|
+
// { name: 'testtest', value: '' }
|
|
39
|
+
// { name: 'seatSelectImage', value: '' }
|
|
40
|
+
// ]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
{ movieTheaterId, roomCode }
|
|
44
|
+
);
|
|
45
|
+
console.log('upserted.', result);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
main()
|
|
49
|
+
.then(() => {
|
|
50
|
+
console.log('success!');
|
|
51
|
+
})
|
|
52
|
+
.catch(console.error);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
+
import * as client from '../../../../lib/index';
|
|
4
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
// import { auth } from '../../auth/clientCredentials';
|
|
6
|
+
|
|
7
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
8
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
9
|
+
// const SELLER_ID = 'x';
|
|
10
|
+
|
|
11
|
+
// tslint:disable-next-line:max-func-body-length
|
|
12
|
+
async function main() {
|
|
13
|
+
const authClient = await auth.login();
|
|
14
|
+
await authClient.refreshAccessToken();
|
|
15
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
16
|
+
console.log('username is', loginTicket.getUsername());
|
|
17
|
+
|
|
18
|
+
const seatService = await (await client.loadChevreAdmin({
|
|
19
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
20
|
+
auth: authClient
|
|
21
|
+
// auth: await auth()
|
|
22
|
+
})).createSeatInstance({
|
|
23
|
+
project: { id: PROJECT_ID },
|
|
24
|
+
seller: { id: SELLER_ID }
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const result = await seatService.deleteSeatsByBranchCode(
|
|
28
|
+
[
|
|
29
|
+
{ branchCode: '10' },
|
|
30
|
+
{ branchCode: '20' },
|
|
31
|
+
{ branchCode: 'A-4' },
|
|
32
|
+
{ branchCode: 'xxx' },
|
|
33
|
+
{ branchCode: 'xxx' },
|
|
34
|
+
{ branchCode: 'xxx' },
|
|
35
|
+
{ branchCode: 'xxx' },
|
|
36
|
+
{ branchCode: 'xxx' }
|
|
37
|
+
],
|
|
38
|
+
{
|
|
39
|
+
movieTheaterId: '5bfb841d5a78d7948369979a',
|
|
40
|
+
movieTheaterCode: '',
|
|
41
|
+
roomCode: '10',
|
|
42
|
+
sectionCode: 'Default02'
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
console.log(result);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
main()
|
|
49
|
+
.then(() => {
|
|
50
|
+
console.log('success!');
|
|
51
|
+
})
|
|
52
|
+
.catch(console.error);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
+
import * as client from '../../../../lib/index';
|
|
4
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
// import { auth } from '../../auth/clientCredentials';
|
|
6
|
+
|
|
7
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
8
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
9
|
+
// const SELLER_ID = 'x';
|
|
10
|
+
|
|
11
|
+
// tslint:disable-next-line:max-func-body-length
|
|
12
|
+
async function main() {
|
|
13
|
+
const authClient = await auth.login();
|
|
14
|
+
await authClient.refreshAccessToken();
|
|
15
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
16
|
+
console.log('username is', loginTicket.getUsername());
|
|
17
|
+
|
|
18
|
+
const roomService = await (await client.loadChevreAdmin({
|
|
19
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
20
|
+
auth: authClient
|
|
21
|
+
// auth: await auth()
|
|
22
|
+
})).createRoomInstance({
|
|
23
|
+
project: { id: PROJECT_ID },
|
|
24
|
+
seller: { id: SELLER_ID }
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const gates = await roomService.findRooms({
|
|
28
|
+
movieTheaterId: '5bfb841d5a78d7948369979a',
|
|
29
|
+
limit: 20,
|
|
30
|
+
page: 1,
|
|
31
|
+
// branchCode: '10',
|
|
32
|
+
branchCodes: ['10', '20']
|
|
33
|
+
// branchCodeContains: '*',
|
|
34
|
+
// nameContains: '2',
|
|
35
|
+
// openSeatingAllowed: true,
|
|
36
|
+
// additionalPropertyName: ''
|
|
37
|
+
});
|
|
38
|
+
console.log(gates);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
main()
|
|
42
|
+
.then(() => {
|
|
43
|
+
console.log('success!');
|
|
44
|
+
})
|
|
45
|
+
.catch(console.error);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console
|
|
2
|
+
import * as client 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 client.auth.ClientCredentials.createInstance({
|
|
9
|
+
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
10
|
+
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
11
|
+
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
12
|
+
scopes: [],
|
|
13
|
+
state: ''
|
|
14
|
+
});
|
|
15
|
+
// const authClient = await auth.login();
|
|
16
|
+
// await authClient.refreshAccessToken();
|
|
17
|
+
// const loginTicket = authClient.verifyIdToken({});
|
|
18
|
+
// console.log('username is', loginTicket.getUsername());
|
|
19
|
+
|
|
20
|
+
const chevre = await client.loadChevre({
|
|
21
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
22
|
+
auth: authClient
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const placeService = await chevre.createPlaceInstance({
|
|
26
|
+
project: { id: PROJECT_ID },
|
|
27
|
+
seller: { id: '' }
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const result = await placeService.findMovieTheaters({
|
|
31
|
+
page: 1,
|
|
32
|
+
limit: 20
|
|
33
|
+
// id: '5bfb841d5a78d7948369979a'
|
|
34
|
+
// branchCode: '118'
|
|
35
|
+
});
|
|
36
|
+
console.log(result);
|
|
37
|
+
console.log(result.length, 'docs returned');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
main()
|
|
41
|
+
.then(() => {
|
|
42
|
+
console.log('success!');
|
|
43
|
+
})
|
|
44
|
+
.catch(console.error);
|
|
@@ -99,32 +99,45 @@ async function main() {
|
|
|
99
99
|
);
|
|
100
100
|
console.log('created.');
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
102
|
+
await adminEventService.updateEventsByIdentifier(
|
|
103
|
+
[
|
|
104
|
+
{
|
|
105
|
+
identifier,
|
|
106
|
+
doorTime: startDate,
|
|
107
|
+
startDate,
|
|
108
|
+
endDate,
|
|
109
|
+
// eventStatus: client.factory.eventStatusType.EventCancelled,
|
|
110
|
+
eventStatus: client.factory.eventStatusType.EventScheduled,
|
|
111
|
+
additionalProperty: [
|
|
112
|
+
{
|
|
113
|
+
name: ADDITIONAL_PROPERTY_NAME,
|
|
114
|
+
value: `update fromSamples:${moment()
|
|
115
|
+
.format('YYYY-MM-DD HH:mm')}`
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
offers: {
|
|
119
|
+
eligibleQuantity: { maxValue: 6 },
|
|
120
|
+
itemOffered: { id: EVENT_SERVICE_ID },
|
|
121
|
+
seller: {
|
|
122
|
+
makesOffer: [
|
|
123
|
+
{
|
|
124
|
+
typeOf: client.factory.offerType.Offer,
|
|
125
|
+
availableAtOrFrom: { id: AVAILABLE_AT_OR_FROM_ID },
|
|
126
|
+
availabilityStarts: validFrom,
|
|
127
|
+
availabilityEnds: validThrough,
|
|
128
|
+
validFrom,
|
|
129
|
+
validThrough
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
{
|
|
137
|
+
typeOf: client.factory.eventType.ScreeningEvent
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
console.log('updated.');
|
|
128
141
|
|
|
129
142
|
// イベントを検索する場合
|
|
130
143
|
const events = await adminEventService.findEvents({
|
|
@@ -136,7 +136,7 @@ type IAuthorizeReservationAction = Pick<client.factory.action.authorize.offer.ev
|
|
|
136
136
|
|
|
137
137
|
// tslint:disable-next-line:max-func-body-length
|
|
138
138
|
async function authorizeSeatReservationByEvent(params: {
|
|
139
|
-
event: Omit<client.factory.event.screeningEvent.IEvent, 'offers'>;
|
|
139
|
+
event: Omit<client.factory.event.screeningEvent.IEvent, 'offers' | 'superEvent'>;
|
|
140
140
|
transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
141
141
|
}): Promise<{
|
|
142
142
|
price: number;
|
|
@@ -221,7 +221,7 @@ async function main() {
|
|
|
221
221
|
|
|
222
222
|
// tslint:disable-next-line:max-func-body-length
|
|
223
223
|
async function authorizeSeatReservationByEvent(params: {
|
|
224
|
-
event: Omit<client.factory.event.screeningEvent.IEvent, 'offers'>;
|
|
224
|
+
event: Omit<client.factory.event.screeningEvent.IEvent, 'offers' | 'superEvent'>;
|
|
225
225
|
transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
226
226
|
}): Promise<{ price?: number }> {
|
|
227
227
|
const placeOrderService = await (await client.loadCloudTxc({
|
|
@@ -218,7 +218,7 @@ async function main() {
|
|
|
218
218
|
|
|
219
219
|
// tslint:disable-next-line:max-func-body-length
|
|
220
220
|
async function authorizeSeatReservationByEvent(params: {
|
|
221
|
-
event: Omit<client.factory.event.screeningEvent.IEvent, 'offers'>;
|
|
221
|
+
event: Omit<client.factory.event.screeningEvent.IEvent, 'offers' | 'superEvent'>;
|
|
222
222
|
transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
223
223
|
}): Promise<{ price?: number }> {
|
|
224
224
|
const placeOrderService = await (await client.loadCloudTxc({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// tslint:disable:no-console
|
|
2
2
|
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
3
|
import * as client from '../../lib/index';
|
|
4
|
+
// import * as auth from './auth/authAsAdmin';
|
|
4
5
|
|
|
5
6
|
const project = { id: String(process.env.PROJECT_ID) };
|
|
6
7
|
|
|
@@ -12,24 +13,23 @@ async function main() {
|
|
|
12
13
|
scopes: [],
|
|
13
14
|
state: ''
|
|
14
15
|
});
|
|
16
|
+
// const authClient = await auth.login();
|
|
17
|
+
// const loginTicket = authClient.verifyIdToken({});
|
|
18
|
+
// console.log('username is', loginTicket.getUsername());
|
|
15
19
|
|
|
16
|
-
const
|
|
20
|
+
const placeService = new (await client.loadService()).Place({
|
|
17
21
|
endpoint: <string>process.env.API_ENDPOINT,
|
|
18
22
|
auth: authClient,
|
|
19
23
|
project: { id: project.id },
|
|
20
|
-
seller: { id: '' }
|
|
24
|
+
seller: { id: '59d20831e53ebc2b4e774466' }
|
|
21
25
|
});
|
|
22
26
|
|
|
23
|
-
const result = await
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
limit: 10,
|
|
27
|
-
page: 1
|
|
28
|
-
// branchCode: { $eq: '001' }
|
|
29
|
-
}
|
|
27
|
+
const result = await placeService.searchMovieTheaters({
|
|
28
|
+
limit: 10,
|
|
29
|
+
page: 1
|
|
30
30
|
});
|
|
31
|
-
console.log(result);
|
|
32
|
-
console.log(result.length);
|
|
31
|
+
console.log(result.data.map(({ branchCode, hasEntranceGate }) => ({ branchCode, hasEntranceGate })));
|
|
32
|
+
console.log(result.data.length);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
main()
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// tslint:disable:no-console no-implicit-dependencies no-magic-numbers
|
|
2
|
+
import * as httpStatus from 'http-status';
|
|
3
|
+
import * as moment from 'moment';
|
|
4
|
+
|
|
5
|
+
import * as client from '../../../../lib/index';
|
|
6
|
+
|
|
7
|
+
// tslint:disable-next-line:max-func-body-length
|
|
8
|
+
async function main() {
|
|
9
|
+
const auth = await client.auth.ClientCredentials.createInstance({
|
|
10
|
+
domain: <string>process.env.ST_AUTHORIZE_SERVER_DOMAIN,
|
|
11
|
+
clientId: <string>process.env.ST_CLIENT_ID,
|
|
12
|
+
clientSecret: <string>process.env.ST_CLIENT_SECRET,
|
|
13
|
+
scopes: [],
|
|
14
|
+
state: 'teststate'
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const sellerService = new (await client.loadService()).Seller({
|
|
18
|
+
endpoint: <string>process.env.ST_API_V2_ENDPOINT,
|
|
19
|
+
auth: auth,
|
|
20
|
+
project: { id: '' }
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
console.log('イベントを検索しています...');
|
|
24
|
+
const searchResult = await sellerService.fetch({
|
|
25
|
+
uri: '/place/searchMovieTheaters',
|
|
26
|
+
method: 'GET',
|
|
27
|
+
qs: {
|
|
28
|
+
limit: 10,
|
|
29
|
+
ids: 'bm2bfj55o',
|
|
30
|
+
startFrom: new Date(),
|
|
31
|
+
startThrough: moment()
|
|
32
|
+
.add(1, 'days')
|
|
33
|
+
.toDate(),
|
|
34
|
+
sellerId: '59d20831e53ebc2b4e774466'
|
|
35
|
+
// clientId: 'xx'
|
|
36
|
+
},
|
|
37
|
+
expectedStatusCodes: [httpStatus.OK]
|
|
38
|
+
})
|
|
39
|
+
.then(async (response) => response.json());
|
|
40
|
+
// tslint:disable-next-line:no-null-keyword
|
|
41
|
+
console.dir(searchResult, { depth: null });
|
|
42
|
+
console.log(searchResult.length);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
main()
|
|
46
|
+
.then(() => {
|
|
47
|
+
console.log('main processed.');
|
|
48
|
+
})
|
|
49
|
+
.catch((err) => {
|
|
50
|
+
console.error(err);
|
|
51
|
+
});
|
|
@@ -4,16 +4,29 @@ export declare type IScreeningRoom = Omit<factory.place.screeningRoom.IPlace, 'c
|
|
|
4
4
|
export declare type IScreeningRoomSection = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace' | 'parentOrganization'>;
|
|
5
5
|
export declare type ISeat = Omit<factory.place.seat.IPlace, 'parentOrganization'>;
|
|
6
6
|
export declare type IMovieTheater = Pick<factory.place.movieTheater.IPlace, 'typeOf' | 'additionalProperty' | 'branchCode' | 'hasEntranceGate' | 'id' | 'kanaName' | 'name' | 'offers' | 'parentOrganization' | 'telephone' | 'project'>;
|
|
7
|
+
interface IFindMovieTheaterParams {
|
|
8
|
+
limit: number;
|
|
9
|
+
page: number;
|
|
10
|
+
id?: string;
|
|
11
|
+
branchCode?: string;
|
|
12
|
+
}
|
|
13
|
+
declare type IMovieTheaterAsFindResult = Pick<factory.place.movieTheater.IPlace, 'additionalProperty' | 'branchCode' | 'id' | 'kanaName' | 'name' | 'parentOrganization' | 'telephone' | 'url'>;
|
|
7
14
|
/**
|
|
8
15
|
* 施設サービス
|
|
9
16
|
*/
|
|
10
17
|
export declare class PlaceService extends Service {
|
|
11
18
|
/**
|
|
12
19
|
* 施設検索
|
|
20
|
+
* @deprecated use findMovieTheaters
|
|
13
21
|
*/
|
|
14
22
|
searchMovieTheaters(params: Omit<factory.place.movieTheater.ISearchConditions, 'project'>): Promise<{
|
|
15
23
|
data: IMovieTheater[];
|
|
16
24
|
}>;
|
|
25
|
+
/**
|
|
26
|
+
* 施設検索
|
|
27
|
+
* 2026-01-03~
|
|
28
|
+
*/
|
|
29
|
+
findMovieTheaters(params: IFindMovieTheaterParams): Promise<IMovieTheaterAsFindResult[]>;
|
|
17
30
|
/**
|
|
18
31
|
* ルーム検索
|
|
19
32
|
*/
|
|
@@ -79,3 +92,4 @@ export declare class PlaceService extends Service {
|
|
|
79
92
|
data: factory.place.busStop.IPlace[];
|
|
80
93
|
}>;
|
|
81
94
|
}
|
|
95
|
+
export {};
|