fix up some in code docs

This commit is contained in:
Ron Rennick 2021-02-22 17:16:17 -04:00
parent 2e2b53cd7d
commit cc86f19dec
2 changed files with 24 additions and 6 deletions

View File

@ -39,7 +39,7 @@ export type ExternalProductRepositoryParams =
ModelRepositoryParams< ExternalProduct, never, ProductSearchParams, ExternalProductUpdateParams >;
/**
* An interface for listing simple products using the repository.
* An interface for listing external products using the repository.
*
* @typedef ListsExternalProducts
* @alias ListsModels.<ExternalProduct>
@ -47,7 +47,7 @@ export type ExternalProductRepositoryParams =
export type ListsExternalProducts = ListsModels< ExternalProductRepositoryParams >;
/**
* An interface for creating simple products using the repository.
* An interface for external simple products using the repository.
*
* @typedef CreatesExternalProducts
* @alias CreatesModels.<ExternalProduct>
@ -55,7 +55,7 @@ export type ListsExternalProducts = ListsModels< ExternalProductRepositoryParams
export type CreatesExternalProducts = CreatesModels< ExternalProductRepositoryParams >;
/**
* An interface for reading simple products using the repository.
* An interface for reading external products using the repository.
*
* @typedef ReadsExternalProducts
* @alias ReadsModels.<ExternalProduct>
@ -63,7 +63,7 @@ export type CreatesExternalProducts = CreatesModels< ExternalProductRepositoryPa
export type ReadsExternalProducts = ReadsModels< ExternalProductRepositoryParams >;
/**
* An interface for updating simple products using the repository.
* An interface for updating external products using the repository.
*
* @typedef UpdatesExternalProducts
* @alias UpdatesModels.<ExternalProduct>
@ -71,7 +71,7 @@ export type ReadsExternalProducts = ReadsModels< ExternalProductRepositoryParams
export type UpdatesExternalProducts = UpdatesModels< ExternalProductRepositoryParams >;
/**
* An interface for deleting simple products using the repository.
* An interface for deleting external products using the repository.
*
* @typedef DeletesExternalProducts
* @alias DeletesModels.<ExternalProduct>
@ -79,7 +79,7 @@ export type UpdatesExternalProducts = UpdatesModels< ExternalProductRepositoryPa
export type DeletesExternalProducts = DeletesModels< ExternalProductRepositoryParams >;
/**
* The base for the simple product object.
* The base for the external product object.
*/
export class ExternalProduct extends AbstractProduct implements
IProductCommon,

View File

@ -189,6 +189,9 @@ export function createProductTransformer< T extends AbstractProduct >(
return new ModelTransformer( transformations );
}
/**
* Create a transformer for the product cross sells property.
*/
export function createProductCrossSellsTransformation(): ModelTransformation[] {
const transformations = [
new PropertyTypeTransformation(
@ -206,6 +209,9 @@ export function createProductCrossSellsTransformation(): ModelTransformation[] {
return transformations;
}
/**
* Create a transformer for the product upsells property.
*/
export function createProductUpSellsTransformation(): ModelTransformation[] {
const transformations = [
new PropertyTypeTransformation(
@ -223,6 +229,9 @@ export function createProductUpSellsTransformation(): ModelTransformation[] {
return transformations;
}
/**
* Create a transformer for product delivery properties.
*/
export function createProductDeliveryTransformation(): ModelTransformation[] {
const transformations = [
new ModelTransformerTransformation( 'downloads', ProductDownload, createProductDownloadTransformer() ),
@ -249,6 +258,9 @@ export function createProductDeliveryTransformation(): ModelTransformation[] {
return transformations;
}
/**
* Create a transformer for product inventory properties.
*/
export function createProductInventoryTransformation(): ModelTransformation[] {
const transformations = [
new PropertyTypeTransformation(
@ -278,6 +290,9 @@ export function createProductInventoryTransformation(): ModelTransformation[] {
return transformations;
}
/**
* Create a transformer for product sales tax properties.
*/
export function createProductSalesTaxTransformation(): ModelTransformation[] {
const transformations = [
new PropertyTypeTransformation(
@ -297,6 +312,9 @@ export function createProductSalesTaxTransformation(): ModelTransformation[] {
return transformations;
}
/**
* Create a transformer for product shipping properties.
*/
export function createProductShippingTransformation(): ModelTransformation[] {
const transformations = [
new CustomTransformation(