@chevre/factory 5.2.0-alpha.9 → 5.3.0-alpha.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.
- package/lib/action/reserve.d.ts +8 -1
- package/lib/assetTransaction/reserve.d.ts +17 -23
- package/lib/authorization.d.ts +59 -14
- package/lib/event/screeningEvent.d.ts +20 -8
- package/lib/iam.d.ts +10 -0
- package/lib/offer/eventOffer.d.ts +26 -10
- package/package.json +1 -1
package/lib/action/reserve.d.ts
CHANGED
|
@@ -37,7 +37,14 @@ export interface IPotentialActions {
|
|
|
37
37
|
}
|
|
38
38
|
export type IOrderAsInstrument = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
39
39
|
export type IPlaceOrderAsInstrument = Pick<IPlaceOrder, 'id' | 'typeOf'>;
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* 興行オファーチケット
|
|
42
|
+
*/
|
|
43
|
+
export interface ITicketAsInstrument {
|
|
44
|
+
ticketToken: string;
|
|
45
|
+
typeOf: 'Ticket';
|
|
46
|
+
}
|
|
47
|
+
export type IInstrument = IOrderAsInstrument | IPlaceOrderAsInstrument | ITicketAsInstrument;
|
|
41
48
|
export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.ReserveAction, IObject, IResult>, 'agent' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'typeOf' | 'error' | 'instrument'> {
|
|
42
49
|
agent: IAgent;
|
|
43
50
|
potentialActions?: IPotentialActions;
|
|
@@ -26,7 +26,7 @@ export interface IStartParams extends AssetTransactionFactory.IStartParams<Asset
|
|
|
26
26
|
/**
|
|
27
27
|
* add(2025-02-17~)
|
|
28
28
|
*/
|
|
29
|
-
instrument
|
|
29
|
+
instrument: IInstrument[];
|
|
30
30
|
}
|
|
31
31
|
export interface IPermitIssuedThroughFaceToFace {
|
|
32
32
|
/**
|
|
@@ -276,12 +276,12 @@ export interface ITokenizedMemberProgramTier {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
279
|
+
* イベントオファートークンの中身
|
|
280
|
+
* 予約対象イベント、オファー有効期間、イベントオファーコード、対象数量を定義する
|
|
281
281
|
*/
|
|
282
|
-
export interface
|
|
282
|
+
export interface IEventOfferTokenPayload {
|
|
283
283
|
/**
|
|
284
|
-
*
|
|
284
|
+
* イベントオファーコード
|
|
285
285
|
*/
|
|
286
286
|
identifier: string;
|
|
287
287
|
/**
|
|
@@ -299,35 +299,29 @@ export interface IOfferTokenPayload {
|
|
|
299
299
|
eligibleQuantity: {
|
|
300
300
|
maxValue: number;
|
|
301
301
|
};
|
|
302
|
+
/**
|
|
303
|
+
* 対象イベント
|
|
304
|
+
*/
|
|
302
305
|
itemOffered: {
|
|
303
306
|
/**
|
|
304
|
-
*
|
|
307
|
+
* イベントID
|
|
305
308
|
*/
|
|
306
|
-
|
|
309
|
+
id: string;
|
|
307
310
|
};
|
|
308
311
|
}
|
|
309
|
-
|
|
312
|
+
/**
|
|
313
|
+
* イベントオファートークン
|
|
314
|
+
* 外部組織がイベントオファーを定義する場合に使用
|
|
315
|
+
* トークンの中身については @see IEventOfferTokenPayload
|
|
316
|
+
*/
|
|
317
|
+
export type IEventOfferToken = string;
|
|
310
318
|
export interface IObjectWithoutDetail {
|
|
311
319
|
acceptedOffer?: IAcceptedTicketOfferWithoutDetail[];
|
|
312
320
|
broker?: ReservationFactory.IBroker;
|
|
313
321
|
reservationFor?: {
|
|
314
322
|
id: string;
|
|
315
323
|
offers?: {
|
|
316
|
-
|
|
317
|
-
* メンバープログラムティアトークン
|
|
318
|
-
* メンバープログラムティアごとにオファー有効期間が管理されている場合、検証されたトークンに基づいて有効期間が検証されます
|
|
319
|
-
*/
|
|
320
|
-
validForMemberTier?: ITokenizedMemberProgramTier;
|
|
321
|
-
/**
|
|
322
|
-
* support オファートークン
|
|
323
|
-
* 2025-10-21~
|
|
324
|
-
*/
|
|
325
|
-
token?: IOfferToken;
|
|
326
|
-
/**
|
|
327
|
-
* アプリケーションオファーコード
|
|
328
|
-
* オファートークン指定の場合、必須
|
|
329
|
-
*/
|
|
330
|
-
identifier?: string;
|
|
324
|
+
validForMemberTier?: never;
|
|
331
325
|
};
|
|
332
326
|
};
|
|
333
327
|
}
|
package/lib/authorization.d.ts
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
|
+
import { IEventOfferToken } from './assetTransaction/reserve';
|
|
1
2
|
import { CreativeWorkType } from './creativeWorkType';
|
|
2
3
|
import { IMember, IMemberOfRole } from './iam';
|
|
3
4
|
import { IInvoice } from './invoice';
|
|
5
|
+
import { OfferType } from './offerType';
|
|
4
6
|
import { IOrder } from './order';
|
|
5
7
|
import { OrganizationType } from './organizationType';
|
|
6
|
-
import { IOwnershipInfo, IPermitAsGood,
|
|
8
|
+
import { IOwnershipInfo, IPermitAsGood, IPermitIssuedThroughAsProduct } from './ownershipInfo';
|
|
7
9
|
import { PersonType } from './personType';
|
|
10
|
+
import { ProductType } from './product';
|
|
8
11
|
import { IProject } from './project';
|
|
12
|
+
import { ReservationType } from './reservationType';
|
|
9
13
|
import { PaymentServiceType } from './service/paymentService';
|
|
10
14
|
import { SortType } from './sortType';
|
|
11
15
|
import { TransactionType } from './transactionType';
|
|
12
16
|
export type IOrderAsObject = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
13
|
-
export type IPermitIssuedThroughOfObjectTypeOfGood = Pick<
|
|
17
|
+
export type IPermitIssuedThroughOfObjectTypeOfGood = Pick<IPermitIssuedThroughAsProduct, 'id' | 'typeOf'>;
|
|
14
18
|
export type IPermitAsTypeOfGood = Pick<IPermitAsGood, 'identifier' | 'typeOf'> & {
|
|
15
19
|
issuedThrough?: IPermitIssuedThroughOfObjectTypeOfGood;
|
|
16
20
|
};
|
|
17
|
-
/**
|
|
18
|
-
* MovieTicket決済サービス発行のチケット
|
|
19
|
-
*/
|
|
20
|
-
export type IInvoiceAsTypeOfGood = Pick<IInvoice, 'paymentMethodId' | 'typeOf'> & {
|
|
21
|
-
issuedThrough: {
|
|
22
|
-
id: string;
|
|
23
|
-
typeOf: PaymentServiceType.MovieTicket;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
21
|
/**
|
|
27
22
|
* 決済サービス発行のチケット
|
|
28
23
|
* new(2025-11-11~)
|
|
@@ -33,6 +28,9 @@ export interface IPaymentMethodAsTypeOfGood {
|
|
|
33
28
|
serviceOutput: Pick<IInvoice, 'paymentMethodId' | 'typeOf'>;
|
|
34
29
|
issuedThrough?: never;
|
|
35
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* 対面決済サービス発行のチケット
|
|
33
|
+
*/
|
|
36
34
|
export interface IFaceToFacePaymentMethodAsTypeOfGood {
|
|
37
35
|
/**
|
|
38
36
|
* 対面決済サービスIDはなし
|
|
@@ -43,7 +41,6 @@ export interface IFaceToFacePaymentMethodAsTypeOfGood {
|
|
|
43
41
|
issuedThrough?: never;
|
|
44
42
|
}
|
|
45
43
|
export type IPermitOwnershipInfo = Pick<IOwnershipInfo<IPermitAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
|
46
|
-
export type IInvoiceOwnershipInfo = Pick<IOwnershipInfo<IInvoiceAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
|
47
44
|
/**
|
|
48
45
|
* 決済方法所有権
|
|
49
46
|
* support(2025-11-11~)
|
|
@@ -54,14 +51,62 @@ export type IPaymentMethodOwnershipInfo = Pick<IOwnershipInfo<IPaymentMethodAsTy
|
|
|
54
51
|
* support(2025-11-12~)
|
|
55
52
|
*/
|
|
56
53
|
export type IFaceToFacePaymentMethodOwnershipInfo = Pick<IOwnershipInfo<IFaceToFacePaymentMethodAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
|
57
|
-
export type IOwnershipInfoAsObject = IPermitOwnershipInfo |
|
|
54
|
+
export type IOwnershipInfoAsObject = IPermitOwnershipInfo | IPaymentMethodOwnershipInfo | IFaceToFacePaymentMethodOwnershipInfo;
|
|
58
55
|
/**
|
|
59
56
|
* 承認対象としてのIAMメンバー
|
|
60
57
|
*/
|
|
61
58
|
export type IRoleAsObject = Pick<IMember, 'member' | 'typeOf'> & {
|
|
62
59
|
member: Pick<IMemberOfRole, 'hasRole' | 'id' | 'memberOf' | 'typeOf'>;
|
|
63
60
|
};
|
|
64
|
-
|
|
61
|
+
/**
|
|
62
|
+
* トークン化されたメンバープログラムティア
|
|
63
|
+
*/
|
|
64
|
+
export interface ITokenizedMemberProgramTier {
|
|
65
|
+
/**
|
|
66
|
+
* ティアトークン
|
|
67
|
+
*/
|
|
68
|
+
token: string;
|
|
69
|
+
isTierOf: {
|
|
70
|
+
/**
|
|
71
|
+
* メンバープログラムコード
|
|
72
|
+
*/
|
|
73
|
+
identifier: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 承認対象としての興行オファー
|
|
78
|
+
*/
|
|
79
|
+
export interface IOfferAsObject {
|
|
80
|
+
typeOf: OfferType.Offer;
|
|
81
|
+
itemOffered: {
|
|
82
|
+
typeOf: ProductType.EventService;
|
|
83
|
+
serviceOutput: {
|
|
84
|
+
typeOf: ReservationType.ReservationPackage;
|
|
85
|
+
reservationFor: {
|
|
86
|
+
/**
|
|
87
|
+
* イベントID
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* 拡張イベントオファーID
|
|
95
|
+
* 拡張イベントオファー使用の場合、必須
|
|
96
|
+
*/
|
|
97
|
+
id?: string;
|
|
98
|
+
/**
|
|
99
|
+
* イベントオファートークン
|
|
100
|
+
* 2025-10-21~
|
|
101
|
+
*/
|
|
102
|
+
token?: IEventOfferToken;
|
|
103
|
+
/**
|
|
104
|
+
* メンバープログラムティアトークン
|
|
105
|
+
* メンバープログラムティアごとにオファー有効期間が管理されている場合、検証されたトークンに基づいて有効期間が検証されます
|
|
106
|
+
*/
|
|
107
|
+
validForMemberTier?: ITokenizedMemberProgramTier;
|
|
108
|
+
}
|
|
109
|
+
export type IObject = IOrderAsObject | IOwnershipInfoAsObject | IRoleAsObject | IOfferAsObject;
|
|
65
110
|
export interface IAudienceAsPlaceOrder {
|
|
66
111
|
/**
|
|
67
112
|
* 取引ID
|
|
@@ -183,7 +183,7 @@ export type IOffers4create = Pick<IOffer, 'unacceptedPaymentMethod' | 'identifie
|
|
|
183
183
|
*/
|
|
184
184
|
itemOffered: Pick<IItemOffered, 'id' | 'serviceOutput'>;
|
|
185
185
|
/**
|
|
186
|
-
*
|
|
186
|
+
* アプリケーション設定
|
|
187
187
|
*/
|
|
188
188
|
seller: ISeller4create;
|
|
189
189
|
};
|
|
@@ -192,12 +192,6 @@ export type ICreateParams = Pick<IAttributes, 'doorTime' | 'startDate' | 'endDat
|
|
|
192
192
|
superEvent?: never;
|
|
193
193
|
offers: IOffers4create;
|
|
194
194
|
};
|
|
195
|
-
/**
|
|
196
|
-
* イベント更新パラメータ
|
|
197
|
-
*/
|
|
198
|
-
export type IUpdateParams = Pick<ICreateParams, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'offers' | 'startDate' | 'maximumPhysicalAttendeeCapacity'> & {
|
|
199
|
-
location?: never;
|
|
200
|
-
};
|
|
201
195
|
export type IOffer4update = Pick<IOffers4create, 'eligibleQuantity' | 'identifier' | 'unacceptedPaymentMethod'> & {
|
|
202
196
|
/**
|
|
203
197
|
* 興行IDを指定
|
|
@@ -210,9 +204,27 @@ export type IOffer4update = Pick<IOffers4create, 'eligibleQuantity' | 'identifie
|
|
|
210
204
|
/**
|
|
211
205
|
* 単一イベント編集パラメータ
|
|
212
206
|
*/
|
|
213
|
-
export type IUpdateByIdParams = Pick<
|
|
207
|
+
export type IUpdateByIdParams = Pick<ICreateParams, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'startDate' | 'maximumPhysicalAttendeeCapacity'> & {
|
|
208
|
+
location?: never;
|
|
214
209
|
offers: IOffer4update;
|
|
215
210
|
};
|
|
211
|
+
/**
|
|
212
|
+
* 識別子によるイベント編集パラメータ
|
|
213
|
+
*/
|
|
214
|
+
export type IUpdateByIdentifierParams = Pick<IUpdateByIdParams, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'startDate' | 'maximumPhysicalAttendeeCapacity'> & {
|
|
215
|
+
/**
|
|
216
|
+
* イベント識別子
|
|
217
|
+
*/
|
|
218
|
+
identifier: string;
|
|
219
|
+
offers: Pick<IOffer4update, 'eligibleQuantity' | 'unacceptedPaymentMethod' | 'itemOffered'> & {
|
|
220
|
+
/**
|
|
221
|
+
* アプリケーション設定
|
|
222
|
+
*/
|
|
223
|
+
seller: Pick<ISeller4create, 'makesOffer'>;
|
|
224
|
+
};
|
|
225
|
+
location?: never;
|
|
226
|
+
superEvent?: never;
|
|
227
|
+
};
|
|
216
228
|
/**
|
|
217
229
|
* ソート条件
|
|
218
230
|
*/
|
package/lib/iam.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export interface IMemberOfRole {
|
|
|
21
21
|
* クライアントID or Person ID
|
|
22
22
|
*/
|
|
23
23
|
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* アプリケーションコード
|
|
26
|
+
*/
|
|
27
|
+
identifier?: string;
|
|
24
28
|
image?: string;
|
|
25
29
|
name?: string;
|
|
26
30
|
username?: string;
|
|
@@ -71,6 +75,12 @@ export interface ISearchConditions {
|
|
|
71
75
|
$eq?: string;
|
|
72
76
|
$in?: string[];
|
|
73
77
|
};
|
|
78
|
+
/**
|
|
79
|
+
* アプリケーションコード
|
|
80
|
+
*/
|
|
81
|
+
identifier?: {
|
|
82
|
+
$eq?: string;
|
|
83
|
+
};
|
|
74
84
|
name?: {
|
|
75
85
|
$regex?: string;
|
|
76
86
|
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { EventType } from '../eventType';
|
|
2
|
-
import {
|
|
2
|
+
import { IOffer } from '../offer';
|
|
3
3
|
import { OfferType } from '../offerType';
|
|
4
4
|
import { OrganizationType } from '../organizationType';
|
|
5
5
|
import { SortType } from '../sortType';
|
|
6
|
-
|
|
6
|
+
interface IOfferAvailableAtOrFrom {
|
|
7
|
+
/**
|
|
8
|
+
* アプリケーションコード
|
|
9
|
+
*/
|
|
10
|
+
identifier: string;
|
|
11
|
+
}
|
|
7
12
|
interface ISeller {
|
|
8
13
|
id: string;
|
|
9
14
|
typeOf: OrganizationType.Corporation;
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
|
-
*
|
|
17
|
+
* 拡張可能なイベントオファー
|
|
13
18
|
*/
|
|
14
|
-
interface
|
|
19
|
+
interface IEventOffer extends Pick<IOffer, 'typeOf' | 'validFrom' | 'validThrough'> {
|
|
15
20
|
project: {
|
|
16
21
|
id: string;
|
|
17
22
|
typeOf: OrganizationType.Project;
|
|
@@ -26,13 +31,23 @@ interface IExtendedEventOffer extends Pick<IOffer, 'typeOf' | 'availabilityEnds'
|
|
|
26
31
|
* いつまで承認可能か
|
|
27
32
|
*/
|
|
28
33
|
validThrough: Date;
|
|
34
|
+
/**
|
|
35
|
+
* 利用可能アプリケーション
|
|
36
|
+
*/
|
|
29
37
|
availableAtOrFrom: IOfferAvailableAtOrFrom;
|
|
38
|
+
id: string;
|
|
30
39
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
40
|
+
* オファーコード
|
|
41
|
+
* イベントID内でユニーク必須
|
|
33
42
|
*/
|
|
34
43
|
identifier: string;
|
|
44
|
+
/**
|
|
45
|
+
* イベント
|
|
46
|
+
*/
|
|
35
47
|
itemOffered: {
|
|
48
|
+
/**
|
|
49
|
+
* イベントID
|
|
50
|
+
*/
|
|
36
51
|
id: string;
|
|
37
52
|
typeOf: EventType.ScreeningEvent;
|
|
38
53
|
};
|
|
@@ -51,10 +66,6 @@ interface IExtendedEventOffer extends Pick<IOffer, 'typeOf' | 'availabilityEnds'
|
|
|
51
66
|
availabilityEnds?: never;
|
|
52
67
|
availabilityStarts?: never;
|
|
53
68
|
}
|
|
54
|
-
/**
|
|
55
|
-
* 拡張されたイベントアプリケーションオファー
|
|
56
|
-
*/
|
|
57
|
-
type IEventOffer = IExtendedEventOffer;
|
|
58
69
|
interface ISearchConditions {
|
|
59
70
|
limit?: number;
|
|
60
71
|
page?: number;
|
|
@@ -85,6 +96,11 @@ interface ISearchConditions {
|
|
|
85
96
|
$in?: string[];
|
|
86
97
|
};
|
|
87
98
|
};
|
|
99
|
+
availableAtOrFrom?: {
|
|
100
|
+
identifier?: {
|
|
101
|
+
$eq?: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
88
104
|
offeredBy?: {
|
|
89
105
|
/**
|
|
90
106
|
* オファー提供者ID
|