@cirrobio/api-client 0.1.1 → 0.1.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/README.md CHANGED
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @cirrobio/api-client@0.1.1 --save
39
+ npm install @cirrobio/api-client@0.1.2 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -51,7 +51,7 @@ export interface Table {
51
51
  * @type {Array<ColumnDefinition>}
52
52
  * @memberof Table
53
53
  */
54
- cols: Array<ColumnDefinition>;
54
+ cols?: Array<ColumnDefinition> | null;
55
55
  }
56
56
  /**
57
57
  * Check if a given object implements the Table interface.
@@ -22,7 +22,6 @@ var ColumnDefinition_1 = require("./ColumnDefinition");
22
22
  function instanceOfTable(value) {
23
23
  var isInstance = true;
24
24
  isInstance = isInstance && "desc" in value;
25
- isInstance = isInstance && "cols" in value;
26
25
  return isInstance;
27
26
  }
28
27
  exports.instanceOfTable = instanceOfTable;
@@ -40,7 +39,7 @@ function TableFromJSONTyped(json, ignoreDiscriminator) {
40
39
  'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
41
40
  'rows': !(0, runtime_1.exists)(json, 'rows') ? undefined : json['rows'],
42
41
  'path': !(0, runtime_1.exists)(json, 'path') ? undefined : json['path'],
43
- 'cols': (json['cols'].map(ColumnDefinition_1.ColumnDefinitionFromJSON)),
42
+ 'cols': !(0, runtime_1.exists)(json, 'cols') ? undefined : (json['cols'] === null ? null : json['cols'].map(ColumnDefinition_1.ColumnDefinitionFromJSON)),
44
43
  };
45
44
  }
46
45
  exports.TableFromJSONTyped = TableFromJSONTyped;
@@ -57,7 +56,7 @@ function TableToJSON(value) {
57
56
  'type': value.type,
58
57
  'rows': value.rows,
59
58
  'path': value.path,
60
- 'cols': (value.cols.map(ColumnDefinition_1.ColumnDefinitionToJSON)),
59
+ 'cols': value.cols === undefined ? undefined : (value.cols === null ? null : value.cols.map(ColumnDefinition_1.ColumnDefinitionToJSON)),
61
60
  };
62
61
  }
63
62
  exports.TableToJSON = TableToJSON;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -61,7 +61,7 @@ export interface Table {
61
61
  * @type {Array<ColumnDefinition>}
62
62
  * @memberof Table
63
63
  */
64
- cols: Array<ColumnDefinition>;
64
+ cols?: Array<ColumnDefinition> | null;
65
65
  }
66
66
 
67
67
  /**
@@ -70,7 +70,6 @@ export interface Table {
70
70
  export function instanceOfTable(value: object): boolean {
71
71
  let isInstance = true;
72
72
  isInstance = isInstance && "desc" in value;
73
- isInstance = isInstance && "cols" in value;
74
73
 
75
74
  return isInstance;
76
75
  }
@@ -90,7 +89,7 @@ export function TableFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tab
90
89
  'type': !exists(json, 'type') ? undefined : json['type'],
91
90
  'rows': !exists(json, 'rows') ? undefined : json['rows'],
92
91
  'path': !exists(json, 'path') ? undefined : json['path'],
93
- 'cols': ((json['cols'] as Array<any>).map(ColumnDefinitionFromJSON)),
92
+ 'cols': !exists(json, 'cols') ? undefined : (json['cols'] === null ? null : (json['cols'] as Array<any>).map(ColumnDefinitionFromJSON)),
94
93
  };
95
94
  }
96
95
 
@@ -108,7 +107,7 @@ export function TableToJSON(value?: Table | null): any {
108
107
  'type': value.type,
109
108
  'rows': value.rows,
110
109
  'path': value.path,
111
- 'cols': ((value.cols as Array<any>).map(ColumnDefinitionToJSON)),
110
+ 'cols': value.cols === undefined ? undefined : (value.cols === null ? null : (value.cols as Array<any>).map(ColumnDefinitionToJSON)),
112
111
  };
113
112
  }
114
113