@cinerino/sdk 15.0.0-alpha.7 → 15.0.0-alpha.9

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.
@@ -4,11 +4,47 @@ import { Service } from '../service';
4
4
  export interface IUseActionResult {
5
5
  id: string;
6
6
  }
7
- type IKeyOfProjection = keyof factory.reservation.eventReservation.IReservation;
8
- type IProjection = Partial<Record<IKeyOfProjection, 1>>;
9
- interface IProjectionSearchConditions {
10
- $projection?: IProjection;
11
- }
7
+ /**
8
+ * 予約検索条件
9
+ */
10
+ type IFindParams = Pick<factory.reservation.eventReservation.ISearchConditions, 'typeOf' | 'bookingFrom' | 'bookingThrough' | 'ids' | 'reservationNumbers' | 'reservationStatuses' | 'attended' | 'checkedIn'> & {
11
+ additionalTicketText?: string;
12
+ broker?: {
13
+ id?: string;
14
+ };
15
+ underName?: {
16
+ email?: {
17
+ $regex?: string;
18
+ };
19
+ telephone?: string;
20
+ givenName?: {
21
+ $regex?: string;
22
+ };
23
+ familyName?: {
24
+ $regex?: string;
25
+ };
26
+ };
27
+ reservationFor?: Pick<factory.reservation.eventReservation.IReservationForSearchConditions, 'startFrom' | 'startThrough' | 'ids'> & {
28
+ location?: {
29
+ branchCodes?: string[];
30
+ };
31
+ superEvent?: {
32
+ id?: string;
33
+ location?: {
34
+ ids?: string[];
35
+ branchCodes?: string[];
36
+ };
37
+ workPerformed?: {
38
+ identifiers?: string[];
39
+ };
40
+ };
41
+ };
42
+ reservedTicket?: {
43
+ ticketedSeat?: {
44
+ seatNumbers?: string[];
45
+ };
46
+ };
47
+ };
12
48
  /**
13
49
  * 予約サービス
14
50
  */
@@ -16,7 +52,8 @@ export declare class ReservationService extends Service {
16
52
  /**
17
53
  * 予約検索
18
54
  */
19
- find(params: Omit<factory.reservation.eventReservation.ISearchConditions, 'project' | 'provider'> & IProjectionSearchConditions & {
55
+ findReservations(params: IFindParams & {
56
+ $projection?: never;
20
57
  /**
21
58
  * min: 1
22
59
  * max: 20
@@ -10,7 +10,7 @@ class ReservationService extends service_1.Service {
10
10
  /**
11
11
  * 予約検索
12
12
  */
13
- async find(params) {
13
+ async findReservations(params) {
14
14
  return this.fetch({
15
15
  uri: '/reservations',
16
16
  method: 'GET',
@@ -1,6 +1,5 @@
1
1
  import { IAdditionalOptions, IOptions, IUnset as IUnsetOnService } from './service';
2
2
  import type { CancelReservationAssetTransactionService } from './chevreAdmin/assetTransaction/cancelReservation';
3
- import type { AuthorizationService } from './chevreAdmin/authorization';
4
3
  import type { CustomerService } from './chevreAdmin/customer';
5
4
  import type { EventService } from './chevreAdmin/event';
6
5
  import type { EventOfferService } from './chevreAdmin/eventOffer';
@@ -24,13 +23,6 @@ import type { SeatSectionService } from './chevreAdmin/seatSection';
24
23
  import type { SellerService } from './chevreAdmin/seller';
25
24
  export declare namespace service {
26
25
  type IUnset = IUnsetOnService;
27
- /**
28
- * 承認サービス
29
- */
30
- type Authorization = AuthorizationService;
31
- namespace Authorization {
32
- let svc: typeof AuthorizationService | undefined;
33
- }
34
26
  /**
35
27
  * 顧客サービス
36
28
  */
@@ -194,7 +186,6 @@ export declare namespace service {
194
186
  export declare class ChevreAdmin {
195
187
  options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>;
196
188
  constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>);
197
- createAuthorizationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AuthorizationService>;
198
189
  createCustomerInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CustomerService>;
199
190
  createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
200
191
  createEventOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventOfferService>;
@@ -36,9 +36,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.ChevreAdmin = exports.service = void 0;
37
37
  var service;
38
38
  (function (service) {
39
- let Authorization;
40
- (function (Authorization) {
41
- })(Authorization = service.Authorization || (service.Authorization = {}));
42
39
  let Customer;
43
40
  (function (Customer) {
44
41
  })(Customer = service.Customer || (service.Customer = {}));
@@ -117,12 +114,6 @@ class ChevreAdmin {
117
114
  constructor(options) {
118
115
  this.options = options;
119
116
  }
120
- async createAuthorizationInstance(params) {
121
- if (service.Authorization.svc === undefined) {
122
- service.Authorization.svc = (await Promise.resolve().then(() => __importStar(require('./chevreAdmin/authorization.js')))).AuthorizationService;
123
- }
124
- return new service.Authorization.svc({ ...this.options, ...params, retryableStatusCodes: [] });
125
- }
126
117
  async createCustomerInstance(params) {
127
118
  if (service.Customer.svc === undefined) {
128
119
  service.Customer.svc = (await Promise.resolve().then(() => __importStar(require('./chevreAdmin/customer.js')))).CustomerService;
@@ -34,17 +34,17 @@ class ReservationService extends service_1.Service {
34
34
  project,
35
35
  seller: { id: (typeof seller?.id === 'string') ? seller.id : '' }
36
36
  });
37
- return await reservationService.find({
37
+ return await reservationService.findReservations({
38
38
  ...params,
39
39
  limit,
40
40
  page,
41
- // statusを明示的に制限(2023-05-29~)
42
- reservationStatus: {
43
- $in: [
44
- factory_1.factory.reservationStatusType.ReservationCancelled,
45
- factory_1.factory.reservationStatusType.ReservationConfirmed
46
- ]
47
- },
41
+ // // statusを明示的に制限(2023-05-29~)
42
+ // reservationStatus: {
43
+ // $in: [
44
+ // factory.reservationStatusType.ReservationCancelled,
45
+ // factory.reservationStatusType.ReservationConfirmed
46
+ // ]
47
+ // },
48
48
  typeOf: factory_1.factory.reservationType.EventReservation
49
49
  });
50
50
  }