@startinblox/components-ds4go 3.3.6 → 3.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startinblox/components-ds4go",
3
- "version": "3.3.6",
3
+ "version": "3.3.7",
4
4
  "description": "Startin'blox DS4GO",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -111,6 +111,8 @@ export interface LimitedResource {
111
111
  permissions?: Permission[];
112
112
  clientContext?: Context | Promise<Context>;
113
113
  serverContext?: Context | Promise<Context>;
114
+ created_at?: DateTime;
115
+ updated_at?: DateTime;
114
116
  }
115
117
 
116
118
  export interface Resource extends LimitedResource {
@@ -156,7 +158,6 @@ export interface SearchObject {
156
158
  }
157
159
 
158
160
  export interface DSPComponentParameters extends ComponentParameters {
159
- "api-gateway-config"?: string;
160
161
  "participant-connector-uri"?: string;
161
162
  "participant-id"?: string;
162
163
  "participant-api-key"?: string;
@@ -3,14 +3,14 @@ import type {
3
3
  Asset,
4
4
  ContractAgreement,
5
5
  PolicyDefinition,
6
- Resource,
7
6
  } from "@src/component";
7
+ import type { Category, Fact, FactBundle } from "@src/ds4go";
8
8
  import ComponentStyle from "@styles/modal/customer-modal/ds4go-contract-modal-part.scss?inline";
9
9
  import { css, html, LitElement, nothing, unsafeCSS } from "lit";
10
10
  import { customElement, state } from "lit/decorators.js";
11
11
 
12
12
  type ExtendedContractAgreement = ContractAgreement & {
13
- relatedBundle?: Resource;
13
+ relatedBundle?: FactBundle;
14
14
  relatedAsset?: Asset;
15
15
  };
16
16
 
@@ -28,7 +28,7 @@ export class DS4GOCustomerContractModalPart extends LitElement {
28
28
  assets?: Asset[] = [];
29
29
 
30
30
  @state()
31
- bundles?: Resource[] = [];
31
+ bundles?: FactBundle[] = [];
32
32
 
33
33
  @state()
34
34
  policies?: PolicyDefinition[] = [];
@@ -52,12 +52,12 @@ export class DS4GOCustomerContractModalPart extends LitElement {
52
52
  }
53
53
  }
54
54
 
55
- _getRelatedBundle(asset?: Asset): Resource | undefined {
55
+ _getRelatedBundle(asset?: Asset): FactBundle | undefined {
56
56
  if (!asset?.dataAddress?.baseUrl) {
57
57
  return undefined;
58
58
  }
59
59
  const baseUrl = asset.dataAddress.baseUrl;
60
- return this.bundles?.find((bundle: Resource) =>
60
+ return this.bundles?.find((bundle: FactBundle) =>
61
61
  bundle["@id"].includes(baseUrl),
62
62
  );
63
63
  }
@@ -184,9 +184,9 @@ export class DS4GOCustomerContractModalPart extends LitElement {
184
184
  >${msg("Facts in this bundle")}</tems-division
185
185
  >
186
186
  <div class="facts-list">
187
- ${this.agreement.relatedBundle.facts?.map((fact: Resource) => {
187
+ ${this.agreement.relatedBundle.facts?.map((fact: Fact) => {
188
188
  const tags =
189
- fact.categories?.map((c: Resource) => ({
189
+ (fact.categories || []).map((c: Category) => ({
190
190
  name: c.name,
191
191
  type: "information",
192
192
  })) || [];