@plusscommunities/pluss-maintenance-aws-a 2.1.20-auth.0 → 2.1.21-auth.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/db/maintenance/addMaintenanceJob.js +1 -0
- package/feature.config.js +25 -0
- package/getData.js +7 -0
- package/integration/IntegrationStrategy.js +6 -0
- package/integration/archibus/ArchibusStrategy.js +706 -573
- package/integration/index.js +3 -0
- package/integration/seestuff/SeeStuffStrategy.js +298 -0
- package/jobChanged.js +1 -1
- package/jobTypesChanged.js +55 -0
- package/package.json +2 -2
- package/requests/getExternalSync.js +147 -0
- package/requests/getRequests.js +237 -97
- package/requests/retrySync.js +161 -0
- package/requests/setExternalJobId.js +124 -0
- package/scheduleJobImport.js +9 -3
- package/updateData.js +13 -0
- package/values.config.a.js +1 -0
- package/values.config.default.js +1 -0
- package/values.config.enquiry.js +1 -0
- package/values.config.feedback.js +1 -0
- package/values.config.food.js +1 -0
- package/values.config.forms.js +1 -0
- package/values.config.js +1 -0
- package/package-lock.json +0 -7847
package/feature.config.js
CHANGED
|
@@ -17,6 +17,7 @@ exports.entity = {
|
|
|
17
17
|
|
|
18
18
|
exports.serverless = {
|
|
19
19
|
name: values.serviceKey,
|
|
20
|
+
useVpc: true, // Enable VPC routing for static outbound IP (requires vpcConfig in config/index.js)
|
|
20
21
|
apis: [
|
|
21
22
|
{
|
|
22
23
|
name: "getJobType",
|
|
@@ -154,6 +155,14 @@ exports.serverless = {
|
|
|
154
155
|
timeout: 300,
|
|
155
156
|
table: values.tableKeyMaintenance,
|
|
156
157
|
},
|
|
158
|
+
{
|
|
159
|
+
name: "jobTypesChanged",
|
|
160
|
+
file: "jobTypesChanged",
|
|
161
|
+
function: "jobTypesChanged",
|
|
162
|
+
memorySize: 512,
|
|
163
|
+
timeout: 60,
|
|
164
|
+
table: values.tableKeyJobTypes,
|
|
165
|
+
},
|
|
157
166
|
],
|
|
158
167
|
schedules: [
|
|
159
168
|
{
|
|
@@ -202,6 +211,8 @@ exports.serverless = {
|
|
|
202
211
|
{ name: "jobId", type: "S" },
|
|
203
212
|
{ name: "jobNo", type: "N" },
|
|
204
213
|
{ name: "userID", type: "S" },
|
|
214
|
+
{ name: "AssigneeId", type: "S" },
|
|
215
|
+
{ name: "status", type: "S" },
|
|
205
216
|
],
|
|
206
217
|
id: "id",
|
|
207
218
|
indexes: [
|
|
@@ -230,6 +241,20 @@ exports.serverless = {
|
|
|
230
241
|
{ name: "userID", type: "RANGE" },
|
|
231
242
|
],
|
|
232
243
|
},
|
|
244
|
+
{
|
|
245
|
+
name: "MaintenanceSiteAssigneeIndex",
|
|
246
|
+
keys: [
|
|
247
|
+
{ name: "site", type: "HASH" },
|
|
248
|
+
{ name: "AssigneeId", type: "RANGE" },
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "MaintenanceSiteStatusIndex",
|
|
253
|
+
keys: [
|
|
254
|
+
{ name: "site", type: "HASH" },
|
|
255
|
+
{ name: "status", type: "RANGE" },
|
|
256
|
+
],
|
|
257
|
+
},
|
|
233
258
|
],
|
|
234
259
|
},
|
|
235
260
|
{
|
package/getData.js
CHANGED
|
@@ -5,6 +5,7 @@ const generateJsonResponse = require("@plusscommunities/pluss-core-aws/helper/ge
|
|
|
5
5
|
const getAssignees = require("./requests/getAssignees");
|
|
6
6
|
const getRequests = require("./requests/getRequests");
|
|
7
7
|
const getRequest = require("./requests/getRequest");
|
|
8
|
+
const getExternalSync = require("./requests/getExternalSync");
|
|
8
9
|
|
|
9
10
|
module.exports.getData = async (event, context, callback) => {
|
|
10
11
|
init(config);
|
|
@@ -34,6 +35,12 @@ module.exports.getData = async (event, context, callback) => {
|
|
|
34
35
|
log(action, "ResponseLength", response.data.Users.length, logId);
|
|
35
36
|
}
|
|
36
37
|
break;
|
|
38
|
+
case "externalsync":
|
|
39
|
+
response = await getExternalSync(event);
|
|
40
|
+
if (response.status === 200) {
|
|
41
|
+
log(action, "ExternalSystem", response.data.externalSystem, logId);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
37
44
|
default:
|
|
38
45
|
break;
|
|
39
46
|
}
|
|
@@ -45,6 +45,12 @@ class IntegrationStrategy {
|
|
|
45
45
|
onCompleteRequest = async (request) => {
|
|
46
46
|
return null;
|
|
47
47
|
};
|
|
48
|
+
|
|
49
|
+
// TODO: Remove once all existing records have ActiveEntityType (PC-1382)
|
|
50
|
+
// backfills ActiveEntityType on existing externalentities records for the sparse GSI migration
|
|
51
|
+
backfillActiveEntityType = async (timeout) => {
|
|
52
|
+
return { backfillCount: 0, complete: true };
|
|
53
|
+
};
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
module.exports = IntegrationStrategy;
|