@izara_project/izara-shared-service-schemas 1.0.13 → 1.0.15

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-shared-service-schemas",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Shared Libraries frontend/backend for Service Schemas",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@izara_project/izara-core-library-core": "^1.0.19",
24
+ "@izara_project/izara-shared-core": "^1.0.2",
24
25
  "lodash": "^4.17.21",
25
26
  "object-hash": "^3.0.0"
26
27
  }
package/src/Consts.js CHANGED
@@ -16,7 +16,7 @@ along with this program.If not, see < http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
18
  'use strict';
19
- const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
19
+ const NoRetryError = require('@izara_project/izara-core-library-core/').NoRetryError;
20
20
 
21
21
  const { validateRelType, validateObjType, validateFlowType } = require('./libs/ValidateObjType');
22
22
  /*
@@ -18,9 +18,9 @@ along with this program.If not, see < http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  const lodash = require('lodash');
21
- const hash = require('object-hash');
22
21
 
23
22
 
23
+ const hash = require('@izara_project/izara-shared-core').objectHash;
24
24
  const izaraCore = require('@izara_project/izara-core-library-core');
25
25
  const NoRetryError = izaraCore.NoRetryError;
26
26
  const { validateObject } = izaraCore.validator;
package/src/Utils.js CHANGED
@@ -17,7 +17,7 @@ along with this program.If not, see < http://www.gnu.org/licenses/>.
17
17
 
18
18
  'use strict';
19
19
 
20
- const hash = require('object-hash');
20
+ const hash = require('@izara_project/izara-shared-core').objectHash;
21
21
  const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
22
22
 
23
23
  const { validateObjType, validateRelType } = require('./libs/ValidateObjType');
@@ -117,6 +117,9 @@ const basicFieldNameSchema = {
117
117
  },
118
118
  logicOnCreate: {
119
119
  type: "boolean",
120
+ },
121
+ statusField: {
122
+ type: "boolean"
120
123
  }
121
124
  }
122
125
  }
@@ -345,11 +348,15 @@ const basicObjectSchema = {
345
348
  type: "string",
346
349
  pattern: strNotEmptyRegex
347
350
  },
348
- groupByPartitionKeyField: {
351
+ serviceTag: {
349
352
  type: "string",
350
353
  pattern: strNotEmptyRegex
351
354
  },
352
- },
355
+ groupByPartitionKeyField: {
356
+ type: "string",
357
+ pattern: strNotEmptyRegex
358
+ }
359
+ }
353
360
  },
354
361
  {
355
362
  required: ["storageType", "graphServerTag"],
@@ -366,7 +373,6 @@ const basicObjectSchema = {
366
373
  },
367
374
  }
368
375
  ],
369
-
370
376
  },
371
377
  }
372
378
  },
@@ -576,6 +582,10 @@ const basicExtendObjectSchema = {
576
582
  type: "string",
577
583
  pattern: strNotEmptyRegex
578
584
  },
585
+ serviceTag: {
586
+ type: "string",
587
+ pattern: strNotEmptyRegex
588
+ }
579
589
  },
580
590
  },
581
591
  {
@@ -682,7 +692,11 @@ const relationshipBasicSchema = {
682
692
  required: ["fieldNames", "storageResources", "links"],
683
693
  additionalProperties: false,
684
694
  properties: {
685
- canChangeToRelType: relTypeSchema,
695
+ // canChangeToRelType: relTypeSchema, //! change format and variable name
696
+ canChangeToRelTypes: {
697
+ type: "array",
698
+ items: relTypeSchema
699
+ },
686
700
  canMove: {
687
701
  type: "boolean",
688
702
  default: false
@@ -928,7 +942,7 @@ const basicFlowSchema = {
928
942
  },
929
943
  statusType: {
930
944
  type: "string",
931
- enum: ["statusField", "storedCache", "none"]
945
+ enum: ["statusField", "storedCache", "none", "triggerCache"]
932
946
  },
933
947
  event: {
934
948
  type: "array",
@@ -938,9 +952,13 @@ const basicFlowSchema = {
938
952
  enum: ["ownTopic", "extTopic", "s3", "eventBridge"],
939
953
  }
940
954
  },
955
+ triggerType: {
956
+ type: "string",
957
+ enum: ["storedCache", "switch"]
958
+ },
941
959
  flowSteps: {
942
960
  type: "object",
943
- minProperties: 2,
961
+ minProperties: 1, // incase outputTopic === false
944
962
  patternProperties: {
945
963
  [strNotEmptyRegex]: {
946
964
  type: "object",
@@ -965,6 +983,9 @@ const basicFlowSchema = {
965
983
  bucketName: {
966
984
  type: "string",
967
985
  pattern: strNotEmptyRegex
986
+ },
987
+ outputTopic: {
988
+ type: "boolean"
968
989
  }
969
990
  }
970
991
  }
@@ -18,7 +18,7 @@ along with this program.If not, see < http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  const NoRetryError = require('@izara_project/izara-core-library-core/src/NoRetryError');
21
- const hash = require("object-hash");
21
+ const hash = require("@izara_project/izara-shared-core").objectHash;
22
22
  const lodash = require("lodash");
23
23
 
24
24
  const getObjectSchema = require("../GetObjectSchema");