@bigfootai/bigfoot-types 4.9.9 → 4.9.10

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.
Files changed (3) hide show
  1. package/model.js +11 -2
  2. package/model.ts +11 -2
  3. package/package.json +1 -1
package/model.js CHANGED
@@ -1117,9 +1117,18 @@ type Dashboard {${exports.BusinessObjectFields}
1117
1117
  blockData: [BlockData]
1118
1118
  }`;
1119
1119
  class Dashboard extends BusinessObject {
1120
- constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, blockData) {
1120
+ constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, dashboardMetadata) {
1121
1121
  super(tenantIdCreated, editors, sharingTags, version, BlockType.Dashboard, provider, application, uri, externalId);
1122
- this.blockData = blockData;
1122
+ this.blockData = [];
1123
+ // Go through the block descriptions and create the block data entries
1124
+ for (const blockDescription of dashboardMetadata.blockDescriptions) {
1125
+ this.blockData.push({
1126
+ name: blockDescription.name,
1127
+ blockType: blockDescription.blockType,
1128
+ title: blockDescription.title,
1129
+ metadataType: blockDescription.metadataType,
1130
+ });
1131
+ }
1123
1132
  }
1124
1133
  }
1125
1134
  exports.Dashboard = Dashboard;
package/model.ts CHANGED
@@ -1954,7 +1954,7 @@ export class Dashboard extends BusinessObject {
1954
1954
  application: string,
1955
1955
  uri: string,
1956
1956
  externalId: string,
1957
- blockData: BlockData[]
1957
+ dashboardMetadata: DashboardMetadata
1958
1958
  ) {
1959
1959
  super(
1960
1960
  tenantIdCreated,
@@ -1968,7 +1968,16 @@ export class Dashboard extends BusinessObject {
1968
1968
  externalId
1969
1969
  );
1970
1970
 
1971
- this.blockData = blockData;
1971
+ this.blockData = [];
1972
+ // Go through the block descriptions and create the block data entries
1973
+ for (const blockDescription of dashboardMetadata.blockDescriptions) {
1974
+ this.blockData.push({
1975
+ name: blockDescription.name,
1976
+ blockType: blockDescription.blockType,
1977
+ title: blockDescription.title,
1978
+ metadataType: blockDescription.metadataType,
1979
+ });
1980
+ }
1972
1981
  }
1973
1982
  }
1974
1983
  //// DASHBOARD END
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "4.9.9",
4
+ "version": "4.9.10",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",