@izara_project/izara-core-library-find-data 1.0.8 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-core-library-find-data",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Shared find data logic",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,14 +35,12 @@ import storedCacheSharedLib from "@izara_project/izara-core-library-stored-cache
35
35
  function createFindDataId(
36
36
  fieldName,
37
37
  objType,
38
- identifiers,
39
- requestProperties = {}
38
+ identifiers
40
39
  ) {
41
40
  return hash({
42
41
  fieldName: fieldName,
43
42
  objType: objType,
44
- identifiers: identifiers,
45
- requestProperties: requestProperties
43
+ identifiers: identifiers
46
44
  });
47
45
  }
48
46
 
@@ -61,9 +59,9 @@ async function checkFindDataMainStatus(
61
59
  fieldName,
62
60
  objType,
63
61
  identifiers,
64
- requestProperties,
65
62
  callingFlow = "",
66
- removeAttributes = []
63
+ removeAttributes = [],
64
+ overWriteCache = false
67
65
  ) {
68
66
  try {
69
67
 
@@ -71,7 +69,6 @@ async function checkFindDataMainStatus(
71
69
  fieldName,
72
70
  objType,
73
71
  identifiers,
74
- requestProperties
75
72
  );
76
73
 
77
74
  let [cacheStatus, findDataMain] = await storedCacheSharedLib.checkStoredCacheStatus(
@@ -84,12 +81,17 @@ async function checkFindDataMainStatus(
84
81
  attributes: {
85
82
  fieldName: fieldName,
86
83
  objType: objType,
87
- identifiers: identifiers,
88
- requestProperties: requestProperties
84
+ identifiers: identifiers
89
85
  }
90
86
  },
91
87
  'findData', // prefix
92
- removeAttributes // removeAttributes
88
+ removeAttributes,// removeAttributes
89
+ [],
90
+ [],// removeAttributes
91
+ "", // used when multi invocation lambdas need to link to the original uniqueRequestId
92
+ false, // will return recordNotFound if record not exist, and not create the record, eg sub-tasks for a main record
93
+ null,
94
+ overWriteCache,
93
95
  );
94
96
  if (cacheStatus !== "process") {
95
97
  // is either complete, processing by another thread, error, or some other status
@@ -104,7 +106,6 @@ async function checkFindDataMainStatus(
104
106
  fieldName,
105
107
  objType,
106
108
  identifiers,
107
- requestProperties,
108
109
  findDataMain.dataValue,
109
110
  findDataMain[storedCacheSharedLib.createFieldNameCacheComplete('findData')],
110
111
  callingFlow,
@@ -135,7 +136,6 @@ async function completeFindDataMain(
135
136
  fieldName,
136
137
  objType,
137
138
  identifiers,
138
- requestProperties,
139
139
  dataValue,
140
140
  callingFlow = "",
141
141
  status,
@@ -155,7 +155,6 @@ async function completeFindDataMain(
155
155
  fieldName,
156
156
  objType,
157
157
  identifiers,
158
- requestProperties,
159
158
  dataValue,
160
159
  timeCacheComplete,
161
160
  callingFlow,
@@ -168,8 +167,7 @@ async function completeFindDataMain(
168
167
  const findDataId = createFindDataId(
169
168
  fieldName,
170
169
  objType,
171
- identifiers,
172
- requestProperties
170
+ identifiers
173
171
  );
174
172
 
175
173
  await storedCacheSharedLib.completeStoredCache(
@@ -247,7 +245,6 @@ async function sendFindDataCompleteMessage(
247
245
  fieldName,
248
246
  objType,
249
247
  identifiers,
250
- requestProperties,
251
248
  dataValue,
252
249
  timeCacheComplete = 0,
253
250
  callingFlow = "",
@@ -265,7 +262,6 @@ async function sendFindDataCompleteMessage(
265
262
  fieldName: fieldName,
266
263
  objType: objType,
267
264
  identifiersObject: identifiers,
268
- requestProperties: requestProperties,
269
265
  dataValue: dataValue,
270
266
  status: status,
271
267
  errorsFound: errorsFound,