@digdir/dialogporten-schema 1.8.1-2a6fe0f → 1.8.1-3ca495f

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,7 +1,10 @@
1
1
  {
2
2
  "name": "@digdir/dialogporten-schema",
3
- "version": "1.8.1-2a6fe0f",
3
+ "version": "1.8.1-3ca495f",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
+ "engines": {
6
+ "node": "20"
7
+ },
5
8
  "author": "DigDir",
6
9
  "main": "src/index.js",
7
10
  "repository": {
@@ -13,9 +16,9 @@
13
16
  "test": "npm run build && vitest run --test-timeout=10000"
14
17
  },
15
18
  "devDependencies": {
16
- "vitest": "^1.2.2",
17
- "glob": "^10.3.12",
18
- "graphql-tag": "^2.12.6"
19
+ "vitest": "2.0.4",
20
+ "glob": "11.0.0",
21
+ "graphql-tag": "2.12.6"
19
22
  },
20
23
  "license": "ISC",
21
24
  "type": "module"
@@ -71,9 +71,17 @@ type AuthorizedParty {
71
71
  }
72
72
 
73
73
  type Content {
74
- type: ContentType!
74
+ title: ContentValue!
75
+ summary: ContentValue!
76
+ senderName: ContentValue
77
+ additionalInfo: ContentValue
78
+ extendedStatus: ContentValue
79
+ mainContentReference: ContentValue
80
+ }
81
+
82
+ type ContentValue {
75
83
  value: [Localization!]!
76
- mediaType: String
84
+ mediaType: String!
77
85
  }
78
86
 
79
87
  type Dialog {
@@ -93,12 +101,13 @@ type Dialog {
93
101
  updatedAt: DateTime!
94
102
  dialogToken: String
95
103
  status: DialogStatus!
96
- content: [Content!]!
104
+ content: Content!
97
105
  attachments: [Attachment!]!
98
106
  guiActions: [GuiAction!]!
99
107
  apiActions: [ApiAction!]!
100
108
  activities: [Activity!]!
101
109
  seenSinceLastUpdate: [SeenLog!]!
110
+ transmissions: [Transmission!]!
102
111
  }
103
112
 
104
113
  type DialogByIdDeleted implements DialogByIdError {
@@ -142,6 +151,13 @@ type Queries @authorize(policy: "enduser") {
142
151
  parties: [AuthorizedParty!]!
143
152
  }
144
153
 
154
+ type SearchContent {
155
+ title: ContentValue!
156
+ summary: ContentValue!
157
+ senderName: ContentValue
158
+ extendedStatus: ContentValue
159
+ }
160
+
145
161
  type SearchDialog {
146
162
  id: UUID!
147
163
  org: String!
@@ -156,7 +172,7 @@ type SearchDialog {
156
172
  dueAt: DateTime
157
173
  status: DialogStatus!
158
174
  latestActivity: Activity
159
- content: [Content!]!
175
+ content: SearchContent!
160
176
  seenSinceLastUpdate: [SeenLog!]!
161
177
  }
162
178
 
@@ -183,6 +199,24 @@ type SeenLog {
183
199
  isCurrentEndUser: Boolean!
184
200
  }
185
201
 
202
+ type Transmission {
203
+ id: UUID!
204
+ createdAt: DateTime!
205
+ authorizationAttribute: String
206
+ isAuthorized: Boolean!
207
+ extendedType: String
208
+ relatedTransmissionId: UUID
209
+ type: TransmissionType!
210
+ sender: Actor!
211
+ content: TransmissionContent!
212
+ attachments: [Attachment!]!
213
+ }
214
+
215
+ type TransmissionContent {
216
+ title: ContentValue!
217
+ summary: ContentValue!
218
+ }
219
+
186
220
  input SearchDialogInput {
187
221
  "Filter by one or more service owner codes"
188
222
  org: [String!]
@@ -215,18 +249,18 @@ input SearchDialogInput {
215
249
  }
216
250
 
217
251
  enum ActivityType {
218
- "Refers to a submission made by a party that has been received by the service provider."
219
- SUBMISSION
220
- "Indicates feedback from the service provider on a submission. Contains a reference to the current submission."
221
- FEEDBACK
222
- "Information from the service provider, not (directly) related to any submission."
252
+ "Refers to a dialog that has been created."
253
+ DIALOG_CREATED
254
+ "Refers to a dialog that has been closed."
255
+ DIALOG_CLOSED
256
+ "Information from the service provider, not (directly) related to any transmission."
223
257
  INFORMATION
224
- "Used to indicate an error situation, typically on a submission. Contains a service-specific activityErrorCode."
225
- ERROR
226
- "Indicates that the dialog is closed for further changes. This typically happens when the dialog is completed or deleted."
227
- CLOSED
228
- "When the dialog is forwarded (delegated access) by someone with access to others."
229
- FORWARDED
258
+ "Refers to a transmission that has been opened."
259
+ TRANSMISSION_OPENED
260
+ "Indicates that payment has been made."
261
+ PAYMENT_MADE
262
+ "Indicates that a signature has been provided."
263
+ SIGNATURE_PROVIDED
230
264
  }
231
265
 
232
266
  enum ActorType {
@@ -245,15 +279,6 @@ enum AttachmentUrlConsumer {
245
279
  API
246
280
  }
247
281
 
248
- enum ContentType {
249
- TITLE
250
- SENDER_NAME
251
- SUMMARY
252
- ADDITIONAL_INFO
253
- EXTENDED_STATUS
254
- MAIN_CONTENT_REFERENCE
255
- }
256
-
257
282
  enum DialogStatus {
258
283
  "The dialogue is considered new. Typically used for simple messages that do not require any interaction, or as an initial step for dialogues. This is the default."
259
284
  NEW
@@ -287,6 +312,25 @@ enum HttpVerb {
287
312
  CONNECT
288
313
  }
289
314
 
315
+ enum TransmissionType {
316
+ "For general information, not related to any submissions"
317
+ INFORMATION
318
+ "Feedback\/receipt accepting a previous submission"
319
+ ACCEPTANCE
320
+ "Feedback\/error message rejecting a previous submission"
321
+ REJECTION
322
+ "Question\/request for more information"
323
+ REQUEST
324
+ "Critical information about the process"
325
+ ALERT
326
+ "Information about a formal decision (\"resolution\")"
327
+ DECISION
328
+ "A normal submission of some information\/form"
329
+ SUBMISSION
330
+ "A submission correcting\/overriding some previously submitted information"
331
+ CORRECTION
332
+ }
333
+
290
334
  directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION
291
335
 
292
336
  "The `DateTime` scalar represents an ISO-8601 compliant date time type."
package/src/index.js CHANGED
@@ -71,9 +71,17 @@ type AuthorizedParty {
71
71
  }
72
72
 
73
73
  type Content {
74
- type: ContentType!
74
+ title: ContentValue!
75
+ summary: ContentValue!
76
+ senderName: ContentValue
77
+ additionalInfo: ContentValue
78
+ extendedStatus: ContentValue
79
+ mainContentReference: ContentValue
80
+ }
81
+
82
+ type ContentValue {
75
83
  value: [Localization!]!
76
- mediaType: String
84
+ mediaType: String!
77
85
  }
78
86
 
79
87
  type Dialog {
@@ -93,12 +101,13 @@ type Dialog {
93
101
  updatedAt: DateTime!
94
102
  dialogToken: String
95
103
  status: DialogStatus!
96
- content: [Content!]!
104
+ content: Content!
97
105
  attachments: [Attachment!]!
98
106
  guiActions: [GuiAction!]!
99
107
  apiActions: [ApiAction!]!
100
108
  activities: [Activity!]!
101
109
  seenSinceLastUpdate: [SeenLog!]!
110
+ transmissions: [Transmission!]!
102
111
  }
103
112
 
104
113
  type DialogByIdDeleted implements DialogByIdError {
@@ -142,6 +151,13 @@ type Queries @authorize(policy: "enduser") {
142
151
  parties: [AuthorizedParty!]!
143
152
  }
144
153
 
154
+ type SearchContent {
155
+ title: ContentValue!
156
+ summary: ContentValue!
157
+ senderName: ContentValue
158
+ extendedStatus: ContentValue
159
+ }
160
+
145
161
  type SearchDialog {
146
162
  id: UUID!
147
163
  org: String!
@@ -156,7 +172,7 @@ type SearchDialog {
156
172
  dueAt: DateTime
157
173
  status: DialogStatus!
158
174
  latestActivity: Activity
159
- content: [Content!]!
175
+ content: SearchContent!
160
176
  seenSinceLastUpdate: [SeenLog!]!
161
177
  }
162
178
 
@@ -183,6 +199,24 @@ type SeenLog {
183
199
  isCurrentEndUser: Boolean!
184
200
  }
185
201
 
202
+ type Transmission {
203
+ id: UUID!
204
+ createdAt: DateTime!
205
+ authorizationAttribute: String
206
+ isAuthorized: Boolean!
207
+ extendedType: String
208
+ relatedTransmissionId: UUID
209
+ type: TransmissionType!
210
+ sender: Actor!
211
+ content: TransmissionContent!
212
+ attachments: [Attachment!]!
213
+ }
214
+
215
+ type TransmissionContent {
216
+ title: ContentValue!
217
+ summary: ContentValue!
218
+ }
219
+
186
220
  input SearchDialogInput {
187
221
  "Filter by one or more service owner codes"
188
222
  org: [String!]
@@ -215,18 +249,18 @@ input SearchDialogInput {
215
249
  }
216
250
 
217
251
  enum ActivityType {
218
- "Refers to a submission made by a party that has been received by the service provider."
219
- SUBMISSION
220
- "Indicates feedback from the service provider on a submission. Contains a reference to the current submission."
221
- FEEDBACK
222
- "Information from the service provider, not (directly) related to any submission."
252
+ "Refers to a dialog that has been created."
253
+ DIALOG_CREATED
254
+ "Refers to a dialog that has been closed."
255
+ DIALOG_CLOSED
256
+ "Information from the service provider, not (directly) related to any transmission."
223
257
  INFORMATION
224
- "Used to indicate an error situation, typically on a submission. Contains a service-specific activityErrorCode."
225
- ERROR
226
- "Indicates that the dialog is closed for further changes. This typically happens when the dialog is completed or deleted."
227
- CLOSED
228
- "When the dialog is forwarded (delegated access) by someone with access to others."
229
- FORWARDED
258
+ "Refers to a transmission that has been opened."
259
+ TRANSMISSION_OPENED
260
+ "Indicates that payment has been made."
261
+ PAYMENT_MADE
262
+ "Indicates that a signature has been provided."
263
+ SIGNATURE_PROVIDED
230
264
  }
231
265
 
232
266
  enum ActorType {
@@ -245,15 +279,6 @@ enum AttachmentUrlConsumer {
245
279
  API
246
280
  }
247
281
 
248
- enum ContentType {
249
- TITLE
250
- SENDER_NAME
251
- SUMMARY
252
- ADDITIONAL_INFO
253
- EXTENDED_STATUS
254
- MAIN_CONTENT_REFERENCE
255
- }
256
-
257
282
  enum DialogStatus {
258
283
  "The dialogue is considered new. Typically used for simple messages that do not require any interaction, or as an initial step for dialogues. This is the default."
259
284
  NEW
@@ -287,6 +312,25 @@ enum HttpVerb {
287
312
  CONNECT
288
313
  }
289
314
 
315
+ enum TransmissionType {
316
+ "For general information, not related to any submissions"
317
+ INFORMATION
318
+ "Feedback\/receipt accepting a previous submission"
319
+ ACCEPTANCE
320
+ "Feedback\/error message rejecting a previous submission"
321
+ REJECTION
322
+ "Question\/request for more information"
323
+ REQUEST
324
+ "Critical information about the process"
325
+ ALERT
326
+ "Information about a formal decision ('resolution')"
327
+ DECISION
328
+ "A normal submission of some information\/form"
329
+ SUBMISSION
330
+ "A submission correcting\/overriding some previously submitted information"
331
+ CORRECTION
332
+ }
333
+
290
334
  directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION
291
335
 
292
336
  "The 'DateTime' scalar represents an ISO-8601 compliant date time type."