wip: interface and types
This commit is contained in:
1 parent
efdc59fd53
commit
56752039cf
4 files changed
+108
-1
No files matched your search
@@ -0,0 +1,30 @@
|
|||||||
|
import { BaseFilterable } from "../dal"
|
||||||
|
import { OperatorMap } from "../dal/utils"
|
||||||
|
|
||||||
|
/* ********** PAYMENT COLLECTION ********** */
|
||||||
|
|
||||||
|
export interface PaymentCollectionDTO {
|
||||||
|
/**
|
||||||
|
* The ID of the Payment Collection
|
||||||
|
*/
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FilterablePaymentCollectionProps
|
||||||
|
extends BaseFilterable<PaymentCollectionDTO> {
|
||||||
|
id?: string | string[]
|
||||||
|
|
||||||
|
region_id?: string | string[] | OperatorMap<string>
|
||||||
|
|
||||||
|
created_at?: OperatorMap<string>
|
||||||
|
updated_at?: OperatorMap<string>
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ********** PAYMENT ********** */
|
||||||
|
|
||||||
|
export interface PaymentDTO {
|
||||||
|
/**
|
||||||
|
* The ID of the Payment Collection
|
||||||
|
*/
|
||||||
|
id: string
|
||||||
|
}
|
||||||
@@ -1 +1,4 @@
|
|||||||
|
export * from "./common"
|
||||||
|
export * from "./mutations"
|
||||||
export * from "./service"
|
export * from "./service"
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export interface CreatePaymentCollectionDTO {}
|
||||||
|
|
||||||
|
export interface UpdatePaymentCollectionDTO {}
|
||||||
@@ -1,3 +1,74 @@
|
|||||||
import { IModuleService } from "../modules-sdk"
|
import { IModuleService } from "../modules-sdk"
|
||||||
|
import { Context } from "../shared-context"
|
||||||
|
import {
|
||||||
|
CreatePaymentCollectionDTO,
|
||||||
|
UpdatePaymentCollectionDTO,
|
||||||
|
} from "./mutations"
|
||||||
|
import {
|
||||||
|
FilterablePaymentCollectionProps,
|
||||||
|
PaymentCollectionDTO,
|
||||||
|
PaymentDTO,
|
||||||
|
} from "./common"
|
||||||
|
import { FindConfig } from "../common"
|
||||||
|
|
||||||
export interface IPaymentModuleService extends IModuleService {}
|
export interface IPaymentModuleService extends IModuleService {
|
||||||
|
createPaymentCollection(
|
||||||
|
data: CreatePaymentCollectionDTO[],
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO[]>
|
||||||
|
createPaymentCollection(
|
||||||
|
data: CreatePaymentCollectionDTO,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
|
retrievePaymentCollection(
|
||||||
|
paymentCollectionId: string,
|
||||||
|
config?: FindConfig<PaymentCollectionDTO>,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
|
listPaymentCollections(
|
||||||
|
filters?: FilterablePaymentCollectionProps,
|
||||||
|
config?: FindConfig<PaymentCollectionDTO>,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<[PaymentCollectionDTO[], number]>
|
||||||
|
|
||||||
|
listAndCountPaymentCollections(
|
||||||
|
filters?: FilterablePaymentCollectionProps,
|
||||||
|
config?: FindConfig<PaymentCollectionDTO>,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<[PaymentCollectionDTO[], number]>
|
||||||
|
|
||||||
|
updatePaymentCollection(
|
||||||
|
data: UpdatePaymentCollectionDTO[],
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO[]>
|
||||||
|
updatePaymentCollection(
|
||||||
|
data: UpdatePaymentCollectionDTO,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
|
deletePaymentCollection(
|
||||||
|
paymentCollectionId: string[],
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<void>
|
||||||
|
deletePaymentCollection(
|
||||||
|
paymentCollectionId: string,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<void>
|
||||||
|
|
||||||
|
authorizePaymentCollection(
|
||||||
|
paymentCollectionId: string,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
|
completePaymentCollection(
|
||||||
|
paymentCollectionId: string,
|
||||||
|
sharedContext?: Context
|
||||||
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
|
capturePayment(paymentId: string): Promise<PaymentDTO>
|
||||||
|
refundPayment(paymentId: string): Promise<PaymentDTO>
|
||||||
|
|
||||||
|
createPayment()
|
||||||
|
}
|
||||||
Reference in new issue
Block a user