@contrail/flexplm 1.1.61 → 1.1.63

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.
@@ -4,10 +4,10 @@ on:
4
4
  workflow_dispatch: # allow running in github actions manually
5
5
  jobs:
6
6
  test:
7
- runs-on: ubuntu-20.04
7
+ runs-on: ubuntu-24.04
8
8
  strategy:
9
9
  matrix:
10
- node-version: [16.17.0]
10
+ node-version: [22.14.0]
11
11
  steps:
12
12
  - name: Node.js
13
13
  uses: actions/setup-node@v3
@@ -462,7 +462,6 @@ class DataConverter {
462
462
  const currentObjPath = '' + currentObj['typePath'];
463
463
  if (!currentObjPath.startsWith(entityTypePath)) {
464
464
  found = false;
465
- break;
466
465
  }
467
466
  }
468
467
  for (const key in criteria) {
@@ -651,6 +651,19 @@ describe('checkKeysAndValues', () => {
651
651
  const results = dc.checkKeysAndValues(criteria, testData, typePath);
652
652
  expect(results.length).toBe(1);
653
653
  });
654
+ it('first & last entity have the wrong typePath', () => {
655
+ const criteria = {
656
+ objectId: "2562",
657
+ };
658
+ const typePath = 'custom-entity:group2';
659
+ const testData = [
660
+ { "typePath": "custom-entity:group1", "name": "BLACK (BK)", "id": "o1v2rh8olgQ78GcL", "objectId": "2562", "entityType": "custom-entity" },
661
+ { "typePath": "custom-entity:group2", "name": "BLACK (BK)", "id": "t5n22S2gqswe8GcL", "objectId": "2562", "entityType": "custom-entity" },
662
+ { "typePath": "custom-entity:group1", "name": "BLACK (BK)", "id": "t5rh8o2gqswk3drt", "objectId": "2562", "entityType": "custom-entity" }
663
+ ];
664
+ const results = dc.checkKeysAndValues(criteria, testData, typePath);
665
+ expect(results.length).toBe(1);
666
+ });
654
667
  });
655
668
  describe('setUserListValue', () => {
656
669
  const config = {
@@ -235,6 +235,8 @@ describe('ThumbnailUtil Tests', () => {
235
235
  tu.logContentResults(content, relations);
236
236
  expect(Object.keys(content)).toHaveLength(3);
237
237
  expect(content).toHaveProperty('primaryFile');
238
+ expect(content.primaryFile).toHaveProperty('id');
239
+ expect(content.primaryFile.id).toEqual('file123');
238
240
  });
239
241
  });
240
242
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/flexplm",
3
- "version": "1.1.61",
3
+ "version": "1.1.63",
4
4
  "description": "Library used for integration with flexplm.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,122 +1,122 @@
1
- export interface FCConfig {
2
- apiKey?: string;
3
- orgSlug?: string;
4
- action?: string;
5
- configFile? :string;
6
- eventObjectClassParam?: string;
7
- eventFlexTypePathParam?: string;
8
- flexplmConnect?: any;
9
- taskId?: string;
10
- apiHost: string;
11
- userName(): string;
12
- password(): string;
13
- plmEnviornment?: string;
14
- urlContext: string;
15
- vibeEventEndpoint: string;
16
- csrfEndpoint: string;
17
- itemPreDevelopmentLifecycleStages: string[];
18
- identifierAtts?: {
19
- [key:string]: string[]
20
- };
21
- propertyMapping?: object;
22
- [key: string]: any;
23
- }
24
-
25
- export interface ProductFederation {
26
- entityReference: string;
27
- objectClass: 'LCSProduct';
28
- federatedId?: string;
29
- flexPLMTypePath?: string;
30
- vibeIQIdentifier?: string
31
- }
32
- export interface ProductData extends ProductFederation {
33
- data: object;
34
- productSeason: {
35
- data: object;
36
- }
37
- }
38
-
39
- export interface SeasonFederation {
40
- entityReference: string;
41
- objectClass: 'LCSSeason';
42
- flexPLMSeasonName?: string;
43
- federationId?: string;
44
- flexPLMTypePath?: string;
45
- }
46
-
47
- export interface SeasonGroupFederation {
48
- entityReference: string;
49
- objectClass: 'SeasonGroup';
50
- seasonGroupName?: string;
51
- federationId?: string;
52
- flexPLMTypePath?: string;
53
- }
54
-
55
- export interface SkuFederation {
56
- entityReference: string;
57
- objectClass: 'LCSSKU';
58
- LCSProduct?: ProductFederation;
59
- federatedId?: string;
60
- flexPLMTypePath?: string;
61
- vibeIQIdentifier?: string;
62
- }
63
- export interface SkuData extends SkuFederation{
64
- data: object;
65
- }
66
-
67
- export interface PayloadType {
68
- eventType: string;
69
- objectClass: string;
70
- }
71
- export interface AsyncPayloadType extends PayloadType {
72
- taskId: string;
73
- }
74
- export interface AsyncEventsPayloadType extends AsyncPayloadType {
75
- events?: PayloadType[];
76
- eventsFileId?: string;
77
- eventsDownloadLink?: string;
78
- eventsAdminDownloadLink?: string;
79
- }
80
-
81
- export interface EntityPayloadType extends PayloadType {
82
- entityReference: string;
83
- federatedId?: string;
84
- flexPLMTypePath?: string;
85
- data: object;
86
- }
87
-
88
- export interface ItemPayloadType extends EntityPayloadType {
89
- LCSProduct?: ProductFederation;
90
- }
91
-
92
- /////////////////////////////////////////////////////////////////////////////
93
- ///////// Custom seasonalPayload: start
94
- /////////////////////////////////////////////////////////////////////////////
95
- export interface SeasonalPayload extends EntityPayloadType {
96
- eventType: 'UPSERT_ON_SEASON' | 'REMOVE_FROM_SEASON';
97
- objectClass: 'LCSProductSeasonLink' | 'LCSSKUSeasonLink';
98
- LCSSeason : SeasonFederation;
99
- LCSProduct? : ProductFederation;
100
- LCSSKU? : SkuFederation;
101
- carriedFromSeason? : object;
102
- }
103
- /////////////////////////////////////////////////////////////////////////////
104
- ///////// Custom seasonalPayload: start
105
- /////////////////////////////////////////////////////////////////////////////
106
-
107
- export interface ExportPayloadType extends AsyncPayloadType {
108
- flexPLMTypePath: string;
109
- }
110
-
111
- export interface FederationRecord {
112
- reference: string;
113
- mappedReference: string
114
- appIdentifier: string;
115
- federationSchema: string
116
- }
117
-
118
- export interface FlexPLMResponseData {
119
- status: number;
120
- data?: object;
121
- error?: string;
1
+ export interface FCConfig {
2
+ apiKey?: string;
3
+ orgSlug?: string;
4
+ action?: string;
5
+ configFile? :string;
6
+ eventObjectClassParam?: string;
7
+ eventFlexTypePathParam?: string;
8
+ flexplmConnect?: any;
9
+ taskId?: string;
10
+ apiHost: string;
11
+ userName(): string;
12
+ password(): string;
13
+ plmEnviornment?: string;
14
+ urlContext: string;
15
+ vibeEventEndpoint: string;
16
+ csrfEndpoint: string;
17
+ itemPreDevelopmentLifecycleStages: string[];
18
+ identifierAtts?: {
19
+ [key:string]: string[]
20
+ };
21
+ propertyMapping?: object;
22
+ [key: string]: any;
23
+ }
24
+
25
+ export interface ProductFederation {
26
+ entityReference: string;
27
+ objectClass: 'LCSProduct';
28
+ federatedId?: string;
29
+ flexPLMTypePath?: string;
30
+ vibeIQIdentifier?: string
31
+ }
32
+ export interface ProductData extends ProductFederation {
33
+ data: object;
34
+ productSeason: {
35
+ data: object;
36
+ }
37
+ }
38
+
39
+ export interface SeasonFederation {
40
+ entityReference: string;
41
+ objectClass: 'LCSSeason';
42
+ flexPLMSeasonName?: string;
43
+ federationId?: string;
44
+ flexPLMTypePath?: string;
45
+ }
46
+
47
+ export interface SeasonGroupFederation {
48
+ entityReference: string;
49
+ objectClass: 'SeasonGroup';
50
+ seasonGroupName?: string;
51
+ federationId?: string;
52
+ flexPLMTypePath?: string;
53
+ }
54
+
55
+ export interface SkuFederation {
56
+ entityReference: string;
57
+ objectClass: 'LCSSKU';
58
+ LCSProduct?: ProductFederation;
59
+ federatedId?: string;
60
+ flexPLMTypePath?: string;
61
+ vibeIQIdentifier?: string;
62
+ }
63
+ export interface SkuData extends SkuFederation{
64
+ data: object;
65
+ }
66
+
67
+ export interface PayloadType {
68
+ eventType: string;
69
+ objectClass: string;
70
+ }
71
+ export interface AsyncPayloadType extends PayloadType {
72
+ taskId: string;
73
+ }
74
+ export interface AsyncEventsPayloadType extends AsyncPayloadType {
75
+ events?: PayloadType[];
76
+ eventsFileId?: string;
77
+ eventsDownloadLink?: string;
78
+ eventsAdminDownloadLink?: string;
79
+ }
80
+
81
+ export interface EntityPayloadType extends PayloadType {
82
+ entityReference: string;
83
+ federatedId?: string;
84
+ flexPLMTypePath?: string;
85
+ data: object;
86
+ }
87
+
88
+ export interface ItemPayloadType extends EntityPayloadType {
89
+ LCSProduct?: ProductFederation;
90
+ }
91
+
92
+ /////////////////////////////////////////////////////////////////////////////
93
+ ///////// Custom seasonalPayload: start
94
+ /////////////////////////////////////////////////////////////////////////////
95
+ export interface SeasonalPayload extends EntityPayloadType {
96
+ eventType: 'UPSERT_ON_SEASON' | 'REMOVE_FROM_SEASON';
97
+ objectClass: 'LCSProductSeasonLink' | 'LCSSKUSeasonLink';
98
+ LCSSeason : SeasonFederation;
99
+ LCSProduct? : ProductFederation;
100
+ LCSSKU? : SkuFederation;
101
+ carriedFromSeason? : object;
102
+ }
103
+ /////////////////////////////////////////////////////////////////////////////
104
+ ///////// Custom seasonalPayload: start
105
+ /////////////////////////////////////////////////////////////////////////////
106
+
107
+ export interface ExportPayloadType extends AsyncPayloadType {
108
+ flexPLMTypePath: string;
109
+ }
110
+
111
+ export interface FederationRecord {
112
+ reference: string;
113
+ mappedReference: string
114
+ appIdentifier: string;
115
+ federationSchema: string
116
+ }
117
+
118
+ export interface FlexPLMResponseData {
119
+ status: number;
120
+ data?: object;
121
+ error?: string;
122
122
  }