@cinerino/sdk 11.0.0-alpha.5 → 11.0.0-alpha.6
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/searchEventSeries.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +19 -1
- package/example/src/st/{processPlaceOrderByPOS.ts → v1/processPlaceOrderByPOS.ts} +1 -1
- package/example/src/st/v1/searchEventSeats.ts +47 -0
- package/example/src/st/{searchEventSeries.ts → v1/searchEventSeries.ts} +1 -1
- package/example/src/st/{searchEvents.ts → v1/searchEvents.ts} +1 -1
- package/example/src/st/{searchMovies.ts → v1/searchMovies.ts} +1 -1
- package/example/src/st/{searchSellers.ts → v1/searchSellers.ts} +1 -1
- package/lib/abstract/chevreConsole/action.d.ts +3 -1
- package/package.json +1 -1
- package/example/src/st/searchEventSeats.ts +0 -49
|
@@ -203,7 +203,25 @@ async function main() {
|
|
|
203
203
|
|
|
204
204
|
console.log('confirming transaction...');
|
|
205
205
|
|
|
206
|
-
let confirmResult = await placeOrderService.confirmWithMiminalResponse({
|
|
206
|
+
let confirmResult = await placeOrderService.confirmWithMiminalResponse({
|
|
207
|
+
id: transaction.id,
|
|
208
|
+
sendEmailMessage: true,
|
|
209
|
+
potentialActions: {
|
|
210
|
+
order: {
|
|
211
|
+
potentialActions: {
|
|
212
|
+
sendOrder: {
|
|
213
|
+
potentialActions: {
|
|
214
|
+
sendEmailMessage: [
|
|
215
|
+
{
|
|
216
|
+
object: { template: '| Date/Time of T' }
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
});
|
|
207
225
|
console.log('transaction confirmed', confirmResult);
|
|
208
226
|
|
|
209
227
|
// 何度確定をコールしても冪等
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// tslint:disable:no-console no-implicit-dependencies no-magic-numbers
|
|
2
|
+
import * as client from '../../../../lib/index';
|
|
3
|
+
|
|
4
|
+
const eventId = 'cmcv6incg';
|
|
5
|
+
|
|
6
|
+
let auth: client.auth.ClientCredentials | undefined;
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
if (auth === undefined) {
|
|
10
|
+
auth = await client.auth.ClientCredentials.createInstance({
|
|
11
|
+
domain: <string>process.env.ST_AUTHORIZE_SERVER_DOMAIN,
|
|
12
|
+
clientId: <string>process.env.ST_CLIENT_ID,
|
|
13
|
+
clientSecret: <string>process.env.ST_CLIENT_SECRET,
|
|
14
|
+
scopes: [],
|
|
15
|
+
state: 'teststate'
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
console.log('座席を検索しています...');
|
|
20
|
+
const qs = new URLSearchParams({
|
|
21
|
+
limit: '10',
|
|
22
|
+
page: '1'
|
|
23
|
+
}).toString();
|
|
24
|
+
const response = await fetch(
|
|
25
|
+
`${<string>process.env.ST_API_ENDPOINT}/events/ScreeningEvent/${eventId}/seats?${qs}`, {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
headers: {
|
|
28
|
+
authorization: `Bearer ${await auth.getAccessToken()}`
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
});
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
console.dir(await response.json());
|
|
34
|
+
throw new Error('Network response was not ok');
|
|
35
|
+
}
|
|
36
|
+
const data = await response.json();
|
|
37
|
+
// tslint:disable-next-line:no-null-keyword
|
|
38
|
+
console.dir(data, { depth: null });
|
|
39
|
+
console.log(data.length, 'data found.');
|
|
40
|
+
}
|
|
41
|
+
main()
|
|
42
|
+
.then(() => {
|
|
43
|
+
console.log('main processed.');
|
|
44
|
+
})
|
|
45
|
+
.catch((err) => {
|
|
46
|
+
console.error(err);
|
|
47
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// tslint:disable:no-console no-implicit-dependencies no-magic-numbers
|
|
2
2
|
import * as moment from 'moment';
|
|
3
3
|
|
|
4
|
-
import * as client from '
|
|
4
|
+
import * as client from '../../../../lib/index';
|
|
5
5
|
|
|
6
6
|
let auth: client.auth.ClientCredentials | undefined;
|
|
7
7
|
|
|
@@ -8,7 +8,9 @@ export declare class ActionService extends Service {
|
|
|
8
8
|
/**
|
|
9
9
|
* アクション検索
|
|
10
10
|
*/
|
|
11
|
-
search<T extends factory.actionType>(params: factory.action.ISearchConditions
|
|
11
|
+
search<T extends factory.actionType>(params: Omit<factory.action.ISearchConditions, 'typeOf'> & {
|
|
12
|
+
typeOf?: factory.actionType;
|
|
13
|
+
}): Promise<ISearchResult<IAction<T>[]>>;
|
|
12
14
|
findById<T extends factory.actionType>(params: {
|
|
13
15
|
id: string;
|
|
14
16
|
typeOf: T;
|
package/package.json
CHANGED
|
@@ -1,49 +0,0 @@
|
|
|
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 eventId = '220406001001010900';
|
|
7
|
-
|
|
8
|
-
// tslint:disable-next-line:max-func-body-length
|
|
9
|
-
async function main() {
|
|
10
|
-
const auth = await client.auth.ClientCredentials.createInstance({
|
|
11
|
-
domain: <string>process.env.ST_AUTHORIZE_SERVER_DOMAIN,
|
|
12
|
-
clientId: <string>process.env.ST_CLIENT_ID,
|
|
13
|
-
clientSecret: <string>process.env.ST_CLIENT_SECRET,
|
|
14
|
-
scopes: [],
|
|
15
|
-
state: 'teststate'
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const sellerService = new (await client.loadService()).Seller({
|
|
19
|
-
endpoint: <string>process.env.ST_API_ENDPOINT,
|
|
20
|
-
auth: auth,
|
|
21
|
-
project: { id: '' }
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
console.log('座席を検索しています...');
|
|
25
|
-
const searchResult = await sellerService.fetch({
|
|
26
|
-
uri: `/events/ScreeningEvent/${eventId}/seats`,
|
|
27
|
-
method: 'GET',
|
|
28
|
-
qs: {
|
|
29
|
-
limit: 10
|
|
30
|
-
},
|
|
31
|
-
expectedStatusCodes: [httpStatus.OK]
|
|
32
|
-
})
|
|
33
|
-
.then(async (response) => {
|
|
34
|
-
return {
|
|
35
|
-
data: await response.json()
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
console.log(searchResult.data);
|
|
39
|
-
console.log(searchResult.data.length);
|
|
40
|
-
console.log(searchResult.data[0]?.offers);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
main()
|
|
44
|
-
.then(() => {
|
|
45
|
-
console.log('main processed.');
|
|
46
|
-
})
|
|
47
|
-
.catch((err) => {
|
|
48
|
-
console.error(err);
|
|
49
|
-
});
|