@proulr/sdui-contract 0.1.1 → 0.1.3

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": "@proulr/sdui-contract",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -15,14 +15,26 @@
15
15
  "url": "git+https://github.com/saviorbp/proulr-sdui-contract.git"
16
16
  },
17
17
  "scripts": {
18
+ "prepare": "husky",
18
19
  "typecheck": "tsc --noEmit",
19
- "prepublishOnly": "npm run typecheck"
20
+ "prepublishOnly": "npm run typecheck",
21
+ "lint": "eslint .",
22
+ "lint:fix": "eslint . --fix"
20
23
  },
21
24
  "publishConfig": {
22
25
  "access": "public"
23
26
  },
24
27
  "devDependencies": {
28
+ "@eslint/js": "^9.39.4",
25
29
  "@types/node": "^22.20.0",
26
- "typescript": "~6.0.3"
30
+ "eslint": "^9.0.0",
31
+ "globals": "^16.0.0",
32
+ "husky": "^9.1.7",
33
+ "lint-staged": "^16.4.0",
34
+ "typescript": "~6.0.3",
35
+ "typescript-eslint": "^8.61.1"
36
+ },
37
+ "engines": {
38
+ "node": ">=22"
27
39
  }
28
40
  }
@@ -8,6 +8,7 @@ export type SduiOfflinePolicy = 'cache_only' | 'fail' | 'queue';
8
8
  export type SduiActionType =
9
9
  | 'navigate'
10
10
  | 'open_sheet'
11
+ | 'open_url'
11
12
  | 'api_call'
12
13
  | 'track'
13
14
  | 'toggle_search'
@@ -30,6 +31,8 @@ export type SduiHeaderWire = {
30
31
  hidden?: boolean;
31
32
  slot_blocks?: SduiBlockWire[];
32
33
  header_search?: { kind: 'vibes' | 'messages' };
34
+ trailing_action_id?: string;
35
+ trailing_icon?: string;
33
36
  };
34
37
 
35
38
  export type SduiActionWire = {
@@ -37,6 +40,8 @@ export type SduiActionWire = {
37
40
  route?: string;
38
41
  params?: Record<string, string>;
39
42
  sheet_id?: string;
43
+ /** Absolute / mailto URL for `open_url`. */
44
+ url?: string;
40
45
  method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
41
46
  path?: string;
42
47
  body?: Record<string, unknown>;
@@ -75,6 +80,8 @@ export type SduiHeader = {
75
80
  hidden?: boolean;
76
81
  slotBlocks: SduiBlock[];
77
82
  headerSearch?: { kind: 'vibes' | 'messages' };
83
+ trailingActionId?: string;
84
+ trailingIcon?: string;
78
85
  };
79
86
 
80
87
  export type SduiAction = {
@@ -82,6 +89,7 @@ export type SduiAction = {
82
89
  route?: string;
83
90
  params?: Record<string, string>;
84
91
  sheetId?: string;
92
+ url?: string;
85
93
  method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
86
94
  path?: string;
87
95
  body?: Record<string, unknown>;
@@ -39,6 +39,7 @@ function mapActionWire(wire: SduiActionWire): SduiAction {
39
39
  route: wire.route,
40
40
  params: wire.params,
41
41
  sheetId: wire.sheet_id,
42
+ url: wire.url,
42
43
  method: wire.method,
43
44
  path: wire.path,
44
45
  body: wire.body,
@@ -56,6 +57,8 @@ function mapHeaderWire(wire: SduiHeaderWire): SduiHeader {
56
57
  hidden: wire.hidden,
57
58
  slotBlocks: (wire.slot_blocks ?? []).map(mapBlockWire),
58
59
  headerSearch: wire.header_search,
60
+ trailingActionId: wire.trailing_action_id,
61
+ trailingIcon: wire.trailing_icon,
59
62
  };
60
63
  }
61
64