@cinerino/sdk 15.0.0-alpha.8 → 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',
@@ -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
  }