@chevre/factory 4.389.0-alpha.14 → 4.389.0-alpha.15

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.
@@ -115,7 +115,7 @@ export interface IItemOffered {
115
115
  typeOf: ProductType.Transportation;
116
116
  availableChannel: ReservationFactory.IServiceChannel;
117
117
  }
118
- export type IOfferedThrough = IWebAPIService<WebAPIIdentifier.Chevre>;
118
+ export type IOfferedThrough = Pick<IWebAPIService<WebAPIIdentifier.Chevre>, 'identifier' | 'typeOf'>;
119
119
  export interface ISellerMakesOffer extends Pick<OfferFactory.IOffer, 'typeOf' | 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> {
120
120
  availabilityEnds: Date;
121
121
  availabilityStarts: Date;
@@ -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'>;
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席までか
@@ -9,7 +9,7 @@ import { IReservation as IEventReservation } from './reservation/event';
9
9
  import { ReservationType } from './reservationType';
10
10
  import * as WebAPIFactory from './service/webAPI';
11
11
  import { SortType } from './sortType';
12
- export type IBookingService = WebAPIFactory.IService<WebAPIFactory.Identifier>;
12
+ export type IBookingService = Pick<WebAPIFactory.IService<WebAPIFactory.Identifier>, 'identifier' | 'typeOf'>;
13
13
  export interface IBusReservationAsGood {
14
14
  typeOf: ReservationType.BusReservation;
15
15
  /**
@@ -1,11 +1,30 @@
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
+ refreshToken?: string;
15
+ }
16
+ export interface IAvailableChannel {
17
+ typeOf: 'ServiceChannel';
18
+ serviceUrl?: string;
19
+ credentials?: ICredentials;
20
+ importEventsInWeeks?: number;
21
+ excludeMovieTheaters?: string[];
22
+ }
23
+ /**
24
+ * 外部サービス設定を含むWebAPI
25
+ */
26
+ export interface IServiceWithChannel extends Pick<IService<Identifier>, 'typeOf'> {
27
+ project: Pick<IProject, 'id' | 'typeOf'>;
28
+ id?: string;
29
+ availableChannel?: IAvailableChannel;
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.389.0-alpha.14",
3
+ "version": "4.389.0-alpha.15",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",