/** AccessTokenFilter */ export interface DtoAccessTokenFilter { cid: number; prdCat: string; version: string; priceList: string; vendor: string; } /** AccessTokenListResponse */ export interface DtoAccessTokenListResponse { tokens: Array; } /** AccessTokenOwner */ export interface DtoAccessTokenOwner { id: string; name: string; } /** AccessTokenOwnerResponse */ export interface DtoAccessTokenOwnerResponse { owner: DtoAccessTokenOwner; } /** AccessTokenRequest */ export interface DtoAccessTokenRequest { name: string; filters: Array; origins: Array; public: boolean; } /** AccessTokenResponse */ export interface DtoAccessTokenResponse { token: DtoDynamoAccessToken; } /** AdditionalProductConf */ export interface DtoAdditionalProductConf extends DtoProductConf { refKey: string; selected: boolean; } /** AdditionalProductConfiguration */ export interface DtoAdditionalProductConfiguration { refKey?: string; selected?: boolean; selOptions: Array; additionalProducts?: Array; } /** AdditionalProductRef */ export interface DtoAdditionalProductRef { refKey: string; catId: DtoCatalogueParams; partNumber: string; refDescription?: string; anchor?: DtoMeasureParam; transform?: DtoTransform; optional?: boolean; } /** ApplicationArea */ export interface DtoApplicationArea { areas?: Array; cid?: number; material?: string; preview?: string; } /** ApplicationAreasResponse */ export interface DtoApplicationAreasResponse { applicationAreas: Array; uuid: string; } /** AuthorizeResponse - The response to an authorize request. It contains an endpoint, a session token and an API session. The endpoint is the URL to access the API. The secret token is used to validate each request to the API. The API session contains information about the user's catalogue access. */ export interface DtoAuthorizeResponse { endpoint: string; secretToken: string; apiSession: DtoCatalogueAPISession; } /** BooleanConstrainedOption */ export interface DtoBooleanConstrainedOption { code: string; /** * The value of the boolean option: * * - If true, the option must be selected * - If false, the option cannot be selected. * * Note: If not present, signifies that there is no valid value for the option. */ value?: boolean; } /** CacheFilterType */ export declare type DtoCacheFilterType = "Contains" | "StartsWith"; export declare const dtoCacheFilterTypeNames: DtoCacheFilterType[]; /** CacheKeyData */ export interface DtoCacheKeyData { key: string; keyType: string; } /** CacheManagementResponse */ export interface DtoCacheManagementResponse { keys: Array; } /** CacheParams */ export interface DtoCacheParams { filterString?: string; filterType?: DtoCacheFilterType; region: DtoCacheRegion; limit?: number; } /** CacheParamsClearCache */ export interface DtoCacheParamsClearCache { region: DtoCacheRegion; keyType: DtoKeyType; } /** CacheParamsWithKey */ export interface DtoCacheParamsWithKey { region: DtoCacheRegion; key: string; } /** CacheRegion */ export declare type DtoCacheRegion = "ap" | "eu" | "us"; export declare const dtoCacheRegionNames: DtoCacheRegion[]; /** CacheResponse */ export interface DtoCacheResponse { data: string; } /** CacheValueResponse */ export interface DtoCacheValueResponse { value: { [index: string]: string; }; } /** Catalogue */ export interface DtoCatalogue { dbName: string; enterprise: string; prdCats?: Array; vendors?: Array; url?: string; modified: number; } /** CatalogueAPISession */ export interface DtoCatalogueAPISession { expires: string; features?: Array; permissions?: Array; } /** CatalogueId */ export interface DtoCatalogueId { cid?: number; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; } /** CatalogueParams */ export interface DtoCatalogueParams { cid: number; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; } /** CatalogueParamsWithLang */ export interface DtoCatalogueParamsWithLang extends DtoCatalogueParams { lang: string; } /** CataloguePermission */ export interface DtoCataloguePermission { cid: number; enterprise: string; prdCat: string; prdCatVersion: string; priceLists?: Array; vendors?: Array; } /** CategoryMap */ export interface DtoCategoryMap { OtherUsage: string; description?: string; subCategory?: Array; } /** ClearCacheKeysResponse */ export interface DtoClearCacheKeysResponse { data: Array; } /** CodeRange */ export interface DtoCodeRange { minValue: number; maxValue: number; increment?: number; } /** CreateAccessTokenResponse */ export interface DtoCreateAccessTokenResponse { token: DtoDynamoAccessToken; secretToken: string; } /** DynamoAccessToken - Is used to authorize new SessionTokens */ export interface DtoDynamoAccessToken extends DtoDynamoObject { cataloguePermissions?: Array; expires: string; features?: Array; filters?: Array; name?: string; public?: boolean; inactive?: boolean; inactiveToggleTimestamp: string; origins?: Array; } /** DynamoObject - Common properties that are shared between all objects we put into DynamoDB */ export interface DtoDynamoObject { /** * partitionKey */ pk: string; /** * sortKey */ sk: string; /** * itemType */ it: string; /** * created */ cr: string; /** * modified */ mo: string; /** * owner */ ow: string; /** * time to live */ ttl: number; } /** EmptyResponse */ export interface DtoEmptyResponse { } /** ErrorResponse */ export interface DtoErrorResponse { error: string; code: number; eventId?: string; } /** ExportFormat - Format of the exported product, identical to the format's file extension. */ export declare type DtoExportFormat = "glb" | "gltf" | "fbx" | "dwg" | "cmdrw" | "cmfav" | "cmsym" | "obj"; export declare const dtoExportFormatNames: DtoExportFormat[]; /** ExportRequest */ export interface DtoExportRequest { format: DtoExportFormat; selOptions: Array; additionalProducts?: Array; /** * This boolean indicates if the exported file should be zipped or not. * When the export outputs multiple files they will always be zipped. * The default behaviour is to always zip the exported file. */ preferUnzipped?: boolean; } /** ExportResponse */ export interface DtoExportResponse { exportStatus: DtoExportStatus; } /** ExportStatus */ export interface DtoExportStatus { created: string; modified: string; status: DtoExportStatusStatus; url?: string; uuid: string; } /** ExportStatusStatus - WIP */ export declare type DtoExportStatusStatus = "pending" | "running" | "finished" | "failed"; export declare const dtoExportStatusStatusNames: DtoExportStatusStatus[]; /** Feature */ export interface DtoFeature { code: string; description: string; functional?: boolean; groupCode?: string; mtrlApplications?: Array; multiple?: boolean; numericOrder: boolean; omitOnOrder?: boolean; optional?: boolean; options: Array; hideIfMainProduct?: boolean; hideIfAdditionalProduct?: boolean; measureParams?: Array; syncGroup?: DtoSyncGroup; unit?: string; noteRefs?: Array; } /** FeatureConf */ export interface DtoFeatureConf { code: string; groupCode?: string; unit?: string; options?: Array; } /** FeatureRef */ export interface DtoFeatureRef { code: string; defaultOptionRef?: string; selectedOptionRef?: string; excludedOptionRefs?: Array; } /** GetApplicationAreasParams represents the URL parameters of getApplicationAreas */ export interface DtoGetApplicationAreasParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; } /** GetExportByIdParams represents the URL parameters of getExportById */ export interface DtoGetExportByIdParams { uuid: string; } /** GetPriceListsParams represents the URL parameters of getPriceLists */ export interface DtoGetPriceListsParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; } /** GetProductParams represents the URL parameters of getProduct */ export interface DtoGetProductParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; partNumber: string; } /** GetRenderByIdParams represents the URL parameters of getRenderById */ export interface DtoGetRenderByIdParams { uuid: string; } /** GetTocFlatParams represents the URL parameters of getTocFlat */ export interface DtoGetTocFlatParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; } /** GetTocTreeParams represents the URL parameters of getTocTree */ export interface DtoGetTocTreeParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; } /** InternalAuth */ export interface DtoInternalAuth { endpoint: string; features?: Array; secretToken: string; } /** InternalCatalogueAPISession */ export interface DtoInternalCatalogueAPISession { expires: string; features?: Array; user: DtoUser; sessionId: string; } /** KeyType */ export declare type DtoKeyType = "Production" | "Test" | "RateLimitTest" | "RateLimitProduction"; export declare const dtoKeyTypeNames: DtoKeyType[]; /** Level */ export interface DtoLevel { code: string; description: string; lvls?: Array; prdRefs?: Array; } /** LevelProductRef */ export interface DtoLevelProductRef { prdRef: string; } /** ListCataloguesResponse */ export interface DtoListCataloguesResponse { cataloguePermissions: Array; } /** LoginRequest */ export interface DtoLoginRequest { email: string; password: string; } /** LoginResponse */ export interface DtoLoginResponse { endpoint: string; secretToken: string; session: DtoInternalCatalogueAPISession; auth: DtoAuthorizeResponse; } /** LogoutResponse */ export interface DtoLogoutResponse { success: boolean; } /** Measurement */ export interface DtoMeasurement { code: string; numericValue?: DtoValueWithUnit; measureParam?: DtoMeasureParam; } /** MeasureParam */ export interface DtoMeasureParam { code: string; anchorPoint?: string; measurePriority?: Array; } /** MeasurePriority */ export interface DtoMeasurePriority { url: string; } /** MiscFile */ export interface DtoMiscFile { key: string; url: string; preview?: string; } /** Model */ export interface DtoModel { cid: number; anchor?: DtoMeasureParam; parentAnchor?: DtoMeasureParam; t?: DtoTransform; uri: string; } /** MtrlApplication */ export interface DtoMtrlApplication { areas?: Array; material?: string; preview?: string; cid?: number; } /** Note */ export interface DtoNote { code: string; severity?: DtoNoteSeverity; key?: string; title?: string; body: string; } /** NoteSeverity - WIP */ export declare type DtoNoteSeverity = "Information" | "Critical" | "Warning"; export declare const dtoNoteSeverityNames: DtoNoteSeverity[]; /** Option */ export interface DtoOption { additionalProductRefs?: Array; code: string; description: string; featureRefs?: Array; material?: string; mtrlApplications?: Array; codeRanges?: Array; upcharge?: number; priceCodes?: Array; noteRefs?: Array; miscFiles?: Array; omitOnOrder?: boolean; } /** OptionConf */ export interface DtoOptionConf { code: string; selected: boolean; numericValue?: DtoValueWithUnit; features?: Array; } /** Orientation */ export interface DtoOrientation { /** * radians */ yaw: number; /** * radians */ pitch: number; /** * radians */ roll: number; } /** PartsConstrainedOption */ export interface DtoPartsConstrainedOption { code: string; feature: string; /** * Mutually exclusive with `constrBooleans` */ constrOptions?: Array; /** * Mutually exclusive with `constrOptions` */ constrBooleans?: Array; next?: { [index: string]: DtoPartsConstrainedOption; }; } /** PartsData */ export interface DtoPartsData { basePrice: number; currency: string; rounding?: number; listPrice: number; pkgCount: number; selOptions: Array; constrOptions?: Array; styleNr: string; prices?: DtoPrices; } /** PartsSelectedOption */ export interface DtoPartsSelectedOption { code: string; numericValue?: DtoValueWithUnit; description?: string; feature: string; featDesc: string; upcharge?: number; next?: { [index: string]: DtoPartsSelectedOption; }; } /** PData */ export interface DtoPData { catId: DtoCatalogueId; partNumber: string; selOptions?: Array; } /** PDataWithAdditionalProducts */ export interface DtoPDataWithAdditionalProducts { catId: DtoCatalogueId; partNumber: string; selOptions?: Array; additionalProducts?: Array; } /** Point */ export interface DtoPoint { x: number; y: number; z: number; } /** Portfolio */ export interface DtoPortfolio extends DtoDynamoObject { debug?: boolean; urls?: Array; catalogues?: Array; } /** PortfolioUrlDatabaseUrl */ export interface DtoPortfolioUrlDatabaseUrl { cid: number; modified: number; url: string; } /** PostExportParams represents the URL parameters of postExport */ export interface DtoPostExportParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; partNumber: string; } /** PostPublicAccessTokenAuthorizeParams represents the URL parameters of postPublicAccessTokenAuthorize */ export interface DtoPostPublicAccessTokenAuthorizeParams { accessTokenId: string; } /** PostRenderParams represents the URL parameters of postRender */ export interface DtoPostRenderParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; partNumber: string; } /** PostUsageByDateResponse */ export interface DtoPostUsageByDateResponse { date: string; usage?: Array; } /** PostValidateParams represents the URL parameters of postValidate */ export interface DtoPostValidateParams { cid: number; lang: string; enterprise: string; prdCat: string; prdCatVersion: string; vendor: string; priceList: string; partNumber: string; } /** PriceList */ export interface DtoPriceList { code: string; currency: string; desc: string; rate: number; rounding: number; } /** PriceListsResponse */ export interface DtoPriceListsResponse { priceLists: Array; uuid: string; } /** Prices */ export interface DtoPrices { values: { [index: string]: number; }; parent?: DtoPrices; } /** ProductCatalogue */ export interface DtoProductCatalogue { code: string; version: string; priceLists?: Array; } /** ProductCatalogueInfo */ export interface DtoProductCatalogueInfo { catDesc: string; catName: string; currency: string; currencyRound: number; exchangeRate: number; lastModified: string; } /** ProductConf - This is intended to eventually supersede AdditionalProductConfiguration as the format for sending/receiving how a Product is configured. */ export interface DtoProductConf { features?: Array; additionalProducts?: Array; prodParams?: DtoProductParamsWithLang; syncGroupState?: DtoSyncGroupState; } /** ProductData */ export interface DtoProductData { area?: string; categories?: Array; depth?: string; description?: string; height?: string; hideIfMainProduct?: boolean; hideIfAdditionalProduct?: boolean; length?: string; mtrlApplications?: Array; additionalProductRefs?: Array; navImage?: string; sku: string; measurements?: Array; tags?: Array<{ [index: string]: string; }>; volume?: string; weight?: string; width?: string; models?: Array; partsData: DtoPartsData; noteRefs?: Array; miscFiles?: Array; } /** ProductParams */ export interface DtoProductParams extends DtoCatalogueParams { partNumber: string; } /** ProductParamsWithLang */ export interface DtoProductParamsWithLang extends DtoProductParams { lang: string; } /** ProductRef */ export interface DtoProductRef { basePrice: number; categories?: Array; descLong: string; descShort: string; navImage: string; omitOnOrder: boolean; partNr: string; styleNr?: string; } /** ProductResponse */ export interface DtoProductResponse { rootFeatureRefs: Array; features: Array; productData: DtoProductData; omitOnOrder: boolean; unit: string; uuid: string; notes?: Array; } /** RefreshSessionTokenResponse - The response to a refresh session token request. It contains a new API session. */ export interface DtoRefreshSessionTokenResponse { apiSession: DtoCatalogueAPISession; } /** RenderFormat */ export declare type DtoRenderFormat = "jpg" | "png"; export declare const dtoRenderFormatNames: DtoRenderFormat[]; /** RenderRequest */ export interface DtoRenderRequest { width: number; height: number; format?: DtoRenderFormat; targetCameraArgs?: DtoTargetCameraArgs; selOptions: Array; additionalProducts?: Array; } /** RenderResponse */ export interface DtoRenderResponse { renderStatus: DtoRenderStatus; } /** RenderStatus */ export interface DtoRenderStatus { created: string; modified: string; status: DtoRenderStatusStatus; url?: string; uuid: string; } /** RenderStatusStatus - WIP */ export declare type DtoRenderStatusStatus = "pending" | "running" | "finished" | "failed"; export declare const dtoRenderStatusStatusNames: DtoRenderStatusStatus[]; /** RequestData */ export interface DtoRequestData extends DtoDynamoObject { ip: string; operationId: string; path: string; requestId: string; requesterId: string; } /** SelectedOption */ export interface DtoSelectedOption { code: string; numericValue?: DtoValueWithUnit; next?: { [index: string]: DtoSelectedOption; }; } /** SessionToken - Is used to query the catalogue api */ export interface DtoSessionToken extends DtoDynamoObject { cataloguePermissions?: Array; expires: string; features?: Array; } /** SuccessResponse */ export interface DtoSuccessResponse { uuid: string; success: boolean; } /** SyncGroup */ export interface DtoSyncGroup { syncGroupCode: string; syncMethod: DtoSyncGroupMethods; } /** SyncGroupMethods */ export declare type DtoSyncGroupMethods = "pull" | "push" | "twoWay"; export declare const dtoSyncGroupMethodsNames: DtoSyncGroupMethods[]; /** SyncGroupState */ export interface DtoSyncGroupState { selectOne?: Array; selectMany?: Array; } /** SyncToOptionCode */ export interface DtoSyncToOptionCode { syncCode: string; optionCode: string; } /** SyncToOptionCodeToSelected */ export interface DtoSyncToOptionCodeToSelected extends DtoSyncToOptionCode { selected: boolean; } /** TargetCameraArgs */ export interface DtoTargetCameraArgs { location?: DtoPoint; target?: DtoPoint; direction?: DtoVector; normal?: DtoVector; /** * radians */ yaw?: number; /** * radians */ pitch?: number; /** * radians */ roll?: number; /** * radians */ fov?: number; nearClip?: number; minHeight?: number; } /** TOCResponse - Table Of Contents */ export interface DtoTOCResponse { uuid: string; prdRefs?: Array; prdCatInfo: DtoProductCatalogueInfo; lvls?: Array; } /** Transform */ export interface DtoTransform { pos: DtoVector; scale: DtoVector; rot: DtoOrientation; } /** UsageAggregated */ export interface DtoUsageAggregated { count: number; unitCost: string; totalCost: string; } /** UsageByDateResponse */ export interface DtoUsageByDateResponse { date: string; usage?: Array; } /** UsageByMonthResponse */ export interface DtoUsageByMonthResponse { date: string; usage?: Array; } /** UsageByOperationByPath */ export interface DtoUsageByOperationByPath { [index: string]: { [index: string]: number; }; } /** UsageByOperationByPathWithDateTime */ export interface DtoUsageByOperationByPathWithDateTime { dateTime: string; data: DtoUsageByOperationByPath; } /** UsageByOperationByPathWithModified */ export interface DtoUsageByOperationByPathWithModified { modified: string; data: DtoUsageByOperationByPath; } /** UsageByOperationResponse */ export interface DtoUsageByOperationResponse { date: string; totalAggregatedCost: string; usage: { [index: string]: DtoUsageAggregated; }; } /** UsageByTimeUnitByOperationByPath */ export interface DtoUsageByTimeUnitByOperationByPath { [index: string]: DtoUsageByOperationByPathWithModified; } /** UsageByTimeUnitResponse */ export interface DtoUsageByTimeUnitResponse { date: string; timeUnit: DtoUsageTimeUnit; totalAggregatedCost: string; usageAggregated: { [index: string]: DtoUsageAggregated; }; usage: DtoUsageByTimeUnitByOperationByPath; } /** UsageTimeUnit */ export declare type DtoUsageTimeUnit = "day" | "hour"; export declare const dtoUsageTimeUnitNames: DtoUsageTimeUnit[]; /** User */ export interface DtoUser { id: number; email: string; name: string; } /** UserResponse */ export interface DtoUserResponse { user: DtoUser; } /** ValidateRequest */ export interface DtoValidateRequest { knownFeatureCodes: Array; selOptions: Array; } /** ValidateResponse */ export interface DtoValidateResponse { productData: DtoProductData; omitOnOrder: boolean; uuid: string; validated: boolean; rootFeatureRefs?: Array; features: Array; unit: string; notes?: Array; } /** ValueWithUnit */ export interface DtoValueWithUnit { value: number; unit?: string; } /** Vector */ export interface DtoVector { x: number; y: number; z: number; } export declare type DtoRequestOptions = { method: "POST" | "GET" | "DELETE"; headers: { [index: string]: string; }; body?: string; }; export declare class DtoAPIError extends Error { body?: string; error?: Error; parsed?: T; status?: number; } declare type FetchFunc = (input: RequestInfo, init?: RequestInit) => Promise; export declare class CatalogueAPI { private readonly _fetch; auth: DtoAuthorizeResponse | undefined; constructor(_fetch?: FetchFunc); private _alternativeReferer; _saveAlternativeReferer(): void; hasFeature(feature: string): boolean; fetch(url: string, options: DtoRequestOptions): Promise; postPublicAccessTokenAuthorize(params: DtoPostPublicAccessTokenAuthorizeParams, endpoint: string): Promise; getApplicationAreas(params: DtoGetApplicationAreasParams): Promise; postExport(params: DtoPostExportParams, body: DtoExportRequest): Promise; getPriceLists(params: DtoGetPriceListsParams): Promise; getProduct(params: DtoGetProductParams): Promise; postRender(params: DtoPostRenderParams, body: DtoRenderRequest): Promise; postValidate(params: DtoPostValidateParams, body: DtoValidateRequest): Promise; getTocTree(params: DtoGetTocTreeParams): Promise; getTocFlat(params: DtoGetTocFlatParams): Promise; getExportById(params: DtoGetExportByIdParams): Promise; getRenderById(params: DtoGetRenderByIdParams): Promise; postSessionTokenRefresh(): Promise; } export declare const DTO_OPERATION_ID_TO_DEBIT_GROUP: { [operation_id: string]: string; }; export {}; //# sourceMappingURL=CatalogueAPI.d.ts.map