@chevre/domain
Version:
Chevre Domain Library for Node.js
46 lines (45 loc) • 1.32 kB
TypeScript
/**
* 許可証サービス
*/
import * as factory from '../factory';
import type { AccountRepo } from '../repo/account';
import type { ServiceOutputRepo } from '../repo/serviceOutput';
/**
* 許可証発行
*/
export declare function issue(params: {
project: {
id: string;
};
issuedThrough: {
typeOf: factory.product.ProductType;
};
serviceOutputs: factory.permit.IPermit[];
}): (repos: {
account: AccountRepo;
serviceOutput: ServiceOutputRepo;
}) => Promise<void>;
/**
* 許可証有効化
*/
export declare function activate(params: {
typeOf: string;
identifier: string;
validFrom: Date;
validUntil?: Date;
}): (repos: {
serviceOutput: ServiceOutputRepo;
}) => Promise<factory.permit.IPermit>;
type IPermitWithAccountDetail = Omit<factory.permit.IPermit, 'paymentAccount'> & {
paymentAccount?: factory.permit.IPaymentAccountWithDetail;
};
/**
* プロジェクト指定で、許可証を検索する(ペイメントカードプロダクトの場合、口座詳細込み)
*/
export declare function search(project: {
id: string;
}, params: factory.product.IServiceOutputSearchConditions, projection?: any): (repos: {
account: AccountRepo;
serviceOutput: ServiceOutputRepo;
}) => Promise<IPermitWithAccountDetail[]>;
export {};