@cinerino/sdk 18.1.0-alpha.2 → 18.1.0-alpha.4

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.
@@ -3,15 +3,21 @@ import { Service } from '../service';
3
3
  export type IMovieAsFindResult = Pick<factory.creativeWork.movie.ICreativeWork, 'additionalProperty' | 'alternativeHeadline' | 'contentRating' | 'datePublished' | 'distributor' | 'duration' | 'headline' | 'identifier' | 'name' | 'project' | 'thumbnailUrl' | 'typeOf'> & {
4
4
  id: string;
5
5
  };
6
- export type IFindParams = Pick<factory.creativeWork.movie.ISearchConditions, 'limit' | 'page'> & {
6
+ export type IFindParamsLegacy = Pick<factory.creativeWork.movie.ISearchConditions, 'limit' | 'page'> & {
7
7
  identifier?: string | {
8
8
  $eq?: string;
9
9
  $in?: string[];
10
10
  };
11
11
  };
12
+ export interface IFindParamsNew {
13
+ limit: number;
14
+ page: number;
15
+ identifier?: string;
16
+ identifiers?: string[];
17
+ }
12
18
  /**
13
19
  * コンテンツサービス
14
20
  */
15
21
  export declare class CreativeWorkService extends Service {
16
- findMovies(params: IFindParams): Promise<IMovieAsFindResult[]>;
22
+ findMovies(params: IFindParamsNew): Promise<IMovieAsFindResult[]>;
17
23
  }
@@ -3,16 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreativeWorkService = void 0;
4
4
  const http_status_1 = require("http-status");
5
5
  const service_1 = require("../service");
6
+ ;
6
7
  /**
7
8
  * コンテンツサービス
8
9
  */
9
10
  class CreativeWorkService extends service_1.Service {
11
+ // public async findMovies(params: IFindParams): Promise<IMovieAsFindResult[]> {
12
+ // return this.fetch({
13
+ // uri: '/creativeWorks/movie',
14
+ // method: 'GET',
15
+ // qs: params,
16
+ // expectedStatusCodes: [status.OK]
17
+ // })
18
+ // .then(async (response) => response.json());
19
+ // }
10
20
  async findMovies(params) {
11
21
  return this.fetch({
12
- uri: '/creativeWorks/movie',
22
+ uri: '/movies',
13
23
  method: 'GET',
14
24
  qs: params,
15
- expectedStatusCodes: [http_status_1.status.OK]
25
+ expectedStatusCodes: [http_status_1.status.OK],
26
+ stringifyOptions: { arrayFormat: 'repeat' }
16
27
  })
17
28
  .then(async (response) => response.json());
18
29
  }
@@ -2,7 +2,7 @@ import { factory } from '../factory';
2
2
  import { Service } from '../service';
3
3
  type IKeyOfProjection = keyof factory.eventSeries.IEvent;
4
4
  type IProjection = Partial<Record<IKeyOfProjection, 0>>;
5
- export type IFindParams = Pick<factory.eventSeries.ISearchConditions, 'endFrom' | 'endThrough' | 'id' | 'limit' | 'name' | 'page' | 'sort' | 'startFrom' | 'startThrough'> & {
5
+ export type IFindParamsLegacy = Pick<factory.eventSeries.ISearchConditions, 'endFrom' | 'endThrough' | 'id' | 'limit' | 'name' | 'page' | 'sort' | 'startFrom' | 'startThrough'> & {
6
6
  location?: {
7
7
  branchCode?: {
8
8
  $eq?: string;
@@ -10,18 +10,54 @@ export type IFindParams = Pick<factory.eventSeries.ISearchConditions, 'endFrom'
10
10
  };
11
11
  workPerformed?: {
12
12
  /**
13
- * コンテンツコード
13
+ * コンテンツコード(最大1つ指定可能)
14
14
  */
15
15
  identifiers?: string[];
16
16
  };
17
17
  typeOf: factory.eventType.ScreeningEventSeries;
18
18
  $projection?: IProjection;
19
19
  };
20
+ export interface IFindParamsNew {
21
+ limit: number;
22
+ page: number;
23
+ id?: string;
24
+ ids?: string[];
25
+ /**
26
+ * 開始日時 from
27
+ * ISO 8601 date format
28
+ */
29
+ startFrom?: Date;
30
+ /**
31
+ * 開始日時 through
32
+ * ISO 8601 date format
33
+ */
34
+ startThrough?: Date;
35
+ /**
36
+ * 終了日時 from
37
+ * ISO 8601 date format
38
+ */
39
+ endFrom?: Date;
40
+ /**
41
+ * 終了日時 through
42
+ * ISO 8601 date format
43
+ */
44
+ endThrough?: Date;
45
+ name?: string;
46
+ /**
47
+ * 施設コード
48
+ */
49
+ locationBranchCode?: string;
50
+ /**
51
+ * コンテンツコード
52
+ */
53
+ movieIdentifier?: string;
54
+ movieIdentifiers?: never;
55
+ }
20
56
  export type IEventSeriesAsFindResult = Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'coaInfo' | 'description' | 'dubLanguage' | 'duration' | 'endDate' | 'eventStatus' | 'headline' | 'identifier' | 'kanaName' | 'location' | 'name' | 'offers' | 'organizer' | 'project' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed' | 'subEvent' | 'id'>;
21
57
  /**
22
58
  * 施設コンテンツサービス
23
59
  */
24
60
  export declare class EventSeriesService extends Service {
25
- findEventSeries(params: IFindParams): Promise<IEventSeriesAsFindResult[]>;
61
+ findEventSeries(params: IFindParamsNew): Promise<IEventSeriesAsFindResult[]>;
26
62
  }
27
63
  export {};
@@ -7,12 +7,22 @@ const service_1 = require("../service");
7
7
  * 施設コンテンツサービス
8
8
  */
9
9
  class EventSeriesService extends service_1.Service {
10
+ // public async findEventSeries(params: IFindParams): Promise<IEventSeriesAsFindResult[]> {
11
+ // return this.fetch({
12
+ // uri: '/eventSeries',
13
+ // method: 'GET',
14
+ // qs: params,
15
+ // expectedStatusCodes: [status.OK]
16
+ // })
17
+ // .then(async (response) => response.json());
18
+ // }
10
19
  async findEventSeries(params) {
11
20
  return this.fetch({
12
- uri: '/eventSeries',
21
+ uri: '/superEvents',
13
22
  method: 'GET',
14
23
  qs: params,
15
- expectedStatusCodes: [http_status_1.status.OK]
24
+ expectedStatusCodes: [http_status_1.status.OK],
25
+ stringifyOptions: { arrayFormat: 'repeat' }
16
26
  })
17
27
  .then(async (response) => response.json());
18
28
  }
@@ -21,15 +21,15 @@ export type IOrderAsFindByConfirmationNumberResult = Pick<factory.order.IOrder,
21
21
  telephone?: string;
22
22
  };
23
23
  };
24
- export type IItemOfferedMinimized = Pick<factory.order.IAcceptedOffer['itemOffered'], 'additionalTicketText' | 'id' | 'issuedThrough' | 'programMembershipUsed' | 'reservationNumber' | 'reservedTicket' | 'typeOf'> & {
24
+ export type IItemOfferedMinimized = Pick<factory.acceptedOffer.IAcceptedOffer['itemOffered'], 'additionalTicketText' | 'id' | 'issuedThrough' | 'programMembershipUsed' | 'reservationNumber' | 'reservedTicket' | 'typeOf'> & {
25
25
  /**
26
26
  * 注文オファー参照結果に含まれるイベント情報は基本的にidのみ
27
27
  */
28
- reservationFor: Pick<factory.order.IEventAsReservationFor, 'id' | 'typeOf'>;
28
+ reservationFor: Pick<factory.acceptedOffer.IEventAsReservationFor, 'id' | 'typeOf'>;
29
29
  };
30
30
  /**
31
31
  * 注文番号+確認番号による注文オファー検索結果としての注文オファー
32
32
  */
33
- export type IAcceptedOfferAsFindResult = Pick<factory.order.IAcceptedOffer, 'id' | 'offeredThrough' | 'priceSpecification' | 'serialNumber' | 'typeOf'> & {
33
+ export type IAcceptedOfferAsFindResult = Pick<factory.acceptedOffer.IAcceptedOffer, 'id' | 'offeredThrough' | 'priceSpecification' | 'serialNumber' | 'typeOf'> & {
34
34
  itemOffered: IItemOfferedMinimized;
35
35
  };
@@ -4,13 +4,13 @@ type IKeyOfProjection = keyof factory.order.IOrder | '_id';
4
4
  * 注文検索時projection
5
5
  */
6
6
  export type IProjection = Partial<Record<IKeyOfProjection, 1>>;
7
- export type IItemOfferedMinimized = Pick<factory.order.IAcceptedOffer['itemOffered'], 'additionalTicketText' | 'id' | 'issuedThrough' | 'programMembershipUsed' | 'reservationNumber' | 'reservedTicket' | 'typeOf'> & {
7
+ export type IItemOfferedMinimized = Pick<factory.acceptedOffer.IAcceptedOffer['itemOffered'], 'additionalTicketText' | 'id' | 'issuedThrough' | 'programMembershipUsed' | 'reservationNumber' | 'reservedTicket' | 'typeOf'> & {
8
8
  /**
9
9
  * 注文オファー参照結果に含まれるイベント情報は基本的にidのみ
10
10
  */
11
- reservationFor: Pick<factory.order.IEventAsReservationFor, 'id' | 'typeOf'>;
11
+ reservationFor: Pick<factory.acceptedOffer.IEventAsReservationFor, 'id' | 'typeOf'>;
12
12
  };
13
- export type IAcceptedOfferMinimized = Pick<factory.order.IAcceptedOffer, 'id' | 'offeredThrough' | 'priceSpecification' | 'serialNumber' | 'typeOf'> & {
13
+ export type IAcceptedOfferMinimized = Pick<factory.acceptedOffer.IAcceptedOffer, 'id' | 'offeredThrough' | 'priceSpecification' | 'serialNumber' | 'typeOf'> & {
14
14
  itemOffered: IItemOfferedMinimized;
15
15
  };
16
16
  /**
@@ -1,4 +1,4 @@
1
- import { IFindParams, IMovieAsFindResult } from '../../chevre/creativeWork';
1
+ import { IFindParamsLegacy, IMovieAsFindResult } from '../../chevre/creativeWork';
2
2
  import { Service } from '../../service';
3
3
  /**
4
4
  * コンテンツサービス
@@ -7,5 +7,5 @@ export declare class CreativeWorkService extends Service {
7
7
  /**
8
8
  * コンテンツ検索
9
9
  */
10
- findMovies(params: Pick<IFindParams, 'identifier' | 'limit' | 'page'>): Promise<Omit<IMovieAsFindResult, 'project'>[]>;
10
+ findMovies(params: Pick<IFindParamsLegacy, 'identifier' | 'limit' | 'page'>): Promise<Omit<IMovieAsFindResult, 'project'>[]>;
11
11
  }
@@ -1,5 +1,5 @@
1
1
  import { Service } from '../../service';
2
- import { IFindParams, IEventSeriesAsFindResult } from '../../chevre/eventSeries';
2
+ import { IFindParamsLegacy, IEventSeriesAsFindResult } from '../../chevre/eventSeries';
3
3
  /**
4
4
  * 施設コンテンツサービス
5
5
  */
@@ -7,5 +7,5 @@ export declare class EventSeriesService extends Service {
7
7
  /**
8
8
  * 施設コンテンツ検索
9
9
  */
10
- findEventSeries(params: IFindParams): Promise<IEventSeriesAsFindResult[]>;
10
+ findEventSeries(params: IFindParamsLegacy): Promise<IEventSeriesAsFindResult[]>;
11
11
  }