@izara_project/izara-market-library-service-schemas 1.0.14 → 1.0.16

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.
Files changed (67) hide show
  1. package/package.json +5 -5
  2. package/src/GenerateCodeLibs/src/Consts.js +3 -1
  3. package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +122 -98
  4. package/src/MainLibs/src/Utils.js +10 -9
  5. package/src/TemplateManager/src/FindData/GetByStorage/getByGraph.ejs +2 -1
  6. package/src/TemplateManager/src/GenerateCode.js +55 -12
  7. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/functionYaml/data.js +86 -0
  8. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/functionYaml/template.ejs +33 -0
  9. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/handler/data.js +59 -0
  10. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/handler/template.ejs +129 -0
  11. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/mainFunction/data.js +53 -0
  12. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/mainFunction/template.ejs +130 -0
  13. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/sns-out/data.js +62 -0
  14. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/sqs-in-sns/data.js +58 -0
  15. package/src/TemplateManager/src/OutPerActionComplete/OutGetComplete/sqs-in-sns/template.ejs +47 -0
  16. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrApi/data.js +15 -7
  17. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrDsq/data.js +14 -6
  18. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrInv/data.js +14 -4
  19. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrSqs/data.js +14 -4
  20. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrWbs/data.js +171 -0
  21. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrWbs/request.json +19 -0
  22. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrWbs/template.ejs +29 -0
  23. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/webSocketConnect/data.js +60 -0
  24. package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/webSocketConnect/template.ejs +10 -0
  25. package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrDsq/template.ejs +15 -12
  26. package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrSqs/template.ejs +14 -13
  27. package/src/TemplateManager/src/PerActionEndpoint/Handler/WebSocket/data.js +76 -0
  28. package/src/TemplateManager/src/PerActionEndpoint/Handler/WebSocket/template.ejs +141 -0
  29. package/src/TemplateManager/src/PerActionEndpoint/Handler/WebSocketConnect/data.js +56 -0
  30. package/src/TemplateManager/src/PerActionEndpoint/Handler/WebSocketConnect/template.ejs +55 -0
  31. package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Create/template.ejs +40 -36
  32. package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Delete/template.ejs +0 -1
  33. package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Get/template.ejs +54 -22
  34. package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Update/template.ejs +23 -27
  35. package/src/TemplateManager/src/ProcessLogical/mainFunction/template.ejs +2 -2
  36. package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/functionYaml/HdrSqs/template.ejs +4 -0
  37. package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrApi/template.ejs +2 -1
  38. package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrDsq/template.ejs +1 -5
  39. package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationship/perAction/HdrSqs/template.ejs +1 -5
  40. package/src/TemplateManager/src/RelationshipPerAction/CreateRelationship/createRelationshipComplete/mainFunction/template.ejs +11 -7
  41. package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/functionYaml/HdrSqs/template.ejs +4 -0
  42. package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrApi/template.ejs +5 -4
  43. package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationship/perAction/HdrInv/template.ejs +3 -2
  44. package/src/TemplateManager/src/RelationshipPerAction/DeleteRelationship/DeleteRelationshipComplete/mainFunction/template.ejs +16 -13
  45. package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRalationshipComplete/mainFunction/template.ejs +9 -6
  46. package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/functionYaml/HdrSqs/template.ejs +4 -0
  47. package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrApi/template.ejs +8 -5
  48. package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrDsq/template.ejs +1 -1
  49. package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrInv/template.ejs +10 -8
  50. package/src/TemplateManager/src/RelationshipPerAction/UpdateRelationshipSchema/updateRelationship/perAction/HdrSqs/template.ejs +1 -1
  51. package/src/TemplateManager/src/ResourceYaml/dynamodb/{awaitingMultipleStepData.js → defaultDynamoDbTable.js} +39 -3
  52. package/src/TemplateManager/src/ResourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +6 -3
  53. package/src/TemplateManager/src/externalService/FunctionNameConfig/data.js +1 -1
  54. package/src/TemplateManager/src/externalService/LambdaRole/data.js +5 -10
  55. package/src/TemplateManager/src/externalService/SnsTopicSubscriotions/data.js +14 -0
  56. package/src/TemplateManager/src/flowTag/resources/dynamoDb/data.js +65 -0
  57. package/src/TemplateManager/src/flowTag/webSocket/webSocketConnect/functionYaml/data.js +56 -0
  58. package/src/TemplateManager/src/flowTag/webSocket/webSocketConnect/functionYaml/template.ejs +10 -0
  59. package/src/TemplateManager/src/flowTag/webSocket/webSocketConnect/handler/data.js +55 -0
  60. package/src/TemplateManager/src/flowTag/webSocket/webSocketConnect/handler/template.ejs +63 -0
  61. package/src/TemplateManager/src/flowTag/webSocket/websocketHandler/functionYaml/data.js +75 -0
  62. package/src/TemplateManager/src/flowTag/webSocket/websocketHandler/functionYaml/template.ejs +33 -0
  63. package/src/TemplateManager/src/flowTag/webSocket/websocketHandler/lambda/data.js +57 -0
  64. package/src/TemplateManager/src/flowTag/webSocket/websocketHandler/lambda/template.ejs +131 -0
  65. package/src/TemplateManager/src/libs/Consts.js +7 -2
  66. package/src/TemplateManager/src/libs/GenerateCodeUtils.js +3 -1
  67. package/src/TemplateManager/src/ResourceYaml/dynamodb/processLogicalAndFindData.js +0 -99
@@ -1,99 +0,0 @@
1
- /*
2
- Copyright (C) 2020 Sven Mason <http://izara.io>
3
-
4
- This program is free software: you can redistribute it and/or modify
5
- it under the terms of the GNU Affero General Public License as
6
- published by the Free Software Foundation, either version 3 of the
7
- License, or (at your option) any later version.
8
-
9
- This program is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU Affero General Public License for more details.
13
-
14
- You should have received a copy of the GNU Affero General Public License
15
- along with this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
17
-
18
- 'use strict';
19
-
20
- const path = require("path")
21
-
22
-
23
- // const {
24
- // HANDLER,
25
- // STORAGE_TYPES
26
- // } = require('@izara_project/izara-core-library-service-schemas/src/Consts');
27
-
28
- const STORAGE_TYPES = {
29
- dynamoDB: "dynamoDB",
30
- graph: "graph"
31
- }
32
- const templatePath = path.join(__dirname, './template.ejs')
33
- const { SOURCE_PATH, SAVE_FILE_NAME } = require('../../libs/Consts');
34
-
35
- /**
36
- * create param of crateSouce for FindData And processLogical
37
- *
38
- * @param {Object} _izContext
39
- * @param {String} srcPath
40
- * @returns {Object[]}
41
- */
42
- const createDefaultSourceDataDynamoDB = (_izContext, srcPath) => {
43
-
44
- let resultsForCreateSource = [];
45
-
46
- const defaultDynamoDataList = [
47
- {
48
- "tableName": "FindDataMain",
49
- "attributes": [
50
- {
51
- "keyType": "partitionKey",
52
- "AttributeName": "findDataId",
53
- "AttributeType": "S"
54
- }
55
- ]
56
- },
57
- {
58
- "tableName": "LogicalResultsMain",
59
- "attributes": [
60
- {
61
- "keyType": "partitionKey",
62
- "AttributeName": "logicalResultId",
63
- "AttributeType": "S"
64
- }
65
- ]
66
- },
67
- {
68
- "tableName": "LogicalResultsData",
69
- "attributes": [
70
- {
71
- "keyType": "partitionKey",
72
- "AttributeName": "logicalResultId",
73
- "AttributeType": "S"
74
- },
75
- {
76
- "keyType": "sortKey",
77
- "AttributeName": "identifiersId",
78
- "AttributeType": "S"
79
- }
80
- ]
81
- }
82
- ];
83
-
84
- for (let defaultlDynamoData of defaultDynamoDataList) {
85
- resultsForCreateSource.push({
86
- templatePath: templatePath,
87
- templateData: defaultlDynamoData,
88
- setting: {
89
- initialData: 'Resources:\n',
90
- savePath: path.join(srcPath, SOURCE_PATH.resourceYaml),
91
- saveFileName: SAVE_FILE_NAME.dynamoDbYaml,
92
- fileExtension: '.yml',
93
- isAppend: true
94
- }
95
- });
96
- }
97
- return resultsForCreateSource;
98
- }
99
- module.exports = createDefaultSourceDataDynamoDB