@cinerino/sdk 18.1.0-alpha.6 → 18.1.0-alpha.8
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/lib/abstract/chevre/eventSeries.d.ts +0 -1
- package/lib/abstract/chevreAdmin/eventSeries.d.ts +1 -5
- package/lib/abstract/chevreConsole/eventSeries.d.ts +0 -14
- package/lib/abstract/chevreConsole/eventSeries.js +12 -61
- package/lib/abstract/transporters.js +13 -4
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +3 -3
- package/package.json +2 -2
|
@@ -20,10 +20,6 @@ export interface IFindParams {
|
|
|
20
20
|
* バージョン
|
|
21
21
|
*/
|
|
22
22
|
workPerformedVersion?: string;
|
|
23
|
-
/**
|
|
24
|
-
* 音響方式区分コード
|
|
25
|
-
*/
|
|
26
|
-
soundFormatType?: string;
|
|
27
23
|
/**
|
|
28
24
|
* 上映方式区分コード
|
|
29
25
|
*/
|
|
@@ -41,7 +37,7 @@ export interface IFindParams {
|
|
|
41
37
|
*/
|
|
42
38
|
endDateGte?: Date;
|
|
43
39
|
}
|
|
44
|
-
export type IEventSeriesAsFindResult = Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'duration' | 'endDate' | 'headline' | 'kanaName' | 'location' | 'name' | 'offers' | 'organizer' | '
|
|
40
|
+
export type IEventSeriesAsFindResult = Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'duration' | 'endDate' | 'headline' | 'kanaName' | 'location' | 'name' | 'offers' | 'organizer' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed' | 'id' | 'coaInfo' | 'identifier' | 'subEvent'>;
|
|
45
41
|
/**
|
|
46
42
|
* 施設コンテンツサービス
|
|
47
43
|
*/
|
|
@@ -3,20 +3,6 @@ import { Service } from '../service';
|
|
|
3
3
|
* 施設コンテンツサービス
|
|
4
4
|
*/
|
|
5
5
|
export declare class EventSeriesService extends Service {
|
|
6
|
-
aggregateMaxVersion(params: {
|
|
7
|
-
workPerformed: {
|
|
8
|
-
identifier: {
|
|
9
|
-
$eq: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
location: {
|
|
13
|
-
branchCode: {
|
|
14
|
-
$in: string[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}): Promise<{
|
|
18
|
-
maxVersion: string;
|
|
19
|
-
}>;
|
|
20
6
|
/**
|
|
21
7
|
* 施設コンテンツ削除
|
|
22
8
|
*/
|
|
@@ -8,72 +8,23 @@ const service_1 = require("../service");
|
|
|
8
8
|
* 施設コンテンツサービス
|
|
9
9
|
*/
|
|
10
10
|
class EventSeriesService extends service_1.Service {
|
|
11
|
-
// discontinue(2026-
|
|
12
|
-
// public async
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
// /**
|
|
16
|
-
// * 全施設に作成するかどうか
|
|
17
|
-
// */
|
|
18
|
-
// createScreeningEventSeriesOnAllLocation?: boolean;
|
|
11
|
+
// discontinue(2026-10-04~)
|
|
12
|
+
// public async aggregateMaxVersion(params: {
|
|
13
|
+
// workPerformed: {
|
|
14
|
+
// identifier: { $eq: string };
|
|
19
15
|
// };
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
// body: params.attributes,
|
|
25
|
-
// qs: params.qs,
|
|
26
|
-
// expectedStatusCodes: [status.NO_CONTENT]
|
|
27
|
-
// });
|
|
28
|
-
// }
|
|
29
|
-
// discontinue(2026-01-30~)
|
|
30
|
-
// /**
|
|
31
|
-
// * 施設コンテンツ作成
|
|
32
|
-
// */
|
|
33
|
-
// public async create(
|
|
34
|
-
// params: factory.eventSeries.ICreateParams[]
|
|
35
|
-
// ): Promise<{ id: string }> {
|
|
16
|
+
// location: {
|
|
17
|
+
// branchCode: { $in: string[] };
|
|
18
|
+
// };
|
|
19
|
+
// }): Promise<{ maxVersion: string }> {
|
|
36
20
|
// return this.fetch({
|
|
37
|
-
// uri: `/events/${factory.eventType.ScreeningEventSeries}`,
|
|
38
|
-
// method: '
|
|
39
|
-
//
|
|
40
|
-
// expectedStatusCodes: [status.
|
|
21
|
+
// uri: `/events/${factory.eventType.ScreeningEventSeries}/aggregateScreeningEventMaxVersion`,
|
|
22
|
+
// method: 'GET',
|
|
23
|
+
// qs: params,
|
|
24
|
+
// expectedStatusCodes: [status.OK]
|
|
41
25
|
// })
|
|
42
26
|
// .then(async (response) => response.json());
|
|
43
27
|
// }
|
|
44
|
-
async aggregateMaxVersion(params) {
|
|
45
|
-
return this.fetch({
|
|
46
|
-
uri: `/events/${factory_1.factory.eventType.ScreeningEventSeries}/aggregateScreeningEventMaxVersion`,
|
|
47
|
-
method: 'GET',
|
|
48
|
-
qs: params,
|
|
49
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
50
|
-
})
|
|
51
|
-
.then(async (response) => response.json());
|
|
52
|
-
}
|
|
53
|
-
// discontinue(2026-01-30~)
|
|
54
|
-
// /**
|
|
55
|
-
// * 施設コンテンツ更新
|
|
56
|
-
// */
|
|
57
|
-
// public async updateById(params: {
|
|
58
|
-
// id: string;
|
|
59
|
-
// attributes: factory.eventSeries.ICreateParams & {
|
|
60
|
-
// // $unset?: IUnset; // discontinue(2024-08-07~)
|
|
61
|
-
// };
|
|
62
|
-
// qs: {
|
|
63
|
-
// /**
|
|
64
|
-
// * 関連リソースへの同期有無(2023-07-28~)
|
|
65
|
-
// */
|
|
66
|
-
// useSync?: boolean;
|
|
67
|
-
// };
|
|
68
|
-
// }): Promise<void> {
|
|
69
|
-
// await this.fetch({
|
|
70
|
-
// uri: `/events/${factory.eventType.ScreeningEventSeries}/${encodeURIComponent(String(params.id))}`,
|
|
71
|
-
// method: 'PUT',
|
|
72
|
-
// body: params.attributes,
|
|
73
|
-
// qs: params.qs,
|
|
74
|
-
// expectedStatusCodes: [status.NO_CONTENT]
|
|
75
|
-
// });
|
|
76
|
-
// }
|
|
77
28
|
/**
|
|
78
29
|
* 施設コンテンツ削除
|
|
79
30
|
*/
|
|
@@ -9,14 +9,23 @@ exports.StubTransporter = exports.DefaultTransporter = exports.RequestError = ex
|
|
|
9
9
|
*/
|
|
10
10
|
const debug_1 = __importDefault(require("debug"));
|
|
11
11
|
const debug = (0, debug_1.default)('cinerino-sdk:transporters');
|
|
12
|
-
let
|
|
12
|
+
let packageInfo = { name: 'unknown', version: 'unknown' };
|
|
13
13
|
try {
|
|
14
|
-
|
|
15
|
-
version = pkg.version;
|
|
14
|
+
packageInfo = require('../../package.json'); // eslint-disable-line @typescript-eslint/no-require-imports
|
|
16
15
|
}
|
|
17
16
|
catch {
|
|
18
17
|
// 万が一ビルド後の配置で package.json が読めない場合のフォールバック
|
|
19
18
|
}
|
|
19
|
+
// 存在する環境変数のみを配列で抽出し、半角スペースで結合する
|
|
20
|
+
// process が未定義のブラウザ環境でも ReferenceError にならないよう安全に参照する
|
|
21
|
+
/* istanbul ignore next */
|
|
22
|
+
const gaeEnvParts = [
|
|
23
|
+
typeof process !== 'undefined' ? process.env.GAE_APPLICATION : undefined,
|
|
24
|
+
typeof process !== 'undefined' ? process.env.GAE_SERVICE : undefined,
|
|
25
|
+
typeof process !== 'undefined' ? process.env.GAE_VERSION : undefined,
|
|
26
|
+
].filter((val) => typeof val === 'string' && val.trim().length > 0);
|
|
27
|
+
// GAE情報とパッケージ情報を結合
|
|
28
|
+
const defaultUserAgentHeader4node = [...gaeEnvParts, `${packageInfo.name}/${packageInfo.version}`].join(' ');
|
|
20
29
|
/**
|
|
21
30
|
* トランスポーター抽象クラス
|
|
22
31
|
*/
|
|
@@ -42,7 +51,7 @@ class DefaultTransporter {
|
|
|
42
51
|
/**
|
|
43
52
|
* Default user agent.
|
|
44
53
|
*/
|
|
45
|
-
static USER_AGENT =
|
|
54
|
+
static USER_AGENT = defaultUserAgentHeader4node;
|
|
46
55
|
expectedStatusCodes;
|
|
47
56
|
constructor(expectedStatusCodes) {
|
|
48
57
|
this.expectedStatusCodes = expectedStatusCodes;
|