@chevre/factory 4.389.0-alpha.8 → 4.389.0

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.
@@ -29,7 +29,7 @@ export interface IPaymentService extends Pick<PayActionFactory.IPaymentService,
29
29
  typeOf: string;
30
30
  };
31
31
  }
32
- export type IObject = IPaymentService[];
32
+ export type IObject = [IPaymentService];
33
33
  export interface IResult {
34
34
  }
35
35
  export type IError = any;
@@ -91,7 +91,7 @@ export interface IPaymentService {
91
91
  */
92
92
  serviceOutput?: IPaymentServiceOutput;
93
93
  }
94
- export type IObject = IPaymentService[];
94
+ export type IObject = [IPaymentService];
95
95
  export type IInformPayment = Pick<IInformActionAttributes<{}>, 'recipient' | 'purpose'>;
96
96
  export interface IPotentialActions {
97
97
  add2report: boolean;
@@ -12,7 +12,7 @@ export type IPaymentService = Omit<IPaymentServiceOnPay, 'paymentMethod'> & {
12
12
  refundFee?: number;
13
13
  paymentMethod: Pick<IPaymentMethod, 'accountId' | 'name' | 'paymentMethodId' | 'typeOf' | 'additionalProperty'>;
14
14
  };
15
- export type IObject = IPaymentService[];
15
+ export type IObject = [IPaymentService];
16
16
  export interface IAlterTranResultAsError {
17
17
  name: string;
18
18
  message: string;
@@ -1,10 +1,12 @@
1
1
  import { CreativeWorkType } from './creativeWorkType';
2
2
  import { IMember, IMemberOfRole } from './iam';
3
+ import { IInvoice } from './invoice';
3
4
  import { IOrder } from './order';
4
5
  import { OrganizationType } from './organizationType';
5
6
  import { IOwnershipInfo, IPermitAsGood, IPermitIssuedThroughAsFaceToFace, IPermitIssuedThroughAsProduct } from './ownershipInfo';
6
7
  import { PersonType } from './personType';
7
8
  import { IProject } from './project';
9
+ import { PaymentServiceType } from './service/paymentService';
8
10
  import { SortType } from './sortType';
9
11
  import { TransactionType } from './transactionType';
10
12
  export type IOrderAsObject = Pick<IOrder, 'orderNumber' | 'typeOf'>;
@@ -12,8 +14,18 @@ export type IPermitIssuedThroughOfObjectTypeOfGood = Pick<IPermitIssuedThroughAs
12
14
  export type IPermitAsObjectTypeOfGood = Pick<IPermitAsGood, 'identifier' | 'typeOf'> & {
13
15
  issuedThrough?: IPermitIssuedThroughOfObjectTypeOfGood;
14
16
  };
17
+ /**
18
+ * 決済サービス発行のチケット
19
+ */
20
+ export type IInvoiceAsObjectTypeOfGood = Pick<IInvoice, 'paymentMethodId' | 'typeOf'> & {
21
+ issuedThrough: {
22
+ id: string;
23
+ typeOf: PaymentServiceType.MovieTicket;
24
+ };
25
+ };
15
26
  export type IPermitOwnershipInfoAsObject = Pick<IOwnershipInfo<IPermitAsObjectTypeOfGood>, 'typeOf' | 'typeOfGood'>;
16
- export type IOwnershipInfoAsObject = IPermitOwnershipInfoAsObject;
27
+ export type IInvoiceOwnershipInfoAsObject = Pick<IOwnershipInfo<IInvoiceAsObjectTypeOfGood>, 'typeOf' | 'typeOfGood'>;
28
+ export type IOwnershipInfoAsObject = IPermitOwnershipInfoAsObject | IInvoiceOwnershipInfoAsObject;
17
29
  /**
18
30
  * 承認対象としてのIAMメンバー
19
31
  */
@@ -28,13 +28,16 @@ export interface IOfferWithAggregateReservation {
28
28
  typeOf: OfferType.Offer;
29
29
  id: string;
30
30
  identifier: string;
31
- aggregateReservation?: Pick<IAggregateReservation, 'typeOf' | 'attendeeCount' | 'checkInCount' | 'reservationCount'>;
31
+ aggregateReservation?: Pick<IAggregateReservation, 'typeOf' | 'reservationCount'> & {
32
+ attendeeCount?: never;
33
+ checkInCount?: never;
34
+ };
32
35
  category?: OfferFactory.ICategory;
33
36
  maximumAttendeeCapacity?: number;
34
37
  remainingAttendeeCapacity?: number;
35
38
  }
36
39
  /**
37
- * オファー集計
40
+ * オファー集計(オファーカテゴリーごと)
38
41
  */
39
42
  export interface IAggregateOffer {
40
43
  typeOf: OfferType.AggregateOffer;
@@ -42,6 +45,9 @@ export interface IAggregateOffer {
42
45
  offerCount?: number;
43
46
  offers?: IOfferWithAggregateReservation[];
44
47
  }
48
+ /**
49
+ * 入場ゲートにおけるオファー集計(オファーカテゴリーごと)
50
+ */
45
51
  export interface IAggregateOfferOfPlace {
46
52
  typeOf: OfferType.AggregateOffer;
47
53
  offers?: {
@@ -109,13 +115,14 @@ export interface IItemOffered {
109
115
  typeOf: ProductType.Transportation;
110
116
  availableChannel: ReservationFactory.IServiceChannel;
111
117
  }
112
- export type IOfferedThrough = IWebAPIService<WebAPIIdentifier.Chevre>;
118
+ export type IOfferedThrough = Pick<IWebAPIService<WebAPIIdentifier.Chevre>, 'identifier' | 'typeOf'>;
119
+ export type IOfferAvailableAtOrFrom = Pick<OfferFactory.IAvailableAtOrFrom, 'id'>;
113
120
  export interface ISellerMakesOffer extends Pick<OfferFactory.IOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> {
114
121
  availabilityEnds: Date;
115
122
  availabilityStarts: Date;
116
123
  validFrom: Date;
117
124
  validThrough: Date;
118
- availableAtOrFrom?: OfferFactory.IAvailableAtOrFrom[] | OfferFactory.IAvailableAtOrFrom;
125
+ availableAtOrFrom?: IOfferAvailableAtOrFrom;
119
126
  }
120
127
  export interface ISeller {
121
128
  typeOf: OrganizationType.Corporation;
@@ -206,16 +213,10 @@ export interface IAttributes extends Pick<EventFactory.IAttributes<EventType.Eve
206
213
  * 参加数
207
214
  */
208
215
  attendeeCount?: Number;
209
- /**
210
- * 入場ゲート集計
211
- */
212
216
  /**
213
217
  * 予約集計
214
218
  */
215
219
  aggregateReservation?: IAggregateReservation;
216
- /**
217
- * オファー集計
218
- */
219
220
  organizer: IOrganizer;
220
221
  }
221
222
  /**
@@ -224,7 +225,7 @@ export interface IAttributes extends Pick<EventFactory.IAttributes<EventType.Eve
224
225
  export type IEvent = EventFactory.IEvent<IAttributes>;
225
226
  export type ILocation4create = Pick<ILocation, 'branchCode' | 'maximumAttendeeCapacity'>;
226
227
  export type ISellerMakesOffer4create = Pick<ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough' | 'typeOf'> & {
227
- availableAtOrFrom: Pick<OfferFactory.IAvailableAtOrFrom, 'id'>;
228
+ availableAtOrFrom: Pick<IOfferAvailableAtOrFrom, 'id'>;
228
229
  };
229
230
  export interface ISeller4create {
230
231
  makesOffer: ISellerMakesOffer4create[];
@@ -65,7 +65,7 @@ export interface IOffer {
65
65
  }
66
66
  export type ISeller4COA = Pick<ISeller, 'id' | 'makesOffer' | 'typeOf'>;
67
67
  export type IOffer4COA = Pick<IOffer, 'typeOf' | 'eligibleQuantity'> & {
68
- offeredThrough: IWebAPIService<WebAPIIdentifier.COA>;
68
+ offeredThrough: Pick<IWebAPIService<WebAPIIdentifier.COA>, 'identifier' | 'typeOf'>;
69
69
  seller: ISeller4COA;
70
70
  itemOffered: {
71
71
  serviceOutput: Pick<IServiceOutput, 'reservedTicket'>;
@@ -1,3 +1,4 @@
1
+ import { ActionType } from '../actionType';
1
2
  import { IProvider, ITicket, IUnderName } from '../reservation';
2
3
  import { IIssuedThrough, IReservation as IEventReservation, IReservationFor } from '../reservation/event';
3
4
  import { ReservationStatusType } from '../reservationStatusType';
@@ -81,6 +82,21 @@ export interface IReservation4informUsed {
81
82
  reservationStatus?: never;
82
83
  checkedIn?: never;
83
84
  }
85
+ /**
86
+ * 予約使用アクション通知
87
+ */
88
+ export interface IUseAction {
89
+ object: Pick<IReservation4informUsed, 'id' | 'modifiedTime' | 'reservedTicket' | 'typeOf'>;
90
+ typeOf: ActionType.UseAction;
91
+ project: IProject;
92
+ id: string;
93
+ location?: {
94
+ /**
95
+ * 入場ゲートコード
96
+ */
97
+ identifier: string;
98
+ };
99
+ }
84
100
  /**
85
101
  * 予約作成通知
86
102
  */
@@ -105,5 +121,5 @@ export interface IReservationPackage4informPendingCanceled {
105
121
  reservationStatus: ReservationStatusType.ReservationCancelled;
106
122
  typeOf: ReservationType.ReservationPackage;
107
123
  }
108
- export type IReservation4inform = IReservationPackage4informConfirmed | IReservation4informCanceled[] | IReservation4informCheckedIn[] | IReservationPackage4informCheckedIn[] | IReservation4informUsed | IReservationPackage4informPending | IReservationPackage4informPendingCanceled;
124
+ export type IReservation4inform = IReservationPackage4informConfirmed | IReservation4informCanceled[] | IReservation4informCheckedIn[] | IReservationPackage4informCheckedIn[] | IReservation4informUsed | IUseAction | IReservationPackage4informPending | IReservationPackage4informPendingCanceled;
109
125
  export {};
package/lib/offer.d.ts CHANGED
@@ -49,7 +49,7 @@ export interface ISeller {
49
49
  typeOf?: OrganizationType.Corporation;
50
50
  id?: string;
51
51
  }
52
- export type IOfferedThrough = WebAPIFactory.IService<WebAPIFactory.Identifier>;
52
+ export type IOfferedThrough = Pick<WebAPIFactory.IService<WebAPIFactory.Identifier>, 'identifier' | 'typeOf'>;
53
53
  /**
54
54
  * レート制限
55
55
  * どのスコープで何秒に1席までか
@@ -1,4 +1,5 @@
1
1
  import { CreativeWorkType } from './creativeWorkType';
2
+ import { IInvoice } from './invoice';
2
3
  import { OrganizationType } from './organizationType';
3
4
  import * as PermitFactory from './permit';
4
5
  import { PersonType } from './personType';
@@ -9,7 +10,7 @@ import { IReservation as IEventReservation } from './reservation/event';
9
10
  import { ReservationType } from './reservationType';
10
11
  import * as WebAPIFactory from './service/webAPI';
11
12
  import { SortType } from './sortType';
12
- export type IBookingService = WebAPIFactory.IService<WebAPIFactory.Identifier>;
13
+ export type IBookingService = Pick<WebAPIFactory.IService<WebAPIFactory.Identifier>, 'identifier' | 'typeOf'>;
13
14
  export interface IBusReservationAsGood {
14
15
  typeOf: ReservationType.BusReservation;
15
16
  /**
@@ -58,10 +59,20 @@ export type IPermitAsGood = Pick<PermitFactory.IPermit, 'identifier' | 'typeOf'
58
59
  identifier: string;
59
60
  issuedThrough?: IPermitIssuedThrough;
60
61
  };
62
+ /**
63
+ * 所有対象としての請求
64
+ * 決済承認時にチケットとして利用される
65
+ */
66
+ export type InvoiceAsGood = Pick<IInvoice, 'paymentMethodId' | 'typeOf'> & {
67
+ issuedThrough: {
68
+ id: string;
69
+ typeOf: IInvoice['paymentMethod']['typeOf'];
70
+ };
71
+ };
61
72
  /**
62
73
  * 所有対象物 (Product or Service)
63
74
  */
64
- export type IGood = IReservation | IPermitAsGood;
75
+ export type IGood = IReservation | IPermitAsGood | InvoiceAsGood;
65
76
  /**
66
77
  * 所有対象物(対象物詳細有)
67
78
  */
package/lib/project.d.ts CHANGED
@@ -26,7 +26,6 @@ export interface ISendEmailMessageSettings {
26
26
  * プロジェクト設定
27
27
  */
28
28
  export interface ISettings {
29
- importEventsInWeeks?: number;
30
29
  sendEmailMessage?: ISendEmailMessageSettings;
31
30
  sendgridApiKey?: string;
32
31
  useMyCreditCards?: boolean;
@@ -34,6 +33,12 @@ export interface ISettings {
34
33
  * 受け入れるトークン発行者
35
34
  */
36
35
  tokenIssuers?: string[];
36
+ useAggregateReservation?: {
37
+ /**
38
+ * aggregateReservationsを利用する施設コンテンツID
39
+ */
40
+ eventSeriesIds?: string[];
41
+ };
37
42
  useAggregateEntranceGate?: boolean;
38
43
  useAggregateOffer?: boolean;
39
44
  useOfferRateLimit?: boolean;
package/lib/schedule.d.ts CHANGED
@@ -1,10 +1,37 @@
1
1
  import { IAvailableAtOrFrom } from './offer';
2
2
  import { OrganizationType } from './organizationType';
3
- export interface ISchedule4ttts {
3
+ export interface ISchedule {
4
+ /**
5
+ * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 duration format.
6
+ */
7
+ duration: string;
8
+ /**
9
+ * Indicates the timezone for which the time(s) indicated in the Schedule are given.
10
+ * Asia/Tokyo
11
+ */
12
+ scheduleTimezone: string;
13
+ /**
14
+ * HH:mm:ss
15
+ */
16
+ startTime: string;
17
+ /**
18
+ * HH:mm:ss
19
+ */
20
+ endTime: string;
21
+ /**
22
+ * Defines the frequency at which Events will occur according to a schedule Schedule.
23
+ */
24
+ repeatFrequency: string;
25
+ typeOf: 'Schedule';
26
+ }
27
+ export interface IEventWithSchedule {
4
28
  project: {
5
29
  id: string;
6
30
  typeOf: OrganizationType.Project;
7
31
  };
32
+ /**
33
+ * スケジュールID
34
+ */
8
35
  id?: string;
9
36
  offers?: {
10
37
  itemOffered?: {
@@ -22,32 +49,11 @@ export interface ISchedule4ttts {
22
49
  }[];
23
50
  };
24
51
  };
25
- film: string;
26
- theater: string;
27
- /**
28
- * 興行プロダクトID
29
- * @deprecated use offers.itemOffered.id
30
- */
31
- duration: number;
32
- noPerformanceTimes: string[];
33
- /**
34
- * 作成対象時間: 9,10,11など
35
- */
36
- hours: string[];
37
- /**
38
- * ['00', '15', '30', '45']
39
- */
40
- minutes: string[];
41
- /**
42
- * ['1', '2', '3', '4']
43
- */
44
- tours: string[];
45
- /**
46
- * 作成開始が今日から何日後か
47
- */
48
- start: number;
49
- /**
50
- * 何日分作成するか
51
- */
52
- days: number;
52
+ superEvent?: {
53
+ /**
54
+ * 施設コンテンツID
55
+ */
56
+ id?: string;
57
+ };
58
+ eventSchedule: ISchedule;
53
59
  }
package/lib/schedule.js CHANGED
@@ -1,2 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export interface ISchedule4ttts extends Pick<IEventWithSchedule, 'id' | 'offers' | 'project' | 'superEvent'> {
4
+ // eventSchedule?: never;
5
+ // duration: number;
6
+ // noPerformanceTimes: string[];
7
+ // /**
8
+ // * 作成対象時間: 9,10,11など
9
+ // */
10
+ // hours: string[];
11
+ // /**
12
+ // * ['00', '15', '30', '45']
13
+ // */
14
+ // minutes: string[];
15
+ // /**
16
+ // * ['1', '2', '3', '4']
17
+ // */
18
+ // tours: string[];
19
+ // /**
20
+ // * 作成開始が今日から何日後か
21
+ // */
22
+ // // start: number;
23
+ // /**
24
+ // * 何日分作成するか
25
+ // */
26
+ // days: number;
27
+ // }
@@ -1,11 +1,35 @@
1
+ import { IProject } from '../project';
1
2
  export declare enum Identifier {
2
3
  COA = "COA",
3
4
  Chevre = "Chevre"
4
5
  }
5
6
  /**
6
- * WebAPIインターフェース
7
+ * WebAPI
7
8
  */
8
9
  export interface IService<T extends Identifier> {
9
10
  typeOf: 'WebAPI';
10
11
  identifier: T;
11
12
  }
13
+ export interface ICredentials {
14
+ endpoint: string;
15
+ refreshToken: string;
16
+ useFetch: boolean;
17
+ /**
18
+ * リモートリポジトリへの認証情報保管期間
19
+ */
20
+ expireInSeconds?: number;
21
+ }
22
+ export interface IAvailableChannel {
23
+ typeOf: 'ServiceChannel';
24
+ credentials?: ICredentials;
25
+ importEventsInWeeks?: number;
26
+ excludeMovieTheaters?: string[];
27
+ }
28
+ /**
29
+ * 外部サービス設定を含むWebAPI
30
+ */
31
+ export interface IServiceWithChannel extends Pick<IService<Identifier>, 'typeOf'> {
32
+ project: Pick<IProject, 'id' | 'typeOf'>;
33
+ id?: string;
34
+ availableChannel?: IAvailableChannel;
35
+ }
@@ -20,8 +20,13 @@ export interface IData {
20
20
  * アクション失敗時に即時に決済取引を中止するかどうか
21
21
  */
22
22
  useCancelPayTransactionOnFailed: boolean;
23
- useCheckByIdentifierIfNotYet: boolean;
24
23
  useUnlockTransactionProcess: boolean;
24
+ /**
25
+ * 既存決済カード認証アクション
26
+ */
27
+ checkedAction: {
28
+ id: string;
29
+ };
25
30
  };
26
31
  }
27
32
  export interface IAttributes extends TaskFactory.IAttributes {
@@ -16,6 +16,10 @@ export interface IActionInstrument {
16
16
  createScreeningEventSeriesOnAllLocation?: boolean;
17
17
  }
18
18
  export interface IEventBySchedule {
19
+ /**
20
+ * スケジュールを作成し始める日(Asia/Tokyoでこの日から作成される)
21
+ */
22
+ startDate?: Date;
19
23
  eventSchedule: {
20
24
  id: string;
21
25
  };
@@ -52,6 +52,10 @@ export interface ISettings {
52
52
  * 区分加算料金を適用しない
53
53
  */
54
54
  ignoreCategoryCodeChargeSpec?: boolean;
55
+ /**
56
+ * 予約集計対象かどうか(2024-11-09~)
57
+ */
58
+ includedInAggregateReservation?: boolean;
55
59
  }
56
60
  export interface IAdvanceBookingRequirement extends Pick<IQuantitativeValue<UnitCode.Sec>, 'typeOf' | 'minValue' | 'unitCode' | 'description'> {
57
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.389.0-alpha.8",
3
+ "version": "4.389.0",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",