@contrail/flexplm 1.0.17 → 1.0.19
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/lib/entity-processor/base-entity-processor.d.ts +30 -30
- package/lib/entity-processor/base-entity-processor.js +143 -143
- package/lib/flexplm-request.d.ts +3 -3
- package/lib/flexplm-request.js +34 -34
- package/lib/flexplm-utils.d.ts +5 -5
- package/lib/flexplm-utils.js +33 -33
- package/lib/index.d.ts +19 -17
- package/lib/index.js +35 -33
- package/lib/interfaces/interfaces.d.ts +91 -91
- package/lib/interfaces/interfaces.js +2 -2
- package/lib/interfaces/item-family-changes.d.ts +19 -19
- package/lib/interfaces/item-family-changes.js +49 -49
- package/lib/interfaces/publish-change-data.d.ts +17 -17
- package/lib/interfaces/publish-change-data.js +30 -30
- package/lib/publish/base-process-publish-assortment-callback.d.ts +8 -8
- package/lib/publish/base-process-publish-assortment-callback.js +19 -19
- package/lib/publish/base-process-publish-assortment.d.ts +57 -57
- package/lib/publish/base-process-publish-assortment.js +570 -563
- package/lib/publish/mockData.d.ts +774 -774
- package/lib/publish/mockData.js +3033 -3033
- package/lib/util/config-defaults.d.ts +6 -6
- package/lib/util/config-defaults.js +71 -71
- package/lib/util/data-converter.d.ts +22 -22
- package/lib/util/data-converter.js +318 -318
- package/lib/util/federation.d.ts +15 -15
- package/lib/util/federation.js +149 -149
- package/lib/util/flexplm-connect.d.ts +16 -16
- package/lib/util/flexplm-connect.js +130 -130
- package/lib/util/logger-config.d.ts +1 -1
- package/lib/util/logger-config.js +26 -26
- package/lib/util/map-util-spec-mockData.d.ts +0 -0
- package/lib/util/map-util-spec-mockData.js +203 -0
- package/lib/util/map-utils.d.ts +4 -3
- package/lib/util/map-utils.js +28 -20
- package/lib/util/mockData.d.ts +39 -39
- package/lib/util/mockData.js +100 -100
- package/lib/util/thumbnail-util.d.ts +15 -15
- package/lib/util/thumbnail-util.js +112 -112
- package/lib/util/type-conversion-utils-spec-mockData.d.ts +0 -0
- package/lib/util/type-conversion-utils-spec-mockData.js +205 -0
- package/lib/util/type-conversion-utils.d.ts +10 -0
- package/lib/util/type-conversion-utils.js +100 -0
- package/lib/util/type-defaults.d.ts +9 -0
- package/lib/util/type-defaults.js +117 -0
- package/lib/util/type-utils.d.ts +12 -12
- package/lib/util/type-utils.js +101 -101
- package/package.json +47 -46
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
export interface FCConfig {
|
|
2
|
-
apiKey?: string;
|
|
3
|
-
orgSlug?: string;
|
|
4
|
-
action?: string;
|
|
5
|
-
configFile?: string;
|
|
6
|
-
eventObjectClassParam?: string;
|
|
7
|
-
eventFlexTypePathParam?: string;
|
|
8
|
-
taskId?: string;
|
|
9
|
-
apiHost: string;
|
|
10
|
-
userName(): string;
|
|
11
|
-
password(): string;
|
|
12
|
-
plmEnviornment?: string;
|
|
13
|
-
urlContext: string;
|
|
14
|
-
vibeEventEndpoint: string;
|
|
15
|
-
csrfEndpoint: string;
|
|
16
|
-
itemPreDevelopmentLifecycleStages: string[];
|
|
17
|
-
identifierAtts?: {
|
|
18
|
-
[key: string]: string[];
|
|
19
|
-
};
|
|
20
|
-
propertyMapping?: object;
|
|
21
|
-
}
|
|
22
|
-
export interface ProductFederation {
|
|
23
|
-
entityReference: string;
|
|
24
|
-
objectClass: 'LCSProduct';
|
|
25
|
-
federatedId?: string;
|
|
26
|
-
vibeIQIdentifier?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface ProductData extends ProductFederation {
|
|
29
|
-
data: object;
|
|
30
|
-
productSeason: {
|
|
31
|
-
data: object;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface SeasonFederation {
|
|
35
|
-
entityReference: string;
|
|
36
|
-
objectClass: 'LCSSeason';
|
|
37
|
-
flexPLMSeasonName?: string;
|
|
38
|
-
federationId?: string;
|
|
39
|
-
}
|
|
40
|
-
export interface SkuFederation {
|
|
41
|
-
entityReference: string;
|
|
42
|
-
objectClass: 'LCSSKU';
|
|
43
|
-
LCSProduct?: ProductFederation;
|
|
44
|
-
federatedId?: string;
|
|
45
|
-
vibeIQIdentifier?: string;
|
|
46
|
-
}
|
|
47
|
-
export interface SkuData extends SkuFederation {
|
|
48
|
-
data: object;
|
|
49
|
-
}
|
|
50
|
-
export interface PayloadType {
|
|
51
|
-
eventType: string;
|
|
52
|
-
objectClass: string;
|
|
53
|
-
}
|
|
54
|
-
export interface AsyncPayloadType extends PayloadType {
|
|
55
|
-
taskId: string;
|
|
56
|
-
}
|
|
57
|
-
export interface AsyncEventsPayloadType extends AsyncPayloadType {
|
|
58
|
-
events?: PayloadType[];
|
|
59
|
-
eventsFileId?: string;
|
|
60
|
-
eventsDownloadLink?: string;
|
|
61
|
-
}
|
|
62
|
-
export interface EntityPayloadType extends PayloadType {
|
|
63
|
-
entityReference: string;
|
|
64
|
-
federatedId?: string;
|
|
65
|
-
flexPLMTypePath?: string;
|
|
66
|
-
data: object;
|
|
67
|
-
}
|
|
68
|
-
export interface ItemPayloadType extends EntityPayloadType {
|
|
69
|
-
LCSProduct?: ProductFederation;
|
|
70
|
-
}
|
|
71
|
-
export interface SeasonalPayload extends EntityPayloadType {
|
|
72
|
-
eventType: 'UPSERT_ON_SEASON' | 'REMOVE_FROM_SEASON';
|
|
73
|
-
objectClass: 'LCSProductSeasonLink' | 'LCSSKUSeasonLink';
|
|
74
|
-
LCSSeason: SeasonFederation;
|
|
75
|
-
LCSProduct?: ProductFederation;
|
|
76
|
-
LCSSKU?: SkuFederation;
|
|
77
|
-
}
|
|
78
|
-
export interface ExportPayloadType extends AsyncPayloadType {
|
|
79
|
-
flexPLMTypePath: string;
|
|
80
|
-
}
|
|
81
|
-
export interface FederationRecord {
|
|
82
|
-
reference: string;
|
|
83
|
-
mappedReference: string;
|
|
84
|
-
appIdentifier: string;
|
|
85
|
-
federationSchema: string;
|
|
86
|
-
}
|
|
87
|
-
export interface FlexPLMResponseData {
|
|
88
|
-
status: number;
|
|
89
|
-
data?: object;
|
|
90
|
-
error?: string;
|
|
91
|
-
}
|
|
1
|
+
export interface FCConfig {
|
|
2
|
+
apiKey?: string;
|
|
3
|
+
orgSlug?: string;
|
|
4
|
+
action?: string;
|
|
5
|
+
configFile?: string;
|
|
6
|
+
eventObjectClassParam?: string;
|
|
7
|
+
eventFlexTypePathParam?: string;
|
|
8
|
+
taskId?: string;
|
|
9
|
+
apiHost: string;
|
|
10
|
+
userName(): string;
|
|
11
|
+
password(): string;
|
|
12
|
+
plmEnviornment?: string;
|
|
13
|
+
urlContext: string;
|
|
14
|
+
vibeEventEndpoint: string;
|
|
15
|
+
csrfEndpoint: string;
|
|
16
|
+
itemPreDevelopmentLifecycleStages: string[];
|
|
17
|
+
identifierAtts?: {
|
|
18
|
+
[key: string]: string[];
|
|
19
|
+
};
|
|
20
|
+
propertyMapping?: object;
|
|
21
|
+
}
|
|
22
|
+
export interface ProductFederation {
|
|
23
|
+
entityReference: string;
|
|
24
|
+
objectClass: 'LCSProduct';
|
|
25
|
+
federatedId?: string;
|
|
26
|
+
vibeIQIdentifier?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ProductData extends ProductFederation {
|
|
29
|
+
data: object;
|
|
30
|
+
productSeason: {
|
|
31
|
+
data: object;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface SeasonFederation {
|
|
35
|
+
entityReference: string;
|
|
36
|
+
objectClass: 'LCSSeason';
|
|
37
|
+
flexPLMSeasonName?: string;
|
|
38
|
+
federationId?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SkuFederation {
|
|
41
|
+
entityReference: string;
|
|
42
|
+
objectClass: 'LCSSKU';
|
|
43
|
+
LCSProduct?: ProductFederation;
|
|
44
|
+
federatedId?: string;
|
|
45
|
+
vibeIQIdentifier?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SkuData extends SkuFederation {
|
|
48
|
+
data: object;
|
|
49
|
+
}
|
|
50
|
+
export interface PayloadType {
|
|
51
|
+
eventType: string;
|
|
52
|
+
objectClass: string;
|
|
53
|
+
}
|
|
54
|
+
export interface AsyncPayloadType extends PayloadType {
|
|
55
|
+
taskId: string;
|
|
56
|
+
}
|
|
57
|
+
export interface AsyncEventsPayloadType extends AsyncPayloadType {
|
|
58
|
+
events?: PayloadType[];
|
|
59
|
+
eventsFileId?: string;
|
|
60
|
+
eventsDownloadLink?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface EntityPayloadType extends PayloadType {
|
|
63
|
+
entityReference: string;
|
|
64
|
+
federatedId?: string;
|
|
65
|
+
flexPLMTypePath?: string;
|
|
66
|
+
data: object;
|
|
67
|
+
}
|
|
68
|
+
export interface ItemPayloadType extends EntityPayloadType {
|
|
69
|
+
LCSProduct?: ProductFederation;
|
|
70
|
+
}
|
|
71
|
+
export interface SeasonalPayload extends EntityPayloadType {
|
|
72
|
+
eventType: 'UPSERT_ON_SEASON' | 'REMOVE_FROM_SEASON';
|
|
73
|
+
objectClass: 'LCSProductSeasonLink' | 'LCSSKUSeasonLink';
|
|
74
|
+
LCSSeason: SeasonFederation;
|
|
75
|
+
LCSProduct?: ProductFederation;
|
|
76
|
+
LCSSKU?: SkuFederation;
|
|
77
|
+
}
|
|
78
|
+
export interface ExportPayloadType extends AsyncPayloadType {
|
|
79
|
+
flexPLMTypePath: string;
|
|
80
|
+
}
|
|
81
|
+
export interface FederationRecord {
|
|
82
|
+
reference: string;
|
|
83
|
+
mappedReference: string;
|
|
84
|
+
appIdentifier: string;
|
|
85
|
+
federationSchema: string;
|
|
86
|
+
}
|
|
87
|
+
export interface FlexPLMResponseData {
|
|
88
|
+
status: number;
|
|
89
|
+
data?: object;
|
|
90
|
+
error?: string;
|
|
91
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export declare class ItemFamilyChanges {
|
|
2
|
-
private _itemFamilyId;
|
|
3
|
-
get itemFamilyId(): string;
|
|
4
|
-
private _sinceDate;
|
|
5
|
-
get sinceDate(): Date;
|
|
6
|
-
familyAdd: boolean;
|
|
7
|
-
familyDelete: boolean;
|
|
8
|
-
familyUpdate: boolean;
|
|
9
|
-
familyItemRemoved: boolean;
|
|
10
|
-
itemFamilyObject: any;
|
|
11
|
-
colorAdds: string[];
|
|
12
|
-
colorDeletes: string[];
|
|
13
|
-
colorUpdates: string[];
|
|
14
|
-
colorUnchanged: string[];
|
|
15
|
-
assortmentItemFullChangeMap: Map<string, any>;
|
|
16
|
-
itemToFederatedIdMapping: Map<string, string>;
|
|
17
|
-
constructor(itemFamilyId: string, sinceDate: Date);
|
|
18
|
-
toString(): string;
|
|
19
|
-
}
|
|
1
|
+
export declare class ItemFamilyChanges {
|
|
2
|
+
private _itemFamilyId;
|
|
3
|
+
get itemFamilyId(): string;
|
|
4
|
+
private _sinceDate;
|
|
5
|
+
get sinceDate(): Date;
|
|
6
|
+
familyAdd: boolean;
|
|
7
|
+
familyDelete: boolean;
|
|
8
|
+
familyUpdate: boolean;
|
|
9
|
+
familyItemRemoved: boolean;
|
|
10
|
+
itemFamilyObject: any;
|
|
11
|
+
colorAdds: string[];
|
|
12
|
+
colorDeletes: string[];
|
|
13
|
+
colorUpdates: string[];
|
|
14
|
+
colorUnchanged: string[];
|
|
15
|
+
assortmentItemFullChangeMap: Map<string, any>;
|
|
16
|
+
itemToFederatedIdMapping: Map<string, string>;
|
|
17
|
+
constructor(itemFamilyId: string, sinceDate: Date);
|
|
18
|
+
toString(): string;
|
|
19
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ItemFamilyChanges = void 0;
|
|
4
|
-
class ItemFamilyChanges {
|
|
5
|
-
get itemFamilyId() { return this._itemFamilyId; }
|
|
6
|
-
get sinceDate() { return this._sinceDate; }
|
|
7
|
-
constructor(itemFamilyId, sinceDate) {
|
|
8
|
-
this.familyAdd = false;
|
|
9
|
-
this.familyDelete = false;
|
|
10
|
-
this.familyUpdate = false;
|
|
11
|
-
this.familyItemRemoved = false;
|
|
12
|
-
this.itemFamilyObject = undefined;
|
|
13
|
-
this.colorAdds = [];
|
|
14
|
-
this.colorDeletes = [];
|
|
15
|
-
this.colorUpdates = [];
|
|
16
|
-
this.colorUnchanged = [];
|
|
17
|
-
this.assortmentItemFullChangeMap = new Map();
|
|
18
|
-
this.itemToFederatedIdMapping = new Map();
|
|
19
|
-
this._itemFamilyId = itemFamilyId;
|
|
20
|
-
this._sinceDate = sinceDate;
|
|
21
|
-
}
|
|
22
|
-
toString() {
|
|
23
|
-
let s = 'ItemFamilyChanges\n'
|
|
24
|
-
+ ' itemFamilyId: ' + this._itemFamilyId + '\n'
|
|
25
|
-
+ ' sinceDate: ' + this._sinceDate + '\n'
|
|
26
|
-
+ ' familyAdd: ' + this.familyAdd + '\n'
|
|
27
|
-
+ ' familyDelete: ' + this.familyDelete + '\n'
|
|
28
|
-
+ ' familyUpdate: ' + this.familyUpdate + '\n'
|
|
29
|
-
+ ' familyItemRemoved: ' + this.familyItemRemoved + '\n';
|
|
30
|
-
s += ' colorAdds: [' + this.colorAdds + ']\n';
|
|
31
|
-
s += ' colorDeletes: [' + this.colorDeletes + ']\n';
|
|
32
|
-
s += ' colorUpdates: [' + this.colorUpdates + ']\n';
|
|
33
|
-
s += ' colorUnchanged: [' + this.colorUnchanged + ']\n';
|
|
34
|
-
s += 'assortmentItemFullChangeMap:\n';
|
|
35
|
-
s += 'size: ' + this.assortmentItemFullChangeMap.size + '\n[';
|
|
36
|
-
for (const key of this.assortmentItemFullChangeMap.keys()) {
|
|
37
|
-
s += key + ', ';
|
|
38
|
-
}
|
|
39
|
-
s += ']\n';
|
|
40
|
-
s += 'itemToFederatedIdMapping:\n';
|
|
41
|
-
s += 'size: ' + this.itemToFederatedIdMapping.size + '\n[';
|
|
42
|
-
for (const key of this.itemToFederatedIdMapping.keys()) {
|
|
43
|
-
s += key + ', ';
|
|
44
|
-
}
|
|
45
|
-
s += ']\n';
|
|
46
|
-
return s;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.ItemFamilyChanges = ItemFamilyChanges;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ItemFamilyChanges = void 0;
|
|
4
|
+
class ItemFamilyChanges {
|
|
5
|
+
get itemFamilyId() { return this._itemFamilyId; }
|
|
6
|
+
get sinceDate() { return this._sinceDate; }
|
|
7
|
+
constructor(itemFamilyId, sinceDate) {
|
|
8
|
+
this.familyAdd = false;
|
|
9
|
+
this.familyDelete = false;
|
|
10
|
+
this.familyUpdate = false;
|
|
11
|
+
this.familyItemRemoved = false;
|
|
12
|
+
this.itemFamilyObject = undefined;
|
|
13
|
+
this.colorAdds = [];
|
|
14
|
+
this.colorDeletes = [];
|
|
15
|
+
this.colorUpdates = [];
|
|
16
|
+
this.colorUnchanged = [];
|
|
17
|
+
this.assortmentItemFullChangeMap = new Map();
|
|
18
|
+
this.itemToFederatedIdMapping = new Map();
|
|
19
|
+
this._itemFamilyId = itemFamilyId;
|
|
20
|
+
this._sinceDate = sinceDate;
|
|
21
|
+
}
|
|
22
|
+
toString() {
|
|
23
|
+
let s = 'ItemFamilyChanges\n'
|
|
24
|
+
+ ' itemFamilyId: ' + this._itemFamilyId + '\n'
|
|
25
|
+
+ ' sinceDate: ' + this._sinceDate + '\n'
|
|
26
|
+
+ ' familyAdd: ' + this.familyAdd + '\n'
|
|
27
|
+
+ ' familyDelete: ' + this.familyDelete + '\n'
|
|
28
|
+
+ ' familyUpdate: ' + this.familyUpdate + '\n'
|
|
29
|
+
+ ' familyItemRemoved: ' + this.familyItemRemoved + '\n';
|
|
30
|
+
s += ' colorAdds: [' + this.colorAdds + ']\n';
|
|
31
|
+
s += ' colorDeletes: [' + this.colorDeletes + ']\n';
|
|
32
|
+
s += ' colorUpdates: [' + this.colorUpdates + ']\n';
|
|
33
|
+
s += ' colorUnchanged: [' + this.colorUnchanged + ']\n';
|
|
34
|
+
s += 'assortmentItemFullChangeMap:\n';
|
|
35
|
+
s += 'size: ' + this.assortmentItemFullChangeMap.size + '\n[';
|
|
36
|
+
for (const key of this.assortmentItemFullChangeMap.keys()) {
|
|
37
|
+
s += key + ', ';
|
|
38
|
+
}
|
|
39
|
+
s += ']\n';
|
|
40
|
+
s += 'itemToFederatedIdMapping:\n';
|
|
41
|
+
s += 'size: ' + this.itemToFederatedIdMapping.size + '\n[';
|
|
42
|
+
for (const key of this.itemToFederatedIdMapping.keys()) {
|
|
43
|
+
s += key + ', ';
|
|
44
|
+
}
|
|
45
|
+
s += ']\n';
|
|
46
|
+
return s;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ItemFamilyChanges = ItemFamilyChanges;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SeasonFederation } from './interfaces';
|
|
2
|
-
import { ItemFamilyChanges } from './item-family-changes';
|
|
3
|
-
export declare class PublishChangeData {
|
|
4
|
-
private _assortmentId;
|
|
5
|
-
get assortmentId(): string;
|
|
6
|
-
private _seasonFed;
|
|
7
|
-
get seasonFed(): SeasonFederation;
|
|
8
|
-
private _assortmentPublishChangeId;
|
|
9
|
-
get assortmentPublishChangeId(): string;
|
|
10
|
-
private _sinceDate;
|
|
11
|
-
get sinceDate(): Date;
|
|
12
|
-
itemToFederatedIdMapping: Map<string, string>;
|
|
13
|
-
releasedForDevelopmentItemIds: string[];
|
|
14
|
-
itemFamilyChanges: Map<string, ItemFamilyChanges>;
|
|
15
|
-
constructor(_assortmentId: string, _seasonFed: SeasonFederation, _assortmentPublishChangeId: string, _sinceDate: Date);
|
|
16
|
-
toString(): string;
|
|
17
|
-
}
|
|
1
|
+
import { SeasonFederation } from './interfaces';
|
|
2
|
+
import { ItemFamilyChanges } from './item-family-changes';
|
|
3
|
+
export declare class PublishChangeData {
|
|
4
|
+
private _assortmentId;
|
|
5
|
+
get assortmentId(): string;
|
|
6
|
+
private _seasonFed;
|
|
7
|
+
get seasonFed(): SeasonFederation;
|
|
8
|
+
private _assortmentPublishChangeId;
|
|
9
|
+
get assortmentPublishChangeId(): string;
|
|
10
|
+
private _sinceDate;
|
|
11
|
+
get sinceDate(): Date;
|
|
12
|
+
itemToFederatedIdMapping: Map<string, string>;
|
|
13
|
+
releasedForDevelopmentItemIds: string[];
|
|
14
|
+
itemFamilyChanges: Map<string, ItemFamilyChanges>;
|
|
15
|
+
constructor(_assortmentId: string, _seasonFed: SeasonFederation, _assortmentPublishChangeId: string, _sinceDate: Date);
|
|
16
|
+
toString(): string;
|
|
17
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PublishChangeData = void 0;
|
|
4
|
-
class PublishChangeData {
|
|
5
|
-
get assortmentId() { return this._assortmentId; }
|
|
6
|
-
get seasonFed() { return Object.assign({}, this._seasonFed); }
|
|
7
|
-
get assortmentPublishChangeId() { return this._assortmentPublishChangeId; }
|
|
8
|
-
get sinceDate() { return this._sinceDate; }
|
|
9
|
-
constructor(_assortmentId, _seasonFed, _assortmentPublishChangeId, _sinceDate) {
|
|
10
|
-
this.releasedForDevelopmentItemIds = [];
|
|
11
|
-
this.itemFamilyChanges = new Map();
|
|
12
|
-
this._assortmentId = _assortmentId;
|
|
13
|
-
this._seasonFed = _seasonFed;
|
|
14
|
-
this._assortmentPublishChangeId = _assortmentPublishChangeId;
|
|
15
|
-
this._sinceDate = _sinceDate;
|
|
16
|
-
}
|
|
17
|
-
toString() {
|
|
18
|
-
let s = 'PublishChangeData\n'
|
|
19
|
-
+ 'assortmentId: ' + this._assortmentId + '\n'
|
|
20
|
-
+ 'seasonFed: ' + JSON.stringify(this._seasonFed) + '\n'
|
|
21
|
-
+ 'assortmentPublishChangeId: ' + this._assortmentPublishChangeId + '\n';
|
|
22
|
-
s += ' itemToFederatedIdMapping: ' + JSON.stringify(Object.fromEntries(this.itemToFederatedIdMapping)) + '\n';
|
|
23
|
-
s += 'itemFamilyChanges:\n';
|
|
24
|
-
for (const [key, value] of this.itemFamilyChanges) {
|
|
25
|
-
s += ' ' + key + ' => ' + value.toString();
|
|
26
|
-
}
|
|
27
|
-
return s;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.PublishChangeData = PublishChangeData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublishChangeData = void 0;
|
|
4
|
+
class PublishChangeData {
|
|
5
|
+
get assortmentId() { return this._assortmentId; }
|
|
6
|
+
get seasonFed() { return Object.assign({}, this._seasonFed); }
|
|
7
|
+
get assortmentPublishChangeId() { return this._assortmentPublishChangeId; }
|
|
8
|
+
get sinceDate() { return this._sinceDate; }
|
|
9
|
+
constructor(_assortmentId, _seasonFed, _assortmentPublishChangeId, _sinceDate) {
|
|
10
|
+
this.releasedForDevelopmentItemIds = [];
|
|
11
|
+
this.itemFamilyChanges = new Map();
|
|
12
|
+
this._assortmentId = _assortmentId;
|
|
13
|
+
this._seasonFed = _seasonFed;
|
|
14
|
+
this._assortmentPublishChangeId = _assortmentPublishChangeId;
|
|
15
|
+
this._sinceDate = _sinceDate;
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
let s = 'PublishChangeData\n'
|
|
19
|
+
+ 'assortmentId: ' + this._assortmentId + '\n'
|
|
20
|
+
+ 'seasonFed: ' + JSON.stringify(this._seasonFed) + '\n'
|
|
21
|
+
+ 'assortmentPublishChangeId: ' + this._assortmentPublishChangeId + '\n';
|
|
22
|
+
s += ' itemToFederatedIdMapping: ' + JSON.stringify(Object.fromEntries(this.itemToFederatedIdMapping)) + '\n';
|
|
23
|
+
s += 'itemFamilyChanges:\n';
|
|
24
|
+
for (const [key, value] of this.itemFamilyChanges) {
|
|
25
|
+
s += ' ' + key + ' => ' + value.toString();
|
|
26
|
+
}
|
|
27
|
+
return s;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PublishChangeData = PublishChangeData;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FCConfig } from '../interfaces/interfaces';
|
|
2
|
-
export declare class BaseProcessPublishAssortmentCallback {
|
|
3
|
-
private config;
|
|
4
|
-
constructor(_config: FCConfig);
|
|
5
|
-
process(event: any): Promise<{
|
|
6
|
-
message: string;
|
|
7
|
-
}>;
|
|
8
|
-
}
|
|
1
|
+
import { FCConfig } from '../interfaces/interfaces';
|
|
2
|
+
export declare class BaseProcessPublishAssortmentCallback {
|
|
3
|
+
private config;
|
|
4
|
+
constructor(_config: FCConfig);
|
|
5
|
+
process(event: any): Promise<{
|
|
6
|
+
message: string;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseProcessPublishAssortmentCallback = void 0;
|
|
4
|
-
class BaseProcessPublishAssortmentCallback {
|
|
5
|
-
constructor(_config) {
|
|
6
|
-
this.config = _config;
|
|
7
|
-
}
|
|
8
|
-
async process(event) {
|
|
9
|
-
console.log('ProcessPublishAssortmentCallback-process()');
|
|
10
|
-
console.log('ProcessPublishAssortmentCallback-event: ' + JSON.stringify(event));
|
|
11
|
-
console.log('ProcessPublishAssortmentCallback-config: ' + JSON.stringify(this.config));
|
|
12
|
-
const statusCounts = this.config['statusCounts'];
|
|
13
|
-
console.log('statusCounts: ' + JSON.stringify(statusCounts));
|
|
14
|
-
return {
|
|
15
|
-
message: 'Done ProcessPublishAssortmentCallback-process()'
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.BaseProcessPublishAssortmentCallback = BaseProcessPublishAssortmentCallback;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseProcessPublishAssortmentCallback = void 0;
|
|
4
|
+
class BaseProcessPublishAssortmentCallback {
|
|
5
|
+
constructor(_config) {
|
|
6
|
+
this.config = _config;
|
|
7
|
+
}
|
|
8
|
+
async process(event) {
|
|
9
|
+
console.log('ProcessPublishAssortmentCallback-process()');
|
|
10
|
+
console.log('ProcessPublishAssortmentCallback-event: ' + JSON.stringify(event));
|
|
11
|
+
console.log('ProcessPublishAssortmentCallback-config: ' + JSON.stringify(this.config));
|
|
12
|
+
const statusCounts = this.config['statusCounts'];
|
|
13
|
+
console.log('statusCounts: ' + JSON.stringify(statusCounts));
|
|
14
|
+
return {
|
|
15
|
+
message: 'Done ProcessPublishAssortmentCallback-process()'
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.BaseProcessPublishAssortmentCallback = BaseProcessPublishAssortmentCallback;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { FCConfig, ProductFederation, SeasonalPayload, SeasonFederation, SkuFederation } from '../interfaces/interfaces';
|
|
2
|
-
import { DataConverter } from '../util/data-converter';
|
|
3
|
-
import { ItemFamilyChanges } from '../interfaces/item-family-changes';
|
|
4
|
-
import { PublishChangeData } from '../interfaces/publish-change-data';
|
|
5
|
-
import { MapFileUtil } from '@contrail/transform-data';
|
|
6
|
-
export declare class BaseProcessPublishAssortment {
|
|
7
|
-
private TTL;
|
|
8
|
-
static ASSORTMENT_NOT_PUBLISHABLE: string;
|
|
9
|
-
static ASSORTMENT_NO_FED_INFO: string;
|
|
10
|
-
private dc;
|
|
11
|
-
private config;
|
|
12
|
-
private mapFileUtil;
|
|
13
|
-
private transformMapFile;
|
|
14
|
-
constructor(_config: FCConfig, _dc: DataConverter, _mapFileUtil: MapFileUtil);
|
|
15
|
-
process(event: any): Promise<{
|
|
16
|
-
results: {
|
|
17
|
-
message: any;
|
|
18
|
-
};
|
|
19
|
-
skip_await: boolean;
|
|
20
|
-
} | {
|
|
21
|
-
results: any;
|
|
22
|
-
skip_await?: undefined;
|
|
23
|
-
}>;
|
|
24
|
-
getSeasonFederation(assortmentId: any): Promise<SeasonFederation>;
|
|
25
|
-
getSinceDate(assortmentId: any, assortmentPublishChangeId: any): Promise<Date>;
|
|
26
|
-
getApcHistory(assortmentId: any): Promise<any>;
|
|
27
|
-
protected updatedSinceDate(entity: any, sinceDate: Date): boolean;
|
|
28
|
-
getSinceDateFromAPCs(apcHistory: any[], assortmentPublishChangeId: string, pastPublishCount?: number): Date;
|
|
29
|
-
private downloadAssortmentPublishChange;
|
|
30
|
-
downloadHydratedChangeDetail(assortmentPublishChange: any): Promise<any>;
|
|
31
|
-
downloadFullChange(assortmentPublishChange: any): Promise<any>;
|
|
32
|
-
getAllItemIds(changeDetail: any, fullChange: any): string[];
|
|
33
|
-
getItemFederatedIds(): Promise<Map<string, string>>;
|
|
34
|
-
getFullChangeAssortmentMap(fullChange: any): Map<string, object>;
|
|
35
|
-
getReleasedForDevelopmentItemAndFamilyIds(fullChange: any): string[];
|
|
36
|
-
processPublish(pcd: PublishChangeData, changeDetail: any, fullChange: any): Promise<{
|
|
37
|
-
results: {
|
|
38
|
-
message: string;
|
|
39
|
-
};
|
|
40
|
-
skip_await: boolean;
|
|
41
|
-
} | {
|
|
42
|
-
results: any;
|
|
43
|
-
skip_await?: undefined;
|
|
44
|
-
}>;
|
|
45
|
-
private sendEvents;
|
|
46
|
-
private sendToFlexPLM;
|
|
47
|
-
private saveToLocalFile;
|
|
48
|
-
private handleVibeIQFile;
|
|
49
|
-
private getCurrentDateString;
|
|
50
|
-
getItemFamilyChanges(publishChangeData: PublishChangeData, changeDetail: any, assortmentItemFullChangeMap: Map<string, any>): Map<string, ItemFamilyChanges>;
|
|
51
|
-
getEventsForPublishChangeData(publishChangeData: PublishChangeData): Promise<SeasonalPayload[]>;
|
|
52
|
-
getEventsForItemFamilyChanges(itemFamilyChanges: ItemFamilyChanges, assortmentId: string, seasonFed: SeasonFederation, itemToFederatedIdMapping: Map<string, string>): Promise<SeasonalPayload[]>;
|
|
53
|
-
getProjectItem(itemFamilyChanges: ItemFamilyChanges, id: string): any;
|
|
54
|
-
getSeasonalData(projectItem: any): Promise<object>;
|
|
55
|
-
protected getProductFederation(entityReference: string, itemToFederatedIdMapping: Map<string, string>, itemFamilyObject: any): Promise<ProductFederation>;
|
|
56
|
-
protected getSKUFederation(entityReference: string, itemToFederatedIdMapping: Map<string, string>, itemObject: any): Promise<SkuFederation>;
|
|
57
|
-
}
|
|
1
|
+
import { FCConfig, ProductFederation, SeasonalPayload, SeasonFederation, SkuFederation } from '../interfaces/interfaces';
|
|
2
|
+
import { DataConverter } from '../util/data-converter';
|
|
3
|
+
import { ItemFamilyChanges } from '../interfaces/item-family-changes';
|
|
4
|
+
import { PublishChangeData } from '../interfaces/publish-change-data';
|
|
5
|
+
import { MapFileUtil } from '@contrail/transform-data';
|
|
6
|
+
export declare class BaseProcessPublishAssortment {
|
|
7
|
+
private TTL;
|
|
8
|
+
static ASSORTMENT_NOT_PUBLISHABLE: string;
|
|
9
|
+
static ASSORTMENT_NO_FED_INFO: string;
|
|
10
|
+
private dc;
|
|
11
|
+
private config;
|
|
12
|
+
private mapFileUtil;
|
|
13
|
+
private transformMapFile;
|
|
14
|
+
constructor(_config: FCConfig, _dc: DataConverter, _mapFileUtil: MapFileUtil);
|
|
15
|
+
process(event: any): Promise<{
|
|
16
|
+
results: {
|
|
17
|
+
message: any;
|
|
18
|
+
};
|
|
19
|
+
skip_await: boolean;
|
|
20
|
+
} | {
|
|
21
|
+
results: any;
|
|
22
|
+
skip_await?: undefined;
|
|
23
|
+
}>;
|
|
24
|
+
getSeasonFederation(assortmentId: any): Promise<SeasonFederation>;
|
|
25
|
+
getSinceDate(assortmentId: any, assortmentPublishChangeId: any): Promise<Date>;
|
|
26
|
+
getApcHistory(assortmentId: any): Promise<any>;
|
|
27
|
+
protected updatedSinceDate(entity: any, sinceDate: Date): boolean;
|
|
28
|
+
getSinceDateFromAPCs(apcHistory: any[], assortmentPublishChangeId: string, pastPublishCount?: number): Date;
|
|
29
|
+
private downloadAssortmentPublishChange;
|
|
30
|
+
downloadHydratedChangeDetail(assortmentPublishChange: any): Promise<any>;
|
|
31
|
+
downloadFullChange(assortmentPublishChange: any): Promise<any>;
|
|
32
|
+
getAllItemIds(changeDetail: any, fullChange: any): string[];
|
|
33
|
+
getItemFederatedIds(): Promise<Map<string, string>>;
|
|
34
|
+
getFullChangeAssortmentMap(fullChange: any): Map<string, object>;
|
|
35
|
+
getReleasedForDevelopmentItemAndFamilyIds(fullChange: any): string[];
|
|
36
|
+
processPublish(pcd: PublishChangeData, changeDetail: any, fullChange: any): Promise<{
|
|
37
|
+
results: {
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
skip_await: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
results: any;
|
|
43
|
+
skip_await?: undefined;
|
|
44
|
+
}>;
|
|
45
|
+
private sendEvents;
|
|
46
|
+
private sendToFlexPLM;
|
|
47
|
+
private saveToLocalFile;
|
|
48
|
+
private handleVibeIQFile;
|
|
49
|
+
private getCurrentDateString;
|
|
50
|
+
getItemFamilyChanges(publishChangeData: PublishChangeData, changeDetail: any, assortmentItemFullChangeMap: Map<string, any>): Map<string, ItemFamilyChanges>;
|
|
51
|
+
getEventsForPublishChangeData(publishChangeData: PublishChangeData): Promise<SeasonalPayload[]>;
|
|
52
|
+
getEventsForItemFamilyChanges(itemFamilyChanges: ItemFamilyChanges, assortmentId: string, seasonFed: SeasonFederation, itemToFederatedIdMapping: Map<string, string>): Promise<SeasonalPayload[]>;
|
|
53
|
+
getProjectItem(itemFamilyChanges: ItemFamilyChanges, id: string): any;
|
|
54
|
+
getSeasonalData(projectItem: any): Promise<object>;
|
|
55
|
+
protected getProductFederation(entityReference: string, itemToFederatedIdMapping: Map<string, string>, itemFamilyObject: any): Promise<ProductFederation>;
|
|
56
|
+
protected getSKUFederation(entityReference: string, itemToFederatedIdMapping: Map<string, string>, itemObject: any): Promise<SkuFederation>;
|
|
57
|
+
}
|