Skip to content

Commit

Permalink
GH-13939 Extract textfield OCC endpoints by model augmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophHi committed Oct 5, 2021
1 parent bd79df1 commit 636ad92
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
2 changes: 2 additions & 0 deletions feature-libs/product-configurator/textfield/occ/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Imported for side effects (module augmentation)
import './occ-configurator-textfield-endpoints.model';
export * from './converters/index';
export * from './occ-configurator-textfield.adapter';
export * from './textfield-configurator-occ.module';
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { OccEndpoint } from '@spartacus/core';
declare module '@spartacus/core' {
interface OccEndpoints {
/**
* Endpoint for create configuration for the textfield configurator
*
* @member {string}
*/
createTextfieldConfiguration?: string;
/**
* Endpoint for add textfield configuration to cart
*
* @member {string}
*/
addTextfieldConfigurationToCart?: string;
/**
* Endpoint for reading textfield configuration attached to the cart entry
*/
readTextfieldConfigurationForCartEntry?: string;
/**
* Endpoint for reading textfield configuration attached to the order entry
*/
readTextfieldConfigurationForOrderEntry?: string | OccEndpoint;
/**
* Endpoint for updating textfield configuration attached to the cart entry
*/
updateTextfieldConfigurationForCartEntry?: string;
}
}
21 changes: 1 addition & 20 deletions projects/core/src/occ/occ-models/occ-endpoints.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,26 +218,7 @@ export interface OccEndpoints {
* @member {string}
*/
createVariantConfiguration?: string;
/**
* Endpoint for create configuration for the textfield configurator
*
* @member {string}
*/
createTextfieldConfiguration?: string;
/**
* Endpoint for add textfield configuration to cart
*
* @member {string}
*/
addTextfieldConfigurationToCart?: string;
/**
* Endpoint for reading textfield configuration attached to the cart entry
*/
readTextfieldConfigurationForCartEntry?: string;
/**
* Endpoint for updating textfield configuration attached to the cart entry
*/
updateTextfieldConfigurationForCartEntry?: string;

/**
* Endpoint to read configuration
*
Expand Down

0 comments on commit 636ad92

Please sign in to comment.