@chevre/factory 6.2.0-alpha.0 → 6.2.0-alpha.2

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.
@@ -1,13 +1,12 @@
1
1
  import { IInvoice } from '../invoice';
2
2
  import { IMultilingualString } from '../multilingualString';
3
+ import { OrganizationType } from '../organizationType';
3
4
  import { IPermit } from '../permit';
4
5
  import { IPotentialInformAction as IPotentialInformActionTemplate } from '../potentialAction';
5
6
  import { IAvailableChannel as IProductAvailableChannel, IServiceType } from '../product';
6
7
  import { IProject } from '../project';
7
8
  import { IPropertyValue } from '../propertyValue';
8
- import { ISeller } from '../seller';
9
9
  import { SortType } from '../sortType';
10
- import { IThing } from '../thing';
11
10
  export declare enum PaymentServiceType {
12
11
  CreditCard = "CreditCard",
13
12
  FaceToFace = "FaceToFace",
@@ -25,7 +24,7 @@ export interface IPaymentUrlSettings {
25
24
  use3DS?: boolean;
26
25
  }
27
26
  export type ICallbackType3ds = 'GET' | 'POST';
28
- export interface IProviderCredentials {
27
+ export interface IProviderCredentialsCreditCard {
29
28
  /**
30
29
  * ショップID
31
30
  */
@@ -46,7 +45,14 @@ export interface IProviderCredentials {
46
45
  * 3Dセキュアコールバック方法
47
46
  */
48
47
  callbackType3ds?: ICallbackType3ds;
48
+ /**
49
+ * 外部決済URL設定
50
+ */
49
51
  paymentUrl?: IPaymentUrlSettings;
52
+ kgygishCd?: never;
53
+ stCd?: never;
54
+ }
55
+ export interface IProviderCredentialsMovieTicket {
50
56
  /**
51
57
  * 決済カード興行会社コード
52
58
  */
@@ -55,8 +61,19 @@ export interface IProviderCredentials {
55
61
  * 決済カードサイトコード
56
62
  */
57
63
  stCd?: string;
64
+ shopId?: never;
65
+ shopPass?: never;
66
+ tokenizationCode?: never;
67
+ returnUrls3ds?: never;
68
+ callbackType3ds?: never;
69
+ paymentUrl?: never;
58
70
  }
59
- export interface IProvider extends Pick<ISeller, 'typeOf'> {
71
+ export type IProviderCredentials = IProviderCredentialsCreditCard | IProviderCredentialsMovieTicket;
72
+ /**
73
+ * 決済方法提供者
74
+ */
75
+ export interface IProvider {
76
+ typeOf: OrganizationType.Corporation;
60
77
  /**
61
78
  * 販売者ID
62
79
  */
@@ -66,16 +83,34 @@ export interface IProvider extends Pick<ISeller, 'typeOf'> {
66
83
  */
67
84
  credentials?: IProviderCredentials;
68
85
  }
69
- export type IAvailableChannel = Pick<IProductAvailableChannel, 'typeOf'> & {
86
+ export interface IAvailableChannelCreditCard {
87
+ typeOf: IProductAvailableChannel['typeOf'];
70
88
  /**
71
89
  * add paymentServiceChannel ID(2025-02-21~)
72
90
  */
73
- id?: string;
91
+ id: string;
92
+ /**
93
+ * 対応決済方法や金額のカスタム検証URL
94
+ */
95
+ customValidationUrl?: string;
96
+ credentials?: never;
97
+ totalPaymentDue?: never;
98
+ }
99
+ export interface IAvailableChannelMovieTicket {
100
+ typeOf: IProductAvailableChannel['typeOf'];
101
+ /**
102
+ * add paymentServiceChannel ID(2025-02-21~)
103
+ */
104
+ id: string;
105
+ /**
106
+ * 対応決済方法や金額のカスタム検証URL
107
+ */
108
+ customValidationUrl?: string;
74
109
  credentials?: never;
75
110
  totalPaymentDue?: {
76
111
  maxValue?: number;
77
112
  };
78
- };
113
+ }
79
114
  /**
80
115
  * CreditCardIF決済サービスのカード属性
81
116
  * ポイントカード情報など
@@ -112,15 +147,9 @@ export type IPermitAsServiceOutput = Pick<IPermit, 'typeOf'> & {
112
147
  export type IServiceOutput = (IInvoiceAsServiceOutput | IPermitAsServiceOutput)[];
113
148
  export type IPotentialInformAction = Pick<IPotentialInformActionTemplate, 'id' | 'typeOf'>;
114
149
  export type IPotentialAction = IPotentialInformAction;
115
- /**
116
- * 決済サービス
117
- * {@link https://schema.org/Service}
118
- */
119
- export interface IService extends Pick<IThing, 'name' | 'description'> {
150
+ export interface ICommonAttributes {
120
151
  project: Pick<IProject, 'id' | 'typeOf'>;
121
- typeOf: PaymentServiceType;
122
152
  id?: string;
123
- availableChannel?: IAvailableChannel;
124
153
  description?: Pick<IMultilingualString, 'en' | 'ja'>;
125
154
  name?: Pick<IMultilingualString, 'en' | 'ja'>;
126
155
  /**
@@ -139,8 +168,28 @@ export interface IService extends Pick<IThing, 'name' | 'description'> {
139
168
  */
140
169
  serviceType: IServiceType;
141
170
  additionalProperty?: IPropertyValue<string>[];
142
- potentialAction?: IPotentialAction[];
143
171
  }
172
+ export type ICreditCardPaymentMethod = ICommonAttributes & {
173
+ typeOf: PaymentServiceType.CreditCard;
174
+ /**
175
+ * クライアントサイドからは見えない想定
176
+ */
177
+ availableChannel?: IAvailableChannelCreditCard;
178
+ potentialAction?: IPotentialAction[];
179
+ };
180
+ export type IMovieTicketPaymentMethod = ICommonAttributes & {
181
+ typeOf: PaymentServiceType.MovieTicket;
182
+ /**
183
+ * クライアントサイドからは見えない想定
184
+ */
185
+ availableChannel?: IAvailableChannelMovieTicket;
186
+ potentialAction?: IPotentialAction[];
187
+ };
188
+ /**
189
+ * 決済サービス
190
+ * {@link https://schema.org/PaymentService}
191
+ */
192
+ export type IService = ICreditCardPaymentMethod | IMovieTicketPaymentMethod;
144
193
  export interface ISortOrder {
145
194
  productID?: SortType;
146
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "6.2.0-alpha.0",
3
+ "version": "6.2.0-alpha.2",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",