@contrail/cli 1.0.10 → 1.0.11

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.
@@ -19,6 +19,8 @@ export interface ReducedTypeProperties {
19
19
  defaultValue: string;
20
20
  propertyLevel: string;
21
21
  inherited: boolean;
22
+ formulaFunction?: string;
23
+ validationFunction?: string;
22
24
  }
23
25
  export interface ReducedOptionSet {
24
26
  name: string;
@@ -46,5 +48,6 @@ export declare enum PropertyType {
46
48
  Constant = "constant",
47
49
  Composite = "composite",
48
50
  UserList = "userList",
49
- Image = "image"
51
+ Image = "image",
52
+ Json = "json"
50
53
  }
@@ -75,6 +75,8 @@ async function getReducedTypes(optionSets) {
75
75
  defaultValue: typeProperty.defaultValue,
76
76
  propertyLevel: typeProperty.propertyLevel,
77
77
  inherited: typeProperty.inherited,
78
+ formulaFunction: typeProperty.formulaFunction,
79
+ validationFunction: typeProperty.validationFunction,
78
80
  };
79
81
  reducedTypeProperties.push(reducedTypeProperty);
80
82
  }
@@ -146,6 +146,8 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
146
146
  referencedTypeRootSlug: newPropertyType.referencedTypeRootSlug,
147
147
  defaultValue: newPropertyType.defaultValue,
148
148
  propertyLevel: newPropertyType.propertyLevel,
149
+ formulaFunction: newPropertyType.formulaFunction,
150
+ validationFunction: newPropertyType.validationFunction,
149
151
  }),
150
152
  headers: {
151
153
  'Accept': 'application/json',
@@ -170,6 +172,8 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
170
172
  referencedTypeRootSlug: newPropertyType.referencedTypeRootSlug,
171
173
  defaultValue: newPropertyType.defaultValue,
172
174
  propertyLevel: newPropertyType.propertyLevel,
175
+ formulaFunction: newPropertyType.formulaFunction,
176
+ validationFunction: newPropertyType.validationFunction,
173
177
  },
174
178
  });
175
179
  }
@@ -210,6 +214,8 @@ function typePropertiesEqual(typeProperty1, typeProperty2, optionSetIdByName) {
210
214
  referencedTypeRootSlug: typeProperty1.referencedTypeRootSlug,
211
215
  defaultValue: typeProperty1.defaultValue,
212
216
  propertyLevel: typeProperty1.propertyLevel,
217
+ formulaFunction: typeProperty1.formulaFunction,
218
+ validationFunction: typeProperty1.validationFunction,
213
219
  };
214
220
  const reducedProperty2 = {
215
221
  isArchived: typeProperty2.isArchived,
@@ -223,6 +229,8 @@ function typePropertiesEqual(typeProperty1, typeProperty2, optionSetIdByName) {
223
229
  referencedTypeRootSlug: typeProperty2.referencedTypeRootSlug,
224
230
  defaultValue: typeProperty2.defaultValue,
225
231
  propertyLevel: typeProperty2.propertyLevel,
232
+ formulaFunction: typeProperty2.formulaFunction,
233
+ validationFunction: typeProperty2.validationFunction,
226
234
  };
227
235
  return _.isEqual(reducedProperty1, reducedProperty2);
228
236
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -20,6 +20,8 @@ export interface ReducedTypeProperties {
20
20
  defaultValue: string;
21
21
  propertyLevel: string;
22
22
  inherited: boolean;
23
+ formulaFunction?: string;
24
+ validationFunction?: string;
23
25
  }
24
26
 
25
27
  export interface ReducedOptionSet {
@@ -50,4 +52,5 @@ export declare enum PropertyType {
50
52
  Composite = 'composite',
51
53
  UserList = 'userList',
52
54
  Image = 'image',
55
+ Json = 'json',
53
56
  }
@@ -95,6 +95,8 @@ async function getReducedTypes(optionSets) {
95
95
  defaultValue: typeProperty.defaultValue,
96
96
  propertyLevel: typeProperty.propertyLevel,
97
97
  inherited: typeProperty.inherited,
98
+ formulaFunction: typeProperty.formulaFunction,
99
+ validationFunction: typeProperty.validationFunction,
98
100
  };
99
101
 
100
102
  reducedTypeProperties.push(reducedTypeProperty);
@@ -173,6 +173,8 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
173
173
  referencedTypeRootSlug: newPropertyType.referencedTypeRootSlug,
174
174
  defaultValue: newPropertyType.defaultValue,
175
175
  propertyLevel: newPropertyType.propertyLevel,
176
+ formulaFunction: newPropertyType.formulaFunction,
177
+ validationFunction: newPropertyType.validationFunction,
176
178
  }),
177
179
  headers: {
178
180
  'Accept': 'application/json',
@@ -197,6 +199,8 @@ async function uploadReducedTypeProperties(type, currentPropertyTypes, newProper
197
199
  referencedTypeRootSlug: newPropertyType.referencedTypeRootSlug,
198
200
  defaultValue: newPropertyType.defaultValue,
199
201
  propertyLevel: newPropertyType.propertyLevel,
202
+ formulaFunction: newPropertyType.formulaFunction,
203
+ validationFunction: newPropertyType.validationFunction,
200
204
  },
201
205
  });
202
206
  }
@@ -241,6 +245,8 @@ function typePropertiesEqual(typeProperty1, typeProperty2, optionSetIdByName): b
241
245
  referencedTypeRootSlug: typeProperty1.referencedTypeRootSlug,
242
246
  defaultValue: typeProperty1.defaultValue,
243
247
  propertyLevel: typeProperty1.propertyLevel,
248
+ formulaFunction: typeProperty1.formulaFunction,
249
+ validationFunction: typeProperty1.validationFunction,
244
250
  };
245
251
 
246
252
  const reducedProperty2 = {
@@ -255,6 +261,8 @@ function typePropertiesEqual(typeProperty1, typeProperty2, optionSetIdByName): b
255
261
  referencedTypeRootSlug: typeProperty2.referencedTypeRootSlug,
256
262
  defaultValue: typeProperty2.defaultValue,
257
263
  propertyLevel: typeProperty2.propertyLevel,
264
+ formulaFunction: typeProperty2.formulaFunction,
265
+ validationFunction: typeProperty2.validationFunction,
258
266
  };
259
267
 
260
268
  return _.isEqual(reducedProperty1, reducedProperty2);