@chevre/factory 5.2.0-alpha.6 → 5.2.0-alpha.8
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/event/anyEvent.d.ts +1 -1
- package/lib/event/screeningEvent.d.ts +17 -1
- package/lib/event/sellerMakesOffer.d.ts +2 -17
- package/lib/index.d.ts +2 -0
- package/lib/index.js +4 -2
- package/lib/notification/event.d.ts +6 -2
- package/lib/offer/eventOffer.d.ts +111 -0
- package/lib/offer/eventOffer.js +2 -0
- package/package.json +1 -1
package/lib/event/anyEvent.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ export interface IAttributes extends Pick<EventFactory.IAttributes<EventType>, '
|
|
|
175
175
|
organizer: IOrganizer;
|
|
176
176
|
}
|
|
177
177
|
export type IMemberProgramTier4create = Pick<IMemberProgramTier, 'typeOf'>;
|
|
178
|
-
export type ISellerMakesOffer4create = Pick<ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough' | 'typeOf' | 'identifier'
|
|
178
|
+
export type ISellerMakesOffer4create = Pick<ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough' | 'typeOf' | 'identifier'> & {
|
|
179
179
|
availableAtOrFrom: Pick<IOfferAvailableAtOrFrom, 'id'>;
|
|
180
180
|
/**
|
|
181
181
|
* 有効なメンバープログラムティア条件
|
|
@@ -78,6 +78,22 @@ export interface IOffer {
|
|
|
78
78
|
identifier?: string;
|
|
79
79
|
itemOffered: IItemOffered;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* 拡張可能なイベントオファー
|
|
83
|
+
* 実質的なアプリケーションオファーは別管理のイベントオファーに従う
|
|
84
|
+
*/
|
|
85
|
+
export interface IExtensibleEventOffer {
|
|
86
|
+
/**
|
|
87
|
+
* support AggregateOffer(2025-11-11~)
|
|
88
|
+
*/
|
|
89
|
+
typeOf: OfferType.AggregateOffer;
|
|
90
|
+
eligibleQuantity: IEligibleQuantity;
|
|
91
|
+
unacceptedPaymentMethod?: IUnacceptedPaymentMethodType[];
|
|
92
|
+
seller: ISeller;
|
|
93
|
+
itemOffered: IItemOffered;
|
|
94
|
+
offeredThrough?: never;
|
|
95
|
+
identifier?: never;
|
|
96
|
+
}
|
|
81
97
|
export type ISeller4COA = Pick<ISeller, 'id' | 'makesOffer' | 'typeOf'>;
|
|
82
98
|
export type IOffer4COA = Pick<IOffer, 'typeOf' | 'eligibleQuantity'> & {
|
|
83
99
|
offeredThrough: Pick<IWebAPIService<WebAPIIdentifier.COA>, 'identifier' | 'typeOf'>;
|
|
@@ -143,7 +159,7 @@ export interface IAttributes extends Pick<AnyEventFactory.IAttributes, 'maximumP
|
|
|
143
159
|
/**
|
|
144
160
|
* 販売情報
|
|
145
161
|
*/
|
|
146
|
-
offers: IOffer | IOffer4COA;
|
|
162
|
+
offers: IOffer | IOffer4COA | IExtensibleEventOffer;
|
|
147
163
|
/**
|
|
148
164
|
* その他COA情報
|
|
149
165
|
* 基本的にsskts対応
|
|
@@ -26,24 +26,9 @@ interface ISingleEventOffer extends Pick<IOffer, 'typeOf' | 'availabilityEnds' |
|
|
|
26
26
|
*/
|
|
27
27
|
validThrough: Date;
|
|
28
28
|
availableAtOrFrom: IOfferAvailableAtOrFrom;
|
|
29
|
+
identifier?: never;
|
|
29
30
|
validForMemberTier?: never;
|
|
30
|
-
|
|
31
|
-
* A pointer to the organization or person making the offer.
|
|
32
|
-
* オファー提供者が定義された場合、オファー承認時にオファー提供者によって署名されたオファートークンが必須
|
|
33
|
-
* その場合、有効期間、適用数量、対応アプリケーションはオファートークンのpayloadに従う
|
|
34
|
-
*/
|
|
35
|
-
offeredBy?: {
|
|
36
|
-
/**
|
|
37
|
-
* オファートークン発行者コード
|
|
38
|
-
*/
|
|
39
|
-
identifier?: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* アプリケーションオファーコード
|
|
43
|
-
* イベント内でユニーク必須
|
|
44
|
-
* オファー発行者を指定する場合、必須
|
|
45
|
-
*/
|
|
46
|
-
identifier?: string;
|
|
31
|
+
offeredBy?: never;
|
|
47
32
|
}
|
|
48
33
|
/**
|
|
49
34
|
* メンバープログラムティア適用のイベントオファー
|
package/lib/index.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ import * as MovieTicketTypeFactory from './movieTicketType';
|
|
|
87
87
|
import { IMultilingualString } from './multilingualString';
|
|
88
88
|
import * as OfferFactory from './offer';
|
|
89
89
|
import * as AggregateOfferFactory from './offer/aggregateOffer';
|
|
90
|
+
import * as EventOfferFactory from './offer/eventOffer';
|
|
90
91
|
import * as ProductOfferFactory from './offer/productOffer';
|
|
91
92
|
import * as OfferCatalogFactory from './offerCatalog';
|
|
92
93
|
import * as OfferItemConditionFactory from './offerItemCondition';
|
|
@@ -388,6 +389,7 @@ export import customer = CustomerFactory;
|
|
|
388
389
|
export declare namespace event {
|
|
389
390
|
export import screeningEvent = ScreeningEventFactory;
|
|
390
391
|
}
|
|
392
|
+
export import eventOffer = EventOfferFactory;
|
|
391
393
|
export import eventSeries = ScreeningEventSeriesFactory;
|
|
392
394
|
export import encodingFormat = EncodingFormat;
|
|
393
395
|
export { entryPoint };
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.unitPriceOffer = exports.unitCode = exports.assetTransactionType = exports.transactionStatusType = exports.transactionType = exports.transaction = exports.assetTransaction = exports.tripType = exports.trip = exports.thing = exports.taskStatus = exports.taskName = exports.sortType = exports.serviceChannel = exports.service = exports.task = exports.sellerReturnPolicy = exports.seller = exports.schedule = exports.role = exports.RESERVED_CODE_VALUES = exports.reservationType = exports.reservationStatusType = exports.reservation = exports.report = exports.recipe = exports.quantitativeValue = exports.qualitativeValue = exports.propertyValue = exports.project = exports.productOffer = exports.product = exports.programMembership = exports.priceSpecificationType = exports.priceSpecification = exports.potentialAction = exports.placeType = exports.place = exports.priceCurrency = void 0;
|
|
3
|
+
exports.person = exports.permit = exports.paymentStatusType = exports.paymentMethod = exports.ownershipInfo = exports.organizationType = exports.organization = exports.orderStatus = exports.order = exports.offerType = exports.offerItemCondition = exports.offerCatalog = exports.offer = exports.notification = exports.movieTicketType = exports.monetaryAmount = exports.merchantReturnPolicy = exports.language = exports.itemAvailability = exports.invoice = exports.identityProvider = exports.iam = exports.eventType = exports.eventStatusType = exports.entryPoint = exports.encodingFormat = exports.eventSeries = exports.eventOffer = exports.event = exports.customer = exports.creativeWorkType = exports.creativeWork = exports.clientUser = exports.CertificationStatusEnumeration = exports.categoryCode = exports.authorization = exports.aggregateOffer = exports.aggregation = exports.advanceBookingRequirement = exports.additionalProperty = exports.accountType = exports.accountTitle = exports.action = exports.actionType = exports.actionStatusType = exports.account = exports.errorCode = exports.errors = exports.waiter = exports.cognito = void 0;
|
|
4
|
+
exports.unitPriceOffer = exports.unitCode = exports.assetTransactionType = exports.transactionStatusType = exports.transactionType = exports.transaction = exports.assetTransaction = exports.tripType = exports.trip = exports.thing = exports.taskStatus = exports.taskName = exports.sortType = exports.serviceChannel = exports.service = exports.task = exports.sellerReturnPolicy = exports.seller = exports.schedule = exports.role = exports.RESERVED_CODE_VALUES = exports.reservationType = exports.reservationStatusType = exports.reservation = exports.report = exports.recipe = exports.quantitativeValue = exports.qualitativeValue = exports.propertyValue = exports.project = exports.productOffer = exports.product = exports.programMembership = exports.priceSpecificationType = exports.priceSpecification = exports.potentialAction = exports.placeType = exports.place = exports.priceCurrency = exports.personType = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* factory
|
|
7
7
|
*/
|
|
@@ -87,6 +87,7 @@ var MonetaryAmountFactory = require("./monetaryAmount");
|
|
|
87
87
|
var MovieTicketTypeFactory = require("./movieTicketType");
|
|
88
88
|
var OfferFactory = require("./offer");
|
|
89
89
|
var AggregateOfferFactory = require("./offer/aggregateOffer");
|
|
90
|
+
var EventOfferFactory = require("./offer/eventOffer");
|
|
90
91
|
var ProductOfferFactory = require("./offer/productOffer");
|
|
91
92
|
var OfferCatalogFactory = require("./offerCatalog");
|
|
92
93
|
var OfferItemConditionFactory = require("./offerItemCondition");
|
|
@@ -405,6 +406,7 @@ var event;
|
|
|
405
406
|
event.screeningEvent = ScreeningEventFactory;
|
|
406
407
|
// export import screeningEventSeries = ScreeningEventSeriesFactory;
|
|
407
408
|
})(event = exports.event || (exports.event = {}));
|
|
409
|
+
exports.eventOffer = EventOfferFactory;
|
|
408
410
|
exports.eventSeries = ScreeningEventSeriesFactory; // reimplement from event.screeningEventSeries
|
|
409
411
|
exports.encodingFormat = EncodingFormat;
|
|
410
412
|
exports.eventStatusType = eventStatusType_1.EventStatusType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEvent as IScreeningEvent, IOffer, IOffer4COA, ISeller, ISellerMakesOffer } from '../event/screeningEvent';
|
|
1
|
+
import { IEvent as IScreeningEvent, IExtensibleEventOffer, IOffer, IOffer4COA, ISeller, ISellerMakesOffer } from '../event/screeningEvent';
|
|
2
2
|
import { EventType } from '../eventType';
|
|
3
3
|
import { IAvailableAtOrFrom } from '../offer';
|
|
4
4
|
import { OrganizationType } from '../organizationType';
|
|
@@ -22,7 +22,11 @@ type IEventSellerMakesOfferAsNotification = (Pick<ISellerMakesOffer, 'availabili
|
|
|
22
22
|
availableAtOrFrom: IAvailableAtOrFrom[];
|
|
23
23
|
identifier?: string;
|
|
24
24
|
});
|
|
25
|
-
type IEventOfferAsNotification = (Pick<
|
|
25
|
+
type IEventOfferAsNotification = (Pick<IExtensibleEventOffer, 'itemOffered' | 'typeOf'> & {
|
|
26
|
+
seller: Pick<ISeller, 'id' | 'typeOf'> & {
|
|
27
|
+
makesOffer: IEventSellerMakesOfferAsNotification[];
|
|
28
|
+
};
|
|
29
|
+
}) | (Pick<IOffer, 'itemOffered' | 'typeOf'> & {
|
|
26
30
|
seller: Pick<ISeller, 'id' | 'typeOf'> & {
|
|
27
31
|
makesOffer: IEventSellerMakesOfferAsNotification[];
|
|
28
32
|
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { EventType } from '../eventType';
|
|
2
|
+
import { IAvailableAtOrFrom, IOffer } from '../offer';
|
|
3
|
+
import { OfferType } from '../offerType';
|
|
4
|
+
import { OrganizationType } from '../organizationType';
|
|
5
|
+
import { SortType } from '../sortType';
|
|
6
|
+
type IOfferAvailableAtOrFrom = Pick<IAvailableAtOrFrom, 'id'>;
|
|
7
|
+
interface ISeller {
|
|
8
|
+
id: string;
|
|
9
|
+
typeOf: OrganizationType.Corporation;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 拡張されたイベントアプリケーションオファー
|
|
13
|
+
*/
|
|
14
|
+
interface IExtendedEventOffer extends Pick<IOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> {
|
|
15
|
+
project: {
|
|
16
|
+
id: string;
|
|
17
|
+
typeOf: OrganizationType.Project;
|
|
18
|
+
};
|
|
19
|
+
seller: ISeller;
|
|
20
|
+
typeOf: OfferType.Offer;
|
|
21
|
+
/**
|
|
22
|
+
* いつから承認可能か
|
|
23
|
+
*/
|
|
24
|
+
validFrom: Date;
|
|
25
|
+
/**
|
|
26
|
+
* いつまで承認可能か
|
|
27
|
+
*/
|
|
28
|
+
validThrough: Date;
|
|
29
|
+
availableAtOrFrom: IOfferAvailableAtOrFrom;
|
|
30
|
+
/**
|
|
31
|
+
* アプリケーションオファーコード
|
|
32
|
+
* イベント内でユニーク必須
|
|
33
|
+
*/
|
|
34
|
+
identifier: string;
|
|
35
|
+
itemOffered: {
|
|
36
|
+
id: string;
|
|
37
|
+
typeOf: EventType.ScreeningEvent;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A pointer to the organization or person making the offer.
|
|
41
|
+
* オファー提供者が定義された場合、オファー承認時にオファー提供者によって署名されたオファートークンが必須
|
|
42
|
+
* その場合、有効期間、適用数量、対応アプリケーションはオファートークンのpayloadに従う
|
|
43
|
+
*/
|
|
44
|
+
offeredBy?: {
|
|
45
|
+
/**
|
|
46
|
+
* オファートークン発行者コード
|
|
47
|
+
*/
|
|
48
|
+
identifier?: string;
|
|
49
|
+
};
|
|
50
|
+
validForMemberTier?: never;
|
|
51
|
+
availabilityEnds?: never;
|
|
52
|
+
availabilityStarts?: never;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 拡張されたイベントアプリケーションオファー
|
|
56
|
+
*/
|
|
57
|
+
type IEventOffer = IExtendedEventOffer;
|
|
58
|
+
interface ISearchConditions {
|
|
59
|
+
limit?: number;
|
|
60
|
+
page?: number;
|
|
61
|
+
sort?: {
|
|
62
|
+
validFrom?: SortType;
|
|
63
|
+
};
|
|
64
|
+
project?: {
|
|
65
|
+
id?: {
|
|
66
|
+
$eq?: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
id?: {
|
|
70
|
+
$eq?: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* オファーコード
|
|
74
|
+
*/
|
|
75
|
+
identifier?: {
|
|
76
|
+
$eq?: string;
|
|
77
|
+
$in?: string[];
|
|
78
|
+
};
|
|
79
|
+
itemOffered?: {
|
|
80
|
+
/**
|
|
81
|
+
* オファーコレクションコード
|
|
82
|
+
*/
|
|
83
|
+
id?: {
|
|
84
|
+
$eq?: string;
|
|
85
|
+
$in?: string[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
offeredBy?: {
|
|
89
|
+
/**
|
|
90
|
+
* オファー提供者ID
|
|
91
|
+
*/
|
|
92
|
+
id?: {
|
|
93
|
+
$eq?: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
seller?: {
|
|
97
|
+
/**
|
|
98
|
+
* 提供販売者ID
|
|
99
|
+
*/
|
|
100
|
+
id?: {
|
|
101
|
+
$eq?: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
validFrom?: {
|
|
105
|
+
$lte?: Date;
|
|
106
|
+
};
|
|
107
|
+
validThrough?: {
|
|
108
|
+
$gte?: Date;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export { IEventOffer, ISearchConditions };
|