@cinerino/sdk 12.5.0-alpha.1 → 12.5.0-alpha.10
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/adminCreateNotesIfNotExistByIdentifier.ts +1 -1
- package/example/src/chevre/admin/findProducts.ts +48 -0
- package/example/src/chevre/default/findPublicNotes.ts +39 -0
- package/example/src/chevre/default/searchEvents.ts +1 -1
- package/example/src/cloud/admin/adminProductOffersByIdentifier.ts +4 -3
- package/example/src/cloud/transaction/processPlaceOrder4ttts.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +10 -6
- package/example/src/cloud/transaction/processPlaceOrderCOAEventByCreditCard.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderCOAEventByMovieTicket.ts +1 -1
- package/example/src/cloud/transaction/processPlaceOrderUsingMemberProgramTier.ts +1 -1
- package/lib/abstract/chevre/event.d.ts +11 -11
- package/lib/abstract/chevre/event.js +0 -1
- package/lib/abstract/chevre/eventSeries.d.ts +3 -3
- package/lib/abstract/chevre/note.d.ts +32 -0
- package/lib/abstract/chevre/note.js +87 -0
- package/lib/abstract/chevre/seller/factory.d.ts +0 -3
- package/lib/abstract/chevre/seller/factory.js +6 -0
- package/lib/abstract/chevre.d.ts +9 -0
- package/lib/abstract/chevre.js +20 -0
- package/lib/abstract/chevreAdmin/event.d.ts +5 -5
- package/lib/abstract/chevreAdmin/eventSeries.d.ts +1 -1
- package/lib/abstract/chevreAdmin/note.d.ts +4 -4
- package/lib/abstract/chevreAdmin/note.js +0 -17
- package/lib/abstract/chevreAdmin/product.d.ts +54 -2
- package/lib/abstract/chevreAdmin/product.js +25 -1
- package/lib/abstract/chevreAsset/order/factory.d.ts +4 -0
- package/lib/abstract/chevreConsole/aggregateReservation.d.ts +2 -2
- package/lib/abstract/chevreConsole/event/factory.d.ts +2 -2
- package/lib/abstract/chevreConsole/event.d.ts +14 -29
- package/lib/abstract/chevreConsole/event.js +0 -53
- package/lib/abstract/chevreConsole/eventSeries.d.ts +6 -6
- package/lib/abstract/chevreConsole/product.d.ts +23 -11
- package/lib/abstract/chevreConsole/product.js +13 -19
- package/lib/abstract/chevreConsole/seller/factory.d.ts +0 -3
- package/lib/abstract/chevreConsole/seller/factory.js +6 -0
- package/lib/abstract/chevreConsole/seller.d.ts +1 -39
- package/lib/abstract/chevreConsole/seller.js +64 -79
- package/lib/abstract/cinerino/service/event.d.ts +21 -24
- package/lib/abstract/cinerino/service/event.js +2 -2
- package/lib/abstract/cloud/admin/event.d.ts +2 -2
- package/lib/bundle.js +1010 -796
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ import * as auth from '../../auth/authAsAdmin';
|
|
|
5
5
|
|
|
6
6
|
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
7
7
|
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
8
|
-
const EVENT_SERVICE_ID = '
|
|
8
|
+
const EVENT_SERVICE_ID = 'xxx';
|
|
9
9
|
// const EVENT_SERVICE_ID = '656038908b1cd5ce629f5991';
|
|
10
10
|
|
|
11
11
|
// tslint:disable-next-line:max-func-body-length
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console no-magic-numbers
|
|
2
|
+
import * as client from '../../../../lib/';
|
|
3
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
4
|
+
|
|
5
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
6
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
const authClient = await auth.login();
|
|
10
|
+
await authClient.refreshAccessToken();
|
|
11
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
12
|
+
console.log('username is', loginTicket.getUsername());
|
|
13
|
+
|
|
14
|
+
const productService = await (await client.loadChevreAdmin({
|
|
15
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
16
|
+
auth: authClient
|
|
17
|
+
})).createProductInstance({
|
|
18
|
+
project: { id: PROJECT_ID },
|
|
19
|
+
seller: { id: SELLER_ID }
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const data = await productService.findProducts({
|
|
23
|
+
limit: 10,
|
|
24
|
+
page: 1,
|
|
25
|
+
typeOf: client.factory.product.ProductType.EventService,
|
|
26
|
+
// typeOfs: [client.factory.product.ProductType.EventService, client.factory.product.ProductType.Product],
|
|
27
|
+
sortByProductID: client.factory.sortType.Ascending
|
|
28
|
+
// id: '67fdca202e75a6d9af33d5c4'
|
|
29
|
+
// ids: ['67fdca202e75a6d9af33d5c4'],
|
|
30
|
+
// typeOf?: factory.product.ProductType;
|
|
31
|
+
// typeOfs?: factory.product.ProductType[];
|
|
32
|
+
// hasOfferCatalogId: '7iri37omad6t6ji',
|
|
33
|
+
// nameRegex: 'Free',
|
|
34
|
+
// productID: 'sampleFreeEventServiceBySub',
|
|
35
|
+
// productIDRegex: 'Free',
|
|
36
|
+
// serviceTypeCodeValue: '0001',
|
|
37
|
+
// serviceOutputAmountCurrency: 'Point',
|
|
38
|
+
// additionalPropertyName: 'te'
|
|
39
|
+
});
|
|
40
|
+
console.log(data);
|
|
41
|
+
console.log(data.length);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
main()
|
|
45
|
+
.then(() => {
|
|
46
|
+
console.log('main processed.');
|
|
47
|
+
})
|
|
48
|
+
.catch(console.error);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// tslint:disable:no-implicit-dependencies no-console
|
|
2
|
+
// import * as moment from 'moment';
|
|
3
|
+
|
|
4
|
+
import * as client from '../../../../lib/index';
|
|
5
|
+
|
|
6
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
const authClient = await client.auth.ClientCredentials.createInstance({
|
|
10
|
+
domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
|
|
11
|
+
clientId: <string>process.env.CHEVRE_CLIENT_ID,
|
|
12
|
+
clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
|
|
13
|
+
scopes: [],
|
|
14
|
+
state: ''
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const noteService = await (await client.loadChevre({
|
|
18
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
19
|
+
auth: authClient
|
|
20
|
+
})).createNoteInstance({
|
|
21
|
+
project: { id: PROJECT_ID },
|
|
22
|
+
seller: { id: '' }
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const result = await noteService.findPublicNotes({
|
|
26
|
+
page: 1,
|
|
27
|
+
limit: 10,
|
|
28
|
+
aboutTypeOf: client.factory.product.ProductType.EventService,
|
|
29
|
+
aboutIds: ['x', '656038908b1cd5ce629f5992']
|
|
30
|
+
});
|
|
31
|
+
console.log(result);
|
|
32
|
+
console.log(result.length, 'notes returned');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main()
|
|
36
|
+
.then(() => {
|
|
37
|
+
console.log('success!');
|
|
38
|
+
})
|
|
39
|
+
.catch(console.error);
|
|
@@ -49,7 +49,7 @@ async function main() {
|
|
|
49
49
|
diff = process.hrtime(startTime);
|
|
50
50
|
console.log(`creating service instance took ${diff[0]} seconds and ${diff[1]} nanoseconds.`);
|
|
51
51
|
|
|
52
|
-
const result = await eventService.projectFields
|
|
52
|
+
const result = await eventService.projectFields({
|
|
53
53
|
page: 1,
|
|
54
54
|
limit: 100,
|
|
55
55
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
@@ -24,8 +24,9 @@ async function main() {
|
|
|
24
24
|
const today = moment()
|
|
25
25
|
.tz('Asia/Tokyo')
|
|
26
26
|
.format('YYYY-MM-DD');
|
|
27
|
-
const identifier = '
|
|
27
|
+
const identifier = '2025101001';
|
|
28
28
|
const itemOfferedIdentifier = '2025093001itemOfferedIdentifier';
|
|
29
|
+
const tierIdentifier = 'silver';
|
|
29
30
|
await productOfferService.createValidForMemberTierByIdentifier(
|
|
30
31
|
[
|
|
31
32
|
{
|
|
@@ -34,7 +35,7 @@ async function main() {
|
|
|
34
35
|
.toDate(),
|
|
35
36
|
validThrough: moment(`${today}T14:00:00Z`)
|
|
36
37
|
.toDate(),
|
|
37
|
-
validForMemberTier: { identifier:
|
|
38
|
+
validForMemberTier: { identifier: tierIdentifier }
|
|
38
39
|
}
|
|
39
40
|
],
|
|
40
41
|
{
|
|
@@ -52,7 +53,7 @@ async function main() {
|
|
|
52
53
|
.toDate(),
|
|
53
54
|
validThrough: moment(`${today}T14:00:00Z`)
|
|
54
55
|
.toDate(),
|
|
55
|
-
validForMemberTier: { identifier:
|
|
56
|
+
validForMemberTier: { identifier: tierIdentifier }
|
|
56
57
|
}
|
|
57
58
|
],
|
|
58
59
|
{
|
|
@@ -68,7 +68,7 @@ async function main() {
|
|
|
68
68
|
console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
|
|
69
69
|
|
|
70
70
|
// イベント検索
|
|
71
|
-
const searchScreeningEventsResult = await eventService.search
|
|
71
|
+
const searchScreeningEventsResult = await eventService.search({
|
|
72
72
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
73
73
|
inSessionFrom: moment()
|
|
74
74
|
.toDate(),
|
|
@@ -5,12 +5,16 @@ import * as client from '../../../../lib/index';
|
|
|
5
5
|
import { auth } from '../../auth/clientCredentials';
|
|
6
6
|
|
|
7
7
|
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
-
const profile = {
|
|
8
|
+
const profile: client.factory.person.IProfile = {
|
|
9
9
|
email: <string>process.env.TEST_PROFILE_EMAIL,
|
|
10
|
-
givenName: 'Taro',
|
|
11
|
-
familyName: 'SDK',
|
|
12
|
-
name: 'Taro ☆ SDK',
|
|
13
|
-
telephone: '+819012345678'
|
|
10
|
+
givenName: 'Taro ##\n##\r##\n\n\n##\r\r\r##\r\n\r\n\r\n##',
|
|
11
|
+
familyName: 'SDK ##\n##\r##\n\n\n##',
|
|
12
|
+
name: 'Taro ☆ SDK ##\n##\r##\n\n\n##',
|
|
13
|
+
telephone: '+819012345678',
|
|
14
|
+
additionalProperty: [{ name: 'someCustomerPropertyName ##\n##\r##\n\n\n##', value: 'someCustomerPropertyValue ##\n##\r##\n\n\n##' }],
|
|
15
|
+
address: 'some address ##\n##\r##\n\n\n##',
|
|
16
|
+
age: 'some age ##\n##\r##\n\n\n##',
|
|
17
|
+
gender: 'some gendedr ##\n##\r##\n\n\n##'
|
|
14
18
|
};
|
|
15
19
|
const paymentMethodType = 'CreditCard3DS';
|
|
16
20
|
const paymentServiceId = '664d98376fb87922bd6a4e52';
|
|
@@ -66,7 +70,7 @@ async function main() {
|
|
|
66
70
|
console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
|
|
67
71
|
|
|
68
72
|
// イベント検索
|
|
69
|
-
const searchScreeningEventsResult = await eventService.search
|
|
73
|
+
const searchScreeningEventsResult = await eventService.search({
|
|
70
74
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
71
75
|
inSessionFrom: moment()
|
|
72
76
|
.toDate(),
|
|
@@ -65,7 +65,7 @@ async function main() {
|
|
|
65
65
|
console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
|
|
66
66
|
|
|
67
67
|
// イベント検索
|
|
68
|
-
const searchScreeningEventsResult = await eventService.search
|
|
68
|
+
const searchScreeningEventsResult = await eventService.search({
|
|
69
69
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
70
70
|
inSessionFrom: moment()
|
|
71
71
|
.toDate(),
|
|
@@ -69,7 +69,7 @@ async function main() {
|
|
|
69
69
|
console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
|
|
70
70
|
|
|
71
71
|
// イベント検索
|
|
72
|
-
const searchScreeningEventsResult = await eventService.search
|
|
72
|
+
const searchScreeningEventsResult = await eventService.search({
|
|
73
73
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
74
74
|
inSessionFrom: moment()
|
|
75
75
|
.toDate(),
|
|
@@ -66,7 +66,7 @@ async function main() {
|
|
|
66
66
|
console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
|
|
67
67
|
|
|
68
68
|
// イベント検索
|
|
69
|
-
const searchScreeningEventsResult = await eventService.search
|
|
69
|
+
const searchScreeningEventsResult = await eventService.search({
|
|
70
70
|
id: { $eq: EVENT_ID },
|
|
71
71
|
typeOf: client.factory.eventType.ScreeningEvent,
|
|
72
72
|
inSessionFrom: moment()
|
|
@@ -2,9 +2,9 @@ import type { ISearchWithReservationForIdResult } from '../chevreConsole/aggrega
|
|
|
2
2
|
import * as factory from '../factory';
|
|
3
3
|
import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, ISellerMakesOffer } from './event/factory';
|
|
4
4
|
import { Service } from '../service';
|
|
5
|
-
declare type IKeyOfProjection
|
|
6
|
-
declare type IProjection
|
|
7
|
-
[key in IKeyOfProjection
|
|
5
|
+
declare type IKeyOfProjection = keyof factory.event.screeningEvent.IEvent;
|
|
6
|
+
declare type IProjection = {
|
|
7
|
+
[key in IKeyOfProjection]?: 0;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* イベントサービス
|
|
@@ -13,19 +13,19 @@ export declare class EventService extends Service {
|
|
|
13
13
|
/**
|
|
14
14
|
* イベント検索
|
|
15
15
|
*/
|
|
16
|
-
projectFields
|
|
17
|
-
typeOf:
|
|
18
|
-
$projection?: IProjection
|
|
16
|
+
projectFields(params: Omit<factory.event.screeningEvent.ISearchConditions, 'project' | 'organizer'> & {
|
|
17
|
+
typeOf: factory.eventType.ScreeningEvent;
|
|
18
|
+
$projection?: IProjection;
|
|
19
19
|
$minimumProjection?: boolean;
|
|
20
20
|
/**
|
|
21
21
|
* offer.seller.makesOfferをアプリケーションIDでfilterする(max:2)
|
|
22
22
|
*/
|
|
23
23
|
sellerMakesOfferAvailableAtIn?: string[];
|
|
24
|
-
}): Promise<factory.event.IEvent
|
|
24
|
+
}): Promise<factory.event.screeningEvent.IEvent[]>;
|
|
25
25
|
/**
|
|
26
26
|
* イベント集計検索
|
|
27
27
|
*/
|
|
28
|
-
searchAggregations(params: Pick<factory.event.ISearchConditions
|
|
28
|
+
searchAggregations(params: Pick<factory.event.screeningEvent.ISearchConditions, 'page' | 'limit' | 'sort' | 'typeOf' | 'id' | 'startFrom' | 'startThrough'> & {
|
|
29
29
|
$projection?: {
|
|
30
30
|
aggregateEntranceGate?: 1;
|
|
31
31
|
aggregateOffer?: 1;
|
|
@@ -61,10 +61,10 @@ export declare class EventService extends Service {
|
|
|
61
61
|
/**
|
|
62
62
|
* イベント取得
|
|
63
63
|
*/
|
|
64
|
-
findById
|
|
64
|
+
findById(params: {
|
|
65
65
|
id: string;
|
|
66
|
-
typeOf:
|
|
67
|
-
}): Promise<factory.event.IEvent
|
|
66
|
+
typeOf: factory.eventType.ScreeningEvent;
|
|
67
|
+
}): Promise<factory.event.screeningEvent.IEvent>;
|
|
68
68
|
/**
|
|
69
69
|
* 興行オファー検索
|
|
70
70
|
*/
|
|
@@ -141,7 +141,6 @@ var EventService = /** @class */ (function (_super) {
|
|
|
141
141
|
return __generator(this, function (_a) {
|
|
142
142
|
id = params.id, typeOf = params.typeOf;
|
|
143
143
|
if (![
|
|
144
|
-
factory.eventType.Event,
|
|
145
144
|
factory.eventType.ScreeningEvent
|
|
146
145
|
].includes(typeOf)) {
|
|
147
146
|
throw new factory.errors.Argument('typeOf', 'invalid event type');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
|
-
declare type IKeyOfProjection = keyof factory.
|
|
3
|
+
declare type IKeyOfProjection = keyof factory.eventSeries.IEvent;
|
|
4
4
|
declare type IProjection = {
|
|
5
5
|
[key in IKeyOfProjection]?: 0;
|
|
6
6
|
};
|
|
@@ -8,9 +8,9 @@ declare type IProjection = {
|
|
|
8
8
|
* 施設コンテンツサービス
|
|
9
9
|
*/
|
|
10
10
|
export declare class EventSeriesService extends Service {
|
|
11
|
-
projectFields(params: Omit<factory.
|
|
11
|
+
projectFields(params: Omit<factory.eventSeries.ISearchConditions, 'project' | 'organizer'> & {
|
|
12
12
|
typeOf: factory.eventType.ScreeningEventSeries;
|
|
13
13
|
$projection?: IProjection;
|
|
14
|
-
}): Promise<factory.
|
|
14
|
+
}): Promise<factory.eventSeries.IEvent[]>;
|
|
15
15
|
}
|
|
16
16
|
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
declare type INoteDigitalDocument = factory.creativeWork.noteDigitalDocument.INoteDigitalDocument;
|
|
4
|
+
export interface IFindParams {
|
|
5
|
+
limit: number;
|
|
6
|
+
page: number;
|
|
7
|
+
/**
|
|
8
|
+
* 主題リソースタイプ
|
|
9
|
+
*/
|
|
10
|
+
aboutTypeOf: factory.product.ProductType.EventService;
|
|
11
|
+
/**
|
|
12
|
+
* 主題リソースIDリスト
|
|
13
|
+
* max: 10
|
|
14
|
+
*/
|
|
15
|
+
aboutIds?: string[];
|
|
16
|
+
/**
|
|
17
|
+
* メモ識別子リスト
|
|
18
|
+
* max: 10
|
|
19
|
+
*/
|
|
20
|
+
identifiers?: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare type INoteAsFindResult = Pick<INoteDigitalDocument, 'about' | 'id' | 'identifier' | 'text'>;
|
|
23
|
+
/**
|
|
24
|
+
* メモサービス
|
|
25
|
+
*/
|
|
26
|
+
export declare class NoteService extends Service {
|
|
27
|
+
/**
|
|
28
|
+
* 公開メモを検索する
|
|
29
|
+
*/
|
|
30
|
+
findPublicNotes(params: IFindParams): Promise<INoteAsFindResult[]>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.NoteService = void 0;
|
|
55
|
+
var http_status_1 = require("http-status");
|
|
56
|
+
var service_1 = require("../service");
|
|
57
|
+
var BASE_URI = '/creativeWorks/noteDigitalDocument';
|
|
58
|
+
/**
|
|
59
|
+
* メモサービス
|
|
60
|
+
*/
|
|
61
|
+
var NoteService = /** @class */ (function (_super) {
|
|
62
|
+
__extends(NoteService, _super);
|
|
63
|
+
function NoteService() {
|
|
64
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 公開メモを検索する
|
|
68
|
+
*/
|
|
69
|
+
NoteService.prototype.findPublicNotes = function (params) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
+
var _this = this;
|
|
72
|
+
return __generator(this, function (_a) {
|
|
73
|
+
return [2 /*return*/, this.fetch({
|
|
74
|
+
uri: BASE_URI,
|
|
75
|
+
method: 'GET',
|
|
76
|
+
qs: params,
|
|
77
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
78
|
+
})
|
|
79
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
80
|
+
return [2 /*return*/, response.json()];
|
|
81
|
+
}); }); })];
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
return NoteService;
|
|
86
|
+
}(service_1.Service));
|
|
87
|
+
exports.NoteService = NoteService;
|
|
@@ -10,6 +10,3 @@ export declare type IPaymentServiceByProvider = Pick<factory.service.paymentServ
|
|
|
10
10
|
*/
|
|
11
11
|
export declare type ISearchPaymentServiceConditions = Pick<factory.service.paymentService.ISearchConditions, 'limit' | 'page' | 'sort' | 'typeOf'>;
|
|
12
12
|
export declare type IPaymentAccepted = Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'additionalProperty' | 'color' | 'image' | 'name'>;
|
|
13
|
-
export declare type IMakesProductOffer = Pick<factory.product.IOffer, 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'> & {
|
|
14
|
-
itemOffered: Pick<factory.product.IProduct, 'id' | 'name' | 'typeOf'>;
|
|
15
|
-
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export type IMakesProductOffer = Pick<
|
|
4
|
+
// factory.product.IOffer,
|
|
5
|
+
// 'availabilityEnds' | 'availabilityStarts' | 'seller' | 'validFrom' | 'validThrough'
|
|
6
|
+
// > & {
|
|
7
|
+
// itemOffered: Pick<factory.product.IProduct, 'id' | 'name' | 'typeOf'>;
|
|
8
|
+
// };
|
package/lib/abstract/chevre.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { CreativeWorkService } from './chevre/creativeWork';
|
|
|
4
4
|
import type { EmailMessageService } from './chevre/emailMessage';
|
|
5
5
|
import type { EventService } from './chevre/event';
|
|
6
6
|
import type { EventSeriesService } from './chevre/eventSeries';
|
|
7
|
+
import type { NoteService } from './chevre/note';
|
|
7
8
|
import type { PaymentProductService } from './chevre/paymentService';
|
|
8
9
|
import type { PlaceService } from './chevre/place';
|
|
9
10
|
import type { HasPOSService } from './chevre/place/hasPOS';
|
|
@@ -48,6 +49,13 @@ export declare namespace service {
|
|
|
48
49
|
namespace EventSeries {
|
|
49
50
|
let svc: typeof EventSeriesService | undefined;
|
|
50
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* メモサービス
|
|
54
|
+
*/
|
|
55
|
+
type Note = NoteService;
|
|
56
|
+
namespace Note {
|
|
57
|
+
let svc: typeof NoteService | undefined;
|
|
58
|
+
}
|
|
51
59
|
/**
|
|
52
60
|
* 決済商品サービス
|
|
53
61
|
*/
|
|
@@ -111,6 +119,7 @@ export declare class Chevre {
|
|
|
111
119
|
createEmailMessageInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EmailMessageService>;
|
|
112
120
|
createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
|
|
113
121
|
createEventSeriesInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventSeriesService>;
|
|
122
|
+
createNoteInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<NoteService>;
|
|
114
123
|
createPaymentProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentProductService>;
|
|
115
124
|
createPlaceInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceService>;
|
|
116
125
|
createHasPOSInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<HasPOSService>;
|
package/lib/abstract/chevre.js
CHANGED
|
@@ -65,6 +65,9 @@ var service;
|
|
|
65
65
|
var EventSeries;
|
|
66
66
|
(function (EventSeries) {
|
|
67
67
|
})(EventSeries = service.EventSeries || (service.EventSeries = {}));
|
|
68
|
+
var Note;
|
|
69
|
+
(function (Note) {
|
|
70
|
+
})(Note = service.Note || (service.Note = {}));
|
|
68
71
|
var PaymentProduct;
|
|
69
72
|
(function (PaymentProduct) {
|
|
70
73
|
})(PaymentProduct = service.PaymentProduct || (service.PaymentProduct = {}));
|
|
@@ -182,6 +185,23 @@ var Chevre = /** @class */ (function () {
|
|
|
182
185
|
});
|
|
183
186
|
});
|
|
184
187
|
};
|
|
188
|
+
Chevre.prototype.createNoteInstance = function (params) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
+
var _a;
|
|
191
|
+
return __generator(this, function (_b) {
|
|
192
|
+
switch (_b.label) {
|
|
193
|
+
case 0:
|
|
194
|
+
if (!(service.Note.svc === undefined)) return [3 /*break*/, 2];
|
|
195
|
+
_a = service.Note;
|
|
196
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevre/note'); })];
|
|
197
|
+
case 1:
|
|
198
|
+
_a.svc = (_b.sent()).NoteService;
|
|
199
|
+
_b.label = 2;
|
|
200
|
+
case 2: return [2 /*return*/, new service.Note.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
};
|
|
185
205
|
Chevre.prototype.createPaymentProductInstance = function (params) {
|
|
186
206
|
return __awaiter(this, void 0, void 0, function () {
|
|
187
207
|
var _a;
|
|
@@ -3,13 +3,13 @@ import { Service } from '../service';
|
|
|
3
3
|
declare type ISendEmailMessageOnEventUpdated = Pick<factory.action.transfer.send.message.email.IAttributes, 'purpose' | 'recipient'> & {
|
|
4
4
|
object: factory.action.transfer.send.message.email.IObjectAsEmailMessage;
|
|
5
5
|
};
|
|
6
|
-
export declare type ICreateParamsByIdentifier = Pick<factory.event.ICreateParams
|
|
6
|
+
export declare type ICreateParamsByIdentifier = Pick<factory.event.screeningEvent.ICreateParams, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'maximumPhysicalAttendeeCapacity' | 'offers' | 'startDate'> & {
|
|
7
7
|
identifier: string;
|
|
8
8
|
offers: Pick<factory.event.screeningEvent.IOffers4create, 'eligibleQuantity' | 'seller' | 'unacceptedPaymentMethod'> & {
|
|
9
9
|
itemOffered: Pick<factory.event.screeningEvent.IItemOffered, 'id'>;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export declare type IUpdateParamsByIdentifier = Pick<factory.event.IUpdateParams
|
|
12
|
+
export declare type IUpdateParamsByIdentifier = Pick<factory.event.screeningEvent.IUpdateParams, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'maximumPhysicalAttendeeCapacity' | 'offers' | 'startDate'> & {
|
|
13
13
|
identifier: string;
|
|
14
14
|
offers: Pick<factory.event.screeningEvent.IOffers4create, 'eligibleQuantity' | 'seller' | 'unacceptedPaymentMethod'> & {
|
|
15
15
|
itemOffered: Pick<factory.event.screeningEvent.IItemOffered, 'id'>;
|
|
@@ -53,7 +53,7 @@ export declare class EventService extends Service {
|
|
|
53
53
|
* 特定の追加特性をキーにして、存在しなければ作成する
|
|
54
54
|
* 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
|
|
55
55
|
*/
|
|
56
|
-
upsertManyByAdditionalProperty(params: factory.event.ICreateParams
|
|
56
|
+
upsertManyByAdditionalProperty(params: factory.event.screeningEvent.ICreateParams[], options: {
|
|
57
57
|
filter: {
|
|
58
58
|
/**
|
|
59
59
|
* キーにする追加特性name
|
|
@@ -67,10 +67,10 @@ export declare class EventService extends Service {
|
|
|
67
67
|
/**
|
|
68
68
|
* イベント部分更新
|
|
69
69
|
*/
|
|
70
|
-
updatePartially
|
|
70
|
+
updatePartially(params: {
|
|
71
71
|
id: string;
|
|
72
72
|
attributes: {
|
|
73
|
-
typeOf:
|
|
73
|
+
typeOf: factory.eventType.ScreeningEvent;
|
|
74
74
|
eventStatus?: factory.eventStatusType;
|
|
75
75
|
onUpdated?: {
|
|
76
76
|
sendEmailMessage?: ISendEmailMessageOnEventUpdated[];
|
|
@@ -8,5 +8,5 @@ export declare class EventSeriesService extends Service {
|
|
|
8
8
|
* 施設コンテンツ冪等置換(施設+コンテンツ+バージョンに対してユニーク)
|
|
9
9
|
* 存在しなければ作成し、存在すれば置換
|
|
10
10
|
*/
|
|
11
|
-
upsertByVersion(params: factory.
|
|
11
|
+
upsertByVersion(params: factory.eventSeries.ICreateParams[]): Promise<void>;
|
|
12
12
|
}
|
|
@@ -17,9 +17,6 @@ interface ICreateParams {
|
|
|
17
17
|
id: string;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
interface IDeleteParams {
|
|
21
|
-
id: string;
|
|
22
|
-
}
|
|
23
20
|
export interface IFindParams {
|
|
24
21
|
limit: number;
|
|
25
22
|
page: number;
|
|
@@ -42,6 +39,10 @@ export interface IFindParams {
|
|
|
42
39
|
* メモID
|
|
43
40
|
*/
|
|
44
41
|
id?: string;
|
|
42
|
+
/**
|
|
43
|
+
* 読取ターゲット
|
|
44
|
+
*/
|
|
45
|
+
audienceType?: factory.creativeWork.noteDigitalDocument.PermissionGranteeAudienceType.Public;
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
48
|
* メモサービス
|
|
@@ -56,6 +57,5 @@ export declare class NoteService extends Service {
|
|
|
56
57
|
findNotes(params: IFindParams): Promise<(INoteDigitalDocument & {
|
|
57
58
|
id: string;
|
|
58
59
|
})[]>;
|
|
59
|
-
deleteNotesByIds(params: IDeleteParams[]): Promise<void>;
|
|
60
60
|
}
|
|
61
61
|
export {};
|
|
@@ -121,23 +121,6 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
NoteService.prototype.deleteNotesByIds = function (params) {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
-
return __generator(this, function (_a) {
|
|
127
|
-
switch (_a.label) {
|
|
128
|
-
case 0: return [4 /*yield*/, this.fetch({
|
|
129
|
-
uri: BASE_URI,
|
|
130
|
-
method: 'DELETE',
|
|
131
|
-
body: params,
|
|
132
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
133
|
-
})];
|
|
134
|
-
case 1:
|
|
135
|
-
_a.sent();
|
|
136
|
-
return [2 /*return*/];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
124
|
return NoteService;
|
|
142
125
|
}(service_1.Service));
|
|
143
126
|
exports.NoteService = NoteService;
|