rapida-partner 1.5.0 → 1.6.2

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": "rapida-partner",
3
- "version": "1.5.0",
3
+ "version": "1.6.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "index.ts",
6
6
  "files": [
@@ -1,4 +1,3 @@
1
- import type { EFormContractDataType } from "../enums/form-contract.enum";
2
1
  import type { EDataType } from "../enums/form.enum";
3
2
  import type { IFormArray } from "./form-array.interface";
4
3
  import type { IFormAutocomplete } from "./form-autocomplete.interface";
@@ -59,6 +58,10 @@ interface IContractRequest {
59
58
  },
60
59
  description?: string,
61
60
  fields: IContractRequestField[]
61
+ uniqueConstraints?: {
62
+ identificator: string;
63
+ fields: string[];
64
+ }[];
62
65
  }
63
66
 
64
67
  interface IContractRequestField {
@@ -69,9 +72,10 @@ interface IContractRequestField {
69
72
  isPrimaryKey?: boolean;
70
73
  minSize?: number;
71
74
  maxSize?: number;
72
- enum?: string[];
75
+ enum?: (string | number)[];
73
76
  isUnique?: boolean;
74
77
  uniqueComposedFields?: string[];
78
+ defaultValue?: string | number | boolean;
75
79
  actionsExceptions?: ("create" | "getOne" | "getAll" | "update" | "delete" | "clone")[];
76
80
  }
77
81
 
@@ -116,7 +116,14 @@
116
116
  "enum": {
117
117
  "type": "array",
118
118
  "items": {
119
- "type": "string"
119
+ "oneOf": [
120
+ {
121
+ "type": "string"
122
+ },
123
+ {
124
+ "type": "number"
125
+ }
126
+ ]
120
127
  }
121
128
  },
122
129
  "isUnique": {
@@ -178,6 +185,23 @@
178
185
  "connectionAttribute",
179
186
  "fieldsFromEntity"
180
187
  ]
188
+ },
189
+ "uniqueConstraints": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "object",
193
+ "properties": {
194
+ "name": {
195
+ "type": "string"
196
+ },
197
+ "fields": {
198
+ "type": "array",
199
+ "items": {
200
+ "type": "string"
201
+ }
202
+ }
203
+ }
204
+ }
181
205
  }
182
206
  },
183
207
  "required": ["entity", "fields"]