@nmshd/connector-tui 2.13.3 → 2.14.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.
@@ -167,17 +167,23 @@ export function AddSendRequestByMessage(Base) {
167
167
  type: "text",
168
168
  name: "attributeType",
169
169
  },
170
+ {
171
+ message: "What's the description of the RequestItem?",
172
+ type: "text",
173
+ name: "requestItemDescription",
174
+ format: (value) => (value === "" ? undefined : value),
175
+ },
170
176
  {
171
177
  message: "What's the title of the RelationshipAttribute?",
172
178
  type: "text",
173
179
  name: "attributeTitle",
174
- initial: "Attribute Title",
180
+ format: (value) => (value === "" ? undefined : value),
175
181
  },
176
182
  {
177
183
  message: "What's the description of the RelationshipAttribute?",
178
184
  type: "text",
179
185
  name: "attributeDescription",
180
- initial: "Attribute Title",
186
+ format: (value) => (value === "" ? undefined : value),
181
187
  },
182
188
  {
183
189
  message: "What's the key of the attribute you would like to query?",
@@ -190,16 +196,18 @@ export function AddSendRequestByMessage(Base) {
190
196
  type: "select",
191
197
  name: "owner",
192
198
  choices: [
193
- { title: "The other side or a third party", value: "" },
194
- { title: "The other side", value: "recipient" },
195
- { title: "A third party", value: "thirdParty" },
199
+ { title: "Yourself", value: "yourself" },
200
+ { title: "The recipient", value: "" },
196
201
  ],
197
202
  },
198
203
  ]);
199
204
  const title = result.attributeTitle ?? `A ${result.attributeType} attribute`;
205
+ if (result.owner === "yourself")
206
+ result.owner = this.connectorAddress;
200
207
  const requestItem = {
201
208
  "@type": "ReadAttributeRequestItem",
202
209
  mustBeAccepted: true,
210
+ description: result.requestItemDescription,
203
211
  query: {
204
212
  "@type": "RelationshipAttributeQuery",
205
213
  owner: result.owner ?? "",
@@ -229,8 +237,13 @@ export function AddSendRequestByMessage(Base) {
229
237
  },
230
238
  {
231
239
  message: "Who is the owner of the RelationshipAttribute?",
232
- type: "text",
240
+ type: "select",
233
241
  name: "owner",
242
+ choices: [
243
+ { title: "The recipient or the third party", value: "" },
244
+ { title: "The recipient", value: "recipient" },
245
+ { title: "The third party", value: "thirdParty" },
246
+ ],
234
247
  },
235
248
  {
236
249
  message: "What are the third party addresses? (comma-separated)",
package/package.json CHANGED
@@ -28,9 +28,9 @@
28
28
  "watch": "node --watch --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' src/run.ts"
29
29
  },
30
30
  "dependencies": {
31
- "@nmshd/connector-sdk": "^6.36.2",
31
+ "@nmshd/connector-sdk": "^6.36.3",
32
32
  "axios": "^1.11.0",
33
- "chalk": "^5.5.0",
33
+ "chalk": "^5.6.0",
34
34
  "dotenv": "^17.2.1",
35
35
  "luxon": "^3.7.1",
36
36
  "prompts": "^2.4.2",
@@ -41,11 +41,11 @@
41
41
  "@js-soft/eslint-config-ts": "^2.0.3",
42
42
  "@js-soft/license-check": "^1.0.9",
43
43
  "@types/luxon": "^3.7.1",
44
- "@types/node": "^24.2.0",
44
+ "@types/node": "^24.3.0",
45
45
  "@types/prompts": "^2.4.9",
46
46
  "@types/qrcode-terminal": "^0.12.2",
47
47
  "@types/yargs": "^17.0.33",
48
- "eslint": "^9.32.0",
48
+ "eslint": "^9.34.0",
49
49
  "prettier": "^3.6.2",
50
50
  "ts-node": "^10.9.2",
51
51
  "typescript": "^5.9.2"
@@ -57,5 +57,5 @@
57
57
  "access": "public",
58
58
  "provenance": true
59
59
  },
60
- "version": "2.13.3"
60
+ "version": "2.14.0"
61
61
  }