diff --git a/docs/docs/reference/admin-ui-api/alerts/alert-config.md b/docs/docs/reference/admin-ui-api/alerts/alert-config.md index 323ea2f17a..eae6be55d5 100644 --- a/docs/docs/reference/admin-ui-api/alerts/alert-config.md +++ b/docs/docs/reference/admin-ui-api/alerts/alert-config.md @@ -22,9 +22,9 @@ interface AlertConfig { recheck?: (context: AlertContext) => Observable; isAlert: (data: T, context: AlertContext) => boolean; action: (data: T, context: AlertContext) => void; - label: ( - data: T, - context: AlertContext, + label: ( + data: T, + context: AlertContext, ) => { text: string; translationVars?: { [key: string]: string | number } }; requiredPermissions?: Permission[]; } @@ -41,18 +41,18 @@ A unique identifier for the alert. AlertContext) => T | Promise<T> | Observable<T>`} /> -A function which is gets the data used to determine whether the alert should be shown. -Typically, this function will query the server or some other remote data source. - -This function will be called once when the Admin UI app bootstraps, and can be also +A function which is gets the data used to determine whether the alert should be shown. +Typically, this function will query the server or some other remote data source. + +This function will be called once when the Admin UI app bootstraps, and can be also set to run at regular intervals by setting the `recheckIntervalMs` property. ### recheck AlertContext) => Observable<any>`} default="undefined" /> -A function which returns an Observable which is used to determine when to re-run the `check` -function. Whenever the observable emits, the `check` function will be called again. - +A function which returns an Observable which is used to determine when to re-run the `check` +function. Whenever the observable emits, the `check` function will be called again. + A basic time-interval-based recheck can be achieved by using the `interval` function from RxJS. *Example* @@ -69,7 +69,7 @@ If this is not set, the `check` function will only be called once when the Admin AlertContext) => boolean`} /> -A function which determines whether the alert should be shown based on the data returned by the `check` +A function which determines whether the alert should be shown based on the data returned by the `check` function. ### action @@ -78,14 +78,14 @@ function. A function which is called when the alert is clicked in the Admin UI. ### label -AlertContext, ) => { text: string; translationVars?: { [key: string]: string | number } }`} /> +AlertContext, ) => { text: string; translationVars?: { [key: string]: string | number } }`} /> A function which returns the text used in the UI to describe the alert. ### requiredPermissions Permission[]`} /> -A list of permissions which the current Administrator must have in order. If the current +A list of permissions which the current Administrator must have in order. If the current Administrator does not have these permissions, none of the other alert functions will be called. diff --git a/docs/docs/reference/typescript-api/data-access/entity-hydrator.md b/docs/docs/reference/typescript-api/data-access/entity-hydrator.md index e0428b17c7..d94cdd63a9 100644 --- a/docs/docs/reference/typescript-api/data-access/entity-hydrator.md +++ b/docs/docs/reference/typescript-api/data-access/entity-hydrator.md @@ -71,7 +71,7 @@ await this.entityHydrator ```ts title="Signature" class EntityHydrator { - constructor(connection: TransactionalConnection, productPriceApplicator: ProductPriceApplicator, translator: TranslatorService, listQueryBuilder: ListQueryBuilder) + constructor(connection: TransactionalConnection, productPriceApplicator: ProductPriceApplicator, translator: TranslatorService) hydrate(ctx: RequestContext, target: Entity, options: HydrateOptions) => Promise; } ``` @@ -80,7 +80,7 @@ class EntityHydrator { ### constructor -TransactionalConnection, productPriceApplicator: ProductPriceApplicator, translator: TranslatorService, listQueryBuilder: ListQueryBuilder) => EntityHydrator`} /> +TransactionalConnection, productPriceApplicator: ProductPriceApplicator, translator: TranslatorService) => EntityHydrator`} /> ### hydrate diff --git a/docs/docs/reference/typescript-api/data-access/list-query-builder.md b/docs/docs/reference/typescript-api/data-access/list-query-builder.md index 9cbe94f856..4933181c8b 100644 --- a/docs/docs/reference/typescript-api/data-access/list-query-builder.md +++ b/docs/docs/reference/typescript-api/data-access/list-query-builder.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## ListQueryBuilder - + This helper class is used when fetching entities the database from queries which return a PaginatedList type. These queries all follow the same format: @@ -84,7 +84,6 @@ class ListQueryBuilder implements OnApplicationBootstrap { constructor(connection: TransactionalConnection, configService: ConfigService) filterObjectHasProperty(filterObject: FP | NullOptionals | null | undefined, property: keyof FP) => boolean; build(entity: Type, options: ListQueryOptions = {}, extendedOptions: ExtendedListQueryOptions = {}) => SelectQueryBuilder; - joinTreeRelationsDynamically(qb: SelectQueryBuilder, entity: EntityTarget, requestedRelations: string[] = []) => Set; } ``` * Implements: OnApplicationBootstrap @@ -115,11 +114,6 @@ to join that relation. ExtendedListQueryOptions<T> = {}) => SelectQueryBuilder<T>`} /> -### joinTreeRelationsDynamically - - Set<string>`} /> - - @@ -127,7 +121,7 @@ to join that relation. ## ExtendedListQueryOptions - + Options which can be passed to the ListQueryBuilder's `build()` method. diff --git a/docs/docs/reference/typescript-api/data-access/transactional-connection.md b/docs/docs/reference/typescript-api/data-access/transactional-connection.md index b3268fa7e5..06bc553b84 100644 --- a/docs/docs/reference/typescript-api/data-access/transactional-connection.md +++ b/docs/docs/reference/typescript-api/data-access/transactional-connection.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## TransactionalConnection - + The TransactionalConnection is a wrapper around the TypeORM `Connection` object which works in conjunction with the Transaction decorator to implement per-request transactions. All services which access the @@ -23,8 +23,8 @@ API by the use of the `Transaction` decorator. ```ts title="Signature" class TransactionalConnection { - constructor(connection: Connection, transactionWrapper: TransactionWrapper) - rawConnection: Connection + constructor(dataSource: DataSource, transactionWrapper: TransactionWrapper) + rawConnection: DataSource getRepository(target: ObjectType | EntitySchema | string) => Repository; getRepository(ctx: RequestContext | undefined, target: ObjectType | EntitySchema | string) => Repository; getRepository(ctxOrTarget: RequestContext | ObjectType | EntitySchema | string | undefined, maybeTarget?: ObjectType | EntitySchema | string) => Repository; @@ -44,12 +44,12 @@ class TransactionalConnection { ### constructor - TransactionalConnection`} /> + TransactionalConnection`} /> ### rawConnection - + The plain TypeORM Connection object. Should be used carefully as any operations performed with this connection will not be performed within any outer diff --git a/docs/docs/reference/typescript-api/entities/authenticated-session.md b/docs/docs/reference/typescript-api/entities/authenticated-session.md index e468220f1b..d48e1ae446 100644 --- a/docs/docs/reference/typescript-api/entities/authenticated-session.md +++ b/docs/docs/reference/typescript-api/entities/authenticated-session.md @@ -19,7 +19,7 @@ An AuthenticatedSession is created upon successful authentication. class AuthenticatedSession extends Session { constructor(input: DeepPartial) @Index() - @ManyToOne(type => User) + @ManyToOne(type => User, user => user.sessions) user: User; @Column() authenticationStrategy: string; diff --git a/docs/docs/reference/typescript-api/entities/channel.md b/docs/docs/reference/typescript-api/entities/channel.md index d1b1d8926d..5a228ccfa0 100644 --- a/docs/docs/reference/typescript-api/entities/channel.md +++ b/docs/docs/reference/typescript-api/entities/channel.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## Channel - + A Channel represents a distinct sales channel and configures defaults for that channel. @@ -39,7 +39,7 @@ class Channel extends VendureEntity { @Column({ default: '', nullable: true }) description: string; @Index() - @ManyToOne(type => Seller) + @ManyToOne(type => Seller, seller => seller.channels) seller?: Seller; @EntityId({ nullable: true }) sellerId?: ID; @@ -47,10 +47,10 @@ class Channel extends VendureEntity { @Column({ type: 'simple-array', nullable: true }) availableLanguageCodes: LanguageCode[]; @Index() - @ManyToOne(type => Zone) + @ManyToOne(type => Zone, zone => zone.defaultTaxZoneChannels) defaultTaxZone: Zone; @Index() - @ManyToOne(type => Zone) + @ManyToOne(type => Zone, zone => zone.defaultShippingZoneChannels) defaultShippingZone: Zone; @Column('varchar') defaultCurrencyCode: CurrencyCode; @@ -73,6 +73,18 @@ class Channel extends VendureEntity { facets: Facet[]; @ManyToMany(type => Collection, collection => collection.channels, { onDelete: 'CASCADE' }) collections: Collection[]; + @ManyToMany(type => Promotion, promotion => promotion.channels, { onDelete: 'CASCADE' }) + promotions: Promotion[]; + @ManyToMany(type => PaymentMethod, paymentMethod => paymentMethod.channels, { onDelete: 'CASCADE' }) + paymentMethods: PaymentMethod[]; + @ManyToMany(type => ShippingMethod, shippingMethod => shippingMethod.channels, { onDelete: 'CASCADE' }) + shippingMethods: ShippingMethod[]; + @ManyToMany(type => Customer, customer => customer.channels, { onDelete: 'CASCADE' }) + customers: Customer[]; + @ManyToMany(type => Role, role => role.channels, { onDelete: 'CASCADE' }) + roles: Role[]; + @ManyToMany(type => StockLocation, stockLocation => stockLocation.channels, { onDelete: 'CASCADE' }) + stockLocations: StockLocation[]; } ``` * Extends: VendureEntity @@ -190,6 +202,36 @@ out of stock. Collection[]`} /> +### promotions + +Promotion[]`} /> + + +### paymentMethods + +PaymentMethod[]`} /> + + +### shippingMethods + +ShippingMethod[]`} /> + + +### customers + +Customer[]`} /> + + +### roles + +Role[]`} /> + + +### stockLocations + +StockLocation[]`} /> + + diff --git a/docs/docs/reference/typescript-api/entities/customer-group.md b/docs/docs/reference/typescript-api/entities/customer-group.md index c18377b82e..17b5bdd070 100644 --- a/docs/docs/reference/typescript-api/entities/customer-group.md +++ b/docs/docs/reference/typescript-api/entities/customer-group.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## CustomerGroup - + A grouping of Customers which enables features such as group-based promotions or tax rules. @@ -24,6 +24,8 @@ class CustomerGroup extends VendureEntity implements HasCustomFields { customers: Customer[]; @Column(type => CustomCustomerGroupFields) customFields: CustomCustomerGroupFields; + @OneToMany(type => TaxRate, taxRate => taxRate.zone) + taxRates: TaxRate[]; } ``` * Extends: VendureEntity @@ -55,6 +57,11 @@ class CustomerGroup extends VendureEntity implements HasCustomFields { +### taxRates + +TaxRate[]`} /> + + diff --git a/docs/docs/reference/typescript-api/entities/customer.md b/docs/docs/reference/typescript-api/entities/customer.md index 55615d5fea..910ea2df8e 100644 --- a/docs/docs/reference/typescript-api/entities/customer.md +++ b/docs/docs/reference/typescript-api/entities/customer.md @@ -42,7 +42,7 @@ class Customer extends VendureEntity implements ChannelAware, HasCustomFields, S user?: User; @Column(type => CustomCustomerFields) customFields: CustomCustomerFields; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.customers) @JoinTable() channels: Channel[]; } diff --git a/docs/docs/reference/typescript-api/entities/facet.md b/docs/docs/reference/typescript-api/entities/facet.md index 31a84f1203..d5f10d9de6 100644 --- a/docs/docs/reference/typescript-api/entities/facet.md +++ b/docs/docs/reference/typescript-api/entities/facet.md @@ -34,7 +34,7 @@ class Facet extends VendureEntity implements Translatable, HasCustomFields, Chan values: FacetValue[]; @Column(type => CustomFacetFields) customFields: CustomFacetFields; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.facets) @JoinTable() channels: Channel[]; } diff --git a/docs/docs/reference/typescript-api/entities/order-line-reference.md b/docs/docs/reference/typescript-api/entities/order-line-reference.md index f509e94c49..f66f9b56e8 100644 --- a/docs/docs/reference/typescript-api/entities/order-line-reference.md +++ b/docs/docs/reference/typescript-api/entities/order-line-reference.md @@ -62,7 +62,7 @@ class OrderLineReference extends VendureEntity { @Column() quantity: number; @Index() - @ManyToOne(type => OrderLine, { onDelete: 'CASCADE' }) + @ManyToOne(type => OrderLine, line => line.linesReferences, { onDelete: 'CASCADE' }) orderLine: OrderLine; @EntityId() orderLineId: ID; diff --git a/docs/docs/reference/typescript-api/entities/order-line.md b/docs/docs/reference/typescript-api/entities/order-line.md index 8d6d04ce21..e3b5c1fcdc 100644 --- a/docs/docs/reference/typescript-api/entities/order-line.md +++ b/docs/docs/reference/typescript-api/entities/order-line.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## OrderLine - + A single line on an Order which contains information about the ProductVariant and quantity ordered, as well as the price and tax information. @@ -25,12 +25,15 @@ class OrderLine extends VendureEntity implements HasCustomFields { @EntityId({ nullable: true }) sellerChannelId?: ID; @Index() - @ManyToOne(type => ShippingLine, { nullable: true, onDelete: 'SET NULL' }) + @ManyToOne(type => ShippingLine, shippingLine => shippingLine.orderLines, { + nullable: true, + onDelete: 'SET NULL', + }) shippingLine?: ShippingLine; @EntityId({ nullable: true }) shippingLineId?: ID; @Index() - @ManyToOne(type => ProductVariant) + @ManyToOne(type => ProductVariant, productVariant => productVariant.lines, { onDelete: 'CASCADE' }) productVariant: ProductVariant; @EntityId() productVariantId: ID; @@ -38,11 +41,15 @@ class OrderLine extends VendureEntity implements HasCustomFields { @ManyToOne(type => TaxCategory) taxCategory: TaxCategory; @Index() - @ManyToOne(type => Asset) + @ManyToOne(type => Asset, asset => asset.featuredInVariants, { onDelete: 'SET NULL' }) featuredAsset: Asset; @Index() @ManyToOne(type => Order, order => order.lines, { onDelete: 'CASCADE' }) order: Order; + @OneToMany(type => OrderLineReference, lineRef => lineRef.orderLine) + linesReferences: OrderLineReference[]; + @OneToMany(type => Sale, sale => sale.orderLine) + sales: Sale[]; @Column() quantity: number; @Column({ default: 0 }) @@ -57,8 +64,10 @@ class OrderLine extends VendureEntity implements HasCustomFields { adjustments: Adjustment[]; @Column('simple-json') taxLines: TaxLine[]; - @OneToOne(type => Cancellation, cancellation => cancellation.orderLine) - cancellation: Cancellation; + @OneToMany(type => Cancellation, cancellation => cancellation.orderLine) + cancellations: Cancellation[]; + @OneToMany(type => Allocation, allocation => allocation.orderLine) + allocations: Allocation[]; @Column(type => CustomOrderLineFields) customFields: CustomOrderLineFields; unitPrice: number @@ -145,6 +154,16 @@ The Order`} /> +### linesReferences + +OrderLineReference[]`} /> + + +### sales + +Sale[]`} /> + + ### quantity @@ -183,9 +202,14 @@ Whether the listPrice includes tax, which depends on the settings of the current -### cancellation +### cancellations + +Cancellation[]`} /> + + +### allocations -Cancellation`} /> +Allocation[]`} /> ### customFields diff --git a/docs/docs/reference/typescript-api/entities/payment-method.md b/docs/docs/reference/typescript-api/entities/payment-method.md index 331d2f6df3..ba5f2b2370 100644 --- a/docs/docs/reference/typescript-api/entities/payment-method.md +++ b/docs/docs/reference/typescript-api/entities/payment-method.md @@ -27,7 +27,7 @@ class PaymentMethod extends VendureEntity implements Translatable, ChannelAware, @Column() enabled: boolean; @Column('simple-json', { nullable: true }) checker: ConfigurableOperation | null; @Column('simple-json') handler: ConfigurableOperation; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.paymentMethods) @JoinTable() channels: Channel[]; @Column(type => CustomPaymentMethodFields) diff --git a/docs/docs/reference/typescript-api/entities/product-variant.md b/docs/docs/reference/typescript-api/entities/product-variant.md index 0b6f70b784..992acb6514 100644 --- a/docs/docs/reference/typescript-api/entities/product-variant.md +++ b/docs/docs/reference/typescript-api/entities/product-variant.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## ProductVariant - + A ProductVariant represents a single stock keeping unit (SKU) in the store's inventory. Whereas a Product is a "container" of variants, the variant itself holds the @@ -76,6 +76,8 @@ class ProductVariant extends VendureEntity implements Translatable, HasCustomFie @ManyToMany(type => Channel, channel => channel.productVariants) @JoinTable() channels: Channel[]; + @OneToMany(type => OrderLine, orderLine => orderLine.productVariant) + lines: OrderLine[]; } ``` * Extends: VendureEntity @@ -229,6 +231,11 @@ value set on this ProductVariant will be ignored. Channel[]`} /> +### lines + +OrderLine[]`} /> + + diff --git a/docs/docs/reference/typescript-api/entities/product.md b/docs/docs/reference/typescript-api/entities/product.md index 0bb032859e..a6ea790be1 100644 --- a/docs/docs/reference/typescript-api/entities/product.md +++ b/docs/docs/reference/typescript-api/entities/product.md @@ -40,7 +40,7 @@ class Product extends VendureEntity implements Translatable, HasCustomFields, Ch @ManyToMany(type => FacetValue, facetValue => facetValue.products) @JoinTable() facetValues: FacetValue[]; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.products) @JoinTable() channels: Channel[]; @Column(type => CustomProductFields) diff --git a/docs/docs/reference/typescript-api/entities/promotion.md b/docs/docs/reference/typescript-api/entities/promotion.md index 95a83dcbec..144846f06a 100644 --- a/docs/docs/reference/typescript-api/entities/promotion.md +++ b/docs/docs/reference/typescript-api/entities/promotion.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## Promotion - + A Promotion is used to define a set of conditions under which promotions actions (typically discounts) will be applied to an Order. @@ -43,7 +43,7 @@ class Promotion extends AdjustmentSource implements ChannelAware, SoftDeletable, @OneToMany(type => PromotionTranslation, translation => translation.base, { eager: true }) translations: Array>; @Column() enabled: boolean; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.promotions) @JoinTable() channels: Channel[]; @ManyToMany(type => Order, order => order.promotions) diff --git a/docs/docs/reference/typescript-api/entities/role.md b/docs/docs/reference/typescript-api/entities/role.md index 7875182857..8e02863dd6 100644 --- a/docs/docs/reference/typescript-api/entities/role.md +++ b/docs/docs/reference/typescript-api/entities/role.md @@ -22,7 +22,7 @@ class Role extends VendureEntity implements ChannelAware { @Column() code: string; @Column() description: string; @Column('simple-array') permissions: Permission[]; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.roles) @JoinTable() channels: Channel[]; } diff --git a/docs/docs/reference/typescript-api/entities/seller.md b/docs/docs/reference/typescript-api/entities/seller.md index 290557f481..89c4a94144 100644 --- a/docs/docs/reference/typescript-api/entities/seller.md +++ b/docs/docs/reference/typescript-api/entities/seller.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## Seller - + A Seller represents the person or organization who is selling the goods on a given Channel. By default, a single-channel Vendure installation will have a single default Seller. @@ -24,6 +24,8 @@ class Seller extends VendureEntity implements SoftDeletable, HasCustomFields { @Column() name: string; @Column(type => CustomSellerFields) customFields: CustomSellerFields; + @OneToMany(type => Channel, channel => channel.seller) + channels: Channel[]; } ``` * Extends: VendureEntity @@ -55,6 +57,11 @@ class Seller extends VendureEntity implements SoftDeletable, HasCustomFields { +### channels + +Channel[]`} /> + + diff --git a/docs/docs/reference/typescript-api/entities/shipping-line.md b/docs/docs/reference/typescript-api/entities/shipping-line.md index 5acb5896df..560925e96e 100644 --- a/docs/docs/reference/typescript-api/entities/shipping-line.md +++ b/docs/docs/reference/typescript-api/entities/shipping-line.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## ShippingLine - + A ShippingLine is created when a ShippingMethod is applied to an Order. It contains information about the price of the shipping method, any discounts that were @@ -36,6 +36,8 @@ class ShippingLine extends VendureEntity { adjustments: Adjustment[]; @Column('simple-json') taxLines: TaxLine[]; + @OneToMany(type => OrderLine, orderLine => orderLine.shippingLine) + orderLines: OrderLine[]; price: number priceWithTax: number discountedPrice: number @@ -92,6 +94,11 @@ class ShippingLine extends VendureEntity { +### orderLines + +OrderLine[]`} /> + + ### price diff --git a/docs/docs/reference/typescript-api/entities/shipping-method.md b/docs/docs/reference/typescript-api/entities/shipping-method.md index 3ac2987d6a..bb9c5b7fd4 100644 --- a/docs/docs/reference/typescript-api/entities/shipping-method.md +++ b/docs/docs/reference/typescript-api/entities/shipping-method.md @@ -31,7 +31,7 @@ class ShippingMethod extends VendureEntity implements ChannelAware, SoftDeletabl @Column('simple-json') calculator: ConfigurableOperation; @Column() fulfillmentHandlerCode: string; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.shippingMethods) @JoinTable() channels: Channel[]; @OneToMany(type => ShippingMethodTranslation, translation => translation.base, { eager: true }) diff --git a/docs/docs/reference/typescript-api/entities/stock-location.md b/docs/docs/reference/typescript-api/entities/stock-location.md index 16073f021e..ed0cccdf53 100644 --- a/docs/docs/reference/typescript-api/entities/stock-location.md +++ b/docs/docs/reference/typescript-api/entities/stock-location.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## StockLocation - + A StockLocation represents a physical location where stock is held. For example, a warehouse or a shop. @@ -29,9 +29,11 @@ class StockLocation extends VendureEntity implements HasCustomFields, ChannelAwa description: string; @Column(type => CustomStockLocationFields) customFields: CustomStockLocationFields; - @ManyToMany(type => Channel) + @ManyToMany(type => Channel, channel => channel.stockLocations) @JoinTable() channels: Channel[]; + @OneToMany(type => StockMovement, movement => movement.stockLocation) + stockMovements: StockMovement[]; } ``` * Extends: VendureEntity @@ -68,6 +70,11 @@ class StockLocation extends VendureEntity implements HasCustomFields, ChannelAwa Channel[]`} /> +### stockMovements + +StockMovement[]`} /> + + diff --git a/docs/docs/reference/typescript-api/entities/stock-movement.md b/docs/docs/reference/typescript-api/entities/stock-movement.md index 330217258f..90a2575237 100644 --- a/docs/docs/reference/typescript-api/entities/stock-movement.md +++ b/docs/docs/reference/typescript-api/entities/stock-movement.md @@ -24,7 +24,7 @@ class StockMovement extends VendureEntity { @ManyToOne(type => ProductVariant, variant => variant.stockMovements) productVariant: ProductVariant; @Index() - @ManyToOne(type => StockLocation, { onDelete: 'CASCADE' }) + @ManyToOne(type => StockLocation, stockLocation => stockLocation.stockMovements, { onDelete: 'CASCADE' }) stockLocation: StockLocation; @EntityId() stockLocationId: ID; @@ -80,7 +80,7 @@ class Allocation extends StockMovement { readonly type = StockMovementType.ALLOCATION; constructor(input: DeepPartial) @Index() - @ManyToOne(type => OrderLine) + @ManyToOne(type => OrderLine, orderLine => orderLine.allocations) orderLine: OrderLine; } ``` @@ -120,7 +120,7 @@ A Cancellation is created when OrderItems from a fulfilled Order are cancelled. class Cancellation extends StockMovement { readonly type = StockMovementType.CANCELLATION; constructor(input: DeepPartial) - @ManyToOne(type => OrderLine) + @ManyToOne(type => OrderLine, orderLine => orderLine.cancellations) orderLine: OrderLine; } ``` @@ -201,7 +201,7 @@ A Sale is created when OrderItems are fulfilled. class Sale extends StockMovement { readonly type = StockMovementType.SALE; constructor(input: DeepPartial) - @ManyToOne(type => OrderLine) + @ManyToOne(type => OrderLine, line => line.sales) orderLine: OrderLine; } ``` diff --git a/docs/docs/reference/typescript-api/entities/tax-category.md b/docs/docs/reference/typescript-api/entities/tax-category.md index fec79acc07..db1634d8a3 100644 --- a/docs/docs/reference/typescript-api/entities/tax-category.md +++ b/docs/docs/reference/typescript-api/entities/tax-category.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## TaxCategory - + A TaxCategory defines what type of taxes to apply to a ProductVariant. @@ -24,6 +24,8 @@ class TaxCategory extends VendureEntity implements HasCustomFields { customFields: CustomTaxCategoryFields; @OneToMany(type => ProductVariant, productVariant => productVariant.taxCategory) productVariants: ProductVariant[]; + @OneToMany(type => TaxRate, taxRate => taxRate.category) + taxRates: TaxRate[]; } ``` * Extends: VendureEntity @@ -60,6 +62,11 @@ class TaxCategory extends VendureEntity implements HasCustomFields { ProductVariant[]`} /> +### taxRates + +TaxRate[]`} /> + + diff --git a/docs/docs/reference/typescript-api/entities/tax-rate.md b/docs/docs/reference/typescript-api/entities/tax-rate.md index 16498eb48a..99863806fa 100644 --- a/docs/docs/reference/typescript-api/entities/tax-rate.md +++ b/docs/docs/reference/typescript-api/entities/tax-rate.md @@ -26,13 +26,13 @@ class TaxRate extends VendureEntity implements HasCustomFields { @Column() enabled: boolean; @Column({ type: 'decimal', precision: 5, scale: 2, transformer: new DecimalTransformer() }) value: number; @Index() - @ManyToOne(type => TaxCategory) + @ManyToOne(type => TaxCategory, taxCategory => taxCategory.taxRates) category: TaxCategory; @Index() - @ManyToOne(type => Zone) + @ManyToOne(type => Zone, zone => zone.taxRates) zone: Zone; @Index() - @ManyToOne(type => CustomerGroup, { nullable: true }) + @ManyToOne(type => CustomerGroup, customerGroup => customerGroup.taxRates, { nullable: true }) customerGroup?: CustomerGroup; @Column(type => CustomTaxRateFields) customFields: CustomTaxRateFields; diff --git a/docs/docs/reference/typescript-api/entities/user.md b/docs/docs/reference/typescript-api/entities/user.md index ff7306e03c..789c68e9f8 100644 --- a/docs/docs/reference/typescript-api/entities/user.md +++ b/docs/docs/reference/typescript-api/entities/user.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## User - + A User represents any authenticated user of the Vendure API. This includes both Administrators as well as registered Customers. @@ -34,6 +34,8 @@ class User extends VendureEntity implements HasCustomFields, SoftDeletable { lastLogin: Date | null; @Column(type => CustomUserFields) customFields: CustomUserFields; + @OneToMany(type => AuthenticatedSession, session => session.user) + sessions: AuthenticatedSession[]; getNativeAuthenticationMethod() => NativeAuthenticationMethod; getNativeAuthenticationMethod(strict?: boolean) => NativeAuthenticationMethod | undefined; getNativeAuthenticationMethod(strict?: boolean) => NativeAuthenticationMethod | undefined; @@ -88,6 +90,11 @@ class User extends VendureEntity implements HasCustomFields, SoftDeletable { +### sessions + +AuthenticatedSession[]`} /> + + ### getNativeAuthenticationMethod NativeAuthenticationMethod`} /> diff --git a/docs/docs/reference/typescript-api/entities/zone.md b/docs/docs/reference/typescript-api/entities/zone.md index cc518024d3..c8c33d8eae 100644 --- a/docs/docs/reference/typescript-api/entities/zone.md +++ b/docs/docs/reference/typescript-api/entities/zone.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## Zone - + A Zone is a grouping of one or more Country entities. It is used for calculating applicable shipping and taxes. @@ -25,6 +25,12 @@ class Zone extends VendureEntity implements HasCustomFields { members: Region[]; @Column(type => CustomZoneFields) customFields: CustomZoneFields; + @OneToMany(type => Channel, country => country.defaultShippingZone) + defaultShippingZoneChannels: Channel[]; + @OneToMany(type => Channel, country => country.defaultTaxZone) + defaultTaxZoneChannels: Channel[]; + @OneToMany(type => TaxRate, taxRate => taxRate.zone) + taxRates: TaxRate[]; } ``` * Extends: VendureEntity @@ -56,6 +62,21 @@ class Zone extends VendureEntity implements HasCustomFields { +### defaultShippingZoneChannels + +Channel[]`} /> + + +### defaultTaxZoneChannels + +Channel[]`} /> + + +### taxRates + +TaxRate[]`} /> + + diff --git a/docs/docs/reference/typescript-api/job-queue/index.md b/docs/docs/reference/typescript-api/job-queue/index.md index a0c58707a0..c20db0b158 100644 --- a/docs/docs/reference/typescript-api/job-queue/index.md +++ b/docs/docs/reference/typescript-api/job-queue/index.md @@ -26,7 +26,7 @@ class JobQueue = object> { name: string started: boolean constructor(options: CreateQueueOptions, jobQueueStrategy: JobQueueStrategy, jobBufferService: JobBufferService) - add(data: Data, options?: JobOptions) => Promise>; + add(data: Data, options?: JobOptions) => Promise>; } ``` @@ -49,7 +49,7 @@ class JobQueue = object> { ### add -JobConfig<Data>, 'retries'>) => Promise<SubscribableJob<Data>>`} /> + Promise<SubscribableJob<Data>>`} /> Adds a new Job to the queue. The resolved SubscribableJob allows the calling code to subscribe to updates to the Job: diff --git a/docs/docs/reference/typescript-api/job-queue/job-queue-strategy.md b/docs/docs/reference/typescript-api/job-queue/job-queue-strategy.md index cb88eac5cb..2c6be10817 100644 --- a/docs/docs/reference/typescript-api/job-queue/job-queue-strategy.md +++ b/docs/docs/reference/typescript-api/job-queue/job-queue-strategy.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## JobQueueStrategy - + Defines how the jobs in the JobQueueService are persisted and accessed. Custom strategies can be defined to make use of external @@ -26,7 +26,7 @@ your VendureConfig. ```ts title="Signature" interface JobQueueStrategy extends InjectableStrategy { - add = object>(job: Job): Promise>; + add = object>(job: Job, jobOptions?: JobQueueStrategyJobOptions): Promise>; start = object>( queueName: string, process: (job: Job) => Promise, @@ -45,7 +45,7 @@ interface JobQueueStrategy extends InjectableStrategy { ### add -Job<Data>) => Promise<Job<Data>>`} /> +Job<Data>, jobOptions?: JobQueueStrategyJobOptions<Data>) => Promise<Job<Data>>`} /> Add a new job to the queue. ### start diff --git a/docs/docs/reference/typescript-api/job-queue/sql-job-queue-strategy.md b/docs/docs/reference/typescript-api/job-queue/sql-job-queue-strategy.md index 3d0c28b981..1c6b05a418 100644 --- a/docs/docs/reference/typescript-api/job-queue/sql-job-queue-strategy.md +++ b/docs/docs/reference/typescript-api/job-queue/sql-job-queue-strategy.md @@ -20,7 +20,7 @@ This strategy is used by the Job<Data>) => Promise<Job<Data>>`} /> +Job<Data>, jobOptions?: JobQueueStrategyJobOptions<Data>) => Promise<Job<Data>>`} /> ### next diff --git a/docs/docs/reference/typescript-api/job-queue/types.md b/docs/docs/reference/typescript-api/job-queue/types.md index 31e41ae8b8..60344915c0 100644 --- a/docs/docs/reference/typescript-api/job-queue/types.md +++ b/docs/docs/reference/typescript-api/job-queue/types.md @@ -73,7 +73,7 @@ type JobUpdateOptions = { ## CreateQueueOptions - + Used to configure a new JobQueue instance. @@ -104,7 +104,7 @@ should resolve when the job is complete, or be rejected in case of an error. ## JobData - + A JSON-serializable data type which provides a Job with the data it needs to be processed. @@ -116,7 +116,7 @@ type JobData = JsonCompatible ## JobConfig - + Used to instantiate a new Job diff --git a/docs/docs/reference/typescript-api/migration/generate-migration.md b/docs/docs/reference/typescript-api/migration/generate-migration.md index 6dcb4ced4a..19911c6cb5 100644 --- a/docs/docs/reference/typescript-api/migration/generate-migration.md +++ b/docs/docs/reference/typescript-api/migration/generate-migration.md @@ -11,14 +11,14 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## generateMigration - + Generates a new migration file based on any schema changes (e.g. adding or removing CustomFields). See [TypeORM migration docs](https://typeorm.io/#/migrations) for more information about the underlying migration mechanism. ```ts title="Signature" -function generateMigration(userConfig: Partial, options: MigrationOptions): void +function generateMigration(userConfig: Partial, options: MigrationOptions): Promise ``` Parameters diff --git a/docs/docs/reference/typescript-api/migration/revert-last-migration.md b/docs/docs/reference/typescript-api/migration/revert-last-migration.md index 3c76dca24e..4228decf67 100644 --- a/docs/docs/reference/typescript-api/migration/revert-last-migration.md +++ b/docs/docs/reference/typescript-api/migration/revert-last-migration.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## revertLastMigration - + Reverts the last applied database migration. See [TypeORM migration docs](https://typeorm.io/#/migrations) for more information about the underlying migration mechanism. diff --git a/docs/docs/reference/typescript-api/migration/run-migrations.md b/docs/docs/reference/typescript-api/migration/run-migrations.md index 575ea62b9a..cb734fd043 100644 --- a/docs/docs/reference/typescript-api/migration/run-migrations.md +++ b/docs/docs/reference/typescript-api/migration/run-migrations.md @@ -17,7 +17,7 @@ Runs any pending database migrations. See [TypeORM migration docs](https://typeo for more information about the underlying migration mechanism. ```ts title="Signature" -function runMigrations(userConfig: Partial): void +function runMigrations(userConfig: Partial): Promise ``` Parameters diff --git a/docs/docs/reference/typescript-api/orders/order-process.md b/docs/docs/reference/typescript-api/orders/order-process.md index a02125122c..9c15fd27a5 100644 --- a/docs/docs/reference/typescript-api/orders/order-process.md +++ b/docs/docs/reference/typescript-api/orders/order-process.md @@ -196,7 +196,7 @@ Parameters ## defaultOrderProcess - + This is the built-in OrderProcess that ships with Vendure. A customized version of this process can be created using the configureDefaultOrderProcess function, which allows you to pass in an object diff --git a/docs/docs/reference/typescript-api/service-helpers/order-calculator.md b/docs/docs/reference/typescript-api/service-helpers/order-calculator.md index a239e2e04a..65016f09ce 100644 --- a/docs/docs/reference/typescript-api/service-helpers/order-calculator.md +++ b/docs/docs/reference/typescript-api/service-helpers/order-calculator.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## OrderCalculator - + This helper is used when making changes to an Order, to apply all applicable price adjustments to that Order, including: diff --git a/docs/docs/reference/typescript-api/service-helpers/product-price-applicator.md b/docs/docs/reference/typescript-api/service-helpers/product-price-applicator.md index 1dac964b40..cea4749de9 100644 --- a/docs/docs/reference/typescript-api/service-helpers/product-price-applicator.md +++ b/docs/docs/reference/typescript-api/service-helpers/product-price-applicator.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## ProductPriceApplicator - + This helper is used to apply the correct price to a ProductVariant based on the current context including active Channel, any current Order, etc. If you use the TransactionalConnection to diff --git a/docs/docs/reference/typescript-api/services/customer-service.md b/docs/docs/reference/typescript-api/services/customer-service.md index 6d4f704718..92cecf5841 100644 --- a/docs/docs/reference/typescript-api/services/customer-service.md +++ b/docs/docs/reference/typescript-api/services/customer-service.md @@ -31,8 +31,8 @@ class CustomerService { refreshVerificationToken(ctx: RequestContext, emailAddress: string) => Promise; verifyCustomerEmailAddress(ctx: RequestContext, verificationToken: string, password?: string) => Promise>; requestPasswordReset(ctx: RequestContext, emailAddress: string) => Promise; - resetPassword(ctx: RequestContext, passwordResetToken: string, password: string) => Promise< - User | PasswordResetTokenExpiredError | PasswordResetTokenInvalidError | PasswordValidationError + resetPassword(ctx: RequestContext, passwordResetToken: string, password: string) => Promise< + User | PasswordResetTokenExpiredError | PasswordResetTokenInvalidError | PasswordValidationError >; requestUpdateEmailAddress(ctx: RequestContext, userId: ID, newEmailAddress: string) => Promise; updateEmailAddress(ctx: RequestContext, token: string) => Promise; @@ -69,8 +69,8 @@ class CustomerService { RequestContext, userId: ID, filterOnChannel: = true) => Promise<Customer | undefined>`} /> -Returns the Customer entity associated with the given userId, if one exists. -Setting `filterOnChannel` to `true` will limit the results to Customers which are assigned +Returns the Customer entity associated with the given userId, if one exists. +Setting `filterOnChannel` to `true` will limit the results to Customers which are assigned to the current active Channel only. ### findAddressesByCustomerId @@ -86,13 +86,13 @@ Returns a list of all RequestContext, input: CreateCustomerInput, password?: string) => Promise<ErrorResultUnion<CreateCustomerResult, Customer>>`} /> -Creates a new Customer, including creation of a new User with the special `customer` Role. - -If the `password` argument is specified, the Customer will be immediately verified. If not, -then an AccountRegistrationEvent is published, so that the customer can have their -email address verified and set their password in a later step using the `verifyCustomerEmailAddress()` -method. - +Creates a new Customer, including creation of a new User with the special `customer` Role. + +If the `password` argument is specified, the Customer will be immediately verified. If not, +then an AccountRegistrationEvent is published, so that the customer can have their +email address verified and set their password in a later step using the `verifyCustomerEmailAddress()` +method. + This method is intended to be used in admin-created Customer flows. ### update @@ -113,47 +113,47 @@ This method is intended to be used in admin-created Customer flows. RequestContext, input: RegisterCustomerInput) => Promise<RegisterCustomerAccountResult | EmailAddressConflictError | PasswordValidationError>`} /> -Registers a new Customer account with the NativeAuthenticationStrategy and starts -the email verification flow (unless AuthOptions `requireVerification` is set to `false`) -by publishing an AccountRegistrationEvent. - +Registers a new Customer account with the NativeAuthenticationStrategy and starts +the email verification flow (unless AuthOptions `requireVerification` is set to `false`) +by publishing an AccountRegistrationEvent. + This method is intended to be used in storefront Customer-creation flows. ### refreshVerificationToken RequestContext, emailAddress: string) => Promise<void>`} /> -Refreshes a stale email address verification token by generating a new one and +Refreshes a stale email address verification token by generating a new one and publishing a AccountRegistrationEvent. ### verifyCustomerEmailAddress RequestContext, verificationToken: string, password?: string) => Promise<ErrorResultUnion<VerifyCustomerAccountResult, Customer>>`} /> -Given a valid verification token which has been published in an AccountRegistrationEvent, this +Given a valid verification token which has been published in an AccountRegistrationEvent, this method is used to set the Customer as `verified` as part of the account registration flow. ### requestPasswordReset RequestContext, emailAddress: string) => Promise<void>`} /> -Publishes a new PasswordResetEvent for the given email address. This event creates +Publishes a new PasswordResetEvent for the given email address. This event creates a token which can be used in the `resetPassword()` method. ### resetPassword -RequestContext, passwordResetToken: string, password: string) => Promise< User | PasswordResetTokenExpiredError | PasswordResetTokenInvalidError | PasswordValidationError >`} /> +RequestContext, passwordResetToken: string, password: string) => Promise< User | PasswordResetTokenExpiredError | PasswordResetTokenInvalidError | PasswordValidationError >`} /> -Given a valid password reset token created by a call to the `requestPasswordReset()` method, +Given a valid password reset token created by a call to the `requestPasswordReset()` method, this method will change the Customer's password to that given as the `password` argument. ### requestUpdateEmailAddress RequestContext, userId: ID, newEmailAddress: string) => Promise<boolean | EmailAddressConflictError>`} /> -Publishes a IdentifierChangeRequestEvent for the given User. This event contains a token -which is then used in the `updateEmailAddress()` method to change the email address of the User & +Publishes a IdentifierChangeRequestEvent for the given User. This event contains a token +which is then used in the `updateEmailAddress()` method to change the email address of the User & Customer. ### updateEmailAddress RequestContext, token: string) => Promise<boolean | IdentifierChangeTokenInvalidError | IdentifierChangeTokenExpiredError>`} /> -Given a valid email update token published in a IdentifierChangeRequestEvent, this method +Given a valid email update token published in a IdentifierChangeRequestEvent, this method will update the Customer & User email address. ### createOrUpdate @@ -184,8 +184,8 @@ Creates a new Addre RequestContext, order: Order) => `} /> -If the Customer associated with the given Order does not yet have any Addresses, -this method will create new Address(es) based on the Order's shipping & billing +If the Customer associated with the given Order does not yet have any Addresses, +this method will create new Address(es) based on the Order's shipping & billing addresses. ### addNoteToCustomer diff --git a/docs/docs/reference/typescript-api/services/fulfillment-service.md b/docs/docs/reference/typescript-api/services/fulfillment-service.md index 13c10c3644..7395ce399a 100644 --- a/docs/docs/reference/typescript-api/services/fulfillment-service.md +++ b/docs/docs/reference/typescript-api/services/fulfillment-service.md @@ -21,14 +21,14 @@ class FulfillmentService { create(ctx: RequestContext, orders: Order[], lines: OrderLineInput[], handler: ConfigurableOperationInput) => Promise; getFulfillmentLines(ctx: RequestContext, id: ID) => Promise; getFulfillmentsLinesForOrderLine(ctx: RequestContext, orderLineId: ID, relations: RelationPaths = []) => Promise; - transitionToState(ctx: RequestContext, fulfillmentId: ID, state: FulfillmentState) => Promise< - | { - fulfillment: Fulfillment; - orders: Order[]; - fromState: FulfillmentState; - toState: FulfillmentState; - } - | FulfillmentStateTransitionError + transitionToState(ctx: RequestContext, fulfillmentId: ID, state: FulfillmentState) => Promise< + | { + fulfillment: Fulfillment; + orders: Order[]; + fromState: FulfillmentState; + toState: FulfillmentState; + } + | FulfillmentStateTransitionError >; getNextStates(fulfillment: Fulfillment) => readonly FulfillmentState[]; } @@ -45,7 +45,7 @@ class FulfillmentService { RequestContext, orders: Order[], lines: OrderLineInput[], handler: ConfigurableOperationInput) => Promise<Fulfillment | InvalidFulfillmentHandlerError | CreateFulfillmentError>`} /> -Creates a new Fulfillment for the given Orders and OrderItems, using the specified +Creates a new Fulfillment for the given Orders and OrderItems, using the specified FulfillmentHandler. ### getFulfillmentLines @@ -59,9 +59,9 @@ Creates a new Fulfillment for the given Orders and OrderItems, using the specifi ### transitionToState -RequestContext, fulfillmentId: ID, state: FulfillmentState) => Promise< | { fulfillment: Fulfillment; orders: Order[]; fromState: FulfillmentState; toState: FulfillmentState; } | FulfillmentStateTransitionError >`} /> +RequestContext, fulfillmentId: ID, state: FulfillmentState) => Promise< | { fulfillment: Fulfillment; orders: Order[]; fromState: FulfillmentState; toState: FulfillmentState; } | FulfillmentStateTransitionError >`} /> -Transitions the specified Fulfillment to a new state and upon successful transition +Transitions the specified Fulfillment to a new state and upon successful transition publishes a FulfillmentStateTransitionEvent. ### getNextStates diff --git a/docs/docs/reference/typescript-api/services/global-settings-service.md b/docs/docs/reference/typescript-api/services/global-settings-service.md index 1a9c32036e..be82bec852 100644 --- a/docs/docs/reference/typescript-api/services/global-settings-service.md +++ b/docs/docs/reference/typescript-api/services/global-settings-service.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## GlobalSettingsService - + Contains methods relating to the {@link GlobalSettings} entity. diff --git a/docs/docs/reference/typescript-api/services/order-service.md b/docs/docs/reference/typescript-api/services/order-service.md index 5670091635..7d413456e3 100644 --- a/docs/docs/reference/typescript-api/services/order-service.md +++ b/docs/docs/reference/typescript-api/services/order-service.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## OrderService - + Contains methods relating to Order entities. diff --git a/docs/docs/reference/typescript-api/services/payment-method-service.md b/docs/docs/reference/typescript-api/services/payment-method-service.md index 8937d40c21..a872a3b0ec 100644 --- a/docs/docs/reference/typescript-api/services/payment-method-service.md +++ b/docs/docs/reference/typescript-api/services/payment-method-service.md @@ -28,10 +28,10 @@ class PaymentMethodService { getPaymentMethodEligibilityCheckers(ctx: RequestContext) => ConfigurableOperationDefinition[]; getPaymentMethodHandlers(ctx: RequestContext) => ConfigurableOperationDefinition[]; getEligiblePaymentMethods(ctx: RequestContext, order: Order) => Promise; - getMethodAndOperations(ctx: RequestContext, method: string) => Promise<{ - paymentMethod: PaymentMethod; - handler: PaymentMethodHandler; - checker: PaymentMethodEligibilityChecker | null; + getMethodAndOperations(ctx: RequestContext, method: string) => Promise<{ + paymentMethod: PaymentMethod; + handler: PaymentMethodHandler; + checker: PaymentMethodEligibilityChecker | null; }>; } ``` @@ -95,7 +95,7 @@ class PaymentMethodService { ### getMethodAndOperations -RequestContext, method: string) => Promise<{ paymentMethod: PaymentMethod; handler: PaymentMethodHandler; checker: PaymentMethodEligibilityChecker | null; }>`} /> +RequestContext, method: string) => Promise<{ paymentMethod: PaymentMethod; handler: PaymentMethodHandler; checker: PaymentMethodEligibilityChecker | null; }>`} /> diff --git a/docs/docs/reference/typescript-api/services/tax-rate-service.md b/docs/docs/reference/typescript-api/services/tax-rate-service.md index a08d20f55c..89ffe9f439 100644 --- a/docs/docs/reference/typescript-api/services/tax-rate-service.md +++ b/docs/docs/reference/typescript-api/services/tax-rate-service.md @@ -11,13 +11,13 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## TaxRateService - + Contains methods relating to TaxRate entities. ```ts title="Signature" class TaxRateService { - constructor(connection: TransactionalConnection, eventBus: EventBus, listQueryBuilder: ListQueryBuilder, configService: ConfigService) + constructor(connection: TransactionalConnection, eventBus: EventBus, listQueryBuilder: ListQueryBuilder, configService: ConfigService, customFieldRelationService: CustomFieldRelationService) findAll(ctx: RequestContext, options?: ListQueryOptions, relations?: RelationPaths) => Promise>; findOne(ctx: RequestContext, taxRateId: ID, relations?: RelationPaths) => Promise; create(ctx: RequestContext, input: CreateTaxRateInput) => Promise; @@ -31,7 +31,7 @@ class TaxRateService { ### constructor -TransactionalConnection, eventBus: EventBus, listQueryBuilder: ListQueryBuilder, configService: ConfigService) => TaxRateService`} /> +TransactionalConnection, eventBus: EventBus, listQueryBuilder: ListQueryBuilder, configService: ConfigService, customFieldRelationService: CustomFieldRelationService) => TaxRateService`} /> ### findAll