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

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;
@@ -17,11 +17,46 @@ export type IFindParams = Pick<factory.eventSeries.ISearchConditions, 'endFrom'
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
+ movieIdentifiers?: string[];
54
+ }
20
55
  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
56
  /**
22
57
  * 施設コンテンツサービス
23
58
  */
24
59
  export declare class EventSeriesService extends Service {
25
- findEventSeries(params: IFindParams): Promise<IEventSeriesAsFindResult[]>;
60
+ findEventSeries(params: IFindParamsNew): Promise<IEventSeriesAsFindResult[]>;
26
61
  }
27
62
  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
  }
@@ -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
  }