import { IInvoice } from '../invoice'; import { IMultilingualString } from '../multilingualString'; import { OrganizationType } from '../organizationType'; import { IPermit } from '../permit'; import { IPotentialInformAction as IPotentialInformActionTemplate } from '../potentialAction'; import { IServiceType } from '../product'; import { IProject } from '../project'; import { IPropertyValue } from '../propertyValue'; import { SortType } from '../sortType'; export declare enum PaymentServiceType { CreditCard = "CreditCard", FaceToFace = "FaceToFace", MovieTicket = "MovieTicket" } export interface IPaymentUrlSettings { /** * 外部決済URL有効時間(秒) * 外部決済URL発行が必要な場合のみ */ expiresInSeconds: number; useCallback?: boolean; useWebhook?: boolean; use3DS?: boolean; } export type ICallbackType3ds = 'GET' | 'POST'; export interface IProviderCredentialsCreditCard { /** * ショップID */ shopId?: string; /** * ショップパス */ shopPass?: string; /** * トークン認証コード */ tokenizationCode?: string; /** * 3Dセキュア認証後加盟店戻りURL */ returnUrls3ds?: string[]; /** * 3Dセキュアコールバック方法 */ callbackType3ds?: ICallbackType3ds; /** * 外部決済URL設定 */ paymentUrl?: IPaymentUrlSettings; kgygishCd?: never; stCd?: never; } export interface IProviderCredentialsMovieTicket { /** * 決済カード興行会社コード */ kgygishCd?: string; /** * 決済カードサイトコード */ stCd?: string; shopId?: never; shopPass?: never; tokenizationCode?: never; returnUrls3ds?: never; callbackType3ds?: never; paymentUrl?: never; } export type IProviderCredentials = IProviderCredentialsCreditCard | IProviderCredentialsMovieTicket; /** * 決済方法提供者 */ export interface IProvider { typeOf: OrganizationType.Corporation; /** * 販売者ID */ id: string; /** * 販売者の決済サービス利用時資格情報 */ credentials?: IProviderCredentials; } export interface IAvailableChannelCreditCard { typeOf: 'ServiceChannel'; /** * add paymentServiceChannel ID(2025-02-21~) */ id: string; /** * 対応決済方法や金額のカスタム検証URL */ customValidationUrl?: string; credentials?: never; totalPaymentDue?: never; } export interface IAvailableChannelMovieTicket { typeOf: 'ServiceChannel'; /** * add paymentServiceChannel ID(2025-02-21~) */ id: string; /** * 対応決済方法や金額のカスタム検証URL */ customValidationUrl?: string; credentials?: never; totalPaymentDue?: { maxValue?: number; }; } /** * CreditCardIF決済サービスのカード属性 * ポイントカード情報など */ export interface IPaymentMethodAsServiceOutput { amount?: { /** * カード通貨区分 */ currency: string; }; } /** * 出力されるインボイス */ export interface IInvoiceAsServiceOutput extends Pick { /** * 発行される決済方法 */ paymentMethod?: IPaymentMethodAsServiceOutput; } /** * 出力メンバーシップ */ export type IPermitAsServiceOutput = Pick & { /** * メンバーシップサービス * メンバーシップ区分が含まれる */ issuedThrough: { serviceType: Pick; }; }; export type IServiceOutput = (IInvoiceAsServiceOutput | IPermitAsServiceOutput)[]; export type IPotentialInformAction = Pick; export type IPotentialAction = IPotentialInformAction; export interface ICommonAttributes { project: Pick; id?: string; description?: Pick; name?: Pick; /** * The product identifier, such as ISBN. * プロジェクト内でユニークなプロダクトコード */ productID: string; /** * The tangible thing generated by the service, e.g. a passport, permit, etc. * (InvoiceやPermit) */ serviceOutput?: IServiceOutput; /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. * 決済サービスの場合、serviceType.codeValueが決済方法区分 */ serviceType: IServiceType; additionalProperty?: IPropertyValue[]; } export type ICreditCardPaymentMethod = ICommonAttributes & { typeOf: PaymentServiceType.CreditCard; /** * クライアントサイドからは見えない想定 */ availableChannel?: IAvailableChannelCreditCard; potentialAction?: IPotentialAction[]; }; export type IMovieTicketPaymentMethod = ICommonAttributes & { typeOf: PaymentServiceType.MovieTicket; /** * クライアントサイドからは見えない想定 */ availableChannel?: IAvailableChannelMovieTicket; potentialAction?: IPotentialAction[]; }; /** * 決済サービス * {@link https://schema.org/PaymentService} */ export type IService = ICreditCardPaymentMethod | IMovieTicketPaymentMethod; export interface ISortOrder { productID?: SortType; } export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; project?: { id?: { $eq?: string; }; }; availableChannel?: { id?: { $eq?: string; }; }; id?: { $eq?: string; $in?: string[]; }; name?: { $regex?: string; }; productID?: { $eq?: string; $in?: string[]; $regex?: string; }; provider?: { id?: { /** * プロバイダーに指定IDの販売者が含まれる */ $eq?: string; }; }; typeOf?: { $eq?: PaymentServiceType; $in?: PaymentServiceType[]; }; serviceOutput?: { typeOf?: { /** * Invoice or Permit */ $eq?: string; }; paymentMethod?: { amount?: { /** * 出力通貨区分コード */ currency?: { $eq?: string; }; }; }; issuedThrough?: { serviceType?: { /** * 出力メンバーシップ区分コード */ codeValue?: { $eq?: string; }; }; }; }; serviceType?: { codeValue?: { $eq?: string; }; }; }