@tap-payments/os-micro-frontend-shared 0.3.136 → 0.3.138

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.
@@ -22,6 +22,13 @@ export type AccountWidgetSectionPayload = {
22
22
  isEditable?: boolean;
23
23
  isCreatable?: boolean;
24
24
  };
25
+ export type AccountWidgetSectionsPayload = {
26
+ [ACCOUNT_SECTION.BRAND]?: AccountWidgetSectionPayload;
27
+ [ACCOUNT_SECTION.ENTITY]?: AccountWidgetSectionPayload;
28
+ [ACCOUNT_SECTION.USERS]?: AccountWidgetSectionPayload;
29
+ [ACCOUNT_SECTION.USER_ROLES]?: AccountWidgetSectionPayload;
30
+ [ACCOUNT_SECTION.APP_SETTINGS]?: Partial<Record<string, AccountWidgetSectionPayload>>;
31
+ };
25
32
  /** Pre-selected account records the widget operates on (the "validation fields"). */
26
33
  export type AccountWidgetSelection = {
27
34
  segmentId?: string;
@@ -40,7 +47,7 @@ export type AccountWidgetSelection = {
40
47
  */
41
48
  export type AccountWidgetPayload = {
42
49
  initialSection?: ACCOUNT_SECTION;
43
- sections?: Partial<Record<ACCOUNT_SECTION, AccountWidgetSectionPayload>>;
50
+ sections?: AccountWidgetSectionsPayload;
44
51
  /** Identifies the external application that opened the Account App for the widget. */
45
52
  context?: AccountWidgetContext;
46
53
  selection: AccountWidgetSelection;
@@ -48,19 +55,16 @@ export type AccountWidgetPayload = {
48
55
  /** How the Account App was reached. */
49
56
  export type AccountWidgetSource = 'internal' | 'external';
50
57
  /**
51
- * Contract the opening application passes when it opens the Account App for the
52
- * Account Widget. Carries the *external* application/service that consumes the
53
- * widget (e.g. the Business app, or the Platform app) — not the Account app's
54
- * own codes. Each opener inlines its own
55
- * `{ appCode, serviceCode, applicationId, serviceId }` from its own app/service;
56
- * the Account App uses it for cross-app scoping (e.g. the data-changed payload)
57
- * and to detect the external mode.
58
- *
59
- * When no opener context is supplied (internal mode), the Account App backfills
60
- * it with its own `app`/`service` codes — so consumers must check
61
- * `appCode`/`serviceCode` rather than assuming it always carries the opener's.
58
+ * Contract the opening application passes when it opens the Account App for
59
+ * the Account Widget. Carries the *external* application/service/window that
60
+ * consumes the widget (e.g. the Business app) — not the Account app's own
61
+ * codes. `windowId` lets the opener tell its own windows apart, since it can
62
+ * have several open at once for the same app/service. Internal mode has no
63
+ * opener, so the Account App backfills `appCode`/`serviceCode` and leaves
64
+ * `windowId` empty.
62
65
  */
63
66
  export type AccountWidgetContext = {
67
+ windowId?: string;
64
68
  appCode?: string;
65
69
  serviceCode?: string;
66
70
  applicationId?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.3.136",
4
+ "version": "0.3.138",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "sideEffects": false,