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 >; 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 * @typedef ListsExternalProducts
* @alias ListsModels.<ExternalProduct> * @alias ListsModels.<ExternalProduct>
@ -47,7 +47,7 @@ export type ExternalProductRepositoryParams =
export type ListsExternalProducts = ListsModels< 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 * @typedef CreatesExternalProducts
* @alias CreatesModels.<ExternalProduct> * @alias CreatesModels.<ExternalProduct>
@ -55,7 +55,7 @@ export type ListsExternalProducts = ListsModels< ExternalProductRepositoryParams
export type CreatesExternalProducts = CreatesModels< 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 * @typedef ReadsExternalProducts
* @alias ReadsModels.<ExternalProduct> * @alias ReadsModels.<ExternalProduct>
@ -63,7 +63,7 @@ export type CreatesExternalProducts = CreatesModels< ExternalProductRepositoryPa
export type ReadsExternalProducts = ReadsModels< ExternalProductRepositoryParams >; 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 * @typedef UpdatesExternalProducts
* @alias UpdatesModels.<ExternalProduct> * @alias UpdatesModels.<ExternalProduct>
@ -71,7 +71,7 @@ export type ReadsExternalProducts = ReadsModels< ExternalProductRepositoryParams
export type UpdatesExternalProducts = UpdatesModels< 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 * @typedef DeletesExternalProducts
* @alias DeletesModels.<ExternalProduct> * @alias DeletesModels.<ExternalProduct>
@ -79,7 +79,7 @@ export type UpdatesExternalProducts = UpdatesModels< ExternalProductRepositoryPa
export type DeletesExternalProducts = DeletesModels< ExternalProductRepositoryParams >; 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 export class ExternalProduct extends AbstractProduct implements
IProductCommon, IProductCommon,

View File

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