import * as i0 from '@angular/core'; import { PipeTransform } from '@angular/core'; import * as i1 from '@angular/common'; import { SchedulerLike, MonoTypeOperatorFunction, Observable } from 'rxjs'; import { HttpHeaders, HttpParams, HttpClient, HttpResponse } from '@angular/common/http'; import { MessageService } from 'primeng/api'; import { Dictionary } from 'lodash'; import { Params } from '@angular/router'; declare class SidebarTabsDirective { private _sidebarTabs; private _defaultTab; private _index; get sidebarTabs(): string; set sidebarTabs(value: string); switchTab(tabName: string, index?: number): void; get activeTab(): string; get index(): number; reset(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class OrderByPipe implements PipeTransform { transform(iterable: any, iteratee: string, order: boolean | 'asc' | 'desc'): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class SearchFilterPipe implements PipeTransform { transform(list: any, filterValue: any, filterProperty?: any): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class ValuesPipe implements PipeTransform { transform(object: any): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class IndexToAlphaPipe implements PipeTransform { transform(index: number): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class CoreModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface Account extends NamedEntity { email: string; phone: string; address: string; } interface SFAccount { Id: string; Name: string; Type: string; CreatedDate: string; Assets: { records: { Id: string; }[]; totalSize: number; }; } interface AccountAssetsState { context: Record; initialState: LineItem[]; currentState: LineItem[]; } type AdjustmentType = 'DISCOUNT_PERCENT' | 'DISCOUNT_AMOUNT' | 'DISCOUNT_UNIT_AMOUNT' | 'MARKUP_PERCENT' | 'MARKUP_AMOUNT' | 'MARKUP_UNIT_AMOUNT' | 'OVERRIDE_AMOUNT' | 'OVERRIDE_UNIT_AMOUNT' | 'OVERRIDE_PERCENT' | 'MARGIN'; declare const ADJUSTMENT_TYPE_LABELS: { [key in AdjustmentType]: string; }; interface Attachment { id?: string; fileName?: string; fileExtension?: string; linkedEntityId?: string; tags?: string; } interface CatalogProducts { additionalFields: unknown[]; attributeCategories: unknown[]; description: string; displayUrl: string; id: string; isActive: boolean; isAssetizable: boolean; isConfigurable: boolean; isSoldOnlyWithOtherProds: boolean; name: string; nodeType: string; prices: unknown[]; productClassification: Record; productCode: string; productComponentGroups: unknown[]; productSellingModelOptions: unknown[]; productType: string; } interface NewProduct { active: boolean; configurable: boolean; name: string; productCode?: string; description?: string; displayUrl?: string; className?: string; } interface Product extends NewProduct { id: string; properties?: { [key: string]: string; }; rank?: string; eligible?: boolean; eligibilityMessage?: string; catalogPriceExplanation?: string; messages?: string[]; } interface NewCatalog { name: string; description?: string; } interface Catalog extends NewCatalog { id: string; } interface NewCategory { name: string; parentId?: string; catalogId: string; cardView: boolean; enableGuidedSelling: boolean; guidedSellingId?: string; orchestrationName?: string; description?: string; attributes?: CategoryFilter[]; suppressToastMessage?: boolean; } interface Category extends NewCategory { id: string; } interface CategoryFilter extends NewCategoryFilter { id: string; } interface NewCategoryFilter { categoryId: string; name: string; attributeName: string; controlType: CategoryFilterType; primitiveType: CategoryPrimitiveType; isRange: boolean; values: string[]; precision?: number; } declare enum CategoryFilterType { CHECKBOX = "CHECKBOX", DROPDOWN = "DROPDOWN", RADIO_BUTTON = "RADIO_BUTTON", SLIDE_TOGGLE = "SLIDE_TOGGLE", RANGE = "RANGE", DATE_PICKER = "DATE_PICKER" } declare enum CategoryPrimitiveType { NUMBER = "NUMBER", TEXT = "TEXT", BOOLEAN = "BOOLEAN", DATE = "DATE" } interface CategoryRequestPayload { catalogId: string; categoryId: string; } interface CategoryRequestPayloadWithData extends CategoryRequestPayload { data: T; } interface AddProductsPayload { products: Product[]; catalogId: string; categoryId: string; } interface UpdateProductPayload { product: Partial; catalogId: string; categoryId: string; } interface FetchCategoryProductsPayload { categoryId: string; } interface CatalogProduct { id: string; productCategoryId: string; productId: string; rank: number; } interface NamedEntity { id: string; name: string; } interface Traversable { parent?: T; children: T[]; } type ArrayLikeProperties = { [K in keyof T as T[K] extends any[] ? K : never]: T[K]; }; type Prettify = { [K in keyof T]: T[K]; } & NonNullable; interface ConfigurationProcessor { isNew?: boolean; id?: string; ownerId?: string; name: string; apiName: string; type: ConfigurationProcessorTypes; script: string; } interface ConfigurationProcessorScriptFnParams { request: unknown; inputData?: unknown; flowStore: Record; configurationStore?: Record; } type ConfigurationProcessorScriptFn = (params: ConfigurationProcessorScriptFnParams) => unknown; declare enum ConfigurationProcessorTypes { ACTION = "ACTION", SELECTOR = "SELECTOR" } declare const CONFIGURATION_PROCESSOR_TYPES_MAP: { ACTION: string; SELECTOR: string; }; interface ConfigurationSettings { id: string; key: string; value: string; } interface ShoppingCartSetting { id: string; properties: any; } type DataAdministrationField = 'all' | 'catalogs' | 'environment-variables'; type NavigationModule = 'PRODUCTS' | 'CATALOGS' | 'TEMPLATES' | 'SETTINGS' | 'ORCHESTRATIONS' | 'API_MANAGER' | 'GUIDED_SELLING' | 'SANDBOX_MANAGER' | 'UI_DEFINITIONS'; interface NavigationSetting { id: NavigationModule; label: string; selected: boolean; } type PCMModel = PCMProduct; type PCMNodeType = 'bundleProduct' | 'simpleProduct' | 'productClass'; type PCMConfigureDuringSale = 'Allowed' | 'NotAllowed'; type PCMAttributeStatus = 'Active' | 'Inactive'; type PCMAttributeDataType = 'Number' | 'Picklist' | 'Checkbox' | 'Text' | 'Date' | 'Datetime' | 'Currency' | 'Percent'; type PCMAttributePicklistDataType = Exclude; type PCMProductSellingModelType = 'OneTime' | 'TermDefined' | 'Evergreen'; type PCMProductSellingModelStatus = 'Draft' | 'Active' | 'Inactive'; type PCMQuantityScaleMethod = 'Proportional' | 'Constant'; interface PCMProduct { id: string; childProducts: PCMProduct[]; nodeType: PCMNodeType; configureDuringSale: PCMConfigureDuringSale; description: string; displayUrl: string; isActive: boolean; isAssetizable: boolean; isSoldOnlyWithOtherProds: boolean; name: string; productCode: string; additionalFields: Record; productComponentGroups: PCMGroup[]; attributeCategory: PCMAttributeCategory[]; productSellingModelOptions: PCMProductSellingModelOption[]; attributes: PCMAttribute[]; productRelatedComponent?: PCMProductRelatedComponent; productClassification?: PCMProductClassification; productSpecificationType?: PCMProductSpecificationType; catalogs: unknown[]; categories: unknown[]; } interface PCMGroup { id: string; name: string; code: string; parentProductId: string; isExcluded: boolean; components: PCMProduct[]; sequence?: number; } interface PCMAttributeCategory { id: string; name: string; code: string; attributes: PCMAttribute[]; } interface PCMAttribute { id: string; developerName: string; name: string; label: string; isRequired: boolean; isHidden: boolean; isReadOnly: boolean; isPriceImpacting: boolean; additionalFields: Record; defaultValue: string; attributeNameOverride: string; status: PCMAttributeStatus; dataType: PCMAttributeDataType; picklist?: PCMAttributePicklist; } interface PCMAttributePicklist { id: string; name: string; dataType: PCMAttributePicklistDataType; values: PCMAttributePicklistValue[]; } interface PCMAttributePicklistValue { id: string; value: string; name: string; code?: string; displayValue?: string; sequence?: string; } interface PCMProductClassification { id: string; } interface PCMProductSpecificationType { name: string; } interface PCMProductSellingModel { id: string; name: string; sellingModelType: PCMProductSellingModelType; status: PCMProductSellingModelStatus; } interface PCMProductSellingModelOption { id: string; isDefault: boolean; productId: string; productSellingModel: PCMProductSellingModel; } interface PCMProductRelatedComponent { id: string; parentProductId: string; productClassificationId: string; productRelationshipTypeId: string; quantity: number; doesBundlePriceIncludeChild: boolean; isComponentRequired: boolean; isDefaultComponent: boolean; isExcluded: boolean; isQuantityEditable: boolean; maxQuantity?: number; minQuantity?: number; quantityScaleMethod?: PCMQuantityScaleMethod; } interface TransactionContext extends ContextNode { contextId?: string; transactionId?: string; salesTransaction: SalesTransaction; properties?: Record; } interface SalesTransaction extends ContextNode { salesTransactionName: string; account: string; quoteAccount: string; pricebook: string; status: string; totalAmount: number; subtotal: number; activatedDate: string; effectiveDate: string; startDate: string; salesTransactionItems: SalesTransactionItem[]; } interface SalesTransactionItem extends ContextNode { qty: number; startQuantity: number; endQuantity: number; productRelatedComponentId: string; rootId: string; parentId?: string; productId: string; productName: string; productBasedOnId: string; productCode: string; assetId: string; startDate: string; endDate: string; effectiveDate: string; actionCode: string; integrationId: string; pricebookEntry: string; unitPrice: number; netUnitPrice: number; listPrice: number; totalPrice: number; netTotalPrice: number; contractPrice: number; itemRecordedPrice: number; discount: number; discountAmount: number; partnerDiscountPercent: number; contractDiscountType: string; contractDiscountValue: number; lineItemDiscountType: string; lineItemDiscountValue: number; constraintEngineNodeStatus: ConstraintEngineNodeStatus; stiAttributes: SalesTransactionItemAttribute[]; children: SalesTransactionItem[]; disabledProducts: string[]; hiddenProducts: string[]; messages?: SalesTransactionItemMessage[]; relationship?: SalesTransactionItemRelationship[]; } interface ConstraintEngineNodeStatus { cfgStatus: string; attributes: ConstraintEngineAttribute[]; } interface ConstraintEngineAttribute { attributeName: string; cfgStatus: string; id?: string; attributeDefinitionId?: string; } interface SalesTransactionItemAttribute extends ContextNode { attributeName: string; attributeDefinitionId: string; value: unknown; hiddenPicklistValues: string[]; priceImpacting: boolean; picklistValue?: string; attributes: { SalesTransactionItemAttrParent: string; } & Record; } interface SalesTransactionItemRelationship extends ContextNode { mainItem: string; associatedItem: string; productRelatedComponent: string; mainItemRole?: string; associatedItemRole?: string; associatedItemPricing?: string; associatedQuantScaleMethod?: PCMQuantityScaleMethod; productRelationshipType?: string; mainItemProduct?: string; mainItemProductSellingModel?: string; rootItem?: string; rootItemProduct?: string; rootItemProductCode?: string; rootItemProductSellingModel?: string; priceInclusive?: boolean; } interface ContextNode { id: string; attributes: Record; nodes: Record; businessObjectType?: string; properties?: Record; } interface SalesTransactionItemMessage { message: string; attributes: Record; nodes: Record; } type FlowState = TransactionContext; interface FlowStateExecutable { name: string; inputData?: unknown; } interface FlowStateExecutableDTO { apiName: string; ownerId: string; inputData: unknown; } interface FlowStateExecutionRequest { actions?: FlowStateExecutable[]; selectors?: Record; } interface FlowStateExecutionRequestDTO { actions?: FlowStateExecutableDTO[]; selectors?: Record; } interface FlowStateSelectorError { success: false; errorMessage: string; } interface FlowStateSelectorResult { success: true; result: T; } type FlowStateSelectorResponse = FlowStateSelectorResult | FlowStateSelectorError; interface FlowStateExecutionResult { stateId: string; selectors: Record; } interface FlowStateInitRequest { quoteId: string; params: Record; selectors?: Record; actions?: FlowStateExecutableDTO[]; actionsOverride?: Array; selectorsOverride?: Array; } interface FlowStateInitResponse { stateId: string; selectors: Record; } interface ConfigurationStateNewRequest { transactionItem: SalesTransactionItem; actions?: FlowStateExecutableDTO[]; selectors?: Record; actionsOverride?: Array; selectorsOverride?: Array; } interface ConfigurationStateStartRequest { transactionItemId: string; actions?: FlowStateExecutableDTO[]; selectors?: Record; actionsOverride?: Array; selectorsOverride?: Array; } interface ConfigurationStateExecuteRequest { actions?: FlowStateExecutableDTO[]; selectors?: Record; } type StatefulConfigurationState = unknown; interface ConfigurationRequestAction { name: string; inputData: unknown; } interface ConfigurationRequestSelector { name: string; inputData: unknown; } interface ConfigurationExecuteRequest { actions?: ConfigurationRequestAction[]; selectors?: Record; } interface ConfigurationResponseSelector { result: unknown; success: boolean; errorMessage?: string; } interface ConfigurationExecuteResponse { stateId: string; selectors: Record; } interface NewContractedPrice { product: string; account: string; adjustmentAmount: number; adjustmentType: AdjustmentType; startDate?: string; endDate?: string; } interface ContractedPrice extends NewContractedPrice { id: string; } declare enum Operator { /** Equal */ EQ = "EQ", /** Not equal */ NE = "NE", /** Greater than */ GT = "GT", /** Greater than or equal */ GE = "GE", /** Less than */ LT = "LT", /** Less than or equal */ LE = "LE", /** Like */ LIKE = "LIKE", /** In */ IN = "IN" } declare enum Predicate { OR = "OR", AND = "AND" } declare const RawOperatorsMap: { [key: string]: string; }; declare class Condition { id?: string; key?: string; displayValue?: string; type?: string; operator?: string; operatorDescription?: string; value?: string; valueOptions?: string[] | { [key: string]: string; }; } interface ExpressionModel { predicate?: Predicate; conditions: Condition[]; expressions: ExpressionModel[]; } declare class Expression implements ExpressionModel { predicate: Predicate; conditions: Condition[]; expressions: Expression[]; constructor(predicate?: Predicate, conditions?: Condition[]); toRawCondition(customFn?: (condition: Condition) => string | undefined): string; isEmpty(): boolean; } interface SearchCriteria { expression: Expression; } declare class SearchRequest { skip?: number; count?: number; fields?: string[]; rawCondition?: string; searchCriteria?: SearchCriteria; nullCheck?: { [index: string]: boolean; }; sort?: { [index: string]: boolean; }; asc?: boolean; groupBy?: string; } declare const validateDateFormatReg: RegExp; declare function convertDateFormatToPrimeNGFormat(date: string): string; declare function convertDateFormatToDatePipeFormat(date: string): string; declare function convertDateFormatToMomentJSFormat(date: string): string; declare function validateDateFormat(date: string): boolean; /** * * @param origin date format to be parsed * @returns origin date format and all formats used by application */ declare function getSupportedDateFormats(origin: string): { originFormat: string; primengFormat: string; datePipeFormat: string; momentjsFormat: string; }; interface VlDateSettings { dateFormats: ReturnType; } interface NewEndpoint { name: string; description?: string; } interface Endpoint extends NewEndpoint { id: string; published: boolean; requestMethod: RequestMethod; requestUrl: string; requestVariableName: string; requestJSONSchema?: string; requestTransformationScript?: string; parameters?: Parameter[]; headers?: Header[]; steps?: OrchestrationStep[]; cached: boolean; duration?: number; testData?: string; } interface Parameter { name: string; defaultValue: string; required: boolean; } interface Header { name: string; value: string; } interface OrchestrationStep { id?: string; name: string; stepVariable: string; active: boolean; apiEndpointId?: string; sequence?: number; orchestrationScript?: string; stepAction: OrchestrationStepAction; } type OrchestrationStepAction = 'QUERY_QUOTE' | 'GET_ROOT_LINE_ITEM' | 'ADD_PRODUCT' | 'UPDATE_PRODUCT' | 'DELETE_PRODUCT' | 'UPDATE_QUANTITY' | 'UPDATE_ATTRIBUTE' | 'UPDATE_PROPERTY' | 'APPLY_DISCOUNT' | 'CREATE_TERM' | 'CONFIGURATION' | 'SAVE_QUOTE' | 'CREATE_ACCOUNT' | 'CREATE_OPPORTUNITY' | 'CREATE_QUOTE' | 'UPDATE_QUOTE_STATUS' | 'CLOSE_WIN_OPPORTUNITY' | 'ACTIVATE_ORDER' | 'CUSTOM'; declare enum RequestMethod { get = "GET", post = "POST", put = "PUT", patch = "PATCH", delete = "DELETE" } interface EndpointExecuteData { httpMethod: RequestMethod; requestURI: string; body: any; headers: Record; parameterMap: Record; } declare enum ErrorType { INTERNAL_ERROR = "VELOCE_INTERNAL_ERROR", SCRIPT_ERROR = "VELOCE_SCRIPT_ERROR", QUOTE_SCRIPT_ERROR = "VELOCE_QUOTE_SCRIPT_ERROR", RULE_ERROR = "VELOCE_RULE_ERROR", APEX_ERROR = "APEX_ERROR" } interface BaseError { errorCode: ErrorType; message: string; logId: string; } interface InternalError extends BaseError { errorCode: ErrorType.INTERNAL_ERROR; details: InternalErrorDetails; } interface InternalErrorDetails { /** * Last part of Veloce CPQ Exception message, if present */ causedByError?: string; } interface ScriptError extends BaseError { errorCode: ErrorType.SCRIPT_ERROR | ErrorType.QUOTE_SCRIPT_ERROR; details: ScriptErrorDetails; } interface ScriptErrorDetails { /** * Script Name where the error occurred. Possible values: SUBMIT_QUOTE_ACTION, QUERY_QUOTE_ACTION */ scriptName: string; /** * A list of the method calls that the application was in the middle of when an Exception was thrown. * * Example: * .execute(Unnamed:25) * ._mainExecute(Unnamed:270) */ stackTrace: string; /** * Last part of Veloce CPQ Exception message */ causedByError: string; } interface RuleError extends BaseError { errorCode: ErrorType.RULE_ERROR; details: RuleErrorDetails; } interface RuleErrorDetails { /** * Function ID where the error occurred */ ruleId: string; /** * Function Name */ ruleName: string; /** * A step where the error occurred. Possible values: Condition, Transformation, Action */ stepType: string; /** * Step Name where the error occurred */ stepName: string; /** * A list of the method calls that the application was in the middle of when an Exception was thrown. * The field will be applies only to errors in JS transformations, otherwise the field is missing. * * Example: * .transform(Unnamed:3) * ._mainExecute(Unnamed:10) */ stackTrace: string; /** * Last part of Veloce CPQ Exception message */ causedByError: string; } interface ApexError extends BaseError { errorCode: ErrorType.APEX_ERROR; details: ApexErrorDetails; } interface ApexErrorDetails { /** * The exact location of the error, which should be taken from the first part of the original message */ salesforceException: string; /** * First error entry from the original message, if present */ firstError?: string; /** * Last part of Veloce CPQ Exception message */ causedByError: string; } interface CanvasError { error: string; } type VeloceError = InternalError | ScriptError | RuleError | ApexError; interface VeloceToken { algorithm: string; client: { instanceUrl: string; oauthToken: string; targetOrigin: string; }; context: { links: { restUrl: string; }; organization: { namespacePrefix: string | null; organizationId: string; }; user: { userId: string; userName: string; }; }; issuedAt: number; packageVersion: { mainPackageVersion: string; mainPackageVersionName: string; }; userId: string; veloceNamespace: string; } declare function parseJwtSafe(token: string): VeloceToken | null; declare function parseJwt(token: string): VeloceToken | null; declare function getCollectionUniqueName(collection: T[], name: string, comparator: (name: string) => (value: T, index?: number, array?: T[]) => boolean, suffixGetter?: (index: number) => string): string; declare class EntityUtil { static isEmpty(object: any): boolean; static isBlank(text: string, trim?: boolean): boolean; static isPresent(object: any): boolean; static clone(object: T): T; static entries(obj: T): { [K in keyof T]: [K, T[K]]; }[keyof T][]; static findById(id: any, container: any): any; static traverseTree(node: Traversable, callbackFn: any, bottomUp?: boolean): void; static traverseFn(node: T, childBagName: keyof T, callbackFn: any): void; static removeByProperty(container: any, itemToRemove: any, listName: string, uniquePropertyName: string): any; static findByFieldHierarchically(fieldName: string, fieldValue: string, container: any[], childBagName: string): T | undefined; static filterHierarchically(container: T[], childBagName: keyof T, condition: any): T[]; } declare function extractErrorDetails(error: VeloceError): string[]; declare function isVeloceError(error: any): error is VeloceError; declare function isCanvasError(error: any): error is CanvasError; declare function isApexError(error: any): error is ApexError; declare const getImgUrl: (file: File, isSvg?: boolean) => string; declare function parseJsonSafely(string: string | undefined, failover: T): T; declare function parseJsonStringAsArray(source: string | undefined): any[]; declare function parseJsonStringAsObject(source: string | undefined): any; declare function isJsonString(string: string | null | undefined): boolean; declare const formatNumber: (value: string | number | null | undefined, thousandsSeparator?: string, decimalSeparator?: string, decimalsCount?: number) => string; declare class SalesforceIdUtils { static readonly SF_PREFIX_MAP: { readonly '001': "Account"; readonly '002': "Note"; readonly '003': "Contact"; readonly '005': "User"; readonly '006': "Opportunity"; readonly '007': "Activity"; readonly '00D': "Organization"; readonly '00E': "UserRole"; readonly '00Q': "Lead"; readonly '00j': "Product"; readonly '01t': "Product2"; readonly '800': "Contract"; readonly '801': "Order"; readonly '806': "Approval"; readonly '0Q0': "Quote"; }; private static readonly CHECKSUM_TABLE; static generateId18FromId15(sfId15: string): string; static getSfObjectNameById(id: string): (typeof SalesforceIdUtils.SF_PREFIX_MAP)[keyof typeof SalesforceIdUtils.SF_PREFIX_MAP] | null; private static generateId18Tail; private static replaceUpperWith1; private static splitSfId15; } declare function mapShoppingCartSettings(shoppingCartSettings: ShoppingCartSetting[]): ShoppingCartSettings; declare function getMaxRenewalTermsValue(shoppingCartSettings: ShoppingCartSettings | undefined): number | null; declare class StringUtils { static fillPlaceholders(statement: string, properties: { [index: string]: any; }, pattern: RegExp): string; static trimString(str: string | null | undefined): string; static normalizeString(value: unknown, ignoreChars?: string[]): unknown; static unwrapString(value: string): string; } declare const isDefined: (value: T) => value is Exclude; declare const getFlowParams: (url: string) => Params; declare class UUID { static SHA1(): any; static UUID(): string; static hex(text: string): string; private static pad4; private static random4; } interface LoadVeloceConfigParams { /** * When `true`, don't load local config * * I.e.: `{ suppressLocalConfig: environment.production }` */ suppressLocalConfig?: boolean; } declare function loadVeloceConfig(cb: () => void, config?: LoadVeloceConfigParams): Promise; declare function initVeloceConfig(child: Window, config: VlGlobalConfig): () => void; interface FlowQueryParams extends Params { /** * ID of a product for Product Configuration */ productId?: string; /** * When transactionItemId is given, Product Configuration will search in SalesTransactionItems, * and will use it as initialState for configuration */ transactionItemId?: string; /** * ID of UI Definition to be used in case it's not provided anywhere else */ defaultUIDefinitionId?: string; /** * ID of UI Definition to be used no matter what */ requiredUIDefinitionId?: string; } interface FlowTemplatesMap { /** * Assets template name * Used when `standalone: 'false'` */ assets?: string; /** * Shopping Cart template name * Used when `standalone: 'false'` */ shoppingCart?: string; /** * Catalog template name * Used when `standalone: 'false'` */ catalog?: string; /** * GuidedSelling template name * Used when `standalone: 'false'` */ guidedSelling?: string; /** * FlowHeader template name * Used when `standalone: 'false'` */ flowHeader?: string; } interface FlowProperties { entryPath: string; queryParams: FlowQueryParams; transformOrchestration: string; contextDefinition: string; queryOrchestration: string; saveOrchestration: string; templates?: FlowTemplatesMap; /** * When 'true', the flow starts as a standalone Product Configuration application (no Catalog or ShoppingCart) */ standalone?: boolean; /** * Flow stateful mode setting * * `false` - Flow state is initialized on Frontend side * * `true` - Flow state is initialized on Backend side */ stateful?: boolean; /** * When there are products in currentState, the flow automatically navigates to Shopping Cart page * * Setting this property to `true` will suppress this navigation logic, and will keep the user * on the page given in `entryPath` property */ suppressInitialNavigation?: boolean; } interface Flow { id: string; properties: FlowProperties; version: number; } interface FlowContext extends FlowQueryParams { headerId: string; mode: FlowContextMode; } type FlowContextMode = Uppercase<(typeof SalesforceIdUtils)['SF_PREFIX_MAP'][keyof (typeof SalesforceIdUtils)['SF_PREFIX_MAP']]> | 'TEST'; type FrequencyUnit = 'DAILY' | 'MONTHLY'; interface GlobalPicklist { description?: string; id: string; label: string; name: string; namespace?: string; } interface GlobalPicklistValue { label: string; valueName: string; default: boolean; } interface NewGuidedSelling { name: string; description: string; configurationJson: string; } interface GuidedSelling extends NewGuidedSelling { id: string; } interface HttpRequestConfigurableOptions { errorHandler?: (error: any) => void; skipErrorHandler?: boolean; } interface HttpRequestOptions extends HttpRequestConfigurableOptions { url: string; method?: 'get' | 'post' | 'delete' | 'put' | 'patch'; body?: T; headers?: HttpHeaders; params?: HttpParams | Record; reportProgress?: boolean; responseType?: 'arraybuffer' | 'blob' | 'json' | 'text'; observe?: 'body' | 'events' | 'response'; } interface LazyChunkRequest { name?: string; count: number; skip: number; } interface RequiresApproval { score: number; message: string; } type ProductStatus = 'ADD' | 'EXIST' | 'PENDING' | 'UPDATE' | 'P. UPDATE' | 'TERMINATE' | 'RENEW'; declare class LineItem { id: string; activated: boolean; attributes: any[]; attributeDomains: Dictionary; cfgStatus: any; chargeGroupItems: any[]; chargeItems: any[]; domainComputations: Dictionary; lineItems: LineItem[]; messages: string[]; name: string; optionalCharges: any[]; pending: boolean; portDomains: Dictionary; properties: Record; qty: number; totalPrices: Dictionary; type: string; integrationId?: string | undefined; productId?: string | undefined; port?: string | undefined; parentId?: string | undefined; assetId?: string | undefined; openOrderLineItemId?: string | undefined; productName?: string | undefined; bundle?: boolean | undefined; rootId?: string | undefined; actionCode?: any | undefined; status?: ProductStatus | undefined; serviceStartDate?: string | undefined; effectiveDate?: string | undefined; effectiveStartDate?: string | undefined; startDate?: string | undefined; endDate?: string | undefined; priceListId?: string | undefined; planId?: string | undefined; sellingFrequencyUnit?: FrequencyUnit | undefined; sellingFrequencyDuration?: string | undefined; minimalTerm?: number | undefined; proratedFrequencyEnabled?: boolean | undefined; offeringId?: string | undefined; offeringItemId?: string | undefined; offeringInstanceId?: string | undefined; rampInstanceId?: string | undefined; enableRamp?: boolean | undefined; configurable?: boolean | undefined; requiresApprovals?: RequiresApproval[] | undefined; metrics?: Dictionary | undefined; totalMetrics?: Dictionary | undefined; constructor(id: string, activated: boolean, attributes: any[], attributeDomains: Dictionary, cfgStatus: any, chargeGroupItems: any[], chargeItems: any[], domainComputations: Dictionary, lineItems: LineItem[], messages: string[], name: string, optionalCharges: any[], pending: boolean, portDomains: Dictionary, properties: Record, qty: number, totalPrices: Dictionary, type: string, integrationId?: string | undefined, productId?: string | undefined, port?: string | undefined, parentId?: string | undefined, assetId?: string | undefined, openOrderLineItemId?: string | undefined, productName?: string | undefined, bundle?: boolean | undefined, rootId?: string | undefined, actionCode?: any | undefined, status?: ProductStatus | undefined, serviceStartDate?: string | undefined, effectiveDate?: string | undefined, effectiveStartDate?: string | undefined, startDate?: string | undefined, endDate?: string | undefined, priceListId?: string | undefined, planId?: string | undefined, sellingFrequencyUnit?: FrequencyUnit | undefined, sellingFrequencyDuration?: string | undefined, minimalTerm?: number | undefined, proratedFrequencyEnabled?: boolean | undefined, offeringId?: string | undefined, offeringItemId?: string | undefined, offeringInstanceId?: string | undefined, rampInstanceId?: string | undefined, enableRamp?: boolean | undefined, configurable?: boolean | undefined, requiresApprovals?: RequiresApproval[] | undefined, metrics?: Dictionary | undefined, totalMetrics?: Dictionary | undefined); } interface LocalAuth { alias?: string; organizationId?: string; serverUrl?: string; token?: string; devToken?: string; accessToken?: string; instanceUrl?: string; } type AdjustmentTarget = 'COST' | 'BASE_PRICE' | 'LIST_PRICE' | 'NET_PRICE'; declare class PriceAdjustment { amount: number; explanation: string; type: AdjustmentType; formula?: string | undefined; adjustmentTarget?: AdjustmentTarget | undefined; constructor(amount: number, explanation: string, type: AdjustmentType, formula?: string | undefined, adjustmentTarget?: AdjustmentTarget | undefined); } interface OfferProduct { id: string; productId: string; productName: string; portName?: string; /** * Parent product ID */ portOwner?: string; priceAdjustment?: PriceAdjustment; portId?: string; modelId?: string; productType?: string; } type NewOfferProduct = Pick; interface Offer { id: string; name: string; description?: string; startDate?: string; endDate?: string; active: boolean; offeringBundleId: string; rootProductName?: string; } type NewOffer = Pick; interface Order { lineItems: LineItem[]; orderNumber: string; } declare enum DefaultPicklistCode { UNIT_OF_MEASURE = "UNIT_OF_MEASURE" } declare const DEFAULT_PICKLIST_VALUES: { [key: string]: string[]; }; interface NewPicklist { name: string; listCode: string; description: string; values: NewPicklistValue[]; } interface Picklist extends NewPicklist { id: string; values: PicklistValue[]; } interface NewPicklistValue { valueCode: string; displayValue: string; } interface PicklistValue extends NewPicklistValue { id: string; picklistId: string; } declare enum PmlConfigurationMode { NEWCONFIG = "NEWCONFIG", SEARCH = "SEARCH" } interface NewPortal { name: string; description?: string; active: boolean; } interface Portal extends NewPortal { id: string; settings?: string; } type PortalVisibility = PortalCustomizationParamVisibility & PortalCustomizationParamReadOnly; interface PortalLoginCustomization { loginLeftImage: { imageTag: string; }; loginTopLogoImage: { imageTag: string; }; title: { label: string; }; accounts: PortalVisibility & { label: string; accountId: string; }; } interface PortalShoppingCartCustomization { general: { type: string; }; tableConfig: { columns: { name: string; visible: boolean; }[]; }; } interface PortalAccountsCustomization { topCoverImage: { imageTag: string; }; title: { label: string; }; layout: { type: string; }; } interface PortalNavMenuItem { name: string; label: string; visible: boolean; url: string; isDefault: boolean; } interface PortalColorCustomization { name: string; label: string; color: string; visible: boolean; } interface PortalThemeCustomization { headerLogo?: { imageTag: string; }; colors?: PortalColorCustomization[]; } interface PortalCustomizationParamVisibility { visible: boolean; visibleCondition?: string; visibleProperty?: string; } interface PortalCustomizationParamReadOnly { readOnly?: boolean; readOnlyCondition?: string; readOnlyProperty?: string; } interface PortalCustomizationCommonParam { name: string; label: string; dataSourceType: string; dataSourceValue: string; } type PortalCustomizationField = PortalCustomizationCommonParam & PortalCustomizationParamVisibility; interface PortalSubscriptionCustomization { general: PortalCustomizationParamVisibility & { name: string; label: string; objects: string; layoutType: string; addProduct: PortalCustomizationParamVisibility & { label: string; url: string; }; }; image?: PortalCustomizationParamVisibility; productName?: PortalCustomizationField; description?: PortalCustomizationField; actionCode?: PortalCustomizationField; fields?: PortalCustomizationField[]; price?: PortalCustomizationField; } interface PortalCustomization { theme: PortalThemeCustomization; navMenu: PortalNavMenuItem[]; pages: { general: { sbqqMode: { name: string; label: string; visible: boolean; }; }; login: PortalLoginCustomization; accounts: PortalAccountsCustomization; subscriptions?: PortalSubscriptionCustomization[]; shoppingCart: PortalShoppingCartCustomization; }; } declare enum PrimitiveType { INTEGER = "INTEGER", DOUBLE = "DOUBLE", DECIMAL = "DECIMAL", STRING = "STRING", BOOLEAN = "BOOLEAN", DATE = "DATE", STRING_ARRAY = "MULTIPLE" } declare const PRIMITIVE_TYPE_OPTIONS: { label: PrimitiveType; value: PrimitiveType; }[]; interface NewRule { name: string; description: string; active: boolean; contextDefinitionId: string; type: RuleTypes; tags: string[]; cached?: boolean; duration?: number; } interface Rule extends NewRule { id: string; conditions: RuleCondition[]; queries: ExtractRuleQuery[]; requests: ExtractRuleRequest[]; actions: RuleMapper[] | MetricRuleMapper[] | ExtractRuleMapper[] | SaveRuleMapper[]; transformations: RuleTransformation[]; parentName: string; parentType: RuleTypes; isDefault: boolean; testData?: string; } interface RuleTransformation { resultPath: string; javaScript: string; expression: string; sequence: number; active: boolean; } interface RuleCondition { id?: string; expression?: string; objectType: string; objectName?: string; variableName: string; extractObjectId?: string; property?: string; relatedConditionVariable?: string; } interface ExtractRuleQuery { id?: string; functionId: string; sfObjectName: string; contextMappingId?: string; variableName: string; statement: ExtractRuleStatement; sequence: number; fields?: string[]; includeHierarchy: boolean; hierarchyIdentifier?: string; } interface ExtractRuleStatement { expression: ExpressionModel; orderBy: Map; limit?: number; offset?: number; } interface ExtractRuleRequest { id?: string; method: RequestMethod; requestUrl: string; variableName: string; parameters?: ExtractRuleRequestParameter[]; headers?: ExtractRuleRequestHeader[]; body?: string; } interface ExtractRuleRequestParameter { name: string; value: string; valueType: ExtractRuleValueTypes; } type ExtractRuleRequestHeader = ExtractRuleRequestParameter; declare enum ExtractRuleValueTypes { Value = "VALUE", Tag = "TAG", Property = "PROPERTY" } interface BaseMapper { action: string; value: string; targetFieldName: string; condition?: string; } interface RuleMapper extends BaseMapper { ruleId?: string; variableName: string; type: string | undefined; explanation: string; valueType: string; message?: string; messageValueType?: string; allowOverride?: boolean; targetObjectName?: string; dataSetName?: string; variable?: string; productComponentGroupId?: string; productId?: string; attributes?: { name: string; valueType: string; value: string; }[]; } interface ExtractRuleMapper { action: string; variableName: string; value: string; valueType: string; targetObjectName?: string; dataSetName?: string; ruleId?: string; } interface SaveRuleMapper { action: string; sfObjectName: string; value?: string; contextMappingId?: string; targetObjectName?: string; ruleId?: string; } interface MetricRuleMapper extends BaseMapper { isCalculateTotalMetric: boolean; totalMetricName: string; isCustomPriceScale: boolean; priceScale: number; } interface RLMRuleMapper extends Partial { variableName: string; action: string; type?: string; valueType?: string; value?: string; } declare enum RuleObjects { priceItem = "LINE_ITEM", chargeItem = "CHARGE_ITEM", header = "CONTEXT", catalogProduct = "CATALOG_PRODUCT", procedureContext = "PROCEDURE_CONTEXT_OBJECT", catalogProductCharge = "CATALOG_PRODUCT_CHARGE", contextDefinition = "CONTEXT_NODE", contextTag = "CONTEXT_TAG", dataSet = "DATA_SET", transactionContext = "TRANSACTION_CONTEXT" } declare enum RuleObjectDefaultVariableNames { chargeItem = "chargeItem", header = "header" } interface HeaderField { updateable: boolean; name: string; type: string; } declare enum RuleTypes { ROOT = "ROOT", GeneralRule = "GENERAL_RULE", RlmRule = "RLM_RULE", QueryRule = "QUERY", QueryContextRule = "QUERY_CONTEXT", APIRequestRule = "REQUEST", TransformationRule = "TRANSFORMATION", SaveRule = "SAVE", SaveContextRule = "SAVE_CONTEXT", Group = "GROUP", FunctionGroup = "FUNCTION_GROUP", ExternalConfigurator = "EXTERNAL_CONFIGURATOR", ExternalPricing = "EXTERNAL_PRICING" } interface DataSet { dataSetId: string; dataSetName: string; variableName: string; } interface FunctionDataSet { functionId: string; functionName: string; dataSets: DataSet[]; } declare enum ProcedureStepType { GROUP = "GROUP", EXTERNAL_PROVIDER = "EXTERNAL_PROVIDER", FUNCTION_GROUP = "FUNCTION_GROUP", FUNCTION = "FUNCTION", QUERY = "QUERY", QUERY_CATALOG_PRODUCTS = "QUERY_CATALOG_PRODUCTS", PROCEDURE_CONTEXT_OBJECT = "PROCEDURE_CONTEXT_OBJECT", ELIGIBILITY_RULES = "ELIGIBILITY_RULES", ELIGIBILITY_RULE = "ELIGIBILITY_RULE", CONFIGURATION_AND_PRICING = "CONFIGURE_AND_PRICE", CATALOG_RULE = "CATALOG_RULE" } declare enum ProcedureStepContextType { CONFIGURATION = "CONFIGURATION", PRICING = "PRICING", METRICS = "METRICS", APPROVALS = "APPROVALS", GROUP = "GROUP", QUERY = "QUERY", ELIGIBILITY_RULES = "ELIGIBILITY_RULES", CONFIGURATION_AND_PRICING = "CONFIGURE_AND_PRICE" } interface Procedure { id: string; name: string; description?: string; active: boolean; deployStartDateGradually: boolean; deployEndDateGradually: boolean; contextDefinitionId?: string; steps: ProcedureStep[]; testData?: string; } type NewProcedure = Omit; interface ProcedureStepBase { id: string; name: string; active: boolean; orchestrationId?: string; parentStepId?: string; sequence?: number; steps?: ProcedureStep[]; contextDefinitionId?: string; } interface ProcedureStepRoot extends ProcedureStepBase { function: ProcedureStepFunctionRoot; } interface ProcedureStepGroup extends ProcedureStepBase { functionId: string; function: ProcedureStepFunctionFnGroup; } interface ProcedureStepRLMPricing extends ProcedureStepBase { functionId: string; function: ProcedureStepFunctionRLMPricing; } interface ProcedureStepRLMConfigurator extends ProcedureStepBase { functionId: string; function: ProcedureStepFunctionRLMConfigurator; } interface ProcedureStepFunctionGroup extends ProcedureStepBase { functionId: string; function: ProcedureStepFunctionGroupFunction; } interface ProcedureStepFunction extends ProcedureStepBase { functionId: string; function: ProcedureStepFunctionFunction; } interface ProcedureStepFunctionBase { id: string; name: string; active: boolean; type: RuleTypes; cached: false; } interface ProcedureStepFunctionRoot { type: RuleTypes.ROOT; contextDefinitionId: string; } interface ProcedureStepFunctionFnGroup extends ProcedureStepFunctionBase { type: RuleTypes.Group; contextDefinitionId: string; contextMappingId: string; } interface ProcedureStepFunctionRLMPricing extends ProcedureStepFunctionBase { type: RuleTypes.ExternalPricing; contextDefinitionId: string; contextMappingId: string; procedure: { id: string; functionId: string; pricingProcedureId: string; }; } interface ProcedureStepFunctionRLMConfigurator extends ProcedureStepFunctionBase { type: RuleTypes.ExternalConfigurator; contextDefinitionId: string; } interface ProcedureStepFunctionGroupFunction extends ProcedureStepFunctionBase { type: RuleTypes.FunctionGroup; contextDefinitionId: string; } interface ProcedureStepFunctionFunction extends ProcedureStepFunctionBase { type: RuleTypes; contextDefinitionId: string; tags: string[]; } type ProcedureStepExternalProvider = ProcedureStepRLMPricing | ProcedureStepRLMConfigurator; type ProcedureStep = ProcedureStepRoot | ProcedureStepGroup | ProcedureStepRLMPricing | ProcedureStepRLMConfigurator | ProcedureStepFunctionGroup | ProcedureStepFunction; interface NewPromotion { name: string; active: boolean; startDate: string; endDate: string; rule: string; eligibleAccountsScript: string; description?: string; } interface Promotion extends NewPromotion { id: string; } type QuestionActionType = 'GOTO' | 'END'; type QuestionType = 'GROUP' | 'CHECKBOX' | 'SHORT_TEXT' | 'LONG_TEXT' | 'DATE' | 'BOOLEAN' | 'RADIO' | 'PICKLIST' | 'NUMBER' | 'RADIO_IMAGE' | 'CHECKBOX_IMAGE'; interface Question { id: string; question: string; type: QuestionType; mapToAttribute?: string; defaultAction?: QuestionAction; isDefaultRequired?: boolean; defaultValue?: any; placeholder?: string; rules?: QuestionRule[]; options?: QuestionOption[]; description?: string; required?: boolean; subQuestions?: SubQuestion[]; } interface QuestionOption { label: string | number; imageId?: string; imageName?: string; imageFile?: File; isLoading?: boolean; } type SubQuestion = Pick & { type: Exclude; }; interface QuestionRule { conditions: QuestionCondition[]; action: QuestionAction; } interface QuestionAction { actionType: QuestionActionType; questionId?: string; } interface QuestionCondition { questionId: string; operator: Operator; value: string | number; predicate?: Predicate; } declare class QuoteDraft { dirty: boolean; quoteId: string; context: Record; initialState: LineItem[]; currentState: LineItem[]; totalPrices: any[]; totalDiscounts: any[]; approvalItems: any[]; charges: Dictionary; pricePlans: Dictionary; activeMetrics: any[]; procedureName?: string | undefined; static isQuote(data: any): data is QuoteDraft; static emptyQuote(): QuoteDraft; constructor(dirty: boolean, quoteId: string, context: Record, initialState: LineItem[], currentState: LineItem[], totalPrices: any[], totalDiscounts: any[], approvalItems: any[], charges: Dictionary, pricePlans: Dictionary, activeMetrics: any[], procedureName?: string | undefined); } interface Quote { id: string; name: string; priceListId: string; accountId: string; lineItems: LineItem[]; properties: Record; quoteNumber: string; } interface NewRebateProgram { name: string; active: boolean; startDate: string; endDate: string; payoutFrequency: string; eligibleAccountsScript: string; } interface RebateProgram extends NewRebateProgram { id: string; } interface NewRebateType { name: string; active: boolean; eligibleProductsScript: string; rebateProgram: string; rule: string; unitOfMeasure: string; benefits: string; } interface RebateType extends NewRebateType { id: string; } interface ContextDefinition { id: string; developerName: string; title: string; description: string; } interface ContextMapping { id: string; title: string; description: string; default?: boolean; } interface ContextMappingDetails { contextMappingId: string; contextMappingName: string; nodesToSobjects: Record; hasMappedContextDefinition: boolean; isDefault: boolean; } type BEContextDefinitionStructure = BEContextDefinitionObject[]; interface BEContextDefinitionObject { id: string; title: string; tags: { title: string; }[]; attributes: { title: string; fieldType: string; dataType: ContextDefinitionAttributeDataType; tags: { title: string; }[]; }[]; parentNodeId?: string; } type ContextDefinitionStructure = ContextDefinitionObject[]; interface ContextDefinitionObject { id: string; title: string; attributes: ContextDefinitionAttribute[]; attributeTags: ContextDefinitionAttribute[]; parentNodeId?: string; } interface ContextDefinitionAttribute { title: string; fieldType: string; dataType: ContextDefinitionAttributeDataType; } type ContextDefinitionAttributeDataType = 'REFERENCE' | 'NUMBER' | 'STRING' | 'DATE' | 'DATETIME' | 'BOOLEAN' | 'CURRENCY' | 'PERCENT' | 'PICKLIST'; interface RlmProcedure { id: string; masterLabel: string; versionNumber: string; status: string; contextDefinitionId: string; contextDefinitionDefaultMappingId: string; default?: boolean; } interface RuntimeCurrencySettings { iso: string; symbol: string; } type RuntimeConfigurationSettings = { 'shopping-cart'?: ShoppingCartSetting[]; navigation?: Dictionary; flows?: Flow[]; } & Dictionary; interface SalesforceField { custom: boolean; label: string; name: string; namespace: string; type: string; referenceTo?: string; relationshipName?: string; createable?: boolean; updateable?: boolean; picklistValues?: SalesforcePicklistValue[]; } interface SalesforcePicklistValue { label: string; value: string; active: boolean; defaultValue?: boolean; } interface SalesforceObject { activateable: boolean; createable: boolean; custom: boolean; customSetting: boolean; deletable: boolean; deprecatedAndHidden: boolean; feedEnabled: boolean; keyPrefix: string; label: string; labelPlural: string; layoutable: boolean; mergeable: boolean; mruEnabled: boolean; name: string; queryable: boolean; replicateable: boolean; retrieveable: boolean; searchable: boolean; triggerable: boolean; undeletable: boolean; updateable: boolean; } interface NewSalesforceOrganization { orgId: string; size: string; active: boolean; } interface SalesforceOrganization extends NewSalesforceOrganization { name: string; } interface Selectable { id: string; path: string; label: string; controlType?: string; order?: number; cssClass?: string; } interface ShoppingCartSettings { /** Table header metrics settings */ DEFAULT_HEADER_METRICS?: string[]; /** Table metrics settings */ DEFAULT_TABLE_METRICS?: string[]; /** Date format for shopping cart dates, default is 'MM.dd.yyyy' */ DATE_FORMAT?: string; /** Decimals count for numeric values, default is 2 */ PRICE_SCALE?: string; /** Thousands separator symbol for numeric values, default is ',' */ THOUSANDS_SEPARATOR?: string; /** Decimal separator symbol for numeric values, default is '.' */ DECIMAL_SEPARATOR?: string; STATUS_LABEL?: { status_label: string; custom_label: string; }[]; [key: string]: any; } type UIDefinitionType = 'DEFAULT' | 'CONFIGURATION'; type UIExternalsType = Record; interface UIDefinitionProps { suppressToastMessages?: boolean; /** * When 'true', the Structure module in UI Builder is hidden */ simplifiedEditorMode?: boolean; /** * When 'true', the Configuration State will be persisted in Preview mode */ persistTestState?: boolean; productId?: string; quoteId?: string; flowId?: string; } interface UIDefinitionGroupData { name: string; ports: string[]; attributes: string[]; } type UIDefinitionTemplateData = { TPL_GROUPS?: UIDefinitionGroupData[]; DISCOUNTS?: boolean; APPROVALS?: boolean; TEMPLATE_NAME?: string; ROOT_CMP_NAME?: string; TYPE_CMP_NAME?: string; ATTRIBUTE_CMP_NAME?: string; PORT_CMP_NAME?: string; ELEMENT_NAME?: string; } & Dictionary; interface UIDefinitionMetadata { name: string; type: UIDefinitionType; version: number; createdTimestamp: number; properties?: UIDefinitionProps; externals?: UIExternalsType; customization?: any; uiTemplateData?: UIDefinitionTemplateData; } interface UIDefinition extends UIDefinitionMetadata { /** * `children` is for simple previews only. * For applications use `pages` property instead */ children?: UIElement[]; /** * The page is an Element with `type: 'PAGE'` */ pages?: UIElement[]; /** * Shared components * These are not rendered on the screen, and only used by REFERENCE type elements */ components?: UIElement[]; } interface UIElement { children: UIElement[]; template?: string; script?: string; styles?: string; } interface UIDefinitionContainer { id: string; name?: string; templateName?: string; source: UIDefinition; actions?: ConfigurationProcessor[]; selectors?: ConfigurationProcessor[]; } type NewUIDefinitionContainer = Omit; type TemplateAttachmentType = 'html' | 'js' | 'css' | 'json'; declare enum UITemplateType { SHOPPING_CART = "SHOPPING_CART", CONFIGURATION_UI = "CONFIGURATION_UI", CATALOG = "CATALOG", GUIDED_SELLING = "GUIDED_SELLING", FLOW_ENGINE = "FLOW_ENGINE", FLOW_HEADER = "FLOW_HEADER" } declare enum UITemplateComponentType { ROOT = "ROOT", SERVICE = "SERVICE", GENERAL = "GENERAL", CUSTOMIZATION = "CUSTOMIZATION" } interface NewUITemplate { name: string; type: UITemplateType; description?: string; } interface UITemplate extends NewUITemplate { id: string; } interface NewTemplateComponent { name: string; type: UITemplateComponentType; uiTemplateId: string; description?: string; } interface TemplateComponent extends NewTemplateComponent { id: string; } type TemplateComponentWithAttachments = TemplateComponent & ComponentAttachments; interface ComponentAttachments { html?: string; js?: string; css?: string; json?: string; } interface NewComponentStory { name: string; uiComponentId: string; description?: string; } interface ComponentStory extends NewComponentStory { id: string; section?: string; template?: string; styles?: string; script?: string; } interface ComponentStoryPreview extends ComponentStory { componentTemplate?: string; componentStyles?: string; componentScript?: string; componentProperties?: string; } interface ComponentStoryAttachments { html?: string; js?: string; css?: string; json?: string; } declare enum ComponentAttachmentFileNames { html = "template.html", css = "style.css", js = "script.js", json = "properties.json" } declare const requiredComponentAttachments: string[]; declare const titlesForErrorMessage: { [key: string]: string; }; interface NewVeloceObjectCategory { name: string; parentId?: string; } interface VeloceObjectCategory extends NewVeloceObjectCategory { id: string; } type ColumnType = 'INTEGER' | 'DECIMAL' | 'STRING' | 'BOOLEAN' | 'DATE' | 'OBJECT' | 'PICKLIST'; type PicklistType = 'GLOBAL' | 'OBJECT'; interface VeloceObjectColumn { name: string; label: string; type: ColumnType; objectName?: string; pickListType?: PicklistType; pickListObjectName?: string; pickListFieldName?: string; globalPickListId?: string; } interface NewVeloceObject { name: string; label: string; categoryId?: string; columns: VeloceObjectColumn[]; data: any[]; } interface VeloceObject extends NewVeloceObject { id: string; } interface VlGlobalConfig { /** * Compression method to use. * Valid options: `'none'` | `'br'` | `'gzip'` * When value is not set, `'gzip'` is used for large requests */ COMPRESSION_METHOD?: string; /** * Veloce API server URL */ VELO_API?: string; /** * Veloce Canvas URL */ VELO_CANVAS_API?: string; /** * Veloce Sandbox URL */ VELO_SANDBOX_API?: string; /** * Path to Veloce public assets */ VELO_PUBLIC_PATH?: string; /** * `true` for VeloceStudio and `false` for RuntimeUI */ ADMIN_CONTEXT?: boolean; /** * Veloce authorization token */ VELO_KEY?: string; /** * Veloce Clinet Id */ VELO_CLIENT?: string; /** * DEV session token */ DEV_TOKEN?: string; /** * Salesforce org ID */ ORGANIZATION_ID?: string; ORGANIZATION_INSTANCE_URL?: string; ORGANIZATION_TOKEN?: string; /** * Studio preview in lwc */ MODE?: 'preview'; /** * Function to return back to the Salesforce object page * @param recordId SF object ID */ VELO_BACK_FN: (recordId: string) => void; /** * Function to open Salesforce approval process page */ VELO_NAVIGATE_TO_APPROVAL_PROCESS_FN?: () => void; /** * Remote configurator initial RPC message as stringified JSON */ RPC_MESSAGE?: string; /** * A function for finalizing Remote configuration * @param response Updated RPC message */ RPC_BROADCAST?: (response: unknown) => void; /** * Remote configurator Saving mode * Valid options: `'ALL'` */ SavingMode?: string; /** * This property is provided by local authorization process */ proxyTargetUrl?: string; /** * Veloce Portal settings for preview mode */ VELO_PORTAL_SETTINGS?: string; /** * The date when a Scratch organization's trial license expires */ TRIAL_EXP_DATE?: string; /** * XRay client credentials */ AWS_XRAY_ACCESS_KEY_ID?: string; AWS_XRAY_SECRET_ACCESS_KEY?: string; AWS_XRAY_REGION?: string; AWS_XRAY_SESSION_TOKEN?: string; /** * Makes a call to Canvas API for the specified endpoint. * * @param {string} endpoint - The endpoint to make the call to Canvas. * @returns {Promise} A promise that resolves with the result of the canvas call. */ doCanvasCall?: (endpoint: string, parameters: string | null) => Promise; /** * Makes a call to Sandbox API for the specified endpoint with the given body and method. * * @param {string} endpoint - The endpoint to make the call to Sandbox. * @param {string} body - The body of the request. * @param {string} method - The HTTP method for the request. * @returns {Promise} A promise that resolves with the result of the Sandbox call. */ doSandboxCall?: (endpoint: string, body: string, method: string) => Promise; } type VlWindow = Window & VlGlobalConfig; interface SegmentException { id: string; message: string; stack?: SegmentStackFrame[]; } interface Segment { id: string; trace_id?: string; type?: string; namespace?: string; parent_id?: string; user: string; name: string; in_progress: boolean; start_time: number; end_time?: number; http: SegmentHttp; error?: boolean; throttle?: boolean; fault?: boolean; cause?: SegmentCause; annotations?: SegmentAnnotations; } interface SegmentHttpRequest { url: string; method: string; traced?: boolean; } interface SegmentHttpResponse { status: number; } interface SegmentHttp { request: SegmentHttpRequest; response?: SegmentHttpResponse; } interface SegmentStackFrame { label: string; } interface SegmentCause { working_directory?: string; paths?: string[]; exceptions: SegmentException[]; } interface SegmentAnnotations { host: string; backend: string; } /** * Following navigation items are mandatory and * any portal customization must contain these */ declare enum PortalNavigationItems { subscriptions = "subscriptions" } declare const PORTAL_NAVIGATION_ITEMS_MAP: Map; declare const PORTAL_DEFAULT_CUSTOMIZATION: PortalCustomization; declare const MAX_INT_32 = 2147483647; declare const DEFAULT_THOUSANDS_SEPARATOR = ","; declare const DEFAULT_DECIMAL_SEPARATOR = "."; declare const DEFAULT_DECIMALS_COUNT = 2; declare const DEFAULT_CURRENCY_SYMBOL = "$"; declare const DEFAULT_CURRENCY_ISO_CODE = "USD"; declare const DEFAULT_DATE_FORMAT = "MM.dd.yyyy"; declare const DEFAULT_TIME_FORMAT = "HH:mm:ss"; declare const DEFAULT_ACTION_CODE_LABELS: { ADD: string; RENEW: string; EXIST: string; PENDING: string; UPDATE: string; 'P.UPDATE': string; TERMINATE: string; }; declare function debounceTimeAfter(amount: number, dueTime: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; declare function debounceTimeAfterFirst(dueTime: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; declare class XrayService { private readonly xray?; private readonly skip; constructor(); getTraceHeader(segment: Segment): string; beginSegment(method: string, url: string): Segment | undefined; endSegment(segment: Segment): void; endSegmentWithError(segment: Segment, status?: number, error?: any): void; private getHexId; private getHexTime; private getEpochTime; private getSegmentException; private putDocuments; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class BaseHttpService { private http; private messageService; private xray; debugMode$: Observable; private readonly API_BASE_URL; private readonly DEV_SESSION_EXPIRED_MESSAGE; private devToken$; constructor(http: HttpClient, messageService: MessageService, xray: XrayService); api(requestOptions: HttpRequestOptions): Observable; upload(requestOptions: HttpRequestOptions): Observable; handleValidationError(error: HttpResponse | any): Observable; private request; private getHeaders; private getHeadersForUpload; private toParams; private get compressionMethod(); private appendHeaderValueFromGlobalScope; private publishErrorMessage; private extractErrorMessage; private getAdjustedHeaders; private adjustRequestBody; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class FileDownloadService { private readonly defaultFileName; private readonly regex; processDownload(response: any, fileName?: string): void; downloadFile(fileName: string, blob: Blob): void; private getFileName; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class SessionStorageService { getData(key: string): T | undefined; setData(key: string, data: T): void; removeData(key: string): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class TokenInfoService { readonly info: VeloceToken | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { ADJUSTMENT_TYPE_LABELS, BaseHttpService, CONFIGURATION_PROCESSOR_TYPES_MAP, CategoryFilterType, CategoryPrimitiveType, ComponentAttachmentFileNames, Condition, ConfigurationProcessorTypes, CoreModule, DEFAULT_ACTION_CODE_LABELS, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, DEFAULT_DATE_FORMAT, DEFAULT_DECIMALS_COUNT, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_PICKLIST_VALUES, DEFAULT_THOUSANDS_SEPARATOR, DEFAULT_TIME_FORMAT, DefaultPicklistCode, EntityUtil, ErrorType, Expression, ExtractRuleValueTypes, FileDownloadService, IndexToAlphaPipe, LineItem, MAX_INT_32, Operator, OrderByPipe, PORTAL_DEFAULT_CUSTOMIZATION, PORTAL_NAVIGATION_ITEMS_MAP, PRIMITIVE_TYPE_OPTIONS, PmlConfigurationMode, PortalNavigationItems, Predicate, PriceAdjustment, PrimitiveType, ProcedureStepContextType, ProcedureStepType, QuoteDraft, RawOperatorsMap, RequestMethod, RuleObjectDefaultVariableNames, RuleObjects, RuleTypes, SalesforceIdUtils, SearchFilterPipe, SearchRequest, SessionStorageService, SidebarTabsDirective, StringUtils, TokenInfoService, UITemplateComponentType, UITemplateType, UUID, ValuesPipe, XrayService, convertDateFormatToDatePipeFormat, convertDateFormatToMomentJSFormat, convertDateFormatToPrimeNGFormat, debounceTimeAfter, debounceTimeAfterFirst, extractErrorDetails, formatNumber, getCollectionUniqueName, getFlowParams, getImgUrl, getMaxRenewalTermsValue, getSupportedDateFormats, initVeloceConfig, isApexError, isCanvasError, isDefined, isJsonString, isVeloceError, loadVeloceConfig, mapShoppingCartSettings, parseJsonSafely, parseJsonStringAsArray, parseJsonStringAsObject, parseJwt, parseJwtSafe, requiredComponentAttachments, titlesForErrorMessage, validateDateFormat, validateDateFormatReg }; export type { Account, AccountAssetsState, AddProductsPayload, AdjustmentTarget, AdjustmentType, ApexError, ArrayLikeProperties, Attachment, BEContextDefinitionObject, BEContextDefinitionStructure, BaseMapper, CanvasError, Catalog, CatalogProduct, CatalogProducts, Category, CategoryFilter, CategoryRequestPayload, CategoryRequestPayloadWithData, ColumnType, ComponentAttachments, ComponentStory, ComponentStoryAttachments, ComponentStoryPreview, ConfigurationExecuteRequest, ConfigurationExecuteResponse, ConfigurationProcessor, ConfigurationProcessorScriptFn, ConfigurationProcessorScriptFnParams, ConfigurationRequestAction, ConfigurationRequestSelector, ConfigurationResponseSelector, ConfigurationSettings, ConfigurationStateExecuteRequest, ConfigurationStateNewRequest, ConfigurationStateStartRequest, ConstraintEngineAttribute, ConstraintEngineNodeStatus, ContextDefinition, ContextDefinitionAttribute, ContextDefinitionAttributeDataType, ContextDefinitionObject, ContextDefinitionStructure, ContextMapping, ContextMappingDetails, ContextNode, ContractedPrice, DataAdministrationField, DataSet, Endpoint, EndpointExecuteData, ExpressionModel, ExtractRuleMapper, ExtractRuleQuery, ExtractRuleRequest, ExtractRuleRequestHeader, ExtractRuleRequestParameter, ExtractRuleStatement, FetchCategoryProductsPayload, Flow, FlowContext, FlowContextMode, FlowProperties, FlowQueryParams, FlowState, FlowStateExecutable, FlowStateExecutableDTO, FlowStateExecutionRequest, FlowStateExecutionRequestDTO, FlowStateExecutionResult, FlowStateInitRequest, FlowStateInitResponse, FlowStateSelectorError, FlowStateSelectorResponse, FlowStateSelectorResult, FlowTemplatesMap, FrequencyUnit, FunctionDataSet, GlobalPicklist, GlobalPicklistValue, GuidedSelling, Header, HeaderField, HttpRequestConfigurableOptions, HttpRequestOptions, LazyChunkRequest, LoadVeloceConfigParams, LocalAuth, MetricRuleMapper, NamedEntity, NavigationModule, NavigationSetting, NewCatalog, NewCategory, NewCategoryFilter, NewComponentStory, NewContractedPrice, NewEndpoint, NewGuidedSelling, NewOffer, NewOfferProduct, NewPicklist, NewPicklistValue, NewPortal, NewProcedure, NewProduct, NewPromotion, NewRebateProgram, NewRebateType, NewRule, NewSalesforceOrganization, NewTemplateComponent, NewUIDefinitionContainer, NewUITemplate, NewVeloceObject, NewVeloceObjectCategory, Offer, OfferProduct, OrchestrationStep, OrchestrationStepAction, Order, PCMAttribute, PCMAttributeCategory, PCMAttributeDataType, PCMAttributePicklist, PCMAttributePicklistDataType, PCMAttributePicklistValue, PCMAttributeStatus, PCMConfigureDuringSale, PCMGroup, PCMModel, PCMNodeType, PCMProduct, PCMProductClassification, PCMProductRelatedComponent, PCMProductSellingModel, PCMProductSellingModelOption, PCMProductSellingModelStatus, PCMProductSellingModelType, PCMProductSpecificationType, PCMQuantityScaleMethod, Parameter, Picklist, PicklistType, PicklistValue, Portal, PortalAccountsCustomization, PortalColorCustomization, PortalCustomization, PortalCustomizationCommonParam, PortalCustomizationField, PortalCustomizationParamReadOnly, PortalCustomizationParamVisibility, PortalLoginCustomization, PortalNavMenuItem, PortalShoppingCartCustomization, PortalSubscriptionCustomization, PortalThemeCustomization, PortalVisibility, Prettify, Procedure, ProcedureStep, ProcedureStepBase, ProcedureStepExternalProvider, ProcedureStepFunction, ProcedureStepFunctionBase, ProcedureStepFunctionFnGroup, ProcedureStepFunctionFunction, ProcedureStepFunctionGroup, ProcedureStepFunctionGroupFunction, ProcedureStepFunctionRLMConfigurator, ProcedureStepFunctionRLMPricing, ProcedureStepFunctionRoot, ProcedureStepGroup, ProcedureStepRLMConfigurator, ProcedureStepRLMPricing, ProcedureStepRoot, Product, ProductStatus, Promotion, Question, QuestionAction, QuestionActionType, QuestionCondition, QuestionOption, QuestionRule, QuestionType, Quote, RLMRuleMapper, RebateProgram, RebateType, RequiresApproval, RlmProcedure, Rule, RuleCondition, RuleMapper, RuleTransformation, RuntimeConfigurationSettings, RuntimeCurrencySettings, SFAccount, SalesTransaction, SalesTransactionItem, SalesTransactionItemAttribute, SalesTransactionItemMessage, SalesTransactionItemRelationship, SalesforceField, SalesforceObject, SalesforceOrganization, SalesforcePicklistValue, SaveRuleMapper, SearchCriteria, Segment, SegmentException, Selectable, ShoppingCartSetting, ShoppingCartSettings, StatefulConfigurationState, SubQuestion, TemplateAttachmentType, TemplateComponent, TemplateComponentWithAttachments, TransactionContext, Traversable, UIDefinition, UIDefinitionContainer, UIDefinitionGroupData, UIDefinitionMetadata, UIDefinitionProps, UIDefinitionTemplateData, UIDefinitionType, UIElement, UIExternalsType, UITemplate, UpdateProductPayload, VeloceError, VeloceObject, VeloceObjectCategory, VeloceObjectColumn, VlDateSettings, VlGlobalConfig, VlWindow };