uapp-communication-sdk 1.0.0-dev.63 → 1.0.0-dev.64

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": "uapp-communication-sdk",
3
- "version": "1.0.0-dev.63",
3
+ "version": "1.0.0-dev.64",
4
4
  "description": "Embeddable Communication Hub widgets (chat, feed, bookings, schedule).",
5
5
  "type": "module",
6
6
  "types": "./types/sdk/index.d.ts",
@@ -1,18 +1,7 @@
1
1
  import { type Logger } from '@core/logger';
2
2
  import type { SdkModuleScope } from '../types';
3
- /** One notification, in the shape a host page needs to render a row. */
4
- export interface SdkNotification {
5
- /** Stable id — the same notification can arrive twice across a reconnect. De-duplicate on it. */
6
- readonly id: string;
7
- /** Which surface it came from: `feed`, `meeting`. */
8
- readonly kind: string;
9
- readonly actor: string;
10
- /** ISO 8601 UTC. Format it in the reader's locale and zone — the SDK does not know either. */
11
- readonly occurredAt: string;
12
- readonly message?: string;
13
- readonly detail?: string;
14
- readonly postId?: string;
15
- }
3
+ import { type SdkNotification } from './notification-payload';
4
+ export type { SdkNotification };
16
5
  export interface NotificationClientOptions {
17
6
  /** Origin of the Communication Hub API. */
18
7
  readonly apiBaseUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/notifications/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAK1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8FAA8F;IA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AE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGjF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,MAAM,WAAW,yBAAyB;IACxC,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,eAAe,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,yEAAyE;IACzE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,oFAAoF;IACpF,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,6EAA6E;IAC7E,MAAM,EAAE,MAAM,SAAS,eAAe,EAAE,CAAC;CAC1C;AAyFD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,yBAAyB,KACjC,kBAyFF,CAAC"}
@@ -0,0 +1,26 @@
1
+ /** One notification, in the shape a host needs to render a row. */
2
+ export interface SdkNotification {
3
+ /** Stable id — the same notification can arrive twice across a reconnect. De-duplicate on it. */
4
+ readonly id: string;
5
+ /** Which surface it came from: `feed`, `meeting`. */
6
+ readonly kind: string;
7
+ readonly actor: string;
8
+ /** ISO 8601 UTC. Format it in the reader's locale and zone — the SDK knows neither. */
9
+ readonly occurredAt: string;
10
+ readonly message?: string;
11
+ readonly detail?: string;
12
+ readonly postId?: string;
13
+ }
14
+ /**
15
+ * The Hub's wire shape → the public contract, or `null` when the payload cannot be trusted.
16
+ *
17
+ * <p>Shared by the two places notifications reach a host — the widget bridge and the headless client
18
+ * — because it is the CONTRACT, not a helper. Two copies drift silently: the wire field is `time`
19
+ * and the public one is `occurredAt`, so a rename applied to one and not the other produces
20
+ * `undefined` in a host's notification centre with nothing failing anywhere.</p>
21
+ *
22
+ * <p>Returning null rather than a partial object is deliberate: handing a host a half-parsed
23
+ * notification puts `undefined` in its header, which is worse than the notification not arriving.</p>
24
+ */
25
+ export declare const toSdkNotification: (raw: unknown) => SdkNotification | null;
26
+ //# sourceMappingURL=notification-payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-payload.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/notifications/notification-payload.ts"],"names":[],"mappings":"AAEA,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,KAAG,eAAe,GAAG,IAgBlE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SdkNotificationBridge.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/runtime/SdkNotificationBridge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,0BAA0B,KAAG,IAoD/E,CAAC"}
1
+ {"version":3,"file":"SdkNotificationBridge.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/runtime/SdkNotificationBridge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,0BAA0B,KAAG,IAmC/E,CAAC"}