@chevre/factory 4.393.0 → 4.394.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.
@@ -265,6 +265,13 @@ export interface IObjectWithoutDetail {
265
265
  broker?: ReservationFactory.IBroker;
266
266
  reservationFor?: {
267
267
  id: string;
268
+ offers?: {
269
+ /**
270
+ * オファー提供組織ロールトークン
271
+ * support offeredBy(2025-05-11~)
272
+ */
273
+ offeredBy?: string;
274
+ };
268
275
  };
269
276
  }
270
277
  export type IReservationFor = IBusReservationReservationFor | IEventReservationReservationFor;
@@ -2,6 +2,7 @@ import * as EventFactory from '../event';
2
2
  import { EventType } from '../eventType';
3
3
  import { IMultilingualString } from '../multilingualString';
4
4
  import * as OfferFactory from '../offer';
5
+ import { IEventOffer } from '../offer/eventOffer';
5
6
  import { OfferType } from '../offerType';
6
7
  import { OrganizationType } from '../organizationType';
7
8
  import { PlaceType } from '../placeType';
@@ -117,13 +118,7 @@ export interface IItemOffered {
117
118
  }
118
119
  export type IOfferedThrough = Pick<IWebAPIService<WebAPIIdentifier.Chevre>, 'identifier' | 'typeOf'>;
119
120
  export type IOfferAvailableAtOrFrom = Pick<OfferFactory.IAvailableAtOrFrom, 'id'>;
120
- export interface ISellerMakesOffer extends Pick<OfferFactory.IOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> {
121
- availabilityEnds: Date;
122
- availabilityStarts: Date;
123
- validFrom: Date;
124
- validThrough: Date;
125
- availableAtOrFrom?: IOfferAvailableAtOrFrom | IOfferAvailableAtOrFrom[];
126
- }
121
+ export { IEventOffer as ISellerMakesOffer };
127
122
  export interface ISeller {
128
123
  typeOf: OrganizationType.Corporation;
129
124
  /**
@@ -134,7 +129,7 @@ export interface ISeller {
134
129
  /**
135
130
  * アプリケーションごとのオファー
136
131
  */
137
- makesOffer: ISellerMakesOffer[];
132
+ makesOffer: IEventOffer[];
138
133
  }
139
134
  export import IEligibleQuantity = OfferFactory.IEligibleQuantity;
140
135
  /**
@@ -224,15 +219,37 @@ export interface IAttributes extends Pick<EventFactory.IAttributes<EventType.Eve
224
219
  */
225
220
  export type IEvent = EventFactory.IEvent<IAttributes>;
226
221
  export type ILocation4create = Pick<ILocation, 'branchCode' | 'maximumAttendeeCapacity'>;
227
- export type ISellerMakesOffer4create = Pick<ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough' | 'typeOf'> & {
222
+ export interface IOfferedBy4create {
223
+ /**
224
+ * オファー提供組織コード
225
+ * トークン発行者から選択
226
+ */
227
+ identifier: string;
228
+ /**
229
+ * 興行オファー承認ロール
230
+ */
231
+ member: {
232
+ /**
233
+ * ロールを識別する任意の文字列
234
+ * プロジェクト内でユニーク必須
235
+ * イベント内に複数アプリケーションに対するオファーが存在する場合、イベント内でもユニーク必須
236
+ */
237
+ identifier: string;
238
+ };
239
+ }
240
+ export type ISellerMakesOffer4create = Pick<IEventOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough' | 'typeOf' | 'offeredBy'> & {
228
241
  availableAtOrFrom: Pick<IOfferAvailableAtOrFrom, 'id'>;
242
+ /**
243
+ * オファー提供組織
244
+ */
245
+ offeredBy?: IOfferedBy4create;
229
246
  };
230
247
  export interface ISeller4create {
231
248
  makesOffer: ISellerMakesOffer4create[];
232
249
  /**
233
250
  * POS以外のアプリケーションの共通設定
234
251
  */
235
- makesOfferDefault?: Pick<ISellerMakesOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'>;
252
+ makesOfferDefault?: Pick<IEventOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'>;
236
253
  }
237
254
  export interface IAvailableChannel4create {
238
255
  serviceLocation: {
package/lib/index.d.ts CHANGED
@@ -77,6 +77,7 @@ import { EventType } from './eventType';
77
77
  import * as IAMFactory from './iam';
78
78
  import * as IdentityProviderFactory from './identityProvider';
79
79
  import * as InvoiceFactory from './invoice';
80
+ import { issuer } from './issuer';
80
81
  import { ItemAvailability } from './itemAvailability';
81
82
  import * as LanguageFactory from './language';
82
83
  import * as MerchantReturnPolicyFactory from './merchantReturnPolicy';
@@ -379,6 +380,7 @@ export import eventType = EventType;
379
380
  export import iam = IAMFactory;
380
381
  export import identityProvider = IdentityProviderFactory;
381
382
  export import invoice = InvoiceFactory;
383
+ export { issuer };
382
384
  export import itemAvailability = ItemAvailability;
383
385
  export import language = LanguageFactory;
384
386
  export import merchantReturnPolicy = MerchantReturnPolicyFactory;
@@ -0,0 +1,46 @@
1
+ import { IProject } from './project';
2
+ import { SortType } from './sortType';
3
+ export declare namespace issuer {
4
+ /**
5
+ * token issuer
6
+ * tokens for memberProgram or offer...
7
+ */
8
+ interface IIssuer {
9
+ id: string;
10
+ /**
11
+ * 管理者定義の識別子
12
+ */
13
+ identifier: string;
14
+ name: {
15
+ ja: string;
16
+ };
17
+ project: Pick<IProject, 'id' | 'typeOf'>;
18
+ tokenSecret?: string;
19
+ /**
20
+ * トークンのiss
21
+ */
22
+ url: string;
23
+ }
24
+ interface IMemberProgram {
25
+ typeOf: 'MemberProgram';
26
+ identifier: string;
27
+ }
28
+ interface ISearchConditions {
29
+ limit?: number;
30
+ page?: number;
31
+ sort?: {
32
+ identifier?: SortType;
33
+ };
34
+ id?: {
35
+ $eq?: string;
36
+ };
37
+ identifier?: {
38
+ $eq?: string;
39
+ };
40
+ project?: {
41
+ id?: {
42
+ $eq?: string;
43
+ };
44
+ };
45
+ }
46
+ }
package/lib/issuer.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,51 @@
1
+ import { RoleType } from '../iam';
2
+ import { IAvailableAtOrFrom, IOffer } from '../offer';
3
+ import { OrganizationType } from '../organizationType';
4
+ type IOfferAvailableAtOrFrom = Pick<IAvailableAtOrFrom, 'id'>;
5
+ /**
6
+ * オファー提供者
7
+ */
8
+ interface IOfferedBy {
9
+ /**
10
+ * オファー提供組織コード
11
+ */
12
+ identifier: string;
13
+ typeOf: OrganizationType.Organization;
14
+ member: {
15
+ /**
16
+ * 興行オファー承認ロールコード
17
+ */
18
+ identifier: string;
19
+ typeOf: RoleType.OrganizationRole;
20
+ };
21
+ }
22
+ /**
23
+ * アプリケーションごとのイベントに対するオファー
24
+ * 基本的に有効期間を定義
25
+ */
26
+ interface IEventOffer extends Pick<IOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> {
27
+ /**
28
+ * いつまで表示可能か
29
+ */
30
+ availabilityEnds: Date;
31
+ /**
32
+ * いつから表示可能か
33
+ */
34
+ availabilityStarts: Date;
35
+ /**
36
+ * いつから承認可能か
37
+ */
38
+ validFrom: Date;
39
+ /**
40
+ * いつまで承認可能か
41
+ */
42
+ validThrough: Date;
43
+ availableAtOrFrom?: IOfferAvailableAtOrFrom | IOfferAvailableAtOrFrom[];
44
+ /**
45
+ * オファー提供者
46
+ * 提供者の定義が存在する場合、提供組織によって発行されたロールトークンがオファー承認時に必要
47
+ * define offeredBy(2025-05-11~)
48
+ */
49
+ offeredBy?: IOfferedBy;
50
+ }
51
+ export { IEventOffer };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.393.0",
3
+ "version": "4.394.0-alpha.0",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",