@bigfootai/bigfoot-types 4.9.8 → 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 +12 -2
  2. package/model.ts +13 -2
  3. package/package.json +1 -1
package/model.js CHANGED
@@ -1109,6 +1109,7 @@ type BlockData {
1109
1109
  blockType: String!
1110
1110
  title: String
1111
1111
  document: String
1112
+ htmlContent: String
1112
1113
  metadataType: String
1113
1114
  }`;
1114
1115
  exports.DashboardQL = `
@@ -1116,9 +1117,18 @@ type Dashboard {${exports.BusinessObjectFields}
1116
1117
  blockData: [BlockData]
1117
1118
  }`;
1118
1119
  class Dashboard extends BusinessObject {
1119
- constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, blockData) {
1120
+ constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, dashboardMetadata) {
1120
1121
  super(tenantIdCreated, editors, sharingTags, version, BlockType.Dashboard, provider, application, uri, externalId);
1121
- 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
+ }
1122
1132
  }
1123
1133
  }
1124
1134
  exports.Dashboard = Dashboard;
package/model.ts CHANGED
@@ -1926,6 +1926,7 @@ type BlockData {
1926
1926
  blockType: String!
1927
1927
  title: String
1928
1928
  document: String
1929
+ htmlContent: String
1929
1930
  metadataType: String
1930
1931
  }`;
1931
1932
  export interface BlockData {
@@ -1933,6 +1934,7 @@ export interface BlockData {
1933
1934
  blockType: BlockType;
1934
1935
  title?: string;
1935
1936
  document?: string;
1937
+ htmlContent?: string;
1936
1938
  metadataType?: string;
1937
1939
  }
1938
1940
 
@@ -1952,7 +1954,7 @@ export class Dashboard extends BusinessObject {
1952
1954
  application: string,
1953
1955
  uri: string,
1954
1956
  externalId: string,
1955
- blockData: BlockData[]
1957
+ dashboardMetadata: DashboardMetadata
1956
1958
  ) {
1957
1959
  super(
1958
1960
  tenantIdCreated,
@@ -1966,7 +1968,16 @@ export class Dashboard extends BusinessObject {
1966
1968
  externalId
1967
1969
  );
1968
1970
 
1969
- 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
+ }
1970
1981
  }
1971
1982
  }
1972
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.8",
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",