Order default adapter

Implements

Constructors

HandlerAndValidators

calculateOrderStatisticsForProducts: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get order count from product ids handler and validators

handler: calculateOrderStatisticsForProductsHandler

validators:

createOrder: HandlerAndValidators<{
    isValidOrderStatus: undefined | Predicate;
    validBody: undefined | Predicate;
} & Record<string, Predicate>>

Description

Create order handler and validators

handler: createOrderHandler

validators:

deleteOrder: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    orderBelongsToOrganization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Delete order handler and validators

handler: deleteOrderHandler

validators:

getOrder: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    orderBelongsToOrganization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get order handler and validators

handler: getOrderHandler

validators:

listOrders: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get all orders across all users/orgs

handler: listOrdersHandler

validators:

listOrdersForOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get orders for organization handler and validators

handler: listOrdersForOrganizationHandler

validators:

listOrdersForUser: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get orders for user handler and validators

handler: listOrdersForUserHandler

validators:

updateOrder: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isValidOrderStatus: undefined | Predicate;
    orderBelongsToOrganization: undefined | Predicate;
    validBody: undefined | Predicate;
} & Record<string, Predicate>>

Description

Update order handler and validators

handler: updateOrderHandler

validators:

Properties

adapterName: string = ADAPTER_NAME
authSecrets: AuthSecrets
dataServices: {
    order: OrderDataService;
}

Type declaration

opts: Required<Omit<OrderDefaultAdapterOptions, (keyof AuthSecrets) | "taxPercent">> & {
    taxRate: Decimal;
}

Type declaration

  • taxRate: Decimal

Generated using TypeDoc