@chevre/factory 5.2.0-alpha.8 → 5.2.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 +2 -16
- package/lib/authorization.d.ts +77 -18
- package/lib/event/screeningEvent.d.ts +20 -8
- package/lib/iam.d.ts +10 -0
- package/lib/offer/eventOffer.d.ts +26 -10
- package/lib/ownershipInfo.d.ts +11 -2
- 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
|
/**
|
|
@@ -313,21 +313,7 @@ export interface IObjectWithoutDetail {
|
|
|
313
313
|
reservationFor?: {
|
|
314
314
|
id: string;
|
|
315
315
|
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;
|
|
316
|
+
validForMemberTier?: never;
|
|
331
317
|
};
|
|
332
318
|
};
|
|
333
319
|
}
|
package/lib/authorization.d.ts
CHANGED
|
@@ -1,53 +1,112 @@
|
|
|
1
1
|
import { CreativeWorkType } from './creativeWorkType';
|
|
2
2
|
import { IMember, IMemberOfRole } from './iam';
|
|
3
3
|
import { IInvoice } from './invoice';
|
|
4
|
+
import { OfferType } from './offerType';
|
|
4
5
|
import { IOrder } from './order';
|
|
5
6
|
import { OrganizationType } from './organizationType';
|
|
6
|
-
import { IOwnershipInfo, IPermitAsGood,
|
|
7
|
+
import { IOwnershipInfo, IPermitAsGood, IPermitIssuedThroughAsProduct } from './ownershipInfo';
|
|
7
8
|
import { PersonType } from './personType';
|
|
9
|
+
import { ProductType } from './product';
|
|
8
10
|
import { IProject } from './project';
|
|
11
|
+
import { ReservationType } from './reservationType';
|
|
9
12
|
import { PaymentServiceType } from './service/paymentService';
|
|
10
13
|
import { SortType } from './sortType';
|
|
11
14
|
import { TransactionType } from './transactionType';
|
|
12
15
|
export type IOrderAsObject = Pick<IOrder, 'orderNumber' | 'typeOf'>;
|
|
13
|
-
export type IPermitIssuedThroughOfObjectTypeOfGood = Pick<
|
|
14
|
-
export type
|
|
16
|
+
export type IPermitIssuedThroughOfObjectTypeOfGood = Pick<IPermitIssuedThroughAsProduct, 'id' | 'typeOf'>;
|
|
17
|
+
export type IPermitAsTypeOfGood = Pick<IPermitAsGood, 'identifier' | 'typeOf'> & {
|
|
15
18
|
issuedThrough?: IPermitIssuedThroughOfObjectTypeOfGood;
|
|
16
19
|
};
|
|
17
|
-
/**
|
|
18
|
-
* MovieTicket決済サービス発行のチケット
|
|
19
|
-
*/
|
|
20
|
-
export type IInvoiceAsObjectTypeOfGood = Pick<IInvoice, 'paymentMethodId' | 'typeOf'> & {
|
|
21
|
-
issuedThrough: {
|
|
22
|
-
id: string;
|
|
23
|
-
typeOf: PaymentServiceType.MovieTicket;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
20
|
/**
|
|
27
21
|
* 決済サービス発行のチケット
|
|
28
22
|
* new(2025-11-11~)
|
|
29
23
|
*/
|
|
30
|
-
export interface
|
|
24
|
+
export interface IPaymentMethodAsTypeOfGood {
|
|
31
25
|
id: string;
|
|
32
26
|
typeOf: PaymentServiceType.CreditCard | PaymentServiceType.MovieTicket;
|
|
33
27
|
serviceOutput: Pick<IInvoice, 'paymentMethodId' | 'typeOf'>;
|
|
34
28
|
issuedThrough?: never;
|
|
35
29
|
}
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
/**
|
|
31
|
+
* 対面決済サービス発行のチケット
|
|
32
|
+
*/
|
|
33
|
+
export interface IFaceToFacePaymentMethodAsTypeOfGood {
|
|
34
|
+
/**
|
|
35
|
+
* 対面決済サービスIDはなし
|
|
36
|
+
*/
|
|
37
|
+
id?: never;
|
|
38
|
+
typeOf: PaymentServiceType.FaceToFace;
|
|
39
|
+
serviceOutput: Pick<IInvoice, 'paymentMethodId' | 'typeOf'>;
|
|
40
|
+
issuedThrough?: never;
|
|
41
|
+
}
|
|
42
|
+
export type IPermitOwnershipInfo = Pick<IOwnershipInfo<IPermitAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
|
38
43
|
/**
|
|
39
44
|
* 決済方法所有権
|
|
40
45
|
* support(2025-11-11~)
|
|
41
46
|
*/
|
|
42
|
-
export type
|
|
43
|
-
|
|
47
|
+
export type IPaymentMethodOwnershipInfo = Pick<IOwnershipInfo<IPaymentMethodAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
|
48
|
+
/**
|
|
49
|
+
* 対面決済方法所有権
|
|
50
|
+
* support(2025-11-12~)
|
|
51
|
+
*/
|
|
52
|
+
export type IFaceToFacePaymentMethodOwnershipInfo = Pick<IOwnershipInfo<IFaceToFacePaymentMethodAsTypeOfGood>, 'typeOf' | 'typeOfGood'>;
|
|
53
|
+
export type IOwnershipInfoAsObject = IPermitOwnershipInfo | IPaymentMethodOwnershipInfo | IFaceToFacePaymentMethodOwnershipInfo;
|
|
44
54
|
/**
|
|
45
55
|
* 承認対象としてのIAMメンバー
|
|
46
56
|
*/
|
|
47
57
|
export type IRoleAsObject = Pick<IMember, 'member' | 'typeOf'> & {
|
|
48
58
|
member: Pick<IMemberOfRole, 'hasRole' | 'id' | 'memberOf' | 'typeOf'>;
|
|
49
59
|
};
|
|
50
|
-
|
|
60
|
+
/**
|
|
61
|
+
* トークン化されたメンバープログラムティア
|
|
62
|
+
*/
|
|
63
|
+
export interface ITokenizedMemberProgramTier {
|
|
64
|
+
/**
|
|
65
|
+
* ティアトークン
|
|
66
|
+
*/
|
|
67
|
+
token: string;
|
|
68
|
+
isTierOf: {
|
|
69
|
+
/**
|
|
70
|
+
* メンバープログラムコード
|
|
71
|
+
*/
|
|
72
|
+
identifier: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export type IOfferToken = string;
|
|
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
|
+
* support オファートークン
|
|
100
|
+
* 2025-10-21~
|
|
101
|
+
*/
|
|
102
|
+
token?: IOfferToken;
|
|
103
|
+
/**
|
|
104
|
+
* メンバープログラムティアトークン
|
|
105
|
+
* メンバープログラムティアごとにオファー有効期間が管理されている場合、検証されたトークンに基づいて有効期間が検証されます
|
|
106
|
+
*/
|
|
107
|
+
validForMemberTier?: ITokenizedMemberProgramTier;
|
|
108
|
+
}
|
|
109
|
+
export type IObject = IOrderAsObject | IOwnershipInfoAsObject | IRoleAsObject | IOfferAsObject;
|
|
51
110
|
export interface IAudienceAsPlaceOrder {
|
|
52
111
|
/**
|
|
53
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
|
package/lib/ownershipInfo.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { PersonType } from './personType';
|
|
|
6
6
|
import * as ProductFactory from './product';
|
|
7
7
|
import { IProject } from './project';
|
|
8
8
|
import { ReservationType } from './reservationType';
|
|
9
|
+
import { PaymentServiceType } from './service/paymentService';
|
|
9
10
|
import * as WebAPIFactory from './service/webAPI';
|
|
10
11
|
import { SortType } from './sortType';
|
|
11
12
|
export type IBookingService = Pick<WebAPIFactory.IService<WebAPIFactory.Identifier>, 'identifier' | 'typeOf'>;
|
|
@@ -77,13 +78,21 @@ export interface IPaymentMethodAsGood {
|
|
|
77
78
|
* 決済サービスID
|
|
78
79
|
*/
|
|
79
80
|
id: string;
|
|
80
|
-
typeOf:
|
|
81
|
+
typeOf: PaymentServiceType.CreditCard | PaymentServiceType.MovieTicket;
|
|
82
|
+
serviceOutput: Pick<IInvoice, 'paymentMethodId' | 'typeOf'>;
|
|
83
|
+
}
|
|
84
|
+
export interface IFaceToFacePaymentMethodAsGood {
|
|
85
|
+
/**
|
|
86
|
+
* 対面決済サービスIDはなし
|
|
87
|
+
*/
|
|
88
|
+
id?: never;
|
|
89
|
+
typeOf: PaymentServiceType.FaceToFace;
|
|
81
90
|
serviceOutput: Pick<IInvoice, 'paymentMethodId' | 'typeOf'>;
|
|
82
91
|
}
|
|
83
92
|
/**
|
|
84
93
|
* 所有対象物 (Product or Service)
|
|
85
94
|
*/
|
|
86
|
-
export type IGood = IReservation | IPermitAsGood | InvoiceAsGood | IPaymentMethodAsGood;
|
|
95
|
+
export type IGood = IReservation | IPermitAsGood | InvoiceAsGood | IPaymentMethodAsGood | IFaceToFacePaymentMethodAsGood;
|
|
87
96
|
export interface IOwnerAsOrganization {
|
|
88
97
|
typeOf: OrganizationType.Organization;
|
|
89
98
|
id: string;
|