@bigfootai/bigfoot-types 4.9.9 → 4.9.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.
Files changed (3) hide show
  1. package/model.js +12 -3
  2. package/model.ts +13 -6
  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) {
1121
- super(tenantIdCreated, editors, sharingTags, version, BlockType.Dashboard, provider, application, uri, externalId);
1122
- this.blockData = blockData;
1120
+ constructor(tenantIdCreated, editors, sharingTags, version, uri, externalId, dashboardMetadata) {
1121
+ super(tenantIdCreated, editors, sharingTags, version, BlockType.Dashboard, dashboardMetadata.provider, dashboardMetadata.application, uri, externalId);
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
@@ -1950,11 +1950,9 @@ export class Dashboard extends BusinessObject {
1950
1950
  editors: Editor[],
1951
1951
  sharingTags: SharingTag[],
1952
1952
  version: number,
1953
- provider: string,
1954
- application: string,
1955
1953
  uri: string,
1956
1954
  externalId: string,
1957
- blockData: BlockData[]
1955
+ dashboardMetadata: DashboardMetadata
1958
1956
  ) {
1959
1957
  super(
1960
1958
  tenantIdCreated,
@@ -1962,13 +1960,22 @@ export class Dashboard extends BusinessObject {
1962
1960
  sharingTags,
1963
1961
  version,
1964
1962
  BlockType.Dashboard,
1965
- provider,
1966
- application,
1963
+ dashboardMetadata.provider,
1964
+ dashboardMetadata.application,
1967
1965
  uri,
1968
1966
  externalId
1969
1967
  );
1970
1968
 
1971
- this.blockData = blockData;
1969
+ this.blockData = [];
1970
+ // Go through the block descriptions and create the block data entries
1971
+ for (const blockDescription of dashboardMetadata.blockDescriptions) {
1972
+ this.blockData.push({
1973
+ name: blockDescription.name,
1974
+ blockType: blockDescription.blockType,
1975
+ title: blockDescription.title,
1976
+ metadataType: blockDescription.metadataType,
1977
+ });
1978
+ }
1972
1979
  }
1973
1980
  }
1974
1981
  //// 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.11",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",