@opencxh/domain 1.130.0 → 1.132.0

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.
@@ -30,7 +30,14 @@ export interface InternalSDK<LocalServices extends ServiceMap = {}, TranslationK
30
30
  get<T = any>(appName: string, resourceKey: string): Promise<T>;
31
31
  };
32
32
  readonly localization: {
33
- t(key: TranslationKeys, params?: Record<string, any>): string;
33
+ /**
34
+ * Vertaal een sleutel.
35
+ *
36
+ * Zonder `:` is het een sleutel van deze app zelf. Mét `:` is hij al genamespaced
37
+ * (`"helpdesk:ticket.added.text"`) en wordt hij ongewijzigd opgezocht — nodig om tekst
38
+ * te tonen die een andere app meestuurde bij iets wat wij renderen.
39
+ */
40
+ t(key: TranslationKeys | `${string}:${string}`, params?: Record<string, any>): string;
34
41
  };
35
42
  readonly ui: {
36
43
  modals: {
@@ -36,7 +36,13 @@ export type ServiceHandlerMetadata<P = any, T = any, R = any> = {
36
36
  appId: string;
37
37
  fn: ServiceHandlerFn<P, T, R>;
38
38
  };
39
- export type ServiceCallOptions<P, T> = {
39
+ /**
40
+ * `T` defaults to `unknown` because most handlers only care about `params`.
41
+ * Spelling it `never` instead makes the handler unassignable to
42
+ * {@link ServiceHandlerFn} (whose `payload` is `any`), which is a confusing error
43
+ * for a service that simply takes no payload.
44
+ */
45
+ export type ServiceCallOptions<P, T = unknown> = {
40
46
  params?: P;
41
47
  payload?: T;
42
48
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.130.0",
3
+ "version": "1.132.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -19,9 +19,9 @@
19
19
  "rxjs": "^7.8.2"
20
20
  },
21
21
  "devDependencies": {
22
- "typescript": "^5.2.2",
22
+ "typescript": "6.0.3",
23
23
  "vite": "7.1.7",
24
- "vite-plugin-dts": "^4.5.4",
24
+ "vite-plugin-dts": "^5.0.3",
25
25
  "vitest": "^4.0.18"
26
26
  }
27
27
  }