@cinerino/sdk 16.4.0-alpha.1 → 16.4.0-alpha.11

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.
@@ -65,9 +65,7 @@ export declare class EventService extends Service {
65
65
  */
66
66
  findSeatOffersDeprecated(params: {
67
67
  id: string;
68
- } & Pick<factory.place.seat.ISearchConditions, 'additionalProperty' | 'branchCode' | 'containedInPlace' | 'limit' | 'name' | 'page' | 'parentOrganization' | 'seatingType' | 'sort'>, options: {
69
- useDefaultSection: boolean;
70
- }): Promise<ISeatAsEventOffer[]>;
68
+ } & Pick<factory.place.seat.ISearchConditions, 'additionalProperty' | 'branchCode' | 'containedInPlace' | 'limit' | 'name' | 'page' | 'parentOrganization' | 'seatingType' | 'sort'>): Promise<ISeatAsEventOffer[]>;
71
69
  /**
72
70
  * オファーで利用可能な適用決済カード条件を検索する
73
71
  */
@@ -67,15 +67,15 @@ class EventService extends service_1.Service {
67
67
  * イベントに対する座席検索
68
68
  * @deprecated use find seatOffers
69
69
  */
70
- async findSeatOffersDeprecated(params, options) {
70
+ async findSeatOffersDeprecated(params) {
71
71
  const { id, ...query } = params;
72
- const { useDefaultSection } = options;
72
+ // const { useDefaultSection } = options;
73
73
  return this.fetch({
74
74
  uri: `/events/${encodeURIComponent(String(id))}/seats`,
75
75
  method: 'GET',
76
76
  qs: {
77
77
  ...query,
78
- useDefaultSection
78
+ // useDefaultSection
79
79
  },
80
80
  expectedStatusCodes: [http_status_1.status.OK]
81
81
  })
@@ -1,11 +1,11 @@
1
1
  import { factory } from '../factory';
2
- import { ISearchResult, Service } from '../service';
2
+ import { Service } from '../service';
3
3
  /**
4
4
  * 資産取引サービス
5
5
  */
6
6
  export declare class AssetTransactionService extends Service {
7
7
  /**
8
- * 取引検索
8
+ * 資産取引検索
9
9
  */
10
- search<T extends factory.assetTransactionType>(params: factory.assetTransaction.ISearchConditions<T>): Promise<ISearchResult<factory.assetTransaction.ITransaction<T>[]>>;
10
+ findAssetTransactions<T extends factory.assetTransactionType>(params: factory.assetTransaction.ISearchConditions<T>): Promise<factory.assetTransaction.ITransaction<T>[]>;
11
11
  }
@@ -8,20 +8,16 @@ const service_1 = require("../service");
8
8
  */
9
9
  class AssetTransactionService extends service_1.Service {
10
10
  /**
11
- * 取引検索
11
+ * 資産取引検索
12
12
  */
13
- async search(params) {
13
+ async findAssetTransactions(params) {
14
14
  return this.fetch({
15
15
  uri: '/assetTransactions',
16
16
  method: 'GET',
17
17
  qs: params,
18
18
  expectedStatusCodes: [http_status_1.status.OK]
19
19
  })
20
- .then(async (response) => {
21
- return {
22
- data: await response.json()
23
- };
24
- });
20
+ .then(async (response) => response.json());
25
21
  }
26
22
  }
27
23
  exports.AssetTransactionService = AssetTransactionService;
@@ -0,0 +1,13 @@
1
+ import { factory } from '../factory';
2
+ import { IOptions, Service } from '../service';
3
+ type IFindParams = Pick<factory.task.ISearchConditions, 'id' | 'name' | 'runsFrom' | 'runsThrough' | 'status' | 'limit' | 'page' | 'sort'>;
4
+ type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
5
+ /**
6
+ * 非同期アクションサービス
7
+ */
8
+ export declare class AsyncActionService extends Service<IOptions> {
9
+ findAsyncActions(params: IFindParams & {
10
+ $projection?: Partial<Record<IKeyOfProjection, 1>>;
11
+ }): Promise<factory.task.ITask<factory.taskName>[]>;
12
+ }
13
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AsyncActionService = void 0;
4
+ const http_status_1 = require("http-status");
5
+ const service_1 = require("../service");
6
+ /**
7
+ * 非同期アクションサービス
8
+ */
9
+ class AsyncActionService extends service_1.Service {
10
+ async findAsyncActions(params) {
11
+ return this.fetch({
12
+ uri: '/asyncActions',
13
+ method: 'GET',
14
+ qs: params,
15
+ expectedStatusCodes: [http_status_1.status.OK]
16
+ })
17
+ .then(async (response) => response.json());
18
+ }
19
+ }
20
+ exports.AsyncActionService = AsyncActionService;
@@ -1,16 +1,18 @@
1
1
  import { factory } from '../factory';
2
- import { ISearchResult, Service } from '../service';
3
- type IEventReservation = factory.reservation.eventReservation.IReservation;
4
- type IReservationWithDetail = IEventReservation;
5
- type IGoodWithDetail = IReservationWithDetail | factory.permit.IPermit;
6
- export type IOwnershipInfo = (factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> | (Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, 'typeOfGood'> & {
7
- typeOfGood: IGoodWithDetail;
8
- })) & {
2
+ import { Service } from '../service';
3
+ export type IOwnershipInfoAsFindResult = factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> & {
9
4
  /**
10
5
  * 所有権ID
11
6
  */
12
7
  id: string;
13
8
  };
9
+ type IFindParams = Pick<factory.ownershipInfo.ISearchConditions, 'limit' | 'ownedFromGte' | 'ownedFromLte' | 'page' | 'sort'> & {
10
+ /**
11
+ * max: 10
12
+ */
13
+ limit: number;
14
+ page: number;
15
+ };
14
16
  /**
15
17
  * 所有権サービス
16
18
  */
@@ -18,18 +20,6 @@ export declare class OwnershipInfoService extends Service {
18
20
  /**
19
21
  * 所有権検索
20
22
  */
21
- search(params: Omit<factory.ownershipInfo.ISearchConditions, 'project'> & {
22
- /**
23
- * max: 10
24
- */
25
- limit?: number;
26
- /**
27
- * 所有物詳細を取得する
28
- * typeOfGood.issuedThrough.typeOf.$eqの指定が必須です
29
- */
30
- includeGoodWithDetails?: '1';
31
- ownedFromGte?: Date;
32
- ownedFromLte?: Date;
33
- }): Promise<ISearchResult<IOwnershipInfo[]>>;
23
+ findOwnershipInfos(params: IFindParams): Promise<IOwnershipInfoAsFindResult[]>;
34
24
  }
35
25
  export {};
@@ -10,18 +10,14 @@ class OwnershipInfoService extends service_1.Service {
10
10
  /**
11
11
  * 所有権検索
12
12
  */
13
- async search(params) {
13
+ async findOwnershipInfos(params) {
14
14
  return this.fetch({
15
15
  uri: '/ownershipInfos',
16
16
  method: 'GET',
17
17
  qs: params,
18
18
  expectedStatusCodes: [http_status_1.status.OK]
19
19
  })
20
- .then(async (response) => {
21
- return {
22
- data: await response.json()
23
- };
24
- });
20
+ .then(async (response) => response.json());
25
21
  }
26
22
  }
27
23
  exports.OwnershipInfoService = OwnershipInfoService;
@@ -0,0 +1,13 @@
1
+ import { factory } from '../factory';
2
+ import { IOptions, Service } from '../service';
3
+ type IFindParams = Pick<factory.task.ISearchConditions, 'id' | 'name' | 'runsFrom' | 'runsThrough' | 'status' | 'limit' | 'page' | 'sort'>;
4
+ type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
5
+ /**
6
+ * 予定タスクサービス
7
+ */
8
+ export declare class ScheduledTaskService extends Service<IOptions> {
9
+ findScheduledTasks(params: IFindParams & {
10
+ $projection?: Partial<Record<IKeyOfProjection, 1>>;
11
+ }): Promise<factory.task.ITask<factory.taskName>[]>;
12
+ }
13
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScheduledTaskService = void 0;
4
+ const http_status_1 = require("http-status");
5
+ const service_1 = require("../service");
6
+ /**
7
+ * 予定タスクサービス
8
+ */
9
+ class ScheduledTaskService extends service_1.Service {
10
+ async findScheduledTasks(params) {
11
+ return this.fetch({
12
+ uri: '/scheduledTasks',
13
+ method: 'GET',
14
+ qs: params,
15
+ expectedStatusCodes: [http_status_1.status.OK]
16
+ })
17
+ .then(async (response) => response.json());
18
+ }
19
+ }
20
+ exports.ScheduledTaskService = ScheduledTaskService;
@@ -1,6 +1,12 @@
1
1
  import { factory } from '../factory';
2
2
  import { IOptions, Service } from '../service';
3
3
  type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
4
+ type IFindParams = Pick<factory.task.ISearchConditions, 'dateAborted' | 'id' | 'identifier' | 'limit' | 'name' | 'page' | 'runsFrom' | 'runsThrough' | 'sort' | 'status'> & {
5
+ $projection?: Partial<Record<IKeyOfProjection, 1>>;
6
+ data?: never;
7
+ lastTriedFrom?: never;
8
+ lastTriedThrough?: never;
9
+ };
4
10
  /**
5
11
  * タスクサービス
6
12
  */
@@ -15,8 +21,6 @@ export declare class TaskService extends Service<IOptions> {
15
21
  /**
16
22
  * タスク検索
17
23
  */
18
- projectFields(params: Omit<factory.task.ISearchConditions, 'project'> & {
19
- $projection?: Partial<Record<IKeyOfProjection, 1>>;
20
- }): Promise<factory.task.ITask<factory.taskName>[]>;
24
+ findTasks(params: IFindParams): Promise<factory.task.ITask<factory.taskName>[]>;
21
25
  }
22
26
  export {};
@@ -30,7 +30,7 @@ class TaskService extends service_1.Service {
30
30
  /**
31
31
  * タスク検索
32
32
  */
33
- async projectFields(params) {
33
+ async findTasks(params) {
34
34
  return this.fetch({
35
35
  uri: '/tasks',
36
36
  method: 'GET',
@@ -48,6 +48,8 @@ import type { ReservationService } from './chevreConsole/reservation';
48
48
  import type { SellerService } from './chevreConsole/seller';
49
49
  import type { SellerMakesOfferService } from './chevreConsole/sellerMakesOffer';
50
50
  import type { SellerReturnPolicyService } from './chevreConsole/sellerReturnPolicy';
51
+ import type { AsyncActionService } from './chevreConsole/asyncAction';
52
+ import type { ScheduledTaskService } from './chevreConsole/scheduledTask';
51
53
  import type { TaskService } from './chevreConsole/task';
52
54
  import type { TicketService } from './chevreConsole/ticket';
53
55
  import type { TokenService } from './chevreConsole/token';
@@ -389,6 +391,20 @@ export declare namespace service {
389
391
  namespace SellerReturnPolicy {
390
392
  let svc: typeof SellerReturnPolicyService | undefined;
391
393
  }
394
+ /**
395
+ * 非同期アクションサービス
396
+ */
397
+ type AsyncAction = AsyncActionService;
398
+ namespace AsyncAction {
399
+ let svc: typeof AsyncActionService | undefined;
400
+ }
401
+ /**
402
+ * 予定タスクサービス
403
+ */
404
+ type ScheduledTask = ScheduledTaskService;
405
+ namespace ScheduledTask {
406
+ let svc: typeof ScheduledTaskService | undefined;
407
+ }
392
408
  /**
393
409
  * タスクサービス
394
410
  */
@@ -520,6 +536,8 @@ export declare class ChevreConsole {
520
536
  createSellerInstance(params: Pick<IOptions, 'project'>): Promise<SellerService>;
521
537
  createSellerMakesOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SellerMakesOfferService>;
522
538
  createSellerReturnPolicyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SellerReturnPolicyService>;
539
+ createAsyncActionInstance(params: Pick<IOptions, 'project'>): Promise<AsyncActionService>;
540
+ createScheduledTaskInstance(params: Pick<IOptions, 'project'>): Promise<ScheduledTaskService>;
523
541
  createTaskInstance(params: Pick<IOptions, 'project'>): Promise<TaskService>;
524
542
  createTicketInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<TicketService>;
525
543
  createAssetTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AssetTransactionService>;
@@ -180,6 +180,12 @@ var service;
180
180
  let SellerReturnPolicy;
181
181
  (function (SellerReturnPolicy) {
182
182
  })(SellerReturnPolicy = service.SellerReturnPolicy || (service.SellerReturnPolicy = {}));
183
+ let AsyncAction;
184
+ (function (AsyncAction) {
185
+ })(AsyncAction = service.AsyncAction || (service.AsyncAction = {}));
186
+ let ScheduledTask;
187
+ (function (ScheduledTask) {
188
+ })(ScheduledTask = service.ScheduledTask || (service.ScheduledTask = {}));
183
189
  let Task;
184
190
  (function (Task) {
185
191
  })(Task = service.Task || (service.Task = {}));
@@ -510,6 +516,18 @@ class ChevreConsole {
510
516
  }
511
517
  return new service.SellerReturnPolicy.svc({ ...this.options, ...params, retryableStatusCodes: [] });
512
518
  }
519
+ async createAsyncActionInstance(params) {
520
+ if (service.AsyncAction.svc === undefined) {
521
+ service.AsyncAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/asyncAction')))).AsyncActionService;
522
+ }
523
+ return new service.AsyncAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
524
+ }
525
+ async createScheduledTaskInstance(params) {
526
+ if (service.ScheduledTask.svc === undefined) {
527
+ service.ScheduledTask.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/scheduledTask.js')))).ScheduledTaskService;
528
+ }
529
+ return new service.ScheduledTask.svc({ ...this.options, ...params, retryableStatusCodes: [] });
530
+ }
513
531
  async createTaskInstance(params) {
514
532
  if (service.Task.svc === undefined) {
515
533
  service.Task.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/task.js')))).TaskService;
@@ -35,8 +35,6 @@ export declare class OfferService extends Service {
35
35
  */
36
36
  id?: string;
37
37
  };
38
- }, options?: {
39
- useAsyncAction: '1' | '0';
40
38
  }): Promise<{
41
39
  /**
42
40
  * task id
@@ -8,9 +8,8 @@ const service_1 = require("../service");
8
8
  * COAオファーサービス
9
9
  */
10
10
  class OfferService extends service_1.Service {
11
- async acceptOffer(params, options) {
11
+ async acceptOffer(params) {
12
12
  const { object, purpose, potentialActions } = params;
13
- const useAsyncAction = options?.useAsyncAction;
14
13
  return this.fetch({
15
14
  uri: `/offers/${factory_1.factory.product.ProductType.EventService}ByCOA/accept`,
16
15
  method: 'POST',
@@ -21,8 +20,7 @@ class OfferService extends service_1.Service {
21
20
  ...(typeof potentialActions?.id === 'string') ? { potentialActions } : undefined
22
21
  },
23
22
  qs: {
24
- purpose: { id: purpose.id },
25
- ...((typeof useAsyncAction === 'string') && { useAsyncAction })
23
+ purpose: { id: purpose.id }
26
24
  }
27
25
  })
28
26
  .then(async (response) => response.json());
@@ -183,8 +183,6 @@ export declare class EventService extends Service {
183
183
  };
184
184
  limit: number;
185
185
  page: number;
186
- }, options?: {
187
- useDefaultSection?: boolean;
188
186
  }): Promise<ISearchResult<Omit<ISeatAsEventOffer, 'containedInPlace'>[]> & {
189
187
  /**
190
188
  * デフォルトセクションコード
@@ -112,16 +112,12 @@ class EventService extends service_1.Service {
112
112
  * 自動的にルームのひとつめのセクションが選択されます
113
113
  * @deprecated use SeatOfferService
114
114
  */
115
- async findSeatOffersDeprecated(params, options) {
116
- const { event, ...query } = params;
117
- const useDefaultSection = options?.useDefaultSection === true;
115
+ async findSeatOffersDeprecated(params) {
116
+ const { event, limit, page } = params;
118
117
  return this.fetch({
119
118
  uri: `/events/${encodeURIComponent(String(event.id))}/seats`,
120
119
  method: 'GET',
121
- qs: {
122
- ...query,
123
- useDefaultSection
124
- },
120
+ qs: { limit, page },
125
121
  expectedStatusCodes: [http_status_1.status.OK]
126
122
  })
127
123
  .then(async (response) => {
@@ -41,8 +41,6 @@ declare function authorizeOfferAsync(params: {
41
41
  */
42
42
  id?: string;
43
43
  };
44
- }, options?: {
45
- useAsyncAction: '1' | '0';
46
44
  }): (repos: {
47
45
  offerService: service.Offer;
48
46
  }) => Promise<IAuthorizeOfferAsyncResult>;
@@ -43,7 +43,7 @@ function authorizeActionError2responseError(authorizeActionError) {
43
43
  }
44
44
  return error;
45
45
  }
46
- function authorizeOfferAsync(params, options) {
46
+ function authorizeOfferAsync(params) {
47
47
  return async (repos) => {
48
48
  const acceptTask = await repos.offerService.acceptOffer({
49
49
  object: {
@@ -55,7 +55,7 @@ function authorizeOfferAsync(params, options) {
55
55
  ...(typeof params.potentialActions?.id === 'string')
56
56
  ? { potentialActions: { id: params.potentialActions.id } }
57
57
  : undefined
58
- }, options);
58
+ });
59
59
  let alreadyGivenUp = false;
60
60
  setTimeout(() => { alreadyGivenUp = true; }, ASYNC_ACTION_GIVEUP_MS);
61
61
  let result;
@@ -38,8 +38,6 @@ export declare class PlaceOrderCOAService extends Service {
38
38
  appliesToSurfrock?: IAppliesToSurfrock;
39
39
  };
40
40
  purpose: factory.action.authorize.offer.eventService.IPurpose;
41
- }, options?: {
42
- useAsyncAction: '1' | '0';
43
41
  }): Promise<IAuthorizeCOAEventServiceResult>;
44
42
  /**
45
43
  * COA興行オファー承認取消
@@ -77,8 +75,6 @@ export declare class PlaceOrderCOAService extends Service {
77
75
  appliesToSurfrock?: IAppliesToSurfrock;
78
76
  };
79
77
  purpose: factory.action.authorize.offer.eventService.IPurpose;
80
- }, options?: {
81
- useAsyncAction: '1' | '0';
82
78
  }): Promise<IAuthorizeCOAEventServiceResult>;
83
79
  }
84
80
  export {};
@@ -12,7 +12,7 @@ class PlaceOrderCOAService extends service_1.Service {
12
12
  /**
13
13
  * COA興行オファー承認
14
14
  */
15
- async createSeatReservationAuthorization(params, options) {
15
+ async createSeatReservationAuthorization(params) {
16
16
  const { object, purpose } = params;
17
17
  const { event, acceptedOffer, appliesToSurfrock } = object;
18
18
  const appliesToSurfrockIdentifier = (typeof appliesToSurfrock?.identifier === 'string' && appliesToSurfrock.identifier.length > 0)
@@ -43,7 +43,7 @@ class PlaceOrderCOAService extends service_1.Service {
43
43
  // potentialActions?: {
44
44
  // id?: string;
45
45
  // };
46
- }, options)({
46
+ })({
47
47
  offerService
48
48
  });
49
49
  if (typeof action.result?.price !== 'number') {
@@ -90,7 +90,7 @@ class PlaceOrderCOAService extends service_1.Service {
90
90
  * COA興行オファー承認変更
91
91
  * 完了ステータスの承認アクションに対して券種変更する際に使用
92
92
  */
93
- async changeSeatReservationOffers(params, options) {
93
+ async changeSeatReservationOffers(params) {
94
94
  const { id, object, purpose } = params;
95
95
  const { event, acceptedOffer, appliesToSurfrock } = object;
96
96
  const appliesToSurfrockIdentifier = (typeof appliesToSurfrock?.identifier === 'string' && appliesToSurfrock.identifier.length > 0)
@@ -119,7 +119,7 @@ class PlaceOrderCOAService extends service_1.Service {
119
119
  serviceOutput: { typeOf: appliesToSurfrockServiceOutputTypeOf }
120
120
  },
121
121
  potentialActions: { id }
122
- }, options)({
122
+ })({
123
123
  offerService
124
124
  });
125
125
  if (typeof action.result?.price !== 'number') {