@izara_project/izara-market-library-service-schemas 1.0.21 → 1.0.23
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 +8 -7
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +97 -1
- package/src/SourceManager/src/CreateSource.js +11 -1
- package/src/TemplateManager/src/FindData/mainFunction/data.js +28 -27
- package/src/TemplateManager/src/GenerateCode.js +6 -5
- package/src/TemplateManager/src/GenerateSchema.js +103 -0
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrApi/data.js +9 -6
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrApi/template.ejs +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrDsq/data.js +5 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrInv/data.js +5 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrInv/template.ejs +1 -1
- package/src/TemplateManager/src/PerActionEndpoint/FunctionYaml/HdrSqs/data.js +3 -1
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrApi/data.js +4 -0
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrDsq/data.js +3 -0
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrInv/data.js +3 -0
- package/src/TemplateManager/src/PerActionEndpoint/Handler/HdrSqs/data.js +3 -0
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Create/data.js +3 -0
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Delete/data.js +3 -0
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Get/data.js +3 -0
- package/src/TemplateManager/src/PerActionEndpoint/MainFunction/Update/data.js +3 -1
- package/src/TemplateManager/src/Role/createSharedResource.js +17 -14
- package/src/TemplateManager/src/attributeTree/objectSchema/data.js +128 -0
- package/src/TemplateManager/src/attributeTree/objectSchema/template.ejs +21 -0
- package/src/TemplateManager/src/attributeTree/refRelationshipSchema/data.js +36 -0
- package/src/TemplateManager/src/attributeTree/refRelationshipSchema/template.ejs +0 -0
- package/src/TemplateManager/src/attributeTree/relationshipSchema/data.js +206 -0
- package/src/TemplateManager/src/attributeTree/relationshipSchema/template.ejs +7 -0
- package/src/TemplateManager/src/externalService/FunctionNameConfig/data.js +11 -6
- package/src/TemplateManager/src/externalService/LambdaRole/data.js +2 -2
- package/src/TemplateManager/src/externalService/SnsTopicSubscriotions/data.js +1 -1
- package/src/TemplateManager/src/libs/Consts.js +92 -2
- package/src/TemplateManager/src/reStructureExample/TemplateConfig.js +7 -3
- package/src/TemplateManager/src/reStructureExample/TemplateData/perAction/generatePerAction.js +9 -2
|
@@ -122,9 +122,9 @@ const SOURCE_PATH = {
|
|
|
122
122
|
resourceLocationLogicalFunctionHook: "src/generatedCode/WebSocket/source/FlowSchemaHook/HookLogicFunction/source",
|
|
123
123
|
generatedCodeHookFunction: "../src/generatedCode/WebSocket/source/FlowSchemaHook/HookFunctionGeneratedCode/source/",
|
|
124
124
|
resourceLocationGeneratedCodeHookFunction: "src/generatedCode/WebSocket/source/FlowSchemaHook/HookFunctionGeneratedCode/source/",
|
|
125
|
+
generatedAttributeTree: "../src/schemas/generatedCode/source/"
|
|
125
126
|
};
|
|
126
127
|
|
|
127
|
-
|
|
128
128
|
const DEFAULT_LAMBDA_ROLE_PER_ACTION = {
|
|
129
129
|
[ACTIONS.create]: {
|
|
130
130
|
dynamoDbPermission: 'PutItem',
|
|
@@ -219,6 +219,9 @@ const SAVE_FILE_NAME = {
|
|
|
219
219
|
flowSchema: "flowSchema",
|
|
220
220
|
S3Bucket: "generated-s3-bucket",
|
|
221
221
|
sharedResourceYaml: "generate-SharedResource",
|
|
222
|
+
attributeTreeObjectRelationship: "ObjectRelationships",
|
|
223
|
+
attributeTreeRefObjectRelationship: "RefObjectRelationships",
|
|
224
|
+
attributeTreeObjectSchema: "ObjectFieldSchema"
|
|
222
225
|
};
|
|
223
226
|
|
|
224
227
|
const FUNCTION_NAME = {
|
|
@@ -361,10 +364,92 @@ function shortNameHandler(fullNameHandler) {
|
|
|
361
364
|
const SOURCE_GENERATE_IAM_ROLE = {
|
|
362
365
|
ProcessFindDataRole: "ProcFindData",
|
|
363
366
|
ObjectCompleteRole: "ObjectCom",
|
|
367
|
+
NodeCompleteRole: "NodeCom",
|
|
364
368
|
RelationshipRole: "Relationship",
|
|
365
369
|
RelationshipCompleteRole: "RelationshipCom",
|
|
366
370
|
};
|
|
367
371
|
|
|
372
|
+
const ADD_ON_DATA_STRUCTURE_TYPE = {
|
|
373
|
+
versionedData: "versionedData",
|
|
374
|
+
attributeTree: "attributeTree"
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
const ATTRIBUTE_TAG = {
|
|
378
|
+
attributeTagLabel: "Label",
|
|
379
|
+
attributeTagLink: "Link",
|
|
380
|
+
attributeTagProperty: "Property",
|
|
381
|
+
attributeTagPropertyLabel: "PropertyLabel",
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
const FIELD_NAME_TPYE = {
|
|
385
|
+
identifiers: "identifiers",
|
|
386
|
+
nonIdentifiers: "nonIdentifiers",
|
|
387
|
+
requiredOnCreateFieldName: "requiredOnCreateFieldName",
|
|
388
|
+
randomOnCreateFieldName: "randomOnCreateFieldName",
|
|
389
|
+
optionalOnCreate: "optionalOnCreate"
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
function fieldNameSetting(fieldNameType) {
|
|
393
|
+
const stringValidation = "^[a-zA-Z0-9-_]+$"
|
|
394
|
+
return {
|
|
395
|
+
[FIELD_NAME_TPYE.identifiers]: {
|
|
396
|
+
type: "string",
|
|
397
|
+
requiredOnCreate: true,
|
|
398
|
+
optionalOnCreate: false,
|
|
399
|
+
canUpdate: false,
|
|
400
|
+
randomOnCreate: false,
|
|
401
|
+
validation: {
|
|
402
|
+
pattern: stringValidation
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
[FIELD_NAME_TPYE.nonIdentifiers]: {
|
|
406
|
+
type: "string",
|
|
407
|
+
requiredOnCreate: false,
|
|
408
|
+
optionalOnCreate: false,
|
|
409
|
+
canUpdate: true,
|
|
410
|
+
randomOnCreate: false,
|
|
411
|
+
validation: {
|
|
412
|
+
pattern: stringValidation
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
[FIELD_NAME_TPYE.requiredOnCreateFieldName]: {
|
|
416
|
+
type: "string",
|
|
417
|
+
requiredOnCreate: true,
|
|
418
|
+
optionalOnCreate: false,
|
|
419
|
+
canUpdate: false,
|
|
420
|
+
randomOnCreate: false,
|
|
421
|
+
validation: {
|
|
422
|
+
pattern: stringValidation
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
[FIELD_NAME_TPYE.randomOnCreateFieldName]: {
|
|
426
|
+
type: "string",
|
|
427
|
+
requiredOnCreate: true,
|
|
428
|
+
optionalOnCreate: false,
|
|
429
|
+
canUpdate: false,
|
|
430
|
+
randomOnCreate: false,
|
|
431
|
+
validation: {
|
|
432
|
+
pattern: stringValidation
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
[FIELD_NAME_TPYE.optionalOnCreate]: {
|
|
436
|
+
type: "string",
|
|
437
|
+
requiredOnCreate: false,
|
|
438
|
+
optionalOnCreate: true,
|
|
439
|
+
canUpdate: false,
|
|
440
|
+
randomOnCreate: false,
|
|
441
|
+
validation: {
|
|
442
|
+
pattern: stringValidation
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}[fieldNameType]
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
const PREFIX_RELATIONSHIP = {
|
|
449
|
+
has: "has",
|
|
450
|
+
is: "is",
|
|
451
|
+
disabled: "disabled"
|
|
452
|
+
}
|
|
368
453
|
|
|
369
454
|
module.exports = {
|
|
370
455
|
ACTIONS,
|
|
@@ -391,5 +476,10 @@ module.exports = {
|
|
|
391
476
|
shortNameHandler,
|
|
392
477
|
SHORT_FUNCTION_NAME,
|
|
393
478
|
S3_RESOURCE,
|
|
394
|
-
SOURCE_GENERATE_IAM_ROLE
|
|
479
|
+
SOURCE_GENERATE_IAM_ROLE,
|
|
480
|
+
fieldNameSetting,
|
|
481
|
+
FIELD_NAME_TPYE,
|
|
482
|
+
ADD_ON_DATA_STRUCTURE_TYPE,
|
|
483
|
+
ATTRIBUTE_TAG,
|
|
484
|
+
PREFIX_RELATIONSHIP
|
|
395
485
|
}
|