@configura/web-api 2.4.1-alpha.0 → 3.0.0-alpha.0
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.
- package/dist/CatalogueAPI.d.ts +299 -43
- package/dist/CatalogueAPI.js +16 -47
- package/dist/CfgProduct.d.ts +6 -6
- package/dist/CfgProduct.js +1 -1
- package/dist/CfgReferencePathHelper.d.ts +3 -3
- package/dist/productConfiguration/filters.js +2 -0
- package/dist/productConfiguration/productParamsGenerator.d.ts +3 -3
- package/dist/productLoader.d.ts +3 -3
- package/dist/tasks/TaskHandler.d.ts +2 -2
- package/dist/tests/testData/dummyProductForTest.d.ts +2 -2
- package/dist/utilitiesCatalogueData.d.ts +6 -6
- package/dist/utilitiesCatalogueData.js +2 -1
- package/dist/utilitiesCataloguePermission.d.ts +4 -4
- package/package.json +3 -3
package/dist/CatalogueAPI.d.ts
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
/** AccessTokenFilter */
|
|
2
|
+
export interface DtoAccessTokenFilter {
|
|
3
|
+
cid: number;
|
|
4
|
+
prdCat: string;
|
|
5
|
+
version: string;
|
|
6
|
+
priceList: string;
|
|
7
|
+
vendor: string;
|
|
8
|
+
}
|
|
9
|
+
/** AccessTokenListResponse */
|
|
10
|
+
export interface DtoAccessTokenListResponse {
|
|
11
|
+
tokens: Array<DtoDynamoAccessToken>;
|
|
12
|
+
}
|
|
13
|
+
/** AccessTokenOwner */
|
|
14
|
+
export interface DtoAccessTokenOwner {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
/** AccessTokenOwnerResponse */
|
|
19
|
+
export interface DtoAccessTokenOwnerResponse {
|
|
20
|
+
owner: DtoAccessTokenOwner;
|
|
21
|
+
}
|
|
22
|
+
/** AccessTokenRequest */
|
|
23
|
+
export interface DtoAccessTokenRequest {
|
|
24
|
+
name: string;
|
|
25
|
+
filters: Array<DtoAccessTokenFilter>;
|
|
26
|
+
origins: Array<string>;
|
|
27
|
+
public: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** AccessTokenResponse */
|
|
30
|
+
export interface DtoAccessTokenResponse {
|
|
31
|
+
token: DtoDynamoAccessToken;
|
|
32
|
+
}
|
|
1
33
|
/** AdditionalProductConf */
|
|
2
34
|
export interface DtoAdditionalProductConf extends DtoProductConf {
|
|
3
35
|
refKey: string;
|
|
@@ -38,26 +70,83 @@ export interface DtoAuthorizeResponse {
|
|
|
38
70
|
secretToken: string;
|
|
39
71
|
apiSession: DtoCatalogueAPISession;
|
|
40
72
|
}
|
|
73
|
+
/** CacheFilterType */
|
|
74
|
+
export declare type DtoCacheFilterType = "Contains" | "StartsWith";
|
|
75
|
+
export declare const dtoCacheFilterTypeNames: DtoCacheFilterType[];
|
|
76
|
+
/** CacheKeyData */
|
|
77
|
+
export interface DtoCacheKeyData {
|
|
78
|
+
key: string;
|
|
79
|
+
keyType: string;
|
|
80
|
+
}
|
|
81
|
+
/** CacheManagementResponse */
|
|
82
|
+
export interface DtoCacheManagementResponse {
|
|
83
|
+
keys: Array<DtoCacheKeyData>;
|
|
84
|
+
}
|
|
85
|
+
/** CacheParams */
|
|
86
|
+
export interface DtoCacheParams {
|
|
87
|
+
filterString?: string;
|
|
88
|
+
filterType?: DtoCacheFilterType;
|
|
89
|
+
region: DtoCacheRegion;
|
|
90
|
+
limit?: number;
|
|
91
|
+
}
|
|
92
|
+
/** CacheParamsClearCache */
|
|
93
|
+
export interface DtoCacheParamsClearCache {
|
|
94
|
+
region: DtoCacheRegion;
|
|
95
|
+
keyType: DtoKeyType;
|
|
96
|
+
}
|
|
97
|
+
/** CacheParamsWithKey */
|
|
98
|
+
export interface DtoCacheParamsWithKey {
|
|
99
|
+
region: DtoCacheRegion;
|
|
100
|
+
key: string;
|
|
101
|
+
}
|
|
102
|
+
/** CacheRegion */
|
|
103
|
+
export declare type DtoCacheRegion = "ap" | "eu" | "us";
|
|
104
|
+
export declare const dtoCacheRegionNames: DtoCacheRegion[];
|
|
105
|
+
/** CacheResponse */
|
|
106
|
+
export interface DtoCacheResponse {
|
|
107
|
+
data: string;
|
|
108
|
+
}
|
|
109
|
+
/** CacheValueResponse */
|
|
110
|
+
export interface DtoCacheValueResponse {
|
|
111
|
+
value: {
|
|
112
|
+
[index: string]: string;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/** Catalogue */
|
|
116
|
+
export interface DtoCatalogue {
|
|
117
|
+
dbName: string;
|
|
118
|
+
enterprise: string;
|
|
119
|
+
prdCats?: Array<DtoProductCatalogue>;
|
|
120
|
+
vendors?: Array<string>;
|
|
121
|
+
url?: string;
|
|
122
|
+
modified: number;
|
|
123
|
+
}
|
|
41
124
|
/** CatalogueAPISession */
|
|
42
125
|
export interface DtoCatalogueAPISession {
|
|
43
126
|
expires: string;
|
|
44
127
|
features?: Array<string>;
|
|
45
128
|
permissions?: Array<DtoCataloguePermission>;
|
|
46
129
|
}
|
|
47
|
-
/**
|
|
48
|
-
export interface
|
|
130
|
+
/** CatalogueId */
|
|
131
|
+
export interface DtoCatalogueId {
|
|
132
|
+
cid?: number;
|
|
49
133
|
enterprise: string;
|
|
50
134
|
prdCat: string;
|
|
51
135
|
prdCatVersion: string;
|
|
52
136
|
vendor: string;
|
|
53
137
|
priceList: string;
|
|
54
138
|
}
|
|
55
|
-
/**
|
|
56
|
-
export interface
|
|
139
|
+
/** CatalogueParams */
|
|
140
|
+
export interface DtoCatalogueParams {
|
|
57
141
|
cid: number;
|
|
142
|
+
enterprise: string;
|
|
143
|
+
prdCat: string;
|
|
144
|
+
prdCatVersion: string;
|
|
145
|
+
vendor: string;
|
|
146
|
+
priceList: string;
|
|
58
147
|
}
|
|
59
|
-
/**
|
|
60
|
-
export interface
|
|
148
|
+
/** CatalogueParamsWithLang */
|
|
149
|
+
export interface DtoCatalogueParamsWithLang extends DtoCatalogueParams {
|
|
61
150
|
lang: string;
|
|
62
151
|
}
|
|
63
152
|
/** CataloguePermission */
|
|
@@ -73,12 +162,54 @@ export interface DtoCataloguePermission {
|
|
|
73
162
|
export interface DtoCategoryMap {
|
|
74
163
|
[index: string]: string;
|
|
75
164
|
}
|
|
165
|
+
/** ClearCacheKeysResponse */
|
|
166
|
+
export interface DtoClearCacheKeysResponse {
|
|
167
|
+
data: Array<string>;
|
|
168
|
+
}
|
|
76
169
|
/** CodeRange */
|
|
77
170
|
export interface DtoCodeRange {
|
|
78
171
|
minValue: number;
|
|
79
172
|
maxValue: number;
|
|
80
173
|
increment?: number;
|
|
81
174
|
}
|
|
175
|
+
/** CreateAccessTokenResponse */
|
|
176
|
+
export interface DtoCreateAccessTokenResponse {
|
|
177
|
+
token: DtoDynamoAccessToken;
|
|
178
|
+
secretToken: string;
|
|
179
|
+
}
|
|
180
|
+
/** DailyUsage */
|
|
181
|
+
export interface DtoDailyUsage extends DtoDynamoObject {
|
|
182
|
+
data?: {
|
|
183
|
+
[index: string]: {
|
|
184
|
+
[index: string]: number;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/** DynamoAccessToken - Is used to authorize new SessionTokens */
|
|
189
|
+
export interface DtoDynamoAccessToken extends DtoDynamoObject {
|
|
190
|
+
cataloguePermissions?: Array<DtoCataloguePermission>;
|
|
191
|
+
expires: string;
|
|
192
|
+
features?: Array<string>;
|
|
193
|
+
filters?: Array<DtoAccessTokenFilter>;
|
|
194
|
+
name?: string;
|
|
195
|
+
public?: boolean;
|
|
196
|
+
inactive?: boolean;
|
|
197
|
+
inactiveToggleTimestamp: string;
|
|
198
|
+
origins?: Array<string>;
|
|
199
|
+
}
|
|
200
|
+
/** DynamoObject - Common properties that are shared between all objects we put into DynamoDB */
|
|
201
|
+
export interface DtoDynamoObject {
|
|
202
|
+
pk: string;
|
|
203
|
+
sk: string;
|
|
204
|
+
it: string;
|
|
205
|
+
cr: string;
|
|
206
|
+
mo: string;
|
|
207
|
+
ow: string;
|
|
208
|
+
ttl: number;
|
|
209
|
+
}
|
|
210
|
+
/** EmptyResponse */
|
|
211
|
+
export interface DtoEmptyResponse {
|
|
212
|
+
}
|
|
82
213
|
/** ErrorResponse */
|
|
83
214
|
export interface DtoErrorResponse {
|
|
84
215
|
error: string;
|
|
@@ -145,6 +276,7 @@ export interface DtoFeatureRef {
|
|
|
145
276
|
}
|
|
146
277
|
/** GetApplicationAreasParams represents the URL parameters of getApplicationAreas */
|
|
147
278
|
export interface DtoGetApplicationAreasParams {
|
|
279
|
+
cid: number;
|
|
148
280
|
lang: string;
|
|
149
281
|
enterprise: string;
|
|
150
282
|
prdCat: string;
|
|
@@ -158,6 +290,7 @@ export interface DtoGetExportByIdParams {
|
|
|
158
290
|
}
|
|
159
291
|
/** GetPriceListsParams represents the URL parameters of getPriceLists */
|
|
160
292
|
export interface DtoGetPriceListsParams {
|
|
293
|
+
cid: number;
|
|
161
294
|
lang: string;
|
|
162
295
|
enterprise: string;
|
|
163
296
|
prdCat: string;
|
|
@@ -165,18 +298,9 @@ export interface DtoGetPriceListsParams {
|
|
|
165
298
|
vendor: string;
|
|
166
299
|
priceList: string;
|
|
167
300
|
}
|
|
168
|
-
/** GetProductLegacyV2Params represents the URL parameters of getProductLegacyV2 */
|
|
169
|
-
export interface DtoGetProductLegacyV2Params {
|
|
170
|
-
lang: string;
|
|
171
|
-
enterprise: string;
|
|
172
|
-
prdCat: string;
|
|
173
|
-
prdCatVersion: string;
|
|
174
|
-
vendor: string;
|
|
175
|
-
priceList: string;
|
|
176
|
-
partNumber: string;
|
|
177
|
-
}
|
|
178
301
|
/** GetProductParams represents the URL parameters of getProduct */
|
|
179
302
|
export interface DtoGetProductParams {
|
|
303
|
+
cid: number;
|
|
180
304
|
lang: string;
|
|
181
305
|
enterprise: string;
|
|
182
306
|
prdCat: string;
|
|
@@ -191,6 +315,7 @@ export interface DtoGetRenderByIdParams {
|
|
|
191
315
|
}
|
|
192
316
|
/** GetTocFlatParams represents the URL parameters of getTocFlat */
|
|
193
317
|
export interface DtoGetTocFlatParams {
|
|
318
|
+
cid: number;
|
|
194
319
|
lang: string;
|
|
195
320
|
enterprise: string;
|
|
196
321
|
prdCat: string;
|
|
@@ -200,6 +325,7 @@ export interface DtoGetTocFlatParams {
|
|
|
200
325
|
}
|
|
201
326
|
/** GetTocTreeParams represents the URL parameters of getTocTree */
|
|
202
327
|
export interface DtoGetTocTreeParams {
|
|
328
|
+
cid: number;
|
|
203
329
|
lang: string;
|
|
204
330
|
enterprise: string;
|
|
205
331
|
prdCat: string;
|
|
@@ -207,6 +333,30 @@ export interface DtoGetTocTreeParams {
|
|
|
207
333
|
vendor: string;
|
|
208
334
|
priceList: string;
|
|
209
335
|
}
|
|
336
|
+
/** HourlyUsage */
|
|
337
|
+
export interface DtoHourlyUsage extends DtoDynamoObject {
|
|
338
|
+
data?: {
|
|
339
|
+
[index: string]: {
|
|
340
|
+
[index: string]: number;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
/** InternalAuth */
|
|
345
|
+
export interface DtoInternalAuth {
|
|
346
|
+
endpoint: string;
|
|
347
|
+
features?: Array<string>;
|
|
348
|
+
secretToken: string;
|
|
349
|
+
}
|
|
350
|
+
/** InternalCatalogueAPISession */
|
|
351
|
+
export interface DtoInternalCatalogueAPISession {
|
|
352
|
+
expires: string;
|
|
353
|
+
features?: Array<string>;
|
|
354
|
+
user: DtoUser;
|
|
355
|
+
sessionId: string;
|
|
356
|
+
}
|
|
357
|
+
/** KeyType */
|
|
358
|
+
export declare type DtoKeyType = "Production" | "Test" | "RateLimitTest" | "RateLimitProduction";
|
|
359
|
+
export declare const dtoKeyTypeNames: DtoKeyType[];
|
|
210
360
|
/** Level */
|
|
211
361
|
export interface DtoLevel {
|
|
212
362
|
code: string;
|
|
@@ -218,6 +368,26 @@ export interface DtoLevel {
|
|
|
218
368
|
export interface DtoLevelProductRef {
|
|
219
369
|
prdRef: string;
|
|
220
370
|
}
|
|
371
|
+
/** ListCataloguesResponse */
|
|
372
|
+
export interface DtoListCataloguesResponse {
|
|
373
|
+
cataloguePermissions: Array<DtoCataloguePermission>;
|
|
374
|
+
}
|
|
375
|
+
/** LoginRequest */
|
|
376
|
+
export interface DtoLoginRequest {
|
|
377
|
+
email: string;
|
|
378
|
+
password: string;
|
|
379
|
+
}
|
|
380
|
+
/** LoginResponse */
|
|
381
|
+
export interface DtoLoginResponse {
|
|
382
|
+
endpoint: string;
|
|
383
|
+
secretToken: string;
|
|
384
|
+
session: DtoInternalCatalogueAPISession;
|
|
385
|
+
auth: DtoAuthorizeResponse;
|
|
386
|
+
}
|
|
387
|
+
/** LogoutResponse */
|
|
388
|
+
export interface DtoLogoutResponse {
|
|
389
|
+
success: boolean;
|
|
390
|
+
}
|
|
221
391
|
/** Measurement */
|
|
222
392
|
export interface DtoMeasurement {
|
|
223
393
|
code: string;
|
|
@@ -326,14 +496,40 @@ export interface DtoPartsSelectedOption {
|
|
|
326
496
|
[index: string]: DtoPartsSelectedOption;
|
|
327
497
|
};
|
|
328
498
|
}
|
|
499
|
+
/** PData */
|
|
500
|
+
export interface DtoPData {
|
|
501
|
+
catId: DtoCatalogueId;
|
|
502
|
+
partNumber: string;
|
|
503
|
+
selOptions?: Array<DtoSelectedOption>;
|
|
504
|
+
}
|
|
505
|
+
/** PDataWithAdditionalProducts */
|
|
506
|
+
export interface DtoPDataWithAdditionalProducts {
|
|
507
|
+
catId: DtoCatalogueId;
|
|
508
|
+
partNumber: string;
|
|
509
|
+
selOptions?: Array<DtoSelectedOption>;
|
|
510
|
+
additionalProducts?: Array<DtoAdditionalProductConfiguration>;
|
|
511
|
+
}
|
|
329
512
|
/** Point */
|
|
330
513
|
export interface DtoPoint {
|
|
331
514
|
x: number;
|
|
332
515
|
y: number;
|
|
333
516
|
z: number;
|
|
334
517
|
}
|
|
518
|
+
/** Portfolio */
|
|
519
|
+
export interface DtoPortfolio extends DtoDynamoObject {
|
|
520
|
+
debug?: boolean;
|
|
521
|
+
urls?: Array<DtoPortfolioUrlDatabaseUrl>;
|
|
522
|
+
catalogues?: Array<DtoCatalogue>;
|
|
523
|
+
}
|
|
524
|
+
/** PortfolioUrlDatabaseUrl */
|
|
525
|
+
export interface DtoPortfolioUrlDatabaseUrl {
|
|
526
|
+
cid: number;
|
|
527
|
+
modified: number;
|
|
528
|
+
url: string;
|
|
529
|
+
}
|
|
335
530
|
/** PostExportParams represents the URL parameters of postExport */
|
|
336
531
|
export interface DtoPostExportParams {
|
|
532
|
+
cid: number;
|
|
337
533
|
lang: string;
|
|
338
534
|
enterprise: string;
|
|
339
535
|
prdCat: string;
|
|
@@ -348,6 +544,7 @@ export interface DtoPostPublicAccessTokenAuthorizeParams {
|
|
|
348
544
|
}
|
|
349
545
|
/** PostRenderParams represents the URL parameters of postRender */
|
|
350
546
|
export interface DtoPostRenderParams {
|
|
547
|
+
cid: number;
|
|
351
548
|
lang: string;
|
|
352
549
|
enterprise: string;
|
|
353
550
|
prdCat: string;
|
|
@@ -356,18 +553,14 @@ export interface DtoPostRenderParams {
|
|
|
356
553
|
priceList: string;
|
|
357
554
|
partNumber: string;
|
|
358
555
|
}
|
|
359
|
-
/**
|
|
360
|
-
export interface
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
prdCat: string;
|
|
364
|
-
prdCatVersion: string;
|
|
365
|
-
vendor: string;
|
|
366
|
-
priceList: string;
|
|
367
|
-
partNumber: string;
|
|
556
|
+
/** PostUsageByDateResponse */
|
|
557
|
+
export interface DtoPostUsageByDateResponse {
|
|
558
|
+
date: string;
|
|
559
|
+
usage?: Array<DtoHourlyUsage>;
|
|
368
560
|
}
|
|
369
561
|
/** PostValidateParams represents the URL parameters of postValidate */
|
|
370
562
|
export interface DtoPostValidateParams {
|
|
563
|
+
cid: number;
|
|
371
564
|
lang: string;
|
|
372
565
|
enterprise: string;
|
|
373
566
|
prdCat: string;
|
|
@@ -396,6 +589,12 @@ export interface DtoPrices {
|
|
|
396
589
|
};
|
|
397
590
|
parent?: DtoPrices;
|
|
398
591
|
}
|
|
592
|
+
/** ProductCatalogue */
|
|
593
|
+
export interface DtoProductCatalogue {
|
|
594
|
+
code: string;
|
|
595
|
+
version: string;
|
|
596
|
+
priceLists?: Array<string>;
|
|
597
|
+
}
|
|
399
598
|
/** ProductCatalogueInfo */
|
|
400
599
|
export interface DtoProductCatalogueInfo {
|
|
401
600
|
catDesc: string;
|
|
@@ -409,7 +608,7 @@ export interface DtoProductCatalogueInfo {
|
|
|
409
608
|
export interface DtoProductConf {
|
|
410
609
|
features?: Array<DtoFeatureConf>;
|
|
411
610
|
additionalProducts?: Array<DtoAdditionalProductConf>;
|
|
412
|
-
prodParams?:
|
|
611
|
+
prodParams?: DtoProductParamsWithLang;
|
|
413
612
|
syncGroupState?: DtoSyncGroupState;
|
|
414
613
|
}
|
|
415
614
|
/** ProductData */
|
|
@@ -438,12 +637,12 @@ export interface DtoProductData {
|
|
|
438
637
|
noteRefs?: Array<string>;
|
|
439
638
|
miscFiles?: Array<DtoMiscFile>;
|
|
440
639
|
}
|
|
441
|
-
/**
|
|
442
|
-
export interface
|
|
640
|
+
/** ProductParams */
|
|
641
|
+
export interface DtoProductParams extends DtoCatalogueParams {
|
|
443
642
|
partNumber: string;
|
|
444
643
|
}
|
|
445
|
-
/**
|
|
446
|
-
export interface
|
|
644
|
+
/** ProductParamsWithLang */
|
|
645
|
+
export interface DtoProductParamsWithLang extends DtoProductParams {
|
|
447
646
|
lang: string;
|
|
448
647
|
}
|
|
449
648
|
/** ProductRef */
|
|
@@ -497,6 +696,14 @@ export interface DtoRenderStatus {
|
|
|
497
696
|
/** RenderStatusStatus - WIP */
|
|
498
697
|
export declare type DtoRenderStatusStatus = "pending" | "running" | "finished" | "failed";
|
|
499
698
|
export declare const dtoRenderStatusStatusNames: DtoRenderStatusStatus[];
|
|
699
|
+
/** RequestData */
|
|
700
|
+
export interface DtoRequestData extends DtoDynamoObject {
|
|
701
|
+
ip: string;
|
|
702
|
+
operationId: string;
|
|
703
|
+
path: string;
|
|
704
|
+
requestId: string;
|
|
705
|
+
requesterId: string;
|
|
706
|
+
}
|
|
500
707
|
/** SelectedOption */
|
|
501
708
|
export interface DtoSelectedOption {
|
|
502
709
|
code: string;
|
|
@@ -505,6 +712,12 @@ export interface DtoSelectedOption {
|
|
|
505
712
|
[index: string]: DtoSelectedOption;
|
|
506
713
|
};
|
|
507
714
|
}
|
|
715
|
+
/** SessionToken - Is used to query the catalogue api */
|
|
716
|
+
export interface DtoSessionToken extends DtoDynamoObject {
|
|
717
|
+
cataloguePermissions?: Array<DtoCataloguePermission>;
|
|
718
|
+
expires: string;
|
|
719
|
+
features?: Array<string>;
|
|
720
|
+
}
|
|
508
721
|
/** SuccessResponse */
|
|
509
722
|
export interface DtoSuccessResponse {
|
|
510
723
|
uuid: string;
|
|
@@ -558,26 +771,71 @@ export interface DtoTransform {
|
|
|
558
771
|
scale: DtoVector;
|
|
559
772
|
rot: DtoOrientation;
|
|
560
773
|
}
|
|
774
|
+
/** UsageByDateResponse */
|
|
775
|
+
export interface DtoUsageByDateResponse {
|
|
776
|
+
date: string;
|
|
777
|
+
usage?: Array<DtoHourlyUsage>;
|
|
778
|
+
}
|
|
779
|
+
/** UsageByMonthResponse */
|
|
780
|
+
export interface DtoUsageByMonthResponse {
|
|
781
|
+
date: string;
|
|
782
|
+
usage?: Array<DtoDailyUsage>;
|
|
783
|
+
}
|
|
784
|
+
/** UsageByOperationByPath */
|
|
785
|
+
export interface DtoUsageByOperationByPath {
|
|
786
|
+
[index: string]: {
|
|
787
|
+
[index: string]: number;
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
/** UsageByOperationByPathWithModified */
|
|
791
|
+
export interface DtoUsageByOperationByPathWithModified {
|
|
792
|
+
modified: string;
|
|
793
|
+
data: DtoUsageByOperationByPath;
|
|
794
|
+
}
|
|
795
|
+
/** UsageByOperationResponse */
|
|
796
|
+
export interface DtoUsageByOperationResponse {
|
|
797
|
+
date: string;
|
|
798
|
+
usage: {
|
|
799
|
+
[index: string]: number;
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
/** UsageByTimeUnitByOperationByPath */
|
|
803
|
+
export interface DtoUsageByTimeUnitByOperationByPath {
|
|
804
|
+
[index: string]: DtoUsageByOperationByPathWithModified;
|
|
805
|
+
}
|
|
806
|
+
/** UsageByTimeUnitResponse */
|
|
807
|
+
export interface DtoUsageByTimeUnitResponse {
|
|
808
|
+
date: string;
|
|
809
|
+
timeUnit: DtoUsageTimeUnit;
|
|
810
|
+
usage: DtoUsageByTimeUnitByOperationByPath;
|
|
811
|
+
}
|
|
812
|
+
/** UsageTimeUnit */
|
|
813
|
+
export declare type DtoUsageTimeUnit = "day" | "hour";
|
|
814
|
+
export declare const dtoUsageTimeUnitNames: DtoUsageTimeUnit[];
|
|
815
|
+
/** User */
|
|
816
|
+
export interface DtoUser {
|
|
817
|
+
id: number;
|
|
818
|
+
email: string;
|
|
819
|
+
name: string;
|
|
820
|
+
}
|
|
821
|
+
/** UserResponse */
|
|
822
|
+
export interface DtoUserResponse {
|
|
823
|
+
user: DtoUser;
|
|
824
|
+
}
|
|
561
825
|
/** ValidateRequest */
|
|
562
|
-
export interface DtoValidateRequest
|
|
826
|
+
export interface DtoValidateRequest {
|
|
563
827
|
knownFeatureCodes: Array<string>;
|
|
564
|
-
}
|
|
565
|
-
/** ValidateRequestLegacyV1 */
|
|
566
|
-
export interface DtoValidateRequestLegacyV1 {
|
|
567
828
|
selOptions: Array<DtoSelectedOption>;
|
|
568
829
|
}
|
|
569
830
|
/** ValidateResponse */
|
|
570
|
-
export interface DtoValidateResponse
|
|
571
|
-
features: Array<DtoFeature>;
|
|
572
|
-
unit: string;
|
|
573
|
-
notes?: Array<DtoNote>;
|
|
574
|
-
}
|
|
575
|
-
/** ValidateResponseLegacyV1 */
|
|
576
|
-
export interface DtoValidateResponseLegacyV1 {
|
|
831
|
+
export interface DtoValidateResponse {
|
|
577
832
|
productData: DtoProductData;
|
|
578
833
|
uuid: string;
|
|
579
834
|
validated: boolean;
|
|
580
835
|
rootFeatureRefs?: Array<DtoFeatureRef>;
|
|
836
|
+
features: Array<DtoFeature>;
|
|
837
|
+
unit: string;
|
|
838
|
+
notes?: Array<DtoNote>;
|
|
581
839
|
}
|
|
582
840
|
/** ValueWithUnit */
|
|
583
841
|
export interface DtoValueWithUnit {
|
|
@@ -616,10 +874,8 @@ export declare class CatalogueAPI {
|
|
|
616
874
|
getApplicationAreas(params: DtoGetApplicationAreasParams): Promise<DtoApplicationAreasResponse>;
|
|
617
875
|
postExport(params: DtoPostExportParams, body: DtoExportRequest): Promise<DtoExportResponse>;
|
|
618
876
|
getPriceLists(params: DtoGetPriceListsParams): Promise<DtoPriceListsResponse>;
|
|
619
|
-
getProductLegacyV2(params: DtoGetProductLegacyV2Params): Promise<DtoProductResponse>;
|
|
620
877
|
getProduct(params: DtoGetProductParams): Promise<DtoProductResponse>;
|
|
621
878
|
postRender(params: DtoPostRenderParams, body: DtoRenderRequest): Promise<DtoRenderResponse>;
|
|
622
|
-
postValidateLegacyV1(params: DtoPostValidateLegacyV1Params, body: DtoValidateRequestLegacyV1): Promise<DtoValidateResponseLegacyV1>;
|
|
623
879
|
postValidate(params: DtoPostValidateParams, body: DtoValidateRequest): Promise<DtoValidateResponse>;
|
|
624
880
|
getTocTree(params: DtoGetTocTreeParams): Promise<DtoTOCResponse>;
|
|
625
881
|
getTocFlat(params: DtoGetTocFlatParams): Promise<DtoTOCResponse>;
|
package/dist/CatalogueAPI.js
CHANGED
|
@@ -12,12 +12,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
import packageInfo from "../package.json";
|
|
15
|
+
export const dtoCacheFilterTypeNames = ["Contains", "StartsWith"];
|
|
16
|
+
export const dtoCacheRegionNames = ["ap", "eu", "us"];
|
|
15
17
|
export const dtoExportFormatNames = ["glb", "gltf", "fbx", "dwg", "cmdrw", "cmfav", "cmsym"];
|
|
16
18
|
export const dtoExportStatusStatusNames = ["pending", "running", "finished", "failed"];
|
|
19
|
+
export const dtoKeyTypeNames = ["Production", "Test", "RateLimitTest", "RateLimitProduction"];
|
|
17
20
|
export const dtoNoteSeverityNames = ["Information", "Critical", "Warning"];
|
|
18
21
|
export const dtoRenderFormatNames = ["jpg", "png"];
|
|
19
22
|
export const dtoRenderStatusStatusNames = ["pending", "running", "finished", "failed"];
|
|
20
23
|
export const dtoSyncGroupMethodsNames = ["pull", "push", "twoWay"];
|
|
24
|
+
export const dtoUsageTimeUnitNames = ["day", "hour"];
|
|
21
25
|
export class DtoAPIError extends Error {
|
|
22
26
|
}
|
|
23
27
|
export class CatalogueAPI {
|
|
@@ -71,7 +75,7 @@ export class CatalogueAPI {
|
|
|
71
75
|
}
|
|
72
76
|
postPublicAccessTokenAuthorize(params, endpoint) {
|
|
73
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const url = `/
|
|
78
|
+
const url = `/v2/access-token/public/${encodeURIComponent(params.accessTokenId)}/authorize`;
|
|
75
79
|
const options = {
|
|
76
80
|
method: "POST",
|
|
77
81
|
headers: { "X-SDK-Version": packageInfo.version },
|
|
@@ -87,7 +91,7 @@ export class CatalogueAPI {
|
|
|
87
91
|
if (this.auth === undefined) {
|
|
88
92
|
throw new Error("missing auth");
|
|
89
93
|
}
|
|
90
|
-
const url = `/
|
|
94
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/application-areas`;
|
|
91
95
|
const options = {
|
|
92
96
|
method: "GET",
|
|
93
97
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -103,7 +107,7 @@ export class CatalogueAPI {
|
|
|
103
107
|
if (this.auth === undefined) {
|
|
104
108
|
throw new Error("missing auth");
|
|
105
109
|
}
|
|
106
|
-
const url = `/
|
|
110
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/export/${encodeURIComponent(params.partNumber)}`;
|
|
107
111
|
const options = {
|
|
108
112
|
method: "POST",
|
|
109
113
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -120,23 +124,7 @@ export class CatalogueAPI {
|
|
|
120
124
|
if (this.auth === undefined) {
|
|
121
125
|
throw new Error("missing auth");
|
|
122
126
|
}
|
|
123
|
-
const url = `/
|
|
124
|
-
const options = {
|
|
125
|
-
method: "GET",
|
|
126
|
-
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
127
|
-
};
|
|
128
|
-
if (this._alternativeReferer) {
|
|
129
|
-
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
130
|
-
}
|
|
131
|
-
return this.fetch(this.auth.endpoint + url, options);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
getProductLegacyV2(params) {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
if (this.auth === undefined) {
|
|
137
|
-
throw new Error("missing auth");
|
|
138
|
-
}
|
|
139
|
-
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product-v2/${encodeURIComponent(params.partNumber)}`;
|
|
127
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/price-lists`;
|
|
140
128
|
const options = {
|
|
141
129
|
method: "GET",
|
|
142
130
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -152,7 +140,7 @@ export class CatalogueAPI {
|
|
|
152
140
|
if (this.auth === undefined) {
|
|
153
141
|
throw new Error("missing auth");
|
|
154
142
|
}
|
|
155
|
-
const url = `/
|
|
143
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}`;
|
|
156
144
|
const options = {
|
|
157
145
|
method: "GET",
|
|
158
146
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -168,24 +156,7 @@ export class CatalogueAPI {
|
|
|
168
156
|
if (this.auth === undefined) {
|
|
169
157
|
throw new Error("missing auth");
|
|
170
158
|
}
|
|
171
|
-
const url = `/
|
|
172
|
-
const options = {
|
|
173
|
-
method: "POST",
|
|
174
|
-
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
175
|
-
body: JSON.stringify(body),
|
|
176
|
-
};
|
|
177
|
-
if (this._alternativeReferer) {
|
|
178
|
-
options.headers["Alternative-Referer"] = this._alternativeReferer;
|
|
179
|
-
}
|
|
180
|
-
return this.fetch(this.auth.endpoint + url, options);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
postValidateLegacyV1(params, body) {
|
|
184
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
-
if (this.auth === undefined) {
|
|
186
|
-
throw new Error("missing auth");
|
|
187
|
-
}
|
|
188
|
-
const url = `/v1/catalogue/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}/validate`;
|
|
159
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}/render`;
|
|
189
160
|
const options = {
|
|
190
161
|
method: "POST",
|
|
191
162
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -202,7 +173,7 @@ export class CatalogueAPI {
|
|
|
202
173
|
if (this.auth === undefined) {
|
|
203
174
|
throw new Error("missing auth");
|
|
204
175
|
}
|
|
205
|
-
const url = `/
|
|
176
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/product/${encodeURIComponent(params.partNumber)}/validate`;
|
|
206
177
|
const options = {
|
|
207
178
|
method: "POST",
|
|
208
179
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -219,7 +190,7 @@ export class CatalogueAPI {
|
|
|
219
190
|
if (this.auth === undefined) {
|
|
220
191
|
throw new Error("missing auth");
|
|
221
192
|
}
|
|
222
|
-
const url = `/
|
|
193
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/toc`;
|
|
223
194
|
const options = {
|
|
224
195
|
method: "GET",
|
|
225
196
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -235,7 +206,7 @@ export class CatalogueAPI {
|
|
|
235
206
|
if (this.auth === undefined) {
|
|
236
207
|
throw new Error("missing auth");
|
|
237
208
|
}
|
|
238
|
-
const url = `/
|
|
209
|
+
const url = `/v2/catalogue/${encodeURIComponent(params.cid)}/${encodeURIComponent(params.lang)}/${encodeURIComponent(params.enterprise)}/${encodeURIComponent(params.prdCat)}/${encodeURIComponent(params.prdCatVersion)}/${encodeURIComponent(params.vendor)}/${encodeURIComponent(params.priceList)}/toc/flat`;
|
|
239
210
|
const options = {
|
|
240
211
|
method: "GET",
|
|
241
212
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -251,7 +222,7 @@ export class CatalogueAPI {
|
|
|
251
222
|
if (this.auth === undefined) {
|
|
252
223
|
throw new Error("missing auth");
|
|
253
224
|
}
|
|
254
|
-
const url = `/
|
|
225
|
+
const url = `/v2/export/${encodeURIComponent(params.uuid)}`;
|
|
255
226
|
const options = {
|
|
256
227
|
method: "GET",
|
|
257
228
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -267,7 +238,7 @@ export class CatalogueAPI {
|
|
|
267
238
|
if (this.auth === undefined) {
|
|
268
239
|
throw new Error("missing auth");
|
|
269
240
|
}
|
|
270
|
-
const url = `/
|
|
241
|
+
const url = `/v2/render/${encodeURIComponent(params.uuid)}`;
|
|
271
242
|
const options = {
|
|
272
243
|
method: "GET",
|
|
273
244
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -283,7 +254,7 @@ export class CatalogueAPI {
|
|
|
283
254
|
if (this.auth === undefined) {
|
|
284
255
|
throw new Error("missing auth");
|
|
285
256
|
}
|
|
286
|
-
const url = `/
|
|
257
|
+
const url = `/v2/session-token/refresh`;
|
|
287
258
|
const options = {
|
|
288
259
|
method: "POST",
|
|
289
260
|
headers: { "X-API-Key": this.auth.secretToken || "", "X-SDK-Version": packageInfo.version },
|
|
@@ -300,10 +271,8 @@ export const DTO_OPERATION_ID_TO_DEBIT_GROUP = {
|
|
|
300
271
|
getApplicationAreas: "base",
|
|
301
272
|
postExport: "export",
|
|
302
273
|
getPriceLists: "base",
|
|
303
|
-
getProductLegacyV2: "base",
|
|
304
274
|
getProduct: "base",
|
|
305
275
|
postRender: "render",
|
|
306
|
-
postValidateLegacyV1: "base",
|
|
307
276
|
postValidate: "base",
|
|
308
277
|
getTocTree: "base",
|
|
309
278
|
getTocFlat: "base",
|
package/dist/CfgProduct.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AggregatedLoadingObservable, LengthUnit, Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
-
import { DtoAdditionalProductConfiguration, DtoAdditionalProductRef,
|
|
2
|
+
import { DtoAdditionalProductConfiguration, DtoAdditionalProductRef, DtoCatalogueParams, DtoMeasureParam, DtoMiscFile, DtoMtrlApplication, DtoNote, DtoPrices, DtoProductConf, DtoProductParamsWithLang, DtoTransform } from "./CatalogueAPI.js";
|
|
3
3
|
import { CfgMeasureDefinition } from "./CfgMeasure.js";
|
|
4
4
|
import { _CfgFeatureInternal } from "./productConfiguration/CfgFeature.js";
|
|
5
5
|
import { ProductConfigurationBubbleMode } from "./productConfiguration/CfgOption.js";
|
|
@@ -82,7 +82,7 @@ export declare type CfgPrice = {
|
|
|
82
82
|
*/
|
|
83
83
|
export declare class _CfgProductInternal {
|
|
84
84
|
readonly _productLoaderRaw: ProductLoader;
|
|
85
|
-
readonly prodParams:
|
|
85
|
+
readonly prodParams: DtoProductParamsWithLang;
|
|
86
86
|
readonly settings: CfgProductSettings;
|
|
87
87
|
readonly uuid: string;
|
|
88
88
|
private readonly _rawUnit;
|
|
@@ -91,7 +91,7 @@ export declare class _CfgProductInternal {
|
|
|
91
91
|
readonly parent: _CfgProductInternal | undefined;
|
|
92
92
|
private _additionalProductRef;
|
|
93
93
|
private readonly _syncGroupHandler;
|
|
94
|
-
static make: (productLoaderRaw: ProductLoader, productLoaderForGroupedLoad: ProductLoader | undefined, prodParams:
|
|
94
|
+
static make: (productLoaderRaw: ProductLoader, productLoaderForGroupedLoad: ProductLoader | undefined, prodParams: DtoProductParamsWithLang, settings: CfgProductSettings, optional: boolean, loadingObservable: AggregatedLoadingObservable, parent: _CfgProductInternal | undefined, root: _CfgProductInternal | undefined, additionalProductRef: DtoAdditionalProductRef | undefined, initialProductConfiguration: DtoProductConf | DtoAdditionalProductConfiguration | undefined) => Promise<_CfgProductInternal>;
|
|
95
95
|
_initialClone: _CfgProductInternal | undefined;
|
|
96
96
|
private constructor();
|
|
97
97
|
readonly root: _CfgProductInternal;
|
|
@@ -214,7 +214,7 @@ export declare class _CfgProductInternal {
|
|
|
214
214
|
}
|
|
215
215
|
export declare class CfgProduct {
|
|
216
216
|
readonly _internal: _CfgProductInternal;
|
|
217
|
-
static make(productLoader: ProductLoader, prodParams:
|
|
217
|
+
static make(productLoader: ProductLoader, prodParams: DtoProductParamsWithLang, settings?: Partial<CfgProductSettings>, initialProductConfiguration?: DtoProductConf | DtoAdditionalProductConfiguration): Promise<CfgProduct>;
|
|
218
218
|
/**
|
|
219
219
|
* Makes an object wrapping the passed object. This is not a clone method, it is a method to
|
|
220
220
|
* make a new outer reference. Like a shallow copy. We use this to help frameworks that are
|
|
@@ -243,9 +243,9 @@ export declare class CfgProduct {
|
|
|
243
243
|
get refKey(): string | undefined;
|
|
244
244
|
get notes(): DtoNote[];
|
|
245
245
|
get miscFiles(): DtoMiscFile[];
|
|
246
|
-
get prodParams():
|
|
246
|
+
get prodParams(): DtoProductParamsWithLang;
|
|
247
247
|
get lang(): string;
|
|
248
|
-
get catId():
|
|
248
|
+
get catId(): DtoCatalogueParams;
|
|
249
249
|
get partNumber(): string;
|
|
250
250
|
get isAdditionalProduct(): boolean;
|
|
251
251
|
/** Only used when this product is an additional product. Root products are never optional. */
|
package/dist/CfgProduct.js
CHANGED
|
@@ -466,7 +466,7 @@ export class _CfgProductInternal {
|
|
|
466
466
|
}
|
|
467
467
|
return {
|
|
468
468
|
originalIndex: p.originalIndex,
|
|
469
|
-
product: CfgProduct._makeNewRefFrom(yield _CfgProductInternal.make(productLoaderRaw, productLoaderForGroupedLoad, Object.assign(Object.assign({}, additionalProductRef.catId), {
|
|
469
|
+
product: CfgProduct._makeNewRefFrom(yield _CfgProductInternal.make(productLoaderRaw, productLoaderForGroupedLoad, Object.assign(Object.assign({}, additionalProductRef.catId), { lang: this.prodParams.lang, partNumber: additionalProductRef.partNumber }), this.settings, additionalProductRef.optional === true, this.loadingObservable, this, this.root, additionalProductRef, additionalProductInitialProductConfiguration)),
|
|
470
470
|
};
|
|
471
471
|
}))()));
|
|
472
472
|
if (this._destroyed) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DtoCatalogueParamsWithLang, DtoProductParamsWithLang } from "./CatalogueAPI";
|
|
2
2
|
/**
|
|
3
3
|
* These methods aims to provide a default suggested way of building
|
|
4
4
|
* URLs to Products and Catalogues. By using consistent URL:s copy-paste
|
|
@@ -14,7 +14,7 @@ export declare class CfgReferencePathHelper {
|
|
|
14
14
|
* @param catParams What catalogue to generate URL for.
|
|
15
15
|
* @returns An URL to a catalogue
|
|
16
16
|
*/
|
|
17
|
-
static getCataloguePath: (browsingRootUrl: string, catParams:
|
|
17
|
+
static getCataloguePath: (browsingRootUrl: string, catParams: DtoCatalogueParamsWithLang) => string;
|
|
18
18
|
/**
|
|
19
19
|
* Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
|
|
20
20
|
* @param browsingRootUrl The URL where Stage browsing begins
|
|
@@ -22,6 +22,6 @@ export declare class CfgReferencePathHelper {
|
|
|
22
22
|
* @param separator Optional, defaults to "product", but can be changed to indicate another function.
|
|
23
23
|
* @returns An URL to a product
|
|
24
24
|
*/
|
|
25
|
-
static getProductPath: (browsingRootUrl: string, productParams:
|
|
25
|
+
static getProductPath: (browsingRootUrl: string, productParams: DtoProductParamsWithLang, separator?: string) => string;
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=CfgReferencePathHelper.d.ts.map
|
|
@@ -69,6 +69,7 @@ export function applyCatalogueFilters(filters, catalogues) {
|
|
|
69
69
|
}
|
|
70
70
|
const filteredCatalogues = [];
|
|
71
71
|
const availablePropertyValues = {
|
|
72
|
+
cid: new Set(),
|
|
72
73
|
enterprise: new Set(),
|
|
73
74
|
prdCat: new Set(),
|
|
74
75
|
prdCatVersion: new Set(),
|
|
@@ -79,6 +80,7 @@ export function applyCatalogueFilters(filters, catalogues) {
|
|
|
79
80
|
filteredCatalogues.push(item);
|
|
80
81
|
})))));
|
|
81
82
|
const availablePropertyValuesAsSortedArrays = {
|
|
83
|
+
cid: stringSetToSortedArray(availablePropertyValues.cid),
|
|
82
84
|
enterprise: stringSetToSortedArray(availablePropertyValues.enterprise),
|
|
83
85
|
prdCat: stringSetToSortedArray(availablePropertyValues.prdCat),
|
|
84
86
|
prdCatVersion: stringSetToSortedArray(availablePropertyValues.prdCatVersion),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Filters } from "@configura/web-utilities";
|
|
2
|
-
import { CatalogueAPI, DtoApplicationAreasResponse,
|
|
2
|
+
import { CatalogueAPI, DtoApplicationAreasResponse, DtoCatalogueParams, DtoCatalogueParamsWithLang } from "../CatalogueAPI.js";
|
|
3
3
|
import { CfgProduct, CfgProductSettings } from "../CfgProduct.js";
|
|
4
4
|
import { ProductRefParams } from "./filters.js";
|
|
5
5
|
export interface GeneratedProductConfiguration {
|
|
6
6
|
applicationAreasResponse: DtoApplicationAreasResponse;
|
|
7
7
|
catalogueCount: number;
|
|
8
8
|
catalogueIndex: number;
|
|
9
|
-
catalogueParams:
|
|
9
|
+
catalogueParams: DtoCatalogueParamsWithLang;
|
|
10
10
|
getProductDuration: number;
|
|
11
11
|
product: CfgProduct;
|
|
12
12
|
productCount: number;
|
|
13
13
|
productIndex: number;
|
|
14
14
|
}
|
|
15
|
-
export declare function generateProductConfigurations(api: CatalogueAPI, lang: string, catalogues:
|
|
15
|
+
export declare function generateProductConfigurations(api: CatalogueAPI, lang: string, catalogues: DtoCatalogueParams[], filters: Filters<ProductRefParams>, settings?: Partial<CfgProductSettings>): AsyncIterableIterator<GeneratedProductConfiguration | Error>;
|
|
16
16
|
//# sourceMappingURL=productParamsGenerator.d.ts.map
|
package/dist/productLoader.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DtoProductParamsWithLang, DtoValidateRequest } from "./CatalogueAPI.js";
|
|
2
2
|
import { CfgProductResponse, CfgValidateResponse } from "./utilitiesCatalogueData.js";
|
|
3
|
-
export declare type GetProduct = (params:
|
|
4
|
-
export declare type PostValidate = (params:
|
|
3
|
+
export declare type GetProduct = (params: DtoProductParamsWithLang) => Promise<CfgProductResponse>;
|
|
4
|
+
export declare type PostValidate = (params: DtoProductParamsWithLang, body: DtoValidateRequest) => Promise<CfgValidateResponse>;
|
|
5
5
|
export declare type ProductLoader = {
|
|
6
6
|
getProduct: GetProduct;
|
|
7
7
|
postValidate: PostValidate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable, SingleArgCallback } from "@configura/web-utilities";
|
|
2
|
-
import { CatalogueAPI, DtoAdditionalProductConfiguration, DtoExportStatus, DtoExportStatusStatus,
|
|
2
|
+
import { CatalogueAPI, DtoAdditionalProductConfiguration, DtoExportStatus, DtoExportStatusStatus, DtoProductParamsWithLang, DtoRenderStatus, DtoRenderStatusStatus, DtoTargetCameraArgs } from "../CatalogueAPI.js";
|
|
3
3
|
import { CfgProduct } from "../CfgProduct.js";
|
|
4
4
|
import { RenderOrExportFormat } from "./formats.js";
|
|
5
5
|
export declare type TasksChangeNotification = {
|
|
@@ -51,7 +51,7 @@ export declare abstract class Task<F extends RenderOrExportFormat> {
|
|
|
51
51
|
protected constructor(taskHandler: _TaskHandlerInternal, format: F, product: CfgProduct, getPreviewUrl: (() => Promise<string>) | undefined);
|
|
52
52
|
protected abstract postInit(): Promise<DtoRenderStatus | DtoExportStatus>;
|
|
53
53
|
protected abstract pollStatus(): Promise<DtoRenderStatus | DtoExportStatus>;
|
|
54
|
-
protected _productParams:
|
|
54
|
+
protected _productParams: DtoProductParamsWithLang;
|
|
55
55
|
protected _apiSelection: DtoAdditionalProductConfiguration;
|
|
56
56
|
private _status;
|
|
57
57
|
private _uuid;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DtoCatalogueParamsWithLang } from "../../CatalogueAPI.js";
|
|
2
2
|
import { CfgProduct } from "../../CfgProduct.js";
|
|
3
|
-
export declare const dummyCatId:
|
|
3
|
+
export declare const dummyCatId: DtoCatalogueParamsWithLang;
|
|
4
4
|
export declare const getDummyCfgProduct: () => Promise<CfgProduct>;
|
|
5
5
|
//# sourceMappingURL=dummyProductForTest.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DtoAdditionalProductRef, DtoCatalogueParams,
|
|
1
|
+
import { DtoAdditionalProductRef, DtoCatalogueParams, DtoCatalogueParamsWithLang, DtoMeasureParam, DtoModel, DtoOrientation, DtoPartsData, DtoPrices, DtoProductData, DtoProductParams, DtoProductParamsWithLang, DtoProductResponse, DtoSelectedOption, DtoTransform, DtoValidateResponse, DtoVector } from "./CatalogueAPI.js";
|
|
2
2
|
/**
|
|
3
3
|
* Makes a string from the params which can be used as a key in for example React. Language is not respected.
|
|
4
4
|
*/
|
|
5
|
-
export declare const makeCatalogueKey: (cat:
|
|
5
|
+
export declare const makeCatalogueKey: (cat: DtoCatalogueParams) => string;
|
|
6
6
|
/**
|
|
7
7
|
* Makes a string from the params which can be used as a key in for example React. Language is not respected.
|
|
8
8
|
*/
|
|
9
|
-
export declare const makeProductKey: (prod:
|
|
9
|
+
export declare const makeProductKey: (prod: DtoProductParams) => string;
|
|
10
10
|
/**
|
|
11
11
|
* Makes a string from selected options, can be used as a key for a selection.
|
|
12
12
|
*/
|
|
@@ -36,13 +36,13 @@ export declare function correctDefaultsOnCatalogueParams<T extends DtoCatalogueP
|
|
|
36
36
|
export declare function recursivelyGetPriceCodeValue(priceCodes: string[], prices: DtoPrices | undefined): number | undefined;
|
|
37
37
|
export declare function comparePricesObjects(prices1: DtoPrices | undefined, prices2: DtoPrices | undefined): boolean;
|
|
38
38
|
export declare const decodeCatalogueParams: <T extends DtoCatalogueParams>(params: T) => T;
|
|
39
|
-
export declare const decodeProductParams: <T extends
|
|
39
|
+
export declare const decodeProductParams: <T extends DtoProductParams>(params: T) => T;
|
|
40
40
|
export declare function isSameCatalogueParams(left: DtoCatalogueParams, right: DtoCatalogueParams): boolean;
|
|
41
41
|
export declare function isSameVector(left: DtoVector, right: DtoVector): boolean;
|
|
42
42
|
export declare function isSameOrientation(left: DtoOrientation, right: DtoOrientation): boolean;
|
|
43
43
|
export declare function isSameAnchor(left: DtoMeasureParam, right: DtoMeasureParam): boolean;
|
|
44
44
|
export declare function isSameTransform(left: DtoTransform, right: DtoTransform): boolean;
|
|
45
45
|
export declare function isSameProductRef(left: DtoAdditionalProductRef, right: DtoAdditionalProductRef): boolean;
|
|
46
|
-
export declare const isSameDtoCatalogueParamsWithLang: (left:
|
|
47
|
-
export declare const isSameDtoProductParamsWithLang: (left:
|
|
46
|
+
export declare const isSameDtoCatalogueParamsWithLang: (left: DtoCatalogueParamsWithLang, right: DtoCatalogueParamsWithLang) => boolean;
|
|
47
|
+
export declare const isSameDtoProductParamsWithLang: (left: DtoProductParamsWithLang, right: DtoProductParamsWithLang) => boolean;
|
|
48
48
|
//# sourceMappingURL=utilitiesCatalogueData.d.ts.map
|
|
@@ -69,7 +69,8 @@ export function comparePricesObjects(prices1, prices2) {
|
|
|
69
69
|
export const decodeCatalogueParams = (params) => (Object.assign(Object.assign({}, params), { enterprise: decodeURIComponent(params.enterprise), prdCat: decodeURIComponent(params.prdCat), prdCatVersion: decodeURIComponent(params.prdCatVersion), priceList: decodeURIComponent(params.priceList), vendor: decodeURIComponent(params.vendor) }));
|
|
70
70
|
export const decodeProductParams = (params) => (Object.assign(Object.assign({}, decodeCatalogueParams(params)), { partNumber: decodeURIComponent(params.partNumber) }));
|
|
71
71
|
export function isSameCatalogueParams(left, right) {
|
|
72
|
-
return (left.
|
|
72
|
+
return (left.cid === right.cid &&
|
|
73
|
+
left.enterprise === right.enterprise &&
|
|
73
74
|
left.prdCat === right.prdCat &&
|
|
74
75
|
left.prdCatVersion === right.prdCatVersion &&
|
|
75
76
|
left.priceList === right.priceList &&
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DtoCatalogueParams, DtoCataloguePermission } from "./CatalogueAPI.js";
|
|
2
2
|
interface CataloguePermissionByEnterpriseKey {
|
|
3
3
|
[key: string]: DtoCataloguePermission[];
|
|
4
4
|
}
|
|
5
5
|
export declare const groupAndSortCataloguePermissions: (cataloguePermissions: DtoCataloguePermission[]) => CataloguePermissionByEnterpriseKey;
|
|
6
6
|
export declare const isParamSet: (param: string | undefined) => boolean;
|
|
7
|
-
export declare const createCataloguePermissionsFilter: (catParams: Partial<
|
|
7
|
+
export declare const createCataloguePermissionsFilter: (catParams: Partial<DtoCatalogueParams>) => (perm: DtoCataloguePermission) => boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Sometimes you will want to use the latest available prdCatVersion. This method will
|
|
10
10
|
* find the highest prdCatVersion version in the cataloguePermissions. If the versions are
|
|
@@ -23,7 +23,7 @@ export declare const getPrdCatVersionFromPermissions: (cataloguePermissions: Dto
|
|
|
23
23
|
* This method will, if the prdCatVersion is not set, fetch the highest available from the catalogue
|
|
24
24
|
* permissions. If it fails to find any applicable permissions the original value is returned.
|
|
25
25
|
*/
|
|
26
|
-
export declare const getPrdCatVersionOrLatestFromPermissions: (params: Omit<
|
|
26
|
+
export declare const getPrdCatVersionOrLatestFromPermissions: (params: Omit<DtoCatalogueParams, "cid"> & {
|
|
27
27
|
cid: number | undefined;
|
|
28
28
|
}, cataloguePermissions: DtoCataloguePermission[]) => string;
|
|
29
29
|
/**
|
|
@@ -32,6 +32,6 @@ export declare const getPrdCatVersionOrLatestFromPermissions: (params: Omit<DtoC
|
|
|
32
32
|
* cataloguePermissions and insert it into a copy of the original params. If it fails to find any
|
|
33
33
|
* applicable auth-permissions the original value is returned.
|
|
34
34
|
*/
|
|
35
|
-
export declare const fillMissingPrdCatVersionFromPermissions: <T extends
|
|
35
|
+
export declare const fillMissingPrdCatVersionFromPermissions: <T extends DtoCatalogueParams>(params: T, cataloguePermissions: DtoCataloguePermission[]) => T;
|
|
36
36
|
export {};
|
|
37
37
|
//# sourceMappingURL=utilitiesCataloguePermission.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/web-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@configura/web-utilities": "
|
|
26
|
+
"@configura/web-utilities": "3.0.0-alpha.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "9fe91599222572a8625a70c03d745f1f2e5eb85b"
|
|
29
29
|
}
|