@configura/web-api 1.6.1 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/.eslintrc.json +18 -18
  2. package/LICENSE +201 -201
  3. package/README.md +1 -1
  4. package/dist/CatalogueAPI.d.ts +551 -507
  5. package/dist/CatalogueAPI.js +293 -280
  6. package/dist/CfgMeasure.d.ts +32 -32
  7. package/dist/CfgMeasure.js +30 -30
  8. package/dist/CfgProduct.d.ts +268 -258
  9. package/dist/CfgProduct.js +778 -747
  10. package/dist/CfgReferencePathHelper.d.ts +14 -0
  11. package/dist/CfgReferencePathHelper.js +13 -0
  12. package/dist/ConfigurationConverter.d.ts +5 -0
  13. package/dist/ConfigurationConverter.js +72 -0
  14. package/dist/index.d.ts +23 -20
  15. package/dist/index.js +23 -20
  16. package/dist/io/CfgHistoryManager.d.ts +51 -0
  17. package/dist/io/CfgHistoryManager.js +82 -0
  18. package/dist/io/CfgHistoryToProdConfConnector.d.ts +21 -0
  19. package/dist/io/CfgHistoryToProdConfConnector.js +56 -0
  20. package/dist/io/CfgIOManager.d.ts +49 -0
  21. package/dist/io/CfgIOManager.js +115 -0
  22. package/dist/io/CfgIOProdConfConnector.d.ts +53 -0
  23. package/dist/io/CfgIOProdConfConnector.js +141 -0
  24. package/dist/io/CfgObservableStateManager.d.ts +22 -0
  25. package/dist/io/CfgObservableStateManager.js +65 -0
  26. package/dist/io/CfgObservableStateToProdConfConnector.d.ts +15 -0
  27. package/dist/io/CfgObservableStateToProdConfConnector.js +16 -0
  28. package/dist/io/CfgWindowEventManager.d.ts +22 -0
  29. package/dist/io/CfgWindowEventManager.js +38 -0
  30. package/dist/io/CfgWindowMessageManager.d.ts +41 -0
  31. package/dist/io/CfgWindowMessageManager.js +84 -0
  32. package/dist/io/CfgWindowMessageToProdConfConnector.d.ts +17 -0
  33. package/dist/io/CfgWindowMessageToProdConfConnector.js +18 -0
  34. package/dist/io/index.d.ts +9 -0
  35. package/dist/io/index.js +8 -0
  36. package/dist/material/CfgMaterialMapping.d.ts +7 -7
  37. package/dist/material/CfgMaterialMapping.js +181 -181
  38. package/dist/material/CfgMtrlApplication.d.ts +18 -18
  39. package/dist/material/CfgMtrlApplication.js +43 -43
  40. package/dist/material/CfgMtrlApplicationSource.d.ts +7 -7
  41. package/dist/material/CfgMtrlApplicationSource.js +8 -8
  42. package/dist/material/CfgMtrlSource.d.ts +19 -19
  43. package/dist/material/CfgMtrlSource.js +40 -40
  44. package/dist/material/CfgMtrlSourceWithMetaData.d.ts +7 -7
  45. package/dist/material/CfgMtrlSourceWithMetaData.js +1 -1
  46. package/dist/productConfiguration/CfgFeature.d.ts +187 -188
  47. package/dist/productConfiguration/CfgFeature.js +645 -636
  48. package/dist/productConfiguration/CfgOption.d.ts +151 -150
  49. package/dist/productConfiguration/CfgOption.js +416 -426
  50. package/dist/productConfiguration/CfgProductConfiguration.d.ts +117 -120
  51. package/dist/productConfiguration/CfgProductConfiguration.js +307 -309
  52. package/dist/productConfiguration/filters.d.ts +15 -15
  53. package/dist/productConfiguration/filters.js +70 -70
  54. package/dist/productConfiguration/productParamsGenerator.d.ts +15 -15
  55. package/dist/productConfiguration/productParamsGenerator.js +51 -51
  56. package/dist/productConfiguration/utilitiesProductConfiguration.d.ts +17 -17
  57. package/dist/productConfiguration/utilitiesProductConfiguration.js +80 -80
  58. package/dist/productLoader.d.ts +33 -33
  59. package/dist/productLoader.js +49 -49
  60. package/dist/syncGroups/SyncGroupsApplyMode.d.ts +20 -20
  61. package/dist/syncGroups/SyncGroupsApplyMode.js +21 -21
  62. package/dist/syncGroups/SyncGroupsHandler.d.ts +40 -40
  63. package/dist/syncGroups/SyncGroupsHandler.js +359 -358
  64. package/dist/syncGroups/SyncGroupsPathHelper.d.ts +26 -26
  65. package/dist/syncGroups/SyncGroupsPathHelper.js +90 -90
  66. package/dist/syncGroups/SyncGroupsState.d.ts +35 -35
  67. package/dist/syncGroups/SyncGroupsState.js +125 -125
  68. package/dist/syncGroups/SyncGroupsTransaction.d.ts +154 -154
  69. package/dist/syncGroups/SyncGroupsTransaction.js +576 -576
  70. package/dist/tasks/TaskHandler.d.ts +77 -78
  71. package/dist/tasks/TaskHandler.js +275 -276
  72. package/dist/tasks/formats.d.ts +4 -4
  73. package/dist/tasks/formats.js +7 -7
  74. package/dist/tests/testData/collectorForTest.d.ts +73 -73
  75. package/dist/tests/testData/collectorForTest.js +194 -194
  76. package/dist/tests/testData/dummyProductForTest.d.ts +4 -4
  77. package/dist/tests/testData/dummyProductForTest.js +32 -36
  78. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.d.ts +11 -11
  79. package/dist/tests/testData/testDataAdditionalProductInAdditionalProductInProductForTest.js +277 -277
  80. package/dist/tests/testData/testDataCachedGetProduct.d.ts +5 -5
  81. package/dist/tests/testData/testDataCachedGetProduct.js +185 -185
  82. package/dist/tests/testData/testDataCachedPostValidate.d.ts +7 -7
  83. package/dist/tests/testData/testDataCachedPostValidate.js +183 -183
  84. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.d.ts +3 -3
  85. package/dist/tests/testData/testDataNoAdditionalProductNoPropagateForTest.js +1099 -1099
  86. package/dist/tests/testData/testDataOptions.d.ts +12 -12
  87. package/dist/tests/testData/testDataOptions.js +60 -60
  88. package/dist/tests/testData/testDataProductAggregatedPrice.d.ts +6 -6
  89. package/dist/tests/testData/testDataProductAggregatedPrice.js +187 -187
  90. package/dist/tests/testData/testDataUpcharge.d.ts +8 -8
  91. package/dist/tests/testData/testDataUpcharge.js +119 -119
  92. package/dist/utilitiesCatalogueData.d.ts +42 -31
  93. package/dist/utilitiesCatalogueData.js +173 -162
  94. package/dist/utilitiesCataloguePermission.d.ts +38 -37
  95. package/dist/utilitiesCataloguePermission.js +79 -80
  96. package/dist/utilitiesNumericValues.d.ts +24 -24
  97. package/dist/utilitiesNumericValues.js +109 -109
  98. package/package.json +3 -3
@@ -1,508 +1,552 @@
1
- /** AdditionalProductConfiguration */
2
- export interface AdditionalProductConfiguration {
3
- refKey?: string;
4
- selected?: boolean;
5
- selOptions: Array<SelectedOption>;
6
- additionalProducts?: Array<AdditionalProductConfiguration>;
7
- }
8
- /** AdditionalProductRef */
9
- export interface AdditionalProductRef {
10
- refKey: string;
11
- catId: CatalogueParams;
12
- partNumber: string;
13
- refDescription?: string;
14
- anchor?: MeasureParam;
15
- transform?: Transform;
16
- optional?: boolean;
17
- }
18
- /** ApplicationArea */
19
- export interface ApplicationArea {
20
- areas?: Array<string>;
21
- cid?: number;
22
- material?: string;
23
- preview?: string;
24
- }
25
- /** ApplicationAreasResponse */
26
- export interface ApplicationAreasResponse {
27
- applicationAreas: Array<ApplicationArea>;
28
- uuid: string;
29
- }
30
- /** AuthorizeResponse */
31
- export interface AuthorizeResponse {
32
- endpoint: string;
33
- secretToken: string;
34
- apiSession: CatalogueAPISession;
35
- }
36
- /** CatalogueAPISession */
37
- export interface CatalogueAPISession {
38
- expires: string;
39
- features?: Array<string>;
40
- permissions?: Array<CataloguePermission>;
41
- }
42
- /** CatalogueParams */
43
- export interface CatalogueParams {
44
- enterprise: string;
45
- prdCat: string;
46
- prdCatVersion: string;
47
- vendor: string;
48
- priceList: string;
49
- }
50
- /** CataloguePermission */
51
- export interface CataloguePermission {
52
- cid: number;
53
- enterprise: string;
54
- prdCat: string;
55
- prdCatVersion: string;
56
- priceLists?: Array<string>;
57
- vendors?: Array<string>;
58
- }
59
- /** CategoryMap */
60
- export interface CategoryMap {
61
- [index: string]: string;
62
- }
63
- /** CodeRange */
64
- export interface CodeRange {
65
- minValue: number;
66
- maxValue: number;
67
- increment?: number;
68
- }
69
- /** ErrorResponse */
70
- export interface ErrorResponse {
71
- error: string;
72
- code: number;
73
- eventId?: string;
74
- }
75
- /** ExportFormat - Format of the exported product, identical to the format's file extension. */
76
- export declare type ExportFormat = "glb" | "gltf" | "fbx" | "dwg" | "cmdrw" | "cmfav" | "cmsym";
77
- export declare const exportFormatNames: ExportFormat[];
78
- /** ExportRequest */
79
- export interface ExportRequest {
80
- format: ExportFormat;
81
- selOptions: Array<SelectedOption>;
82
- additionalProducts?: Array<AdditionalProductConfiguration>;
83
- preferUnzipped?: boolean;
84
- }
85
- /** ExportResponse */
86
- export interface ExportResponse {
87
- exportStatus: ExportStatus;
88
- }
89
- /** ExportStatus */
90
- export interface ExportStatus {
91
- created: string;
92
- modified: string;
93
- status: ExportStatusStatus;
94
- url?: string;
95
- uuid: string;
96
- }
97
- /** ExportStatusStatus - WIP */
98
- export declare type ExportStatusStatus = "pending" | "running" | "finished" | "failed";
99
- export declare const exportStatusStatusNames: ExportStatusStatus[];
100
- /** Feature */
101
- export interface Feature {
102
- code: string;
103
- description: string;
104
- functional?: boolean;
105
- groupCode?: string;
106
- mtrlApplications?: Array<MtrlApplication>;
107
- multiple?: boolean;
108
- numericOrder: boolean;
109
- optional?: boolean;
110
- options: Array<Option>;
111
- hideIfMainProduct?: boolean;
112
- hideIfAdditionalProduct?: boolean;
113
- measureParams?: Array<MeasureParam>;
114
- syncGroup?: SyncGroup;
115
- unit?: string;
116
- }
117
- /** FeatureRef */
118
- export interface FeatureRef {
119
- code: string;
120
- defaultOptionRef?: string;
121
- selectedOptionRef?: string;
122
- excludedOptionRefs?: Array<string>;
123
- }
124
- /** GetApplicationAreasParams represents the URL parameters of getApplicationAreas */
125
- export interface GetApplicationAreasParams {
126
- lang: string;
127
- enterprise: string;
128
- prdCat: string;
129
- prdCatVersion: string;
130
- vendor: string;
131
- priceList: string;
132
- }
133
- /** GetExportByIdParams represents the URL parameters of getExportById */
134
- export interface GetExportByIdParams {
135
- uuid: string;
136
- }
137
- /** GetPriceListsParams represents the URL parameters of getPriceLists */
138
- export interface GetPriceListsParams {
139
- lang: string;
140
- enterprise: string;
141
- prdCat: string;
142
- prdCatVersion: string;
143
- vendor: string;
144
- priceList: string;
145
- }
146
- /** GetProductParams represents the URL parameters of getProduct */
147
- export interface GetProductParams {
148
- lang: string;
149
- enterprise: string;
150
- prdCat: string;
151
- prdCatVersion: string;
152
- vendor: string;
153
- priceList: string;
154
- partNumber: string;
155
- }
156
- /** GetRenderByIdParams represents the URL parameters of getRenderById */
157
- export interface GetRenderByIdParams {
158
- uuid: string;
159
- }
160
- /** GetTocFlatParams represents the URL parameters of getTocFlat */
161
- export interface GetTocFlatParams {
162
- lang: string;
163
- enterprise: string;
164
- prdCat: string;
165
- prdCatVersion: string;
166
- vendor: string;
167
- priceList: string;
168
- }
169
- /** GetTocTreeParams represents the URL parameters of getTocTree */
170
- export interface GetTocTreeParams {
171
- lang: string;
172
- enterprise: string;
173
- prdCat: string;
174
- prdCatVersion: string;
175
- vendor: string;
176
- priceList: string;
177
- }
178
- /** Level */
179
- export interface Level {
180
- code: string;
181
- description: string;
182
- lvls?: Array<Level>;
183
- prdRefs?: Array<LevelProductRef>;
184
- }
185
- /** LevelProductRef */
186
- export interface LevelProductRef {
187
- prdRef: string;
188
- }
189
- /** Measurement */
190
- export interface Measurement {
191
- code: string;
192
- numericValue?: ValueWithUnit;
193
- measureParam?: MeasureParam;
194
- }
195
- /** MeasureParam */
196
- export interface MeasureParam {
197
- code: string;
198
- anchorPoint?: string;
199
- measurePriority?: Array<MeasurePriority>;
200
- }
201
- /** MeasurePriority */
202
- export interface MeasurePriority {
203
- url: string;
204
- }
205
- /** Model */
206
- export interface Model {
207
- cid: number;
208
- anchor?: MeasureParam;
209
- t?: Transform;
210
- uri: string;
211
- }
212
- /** MtrlApplication */
213
- export interface MtrlApplication {
214
- areas?: Array<string>;
215
- material?: string;
216
- preview?: string;
217
- cid?: number;
218
- }
219
- /** Option */
220
- export interface Option {
221
- additionalProductRefs?: Array<AdditionalProductRef>;
222
- code: string;
223
- description: string;
224
- featureRefs?: Array<FeatureRef>;
225
- material?: string;
226
- mtrlApplications?: Array<MtrlApplication>;
227
- codeRanges?: Array<CodeRange>;
228
- upcharge?: number;
229
- priceCodes?: Array<string>;
230
- }
231
- /** Orientation */
232
- export interface Orientation {
233
- yaw: number;
234
- pitch: number;
235
- roll: number;
236
- }
237
- /** PartsData */
238
- export interface PartsData {
239
- basePrice: number;
240
- currency: string;
241
- rounding?: number;
242
- listPrice: number;
243
- pkgCount: number;
244
- selOptions: Array<PartsSelectedOption>;
245
- styleNr: string;
246
- prices?: Prices;
247
- }
248
- /** PartsSelectedOption */
249
- export interface PartsSelectedOption {
250
- code: string;
251
- numericValue?: ValueWithUnit;
252
- description?: string;
253
- feature: string;
254
- featDesc: string;
255
- upcharge?: number;
256
- next?: {
257
- [index: string]: PartsSelectedOption;
258
- };
259
- }
260
- /** Point */
261
- export interface Point {
262
- x: number;
263
- y: number;
264
- z: number;
265
- }
266
- /** PostExportParams represents the URL parameters of postExport */
267
- export interface PostExportParams {
268
- lang: string;
269
- enterprise: string;
270
- prdCat: string;
271
- prdCatVersion: string;
272
- vendor: string;
273
- priceList: string;
274
- partNumber: string;
275
- }
276
- /** PostPublicAccessTokenAuthorizeParams represents the URL parameters of postPublicAccessTokenAuthorize */
277
- export interface PostPublicAccessTokenAuthorizeParams {
278
- accessTokenId: string;
279
- }
280
- /** PostRenderParams represents the URL parameters of postRender */
281
- export interface PostRenderParams {
282
- lang: string;
283
- enterprise: string;
284
- prdCat: string;
285
- prdCatVersion: string;
286
- vendor: string;
287
- priceList: string;
288
- partNumber: string;
289
- }
290
- /** PostValidateParams represents the URL parameters of postValidate */
291
- export interface PostValidateParams {
292
- lang: string;
293
- enterprise: string;
294
- prdCat: string;
295
- prdCatVersion: string;
296
- vendor: string;
297
- priceList: string;
298
- partNumber: string;
299
- }
300
- /** PriceList */
301
- export interface PriceList {
302
- code: string;
303
- currency: string;
304
- desc: string;
305
- rate: number;
306
- rounding: number;
307
- }
308
- /** PriceListsResponse */
309
- export interface PriceListsResponse {
310
- priceLists: Array<PriceList>;
311
- uuid: string;
312
- }
313
- /** Prices */
314
- export interface Prices {
315
- values: {
316
- [index: string]: number;
317
- };
318
- parent?: Prices;
319
- }
320
- /** ProductCatalogueInfo */
321
- export interface ProductCatalogueInfo {
322
- catDesc: string;
323
- catName: string;
324
- currency: string;
325
- currencyRound: number;
326
- exchangeRate: number;
327
- lastModified: string;
328
- }
329
- /** ProductData */
330
- export interface ProductData {
331
- area?: string;
332
- categories?: Array<CategoryMap>;
333
- depth?: string;
334
- description?: string;
335
- height?: string;
336
- hideIfMainProduct?: boolean;
337
- hideIfAdditionalProduct?: boolean;
338
- length?: string;
339
- mtrlApplications?: Array<MtrlApplication>;
340
- additionalProductRefs?: Array<AdditionalProductRef>;
341
- navImage?: string;
342
- sku: string;
343
- measurements?: Array<Measurement>;
344
- tags?: Array<{
345
- [index: string]: string;
346
- }>;
347
- volume?: string;
348
- weight?: string;
349
- width?: string;
350
- models?: Array<Model>;
351
- partsData: PartsData;
352
- }
353
- /** ProductRef */
354
- export interface ProductRef {
355
- basePrice: number;
356
- categories?: Array<CategoryMap>;
357
- descLong: string;
358
- descShort: string;
359
- navImage: string;
360
- omitOnOrder: boolean;
361
- partNr: string;
362
- styleNr?: string;
363
- }
364
- /** ProductResponse */
365
- export interface ProductResponse {
366
- rootFeatureRefs: Array<FeatureRef>;
367
- features: Array<Feature>;
368
- productData: ProductData;
369
- unit: string;
370
- uuid: string;
371
- }
372
- /** RefreshSessionTokenResponse */
373
- export interface RefreshSessionTokenResponse {
374
- apiSession: CatalogueAPISession;
375
- }
376
- /** RenderFormat */
377
- export declare type RenderFormat = "jpg" | "png";
378
- export declare const renderFormatNames: RenderFormat[];
379
- /** RenderRequest */
380
- export interface RenderRequest {
381
- width: number;
382
- height: number;
383
- format?: RenderFormat;
384
- targetCameraArgs?: TargetCameraArgs;
385
- selOptions: Array<SelectedOption>;
386
- additionalProducts?: Array<AdditionalProductConfiguration>;
387
- }
388
- /** RenderResponse */
389
- export interface RenderResponse {
390
- renderStatus: RenderStatus;
391
- }
392
- /** RenderStatus */
393
- export interface RenderStatus {
394
- created: string;
395
- modified: string;
396
- status: RenderStatusStatus;
397
- url?: string;
398
- uuid: string;
399
- }
400
- /** RenderStatusStatus - WIP */
401
- export declare type RenderStatusStatus = "pending" | "running" | "finished" | "failed";
402
- export declare const renderStatusStatusNames: RenderStatusStatus[];
403
- /** SelectedOption */
404
- export interface SelectedOption {
405
- code: string;
406
- numericValue?: ValueWithUnit;
407
- next?: {
408
- [index: string]: SelectedOption;
409
- };
410
- }
411
- /** SuccessResponse */
412
- export interface SuccessResponse {
413
- uuid: string;
414
- success: boolean;
415
- }
416
- /** SyncGroup */
417
- export interface SyncGroup {
418
- syncGroupCode: string;
419
- syncMethod: SyncGroupMethods;
420
- }
421
- /** SyncGroupMethods */
422
- export declare type SyncGroupMethods = "pull" | "push" | "twoWay";
423
- export declare const syncGroupMethodsNames: SyncGroupMethods[];
424
- /** TargetCameraArgs */
425
- export interface TargetCameraArgs {
426
- location?: Point;
427
- target?: Point;
428
- direction?: Vector;
429
- normal?: Vector;
430
- yaw?: number;
431
- pitch?: number;
432
- roll?: number;
433
- fov?: number;
434
- nearClip?: number;
435
- minHeight?: number;
436
- }
437
- /** TOCResponse - Table Of Contents */
438
- export interface TOCResponse {
439
- uuid: string;
440
- prdRefs?: Array<ProductRef>;
441
- prdCatInfo: ProductCatalogueInfo;
442
- lvls?: Array<Level>;
443
- }
444
- /** Transform */
445
- export interface Transform {
446
- pos: Vector;
447
- scale: Vector;
448
- rot: Orientation;
449
- }
450
- /** ValidateRequest */
451
- export interface ValidateRequest {
452
- selOptions: Array<SelectedOption>;
453
- }
454
- /** ValidateResponse */
455
- export interface ValidateResponse {
456
- productData: ProductData;
457
- uuid: string;
458
- validated: boolean;
459
- rootFeatureRefs?: Array<FeatureRef>;
460
- }
461
- /** ValueWithUnit */
462
- export interface ValueWithUnit {
463
- value: number;
464
- unit?: string;
465
- }
466
- /** Vector */
467
- export interface Vector {
468
- x: number;
469
- y: number;
470
- z: number;
471
- }
472
- export declare type RequestOptions = {
473
- method: "POST" | "GET" | "DELETE";
474
- headers: {
475
- [index: string]: string;
476
- };
477
- body?: string;
478
- };
479
- export declare class APIError<T> extends Error {
480
- body?: string;
481
- error?: Error;
482
- parsed?: T;
483
- status?: number;
484
- }
485
- declare type FetchFunc = (input: RequestInfo, init?: RequestInit) => Promise<Response>;
486
- export declare class CatalogueAPI {
487
- private readonly _fetch;
488
- auth: AuthorizeResponse | undefined;
489
- constructor(_fetch?: FetchFunc);
490
- private _alternativeReferer;
491
- _saveAlternativeReferer(): void;
492
- hasFeature(feature: string): boolean;
493
- fetch<T>(url: string, options: RequestOptions): Promise<T>;
494
- postPublicAccessTokenAuthorize(params: PostPublicAccessTokenAuthorizeParams, endpoint: string): Promise<AuthorizeResponse>;
495
- getApplicationAreas(params: GetApplicationAreasParams): Promise<ApplicationAreasResponse>;
496
- postExport(params: PostExportParams, body: ExportRequest): Promise<ExportResponse>;
497
- getPriceLists(params: GetPriceListsParams): Promise<PriceListsResponse>;
498
- getProduct(params: GetProductParams): Promise<ProductResponse>;
499
- postRender(params: PostRenderParams, body: RenderRequest): Promise<RenderResponse>;
500
- postValidate(params: PostValidateParams, body: ValidateRequest): Promise<ValidateResponse>;
501
- getTocTree(params: GetTocTreeParams): Promise<TOCResponse>;
502
- getTocFlat(params: GetTocFlatParams): Promise<TOCResponse>;
503
- getExportById(params: GetExportByIdParams): Promise<ExportResponse>;
504
- getRenderById(params: GetRenderByIdParams): Promise<RenderResponse>;
505
- postSessionTokenRefresh(): Promise<RefreshSessionTokenResponse>;
506
- }
507
- export {};
1
+ /** AdditionalProductConfiguration */
2
+ export interface DtoAdditionalProductConfiguration {
3
+ refKey?: string;
4
+ selected?: boolean;
5
+ selOptions: Array<DtoSelectedOption>;
6
+ additionalProducts?: Array<DtoAdditionalProductConfiguration>;
7
+ }
8
+ /** AdditionalProductRef */
9
+ export interface DtoAdditionalProductRef {
10
+ refKey: string;
11
+ catId: DtoCatalogueParams;
12
+ partNumber: string;
13
+ refDescription?: string;
14
+ anchor?: DtoMeasureParam;
15
+ transform?: DtoTransform;
16
+ optional?: boolean;
17
+ }
18
+ /** ApplicationArea */
19
+ export interface DtoApplicationArea {
20
+ areas?: Array<string>;
21
+ cid?: number;
22
+ material?: string;
23
+ preview?: string;
24
+ }
25
+ /** DtoApplicationAreasResponse */
26
+ export interface DtoApplicationAreasResponse {
27
+ applicationAreas: Array<DtoApplicationArea>;
28
+ uuid: string;
29
+ }
30
+ /** AuthorizeResponse */
31
+ export interface DtoAuthorizeResponse {
32
+ endpoint: string;
33
+ secretToken: string;
34
+ apiSession: DtoCatalogueAPISession;
35
+ }
36
+ /** CatalogueAPISession */
37
+ export interface DtoCatalogueAPISession {
38
+ expires: string;
39
+ features?: Array<string>;
40
+ permissions?: Array<DtoCataloguePermission>;
41
+ }
42
+ /** CatalogueParams */
43
+ export interface DtoCatalogueParams extends DtoCatalogueParamsWithoutCid {
44
+ cid: number;
45
+ }
46
+ /** CatalogueParamsWithLang */
47
+ export interface DtoCatalogueParamsWithLang extends DtoCatalogueParams {
48
+ lang: string;
49
+ }
50
+ /** CatalogueParamsWithoutCid */
51
+ export interface DtoCatalogueParamsWithoutCid {
52
+ enterprise: string;
53
+ prdCat: string;
54
+ prdCatVersion: string;
55
+ vendor: string;
56
+ priceList: string;
57
+ }
58
+ /** CataloguePermission */
59
+ export interface DtoCataloguePermission {
60
+ cid: number;
61
+ enterprise: string;
62
+ prdCat: string;
63
+ prdCatVersion: string;
64
+ priceLists?: Array<string>;
65
+ vendors?: Array<string>;
66
+ }
67
+ /** CategoryMap */
68
+ export interface DtoCategoryMap {
69
+ [index: string]: string;
70
+ }
71
+ /** CodeRange */
72
+ export interface DtoCodeRange {
73
+ minValue: number;
74
+ maxValue: number;
75
+ increment?: number;
76
+ }
77
+ /** ConfAddProd */
78
+ export interface DtoConfAddProd extends DtoConfProd {
79
+ refKey: string;
80
+ selected: boolean;
81
+ }
82
+ /** ConfFeature */
83
+ export interface DtoConfFeature {
84
+ code: string;
85
+ groupCode?: string;
86
+ unit?: string;
87
+ options?: Array<DtoConfOption>;
88
+ }
89
+ /** ConfOption */
90
+ export interface DtoConfOption {
91
+ code: string;
92
+ selected: boolean;
93
+ numericValue?: DtoValueWithUnit;
94
+ features?: Array<DtoConfFeature>;
95
+ }
96
+ /** ConfProd */
97
+ export interface DtoConfProd {
98
+ features?: Array<DtoConfFeature>;
99
+ additionalProducts?: Array<DtoConfAddProd>;
100
+ prodParams?: DtoProductParamsWithLang;
101
+ }
102
+ /** ErrorResponse */
103
+ export interface DtoErrorResponse {
104
+ error: string;
105
+ code: number;
106
+ eventId?: string;
107
+ }
108
+ /** ExportFormat - Format of the exported product, identical to the format's file extension. */
109
+ export declare type DtoExportFormat = "glb" | "gltf" | "fbx" | "dwg" | "cmdrw" | "cmfav" | "cmsym";
110
+ export declare const dtoExportFormatNames: DtoExportFormat[];
111
+ /** ExportRequest */
112
+ export interface DtoExportRequest {
113
+ format: DtoExportFormat;
114
+ selOptions: Array<DtoSelectedOption>;
115
+ additionalProducts?: Array<DtoAdditionalProductConfiguration>;
116
+ preferUnzipped?: boolean;
117
+ }
118
+ /** ExportResponse */
119
+ export interface DtoExportResponse {
120
+ exportStatus: DtoExportStatus;
121
+ }
122
+ /** ExportStatus */
123
+ export interface DtoExportStatus {
124
+ created: string;
125
+ modified: string;
126
+ status: DtoExportStatusStatus;
127
+ url?: string;
128
+ uuid: string;
129
+ }
130
+ /** ExportStatusStatus - WIP */
131
+ export declare type DtoExportStatusStatus = "pending" | "running" | "finished" | "failed";
132
+ export declare const dtoExportStatusStatusNames: DtoExportStatusStatus[];
133
+ /** Feature */
134
+ export interface DtoFeature {
135
+ code: string;
136
+ description: string;
137
+ functional?: boolean;
138
+ groupCode?: string;
139
+ mtrlApplications?: Array<DtoMtrlApplication>;
140
+ multiple?: boolean;
141
+ numericOrder: boolean;
142
+ optional?: boolean;
143
+ options: Array<DtoOption>;
144
+ hideIfMainProduct?: boolean;
145
+ hideIfAdditionalProduct?: boolean;
146
+ measureParams?: Array<DtoMeasureParam>;
147
+ syncGroup?: DtoSyncGroup;
148
+ unit?: string;
149
+ }
150
+ /** FeatureRef */
151
+ export interface DtoFeatureRef {
152
+ code: string;
153
+ defaultOptionRef?: string;
154
+ selectedOptionRef?: string;
155
+ excludedOptionRefs?: Array<string>;
156
+ }
157
+ /** GetApplicationAreasParams represents the URL parameters of getApplicationAreas */
158
+ export interface DtoGetApplicationAreasParams {
159
+ lang: string;
160
+ enterprise: string;
161
+ prdCat: string;
162
+ prdCatVersion: string;
163
+ vendor: string;
164
+ priceList: string;
165
+ }
166
+ /** GetExportByIdParams represents the URL parameters of getExportById */
167
+ export interface DtoGetExportByIdParams {
168
+ uuid: string;
169
+ }
170
+ /** GetPriceListsParams represents the URL parameters of getPriceLists */
171
+ export interface DtoGetPriceListsParams {
172
+ lang: string;
173
+ enterprise: string;
174
+ prdCat: string;
175
+ prdCatVersion: string;
176
+ vendor: string;
177
+ priceList: string;
178
+ }
179
+ /** DtoProductParamsWithLang represents the URL parameters of getProduct */
180
+ export interface DtoGetProductParams {
181
+ lang: string;
182
+ enterprise: string;
183
+ prdCat: string;
184
+ prdCatVersion: string;
185
+ vendor: string;
186
+ priceList: string;
187
+ partNumber: string;
188
+ }
189
+ /** GetRenderByIdParams represents the URL parameters of getRenderById */
190
+ export interface DtoGetRenderByIdParams {
191
+ uuid: string;
192
+ }
193
+ /** GetTocFlatParams represents the URL parameters of getTocFlat */
194
+ export interface DtoGetTocFlatParams {
195
+ lang: string;
196
+ enterprise: string;
197
+ prdCat: string;
198
+ prdCatVersion: string;
199
+ vendor: string;
200
+ priceList: string;
201
+ }
202
+ /** GetTocTreeParams represents the URL parameters of getTocTree */
203
+ export interface DtoGetTocTreeParams {
204
+ lang: string;
205
+ enterprise: string;
206
+ prdCat: string;
207
+ prdCatVersion: string;
208
+ vendor: string;
209
+ priceList: string;
210
+ }
211
+ /** Level */
212
+ export interface DtoLevel {
213
+ code: string;
214
+ description: string;
215
+ lvls?: Array<DtoLevel>;
216
+ prdRefs?: Array<DtoLevelProductRef>;
217
+ }
218
+ /** LevelProductRef */
219
+ export interface DtoLevelProductRef {
220
+ prdRef: string;
221
+ }
222
+ /** Measurement */
223
+ export interface DtoMeasurement {
224
+ code: string;
225
+ numericValue?: DtoValueWithUnit;
226
+ measureParam?: DtoMeasureParam;
227
+ }
228
+ /** MeasureParam */
229
+ export interface DtoMeasureParam {
230
+ code: string;
231
+ anchorPoint?: string;
232
+ measurePriority?: Array<DtoMeasurePriority>;
233
+ }
234
+ /** MeasurePriority */
235
+ export interface DtoMeasurePriority {
236
+ url: string;
237
+ }
238
+ /** Model */
239
+ export interface DtoModel {
240
+ cid: number;
241
+ anchor?: DtoMeasureParam;
242
+ t?: DtoTransform;
243
+ uri: string;
244
+ }
245
+ /** MtrlApplication */
246
+ export interface DtoMtrlApplication {
247
+ areas?: Array<string>;
248
+ material?: string;
249
+ preview?: string;
250
+ cid?: number;
251
+ }
252
+ /** Option */
253
+ export interface DtoOption {
254
+ additionalProductRefs?: Array<DtoAdditionalProductRef>;
255
+ code: string;
256
+ description: string;
257
+ featureRefs?: Array<DtoFeatureRef>;
258
+ material?: string;
259
+ mtrlApplications?: Array<DtoMtrlApplication>;
260
+ codeRanges?: Array<DtoCodeRange>;
261
+ upcharge?: number;
262
+ priceCodes?: Array<string>;
263
+ }
264
+ /** Orientation */
265
+ export interface DtoOrientation {
266
+ yaw: number;
267
+ pitch: number;
268
+ roll: number;
269
+ }
270
+ /** PartsData */
271
+ export interface DtoPartsData {
272
+ basePrice: number;
273
+ currency: string;
274
+ rounding?: number;
275
+ listPrice: number;
276
+ pkgCount: number;
277
+ selOptions: Array<DtoPartsSelectedOption>;
278
+ styleNr: string;
279
+ prices?: DtoPrices;
280
+ }
281
+ /** PartsSelectedOption */
282
+ export interface DtoPartsSelectedOption {
283
+ code: string;
284
+ numericValue?: DtoValueWithUnit;
285
+ description?: string;
286
+ feature: string;
287
+ featDesc: string;
288
+ upcharge?: number;
289
+ next?: {
290
+ [index: string]: DtoPartsSelectedOption;
291
+ };
292
+ }
293
+ /** Point */
294
+ export interface DtoPoint {
295
+ x: number;
296
+ y: number;
297
+ z: number;
298
+ }
299
+ /** PostExportParams represents the URL parameters of postExport */
300
+ export interface DtoPostExportParams {
301
+ lang: string;
302
+ enterprise: string;
303
+ prdCat: string;
304
+ prdCatVersion: string;
305
+ vendor: string;
306
+ priceList: string;
307
+ partNumber: string;
308
+ }
309
+ /** PostPublicAccessTokenAuthorizeParams represents the URL parameters of postPublicAccessTokenAuthorize */
310
+ export interface DtoPostPublicAccessTokenAuthorizeParams {
311
+ accessTokenId: string;
312
+ }
313
+ /** PostRenderParams represents the URL parameters of postRender */
314
+ export interface DtoPostRenderParams {
315
+ lang: string;
316
+ enterprise: string;
317
+ prdCat: string;
318
+ prdCatVersion: string;
319
+ vendor: string;
320
+ priceList: string;
321
+ partNumber: string;
322
+ }
323
+ /** PostValidateParams represents the URL parameters of postValidate */
324
+ export interface DtoPostValidateParams {
325
+ lang: string;
326
+ enterprise: string;
327
+ prdCat: string;
328
+ prdCatVersion: string;
329
+ vendor: string;
330
+ priceList: string;
331
+ partNumber: string;
332
+ }
333
+ /** PriceList */
334
+ export interface DtoPriceList {
335
+ code: string;
336
+ currency: string;
337
+ desc: string;
338
+ rate: number;
339
+ rounding: number;
340
+ }
341
+ /** PriceListsResponse */
342
+ export interface DtoPriceListsResponse {
343
+ priceLists: Array<DtoPriceList>;
344
+ uuid: string;
345
+ }
346
+ /** Prices */
347
+ export interface DtoPrices {
348
+ values: {
349
+ [index: string]: number;
350
+ };
351
+ parent?: DtoPrices;
352
+ }
353
+ /** ProductCatalogueInfo */
354
+ export interface DtoProductCatalogueInfo {
355
+ catDesc: string;
356
+ catName: string;
357
+ currency: string;
358
+ currencyRound: number;
359
+ exchangeRate: number;
360
+ lastModified: string;
361
+ }
362
+ /** ProductData */
363
+ export interface DtoProductData {
364
+ area?: string;
365
+ categories?: Array<DtoCategoryMap>;
366
+ depth?: string;
367
+ description?: string;
368
+ height?: string;
369
+ hideIfMainProduct?: boolean;
370
+ hideIfAdditionalProduct?: boolean;
371
+ length?: string;
372
+ mtrlApplications?: Array<DtoMtrlApplication>;
373
+ additionalProductRefs?: Array<DtoAdditionalProductRef>;
374
+ navImage?: string;
375
+ sku: string;
376
+ measurements?: Array<DtoMeasurement>;
377
+ tags?: Array<{
378
+ [index: string]: string;
379
+ }>;
380
+ volume?: string;
381
+ weight?: string;
382
+ width?: string;
383
+ models?: Array<DtoModel>;
384
+ partsData: DtoPartsData;
385
+ }
386
+ /** ProductParams */
387
+ export interface DtoProductParams extends DtoCatalogueParams {
388
+ partNumber: string;
389
+ }
390
+ /** ProductParamsWithLang */
391
+ export interface DtoProductParamsWithLang extends DtoProductParams {
392
+ lang: string;
393
+ }
394
+ /** ProductRef */
395
+ export interface DtoProductRef {
396
+ basePrice: number;
397
+ categories?: Array<DtoCategoryMap>;
398
+ descLong: string;
399
+ descShort: string;
400
+ navImage: string;
401
+ omitOnOrder: boolean;
402
+ partNr: string;
403
+ styleNr?: string;
404
+ }
405
+ /** ProductResponse */
406
+ export interface DtoProductResponse {
407
+ rootFeatureRefs: Array<DtoFeatureRef>;
408
+ features: Array<DtoFeature>;
409
+ productData: DtoProductData;
410
+ unit: string;
411
+ uuid: string;
412
+ }
413
+ /** RefreshSessionTokenResponse */
414
+ export interface DtoRefreshSessionTokenResponse {
415
+ apiSession: DtoCatalogueAPISession;
416
+ }
417
+ /** RenderFormat */
418
+ export declare type DtoRenderFormat = "jpg" | "png";
419
+ export declare const dtoRenderFormatNames: DtoRenderFormat[];
420
+ /** RenderRequest */
421
+ export interface DtoRenderRequest {
422
+ width: number;
423
+ height: number;
424
+ format?: DtoRenderFormat;
425
+ targetCameraArgs?: DtoTargetCameraArgs;
426
+ selOptions: Array<DtoSelectedOption>;
427
+ additionalProducts?: Array<DtoAdditionalProductConfiguration>;
428
+ }
429
+ /** RenderResponse */
430
+ export interface DtoRenderResponse {
431
+ renderStatus: DtoRenderStatus;
432
+ }
433
+ /** RenderStatus */
434
+ export interface DtoRenderStatus {
435
+ created: string;
436
+ modified: string;
437
+ status: DtoRenderStatusStatus;
438
+ url?: string;
439
+ uuid: string;
440
+ }
441
+ /** RenderStatusStatus - WIP */
442
+ export declare type DtoRenderStatusStatus = "pending" | "running" | "finished" | "failed";
443
+ export declare const dtoRenderStatusStatusNames: DtoRenderStatusStatus[];
444
+ /** SelectedOption */
445
+ export interface DtoSelectedOption {
446
+ code: string;
447
+ numericValue?: DtoValueWithUnit;
448
+ next?: {
449
+ [index: string]: DtoSelectedOption;
450
+ };
451
+ }
452
+ /** SuccessResponse */
453
+ export interface DtoSuccessResponse {
454
+ uuid: string;
455
+ success: boolean;
456
+ }
457
+ /** SyncGroup */
458
+ export interface DtoSyncGroup {
459
+ syncGroupCode: string;
460
+ syncMethod: DtoSyncGroupMethods;
461
+ }
462
+ /** SyncGroupMethods */
463
+ export declare type DtoSyncGroupMethods = "pull" | "push" | "twoWay";
464
+ export declare const dtoSyncGroupMethodsNames: DtoSyncGroupMethods[];
465
+ /** TargetCameraArgs */
466
+ export interface DtoTargetCameraArgs {
467
+ location?: DtoPoint;
468
+ target?: DtoPoint;
469
+ direction?: DtoVector;
470
+ normal?: DtoVector;
471
+ yaw?: number;
472
+ pitch?: number;
473
+ roll?: number;
474
+ fov?: number;
475
+ nearClip?: number;
476
+ minHeight?: number;
477
+ }
478
+ /** TOCResponse - Table Of Contents */
479
+ export interface DtoTOCResponse {
480
+ uuid: string;
481
+ prdRefs?: Array<DtoProductRef>;
482
+ prdCatInfo: DtoProductCatalogueInfo;
483
+ lvls?: Array<DtoLevel>;
484
+ }
485
+ /** Transform */
486
+ export interface DtoTransform {
487
+ pos: DtoVector;
488
+ scale: DtoVector;
489
+ rot: DtoOrientation;
490
+ }
491
+ /** ValidateRequest */
492
+ export interface DtoValidateRequest {
493
+ selOptions: Array<DtoSelectedOption>;
494
+ }
495
+ /** ValidateResponse */
496
+ export interface DtoValidateResponse {
497
+ productData: DtoProductData;
498
+ uuid: string;
499
+ validated: boolean;
500
+ rootFeatureRefs?: Array<DtoFeatureRef>;
501
+ }
502
+ /** ValueWithUnit */
503
+ export interface DtoValueWithUnit {
504
+ value: number;
505
+ unit?: string;
506
+ }
507
+ /** Vector */
508
+ export interface DtoVector {
509
+ x: number;
510
+ y: number;
511
+ z: number;
512
+ }
513
+ export declare type DtoRequestOptions = {
514
+ method: "POST" | "GET" | "DELETE";
515
+ headers: {
516
+ [index: string]: string;
517
+ };
518
+ body?: string;
519
+ };
520
+ export declare class DtoAPIError<T> extends Error {
521
+ body?: string;
522
+ error?: Error;
523
+ parsed?: T;
524
+ status?: number;
525
+ }
526
+ declare type FetchFunc = (input: RequestInfo, init?: RequestInit) => Promise<Response>;
527
+ export declare class CatalogueAPI {
528
+ private readonly _fetch;
529
+ auth: DtoAuthorizeResponse | undefined;
530
+ constructor(_fetch?: FetchFunc);
531
+ private _alternativeReferer;
532
+ _saveAlternativeReferer(): void;
533
+ hasFeature(feature: string): boolean;
534
+ fetch<T>(url: string, options: DtoRequestOptions): Promise<T>;
535
+ postPublicAccessTokenAuthorize(params: DtoPostPublicAccessTokenAuthorizeParams, endpoint: string): Promise<DtoAuthorizeResponse>;
536
+ getApplicationAreas(params: DtoGetApplicationAreasParams): Promise<DtoApplicationAreasResponse>;
537
+ postExport(params: DtoPostExportParams, body: DtoExportRequest): Promise<DtoExportResponse>;
538
+ getPriceLists(params: DtoGetPriceListsParams): Promise<DtoPriceListsResponse>;
539
+ getProduct(params: DtoGetProductParams): Promise<DtoProductResponse>;
540
+ postRender(params: DtoPostRenderParams, body: DtoRenderRequest): Promise<DtoRenderResponse>;
541
+ postValidate(params: DtoPostValidateParams, body: DtoValidateRequest): Promise<DtoValidateResponse>;
542
+ getTocTree(params: DtoGetTocTreeParams): Promise<DtoTOCResponse>;
543
+ getTocFlat(params: DtoGetTocFlatParams): Promise<DtoTOCResponse>;
544
+ getExportById(params: DtoGetExportByIdParams): Promise<DtoExportResponse>;
545
+ getRenderById(params: DtoGetRenderByIdParams): Promise<DtoRenderResponse>;
546
+ postSessionTokenRefresh(): Promise<DtoRefreshSessionTokenResponse>;
547
+ }
548
+ export declare const DTO_OPERATION_ID_TO_DEBIT_GROUP: {
549
+ [operation_id: string]: string;
550
+ };
551
+ export {};
508
552
  //# sourceMappingURL=CatalogueAPI.d.ts.map