@digdir/dialogporten-schema 1.8.1-dbe296a → 1.9.0-5302e9f

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,10 +1,25 @@
1
1
  {
2
2
  "name": "@digdir/dialogporten-schema",
3
- "version": "1.8.1-dbe296a",
3
+ "version": "1.9.0-5302e9f",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
+ "engines": {
6
+ "node": "20"
7
+ },
5
8
  "author": "DigDir",
9
+ "main": "src/index.js",
6
10
  "repository": {
7
11
  "url": "git+https://github.com/digdir/dialogporten.git"
8
12
  },
9
- "license": "ISC"
13
+ "scripts": {
14
+ "build": "./gql-to-js.js",
15
+ "prepublishOnly": "npm run build",
16
+ "test": "npm run build && vitest run --test-timeout=10000"
17
+ },
18
+ "devDependencies": {
19
+ "vitest": "2.0.4",
20
+ "glob": "11.0.0",
21
+ "graphql-tag": "2.12.6"
22
+ },
23
+ "license": "ISC",
24
+ "type": "module"
10
25
  }
@@ -16,10 +16,17 @@ type Activity {
16
16
  extendedType: URL
17
17
  type: ActivityType!
18
18
  relatedActivityId: UUID
19
- performedBy: String
19
+ transmissionId: UUID
20
+ performedBy: Actor!
20
21
  description: [Localization!]!
21
22
  }
22
23
 
24
+ type Actor {
25
+ actorType: ActorType
26
+ actorId: String
27
+ actorName: String
28
+ }
29
+
23
30
  type ApiAction {
24
31
  id: UUID!
25
32
  action: String!
@@ -65,9 +72,17 @@ type AuthorizedParty {
65
72
  }
66
73
 
67
74
  type Content {
68
- type: ContentType!
75
+ title: ContentValue!
76
+ summary: ContentValue!
77
+ senderName: ContentValue
78
+ additionalInfo: ContentValue
79
+ extendedStatus: ContentValue
80
+ mainContentReference: ContentValue
81
+ }
82
+
83
+ type ContentValue {
69
84
  value: [Localization!]!
70
- mediaType: String
85
+ mediaType: String!
71
86
  }
72
87
 
73
88
  type Dialog {
@@ -87,12 +102,13 @@ type Dialog {
87
102
  updatedAt: DateTime!
88
103
  dialogToken: String
89
104
  status: DialogStatus!
90
- content: [Content!]!
105
+ content: Content!
91
106
  attachments: [Attachment!]!
92
107
  guiActions: [GuiAction!]!
93
108
  apiActions: [ApiAction!]!
94
109
  activities: [Activity!]!
95
110
  seenSinceLastUpdate: [SeenLog!]!
111
+ transmissions: [Transmission!]!
96
112
  }
97
113
 
98
114
  type DialogByIdDeleted implements DialogByIdError {
@@ -127,7 +143,7 @@ type GuiAction {
127
143
 
128
144
  type Localization {
129
145
  value: String!
130
- cultureCode: String!
146
+ languageCode: String!
131
147
  }
132
148
 
133
149
  type Queries @authorize(policy: "enduser") {
@@ -136,6 +152,13 @@ type Queries @authorize(policy: "enduser") {
136
152
  parties: [AuthorizedParty!]!
137
153
  }
138
154
 
155
+ type SearchContent {
156
+ title: ContentValue!
157
+ summary: ContentValue!
158
+ senderName: ContentValue
159
+ extendedStatus: ContentValue
160
+ }
161
+
139
162
  type SearchDialog {
140
163
  id: UUID!
141
164
  org: String!
@@ -150,7 +173,7 @@ type SearchDialog {
150
173
  dueAt: DateTime
151
174
  status: DialogStatus!
152
175
  latestActivity: Activity
153
- content: [Content!]!
176
+ content: SearchContent!
154
177
  seenSinceLastUpdate: [SeenLog!]!
155
178
  }
156
179
 
@@ -173,11 +196,28 @@ type SearchDialogsPayload {
173
196
  type SeenLog {
174
197
  id: UUID!
175
198
  seenAt: DateTime!
176
- endUserIdHash: String!
177
- endUserName: String
199
+ seenBy: Actor!
178
200
  isCurrentEndUser: Boolean!
179
201
  }
180
202
 
203
+ type Transmission {
204
+ id: UUID!
205
+ createdAt: DateTime!
206
+ authorizationAttribute: String
207
+ isAuthorized: Boolean!
208
+ extendedType: String
209
+ relatedTransmissionId: UUID
210
+ type: TransmissionType!
211
+ sender: Actor!
212
+ content: TransmissionContent!
213
+ attachments: [Attachment!]!
214
+ }
215
+
216
+ type TransmissionContent {
217
+ title: ContentValue!
218
+ summary: ContentValue!
219
+ }
220
+
181
221
  input SearchDialogInput {
182
222
  "Filter by one or more service owner codes"
183
223
  org: [String!]
@@ -205,23 +245,28 @@ input SearchDialogInput {
205
245
  dueBefore: DateTime
206
246
  "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate"
207
247
  search: String
208
- "Limit free text search to texts with this culture code, e.g. \"nb-NO\". Default: search all culture codes"
209
- searchCultureCode: String
248
+ "Limit free text search to texts with this language code, e.g. 'no', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes"
249
+ searchLanguageCode: String
210
250
  }
211
251
 
212
252
  enum ActivityType {
213
- "Refers to a submission made by a party that has been received by the service provider."
214
- SUBMISSION
215
- "Indicates feedback from the service provider on a submission. Contains a reference to the current submission."
216
- FEEDBACK
217
- "Information from the service provider, not (directly) related to any submission."
253
+ "Refers to a dialog that has been created."
254
+ DIALOG_CREATED
255
+ "Refers to a dialog that has been closed."
256
+ DIALOG_CLOSED
257
+ "Information from the service provider, not (directly) related to any transmission."
218
258
  INFORMATION
219
- "Used to indicate an error situation, typically on a submission. Contains a service-specific activityErrorCode."
220
- ERROR
221
- "Indicates that the dialog is closed for further changes. This typically happens when the dialog is completed or deleted."
222
- CLOSED
223
- "When the dialog is forwarded (delegated access) by someone with access to others."
224
- FORWARDED
259
+ "Refers to a transmission that has been opened."
260
+ TRANSMISSION_OPENED
261
+ "Indicates that payment has been made."
262
+ PAYMENT_MADE
263
+ "Indicates that a signature has been provided."
264
+ SIGNATURE_PROVIDED
265
+ }
266
+
267
+ enum ActorType {
268
+ PARTY_REPRESENTATIVE
269
+ SERVICE_OWNER
225
270
  }
226
271
 
227
272
  enum ApplyPolicy {
@@ -235,26 +280,18 @@ enum AttachmentUrlConsumer {
235
280
  API
236
281
  }
237
282
 
238
- enum ContentType {
239
- TITLE
240
- SENDER_NAME
241
- SUMMARY
242
- ADDITIONAL_INFO
243
- EXTENDED_STATUS
244
- }
245
-
246
283
  enum DialogStatus {
247
- "New"
284
+ "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."
248
285
  NEW
249
- "In progress. General status used for dialog services where further user input is expected."
286
+ "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
250
287
  IN_PROGRESS
251
- "Waiting for feedback from the service provider"
252
- WAITING
253
- "The dialog is in a state where it is waiting for signing. Typically the last step after all completion is carried out and validated."
288
+ "Equivalent to \"InProgress\", but will be used by the workspace\/frontend for display purposes."
254
289
  SIGNING
255
- "The dialog was cancelled. This typically removes the dialog from normal GUI views."
256
- CANCELLED
257
- "The dialog was completed. This typically moves the dialog to a GUI archive or similar."
290
+ "For processing by the service owner. In a serial process, this is used after a submission is made."
291
+ PROCESSING
292
+ "Used to indicate that the dialogue is in progress\/under work, but is in a state where the user must do something - for example, correct an error, or other conditions that hinder further processing."
293
+ REQUIRES_ATTENTION
294
+ "The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar."
258
295
  COMPLETED
259
296
  }
260
297
 
@@ -276,6 +313,25 @@ enum HttpVerb {
276
313
  CONNECT
277
314
  }
278
315
 
316
+ enum TransmissionType {
317
+ "For general information, not related to any submissions"
318
+ INFORMATION
319
+ "Feedback\/receipt accepting a previous submission"
320
+ ACCEPTANCE
321
+ "Feedback\/error message rejecting a previous submission"
322
+ REJECTION
323
+ "Question\/request for more information"
324
+ REQUEST
325
+ "Critical information about the process"
326
+ ALERT
327
+ "Information about a formal decision (\"resolution\")"
328
+ DECISION
329
+ "A normal submission of some information\/form"
330
+ SUBMISSION
331
+ "A submission correcting\/overriding some previously submitted information"
332
+ CORRECTION
333
+ }
334
+
279
335
  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
280
336
 
281
337
  "The `DateTime` scalar represents an ISO-8601 compliant date time type."
package/src/index.js ADDED
@@ -0,0 +1,342 @@
1
+ export const schema_verified_graphql = `schema {
2
+ query: Queries
3
+ }
4
+
5
+ interface DialogByIdError {
6
+ message: String!
7
+ }
8
+
9
+ interface SearchDialogError {
10
+ message: String!
11
+ }
12
+
13
+ type Activity {
14
+ id: UUID!
15
+ createdAt: DateTime
16
+ extendedType: URL
17
+ type: ActivityType!
18
+ relatedActivityId: UUID
19
+ transmissionId: UUID
20
+ performedBy: Actor!
21
+ description: [Localization!]!
22
+ }
23
+
24
+ type Actor {
25
+ actorType: ActorType
26
+ actorId: String
27
+ actorName: String
28
+ }
29
+
30
+ type ApiAction {
31
+ id: UUID!
32
+ action: String!
33
+ authorizationAttribute: String
34
+ isAuthorized: Boolean!
35
+ endpoints: [ApiActionEndpoint!]!
36
+ }
37
+
38
+ type ApiActionEndpoint {
39
+ id: UUID!
40
+ version: String
41
+ url: URL!
42
+ httpMethod: HttpVerb!
43
+ documentationUrl: URL
44
+ requestSchema: URL
45
+ responseSchema: URL
46
+ deprecated: Boolean!
47
+ sunsetAt: DateTime
48
+ }
49
+
50
+ type Attachment {
51
+ id: UUID!
52
+ displayName: [Localization!]!
53
+ urls: [AttachmentUrl!]!
54
+ }
55
+
56
+ type AttachmentUrl {
57
+ id: UUID!
58
+ url: URL!
59
+ consumerType: AttachmentUrlConsumer!
60
+ }
61
+
62
+ type AuthorizedParty {
63
+ party: String!
64
+ name: String!
65
+ partyType: String!
66
+ isDeleted: Boolean!
67
+ hasKeyRole: Boolean!
68
+ isMainAdministrator: Boolean!
69
+ isAccessManager: Boolean!
70
+ hasOnlyAccessToSubParties: Boolean!
71
+ subParties: [AuthorizedParty!]
72
+ }
73
+
74
+ type Content {
75
+ title: ContentValue!
76
+ summary: ContentValue!
77
+ senderName: ContentValue
78
+ additionalInfo: ContentValue
79
+ extendedStatus: ContentValue
80
+ mainContentReference: ContentValue
81
+ }
82
+
83
+ type ContentValue {
84
+ value: [Localization!]!
85
+ mediaType: String!
86
+ }
87
+
88
+ type Dialog {
89
+ id: UUID!
90
+ revision: UUID!
91
+ org: String!
92
+ serviceResource: String!
93
+ serviceResourceType: String!
94
+ party: String!
95
+ progress: Int
96
+ extendedStatus: String
97
+ externalReference: String
98
+ visibleFrom: DateTime
99
+ dueAt: DateTime
100
+ expiresAt: DateTime
101
+ createdAt: DateTime!
102
+ updatedAt: DateTime!
103
+ dialogToken: String
104
+ status: DialogStatus!
105
+ content: Content!
106
+ attachments: [Attachment!]!
107
+ guiActions: [GuiAction!]!
108
+ apiActions: [ApiAction!]!
109
+ activities: [Activity!]!
110
+ seenSinceLastUpdate: [SeenLog!]!
111
+ transmissions: [Transmission!]!
112
+ }
113
+
114
+ type DialogByIdDeleted implements DialogByIdError {
115
+ message: String!
116
+ }
117
+
118
+ type DialogByIdForbidden implements DialogByIdError {
119
+ message: String!
120
+ }
121
+
122
+ type DialogByIdNotFound implements DialogByIdError {
123
+ message: String!
124
+ }
125
+
126
+ type DialogByIdPayload {
127
+ dialog: Dialog
128
+ errors: [DialogByIdError!]!
129
+ }
130
+
131
+ type GuiAction {
132
+ id: UUID!
133
+ action: String!
134
+ url: URL!
135
+ authorizationAttribute: String
136
+ isAuthorized: Boolean!
137
+ isDeleteDialogAction: Boolean!
138
+ priority: GuiActionPriority!
139
+ httpMethod: HttpVerb!
140
+ title: [Localization!]!
141
+ prompt: [Localization!]
142
+ }
143
+
144
+ type Localization {
145
+ value: String!
146
+ languageCode: String!
147
+ }
148
+
149
+ type Queries @authorize(policy: "enduser") {
150
+ dialogById(dialogId: UUID!): DialogByIdPayload!
151
+ searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
152
+ parties: [AuthorizedParty!]!
153
+ }
154
+
155
+ type SearchContent {
156
+ title: ContentValue!
157
+ summary: ContentValue!
158
+ senderName: ContentValue
159
+ extendedStatus: ContentValue
160
+ }
161
+
162
+ type SearchDialog {
163
+ id: UUID!
164
+ org: String!
165
+ serviceResource: String!
166
+ serviceResourceType: String!
167
+ party: String!
168
+ progress: Int
169
+ guiAttachmentCount: Int
170
+ extendedStatus: String
171
+ createdAt: DateTime!
172
+ updatedAt: DateTime!
173
+ dueAt: DateTime
174
+ status: DialogStatus!
175
+ latestActivity: Activity
176
+ content: SearchContent!
177
+ seenSinceLastUpdate: [SeenLog!]!
178
+ }
179
+
180
+ type SearchDialogForbidden implements SearchDialogError {
181
+ message: String!
182
+ }
183
+
184
+ type SearchDialogValidationError implements SearchDialogError {
185
+ message: String!
186
+ }
187
+
188
+ type SearchDialogsPayload {
189
+ items: [SearchDialog!]
190
+ hasNextPage: Boolean!
191
+ continuationToken: String
192
+ orderBy: String
193
+ errors: [SearchDialogError!]!
194
+ }
195
+
196
+ type SeenLog {
197
+ id: UUID!
198
+ seenAt: DateTime!
199
+ seenBy: Actor!
200
+ isCurrentEndUser: Boolean!
201
+ }
202
+
203
+ type Transmission {
204
+ id: UUID!
205
+ createdAt: DateTime!
206
+ authorizationAttribute: String
207
+ isAuthorized: Boolean!
208
+ extendedType: String
209
+ relatedTransmissionId: UUID
210
+ type: TransmissionType!
211
+ sender: Actor!
212
+ content: TransmissionContent!
213
+ attachments: [Attachment!]!
214
+ }
215
+
216
+ type TransmissionContent {
217
+ title: ContentValue!
218
+ summary: ContentValue!
219
+ }
220
+
221
+ input SearchDialogInput {
222
+ "Filter by one or more service owner codes"
223
+ org: [String!]
224
+ "Filter by one or more service resources"
225
+ serviceResource: [String!]
226
+ "Filter by one or more owning parties"
227
+ party: [String!]
228
+ "Filter by one or more extended statuses"
229
+ extendedStatus: [String!]
230
+ "Filter by external reference"
231
+ externalReference: String
232
+ "Filter by status"
233
+ status: [DialogStatus!]
234
+ "Only return dialogs created after this date"
235
+ createdAfter: DateTime
236
+ "Only return dialogs created before this date"
237
+ createdBefore: DateTime
238
+ "Only return dialogs updated after this date"
239
+ updatedAfter: DateTime
240
+ "Only return dialogs updated before this date"
241
+ updatedBefore: DateTime
242
+ "Only return dialogs with due date after this date"
243
+ dueAfter: DateTime
244
+ "Only return dialogs with due date before this date"
245
+ dueBefore: DateTime
246
+ "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate"
247
+ search: String
248
+ "Limit free text search to texts with this language code, e.g. 'no', 'en'. Culture codes will be normalized to neutral language codes (ISO 639). Default: search all culture codes"
249
+ searchLanguageCode: String
250
+ }
251
+
252
+ enum ActivityType {
253
+ "Refers to a dialog that has been created."
254
+ DIALOG_CREATED
255
+ "Refers to a dialog that has been closed."
256
+ DIALOG_CLOSED
257
+ "Information from the service provider, not (directly) related to any transmission."
258
+ INFORMATION
259
+ "Refers to a transmission that has been opened."
260
+ TRANSMISSION_OPENED
261
+ "Indicates that payment has been made."
262
+ PAYMENT_MADE
263
+ "Indicates that a signature has been provided."
264
+ SIGNATURE_PROVIDED
265
+ }
266
+
267
+ enum ActorType {
268
+ PARTY_REPRESENTATIVE
269
+ SERVICE_OWNER
270
+ }
271
+
272
+ enum ApplyPolicy {
273
+ BEFORE_RESOLVER
274
+ AFTER_RESOLVER
275
+ VALIDATION
276
+ }
277
+
278
+ enum AttachmentUrlConsumer {
279
+ GUI
280
+ API
281
+ }
282
+
283
+ enum DialogStatus {
284
+ "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."
285
+ NEW
286
+ "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
287
+ IN_PROGRESS
288
+ "Equivalent to 'InProgress', but will be used by the workspace\/frontend for display purposes."
289
+ SIGNING
290
+ "For processing by the service owner. In a serial process, this is used after a submission is made."
291
+ PROCESSING
292
+ "Used to indicate that the dialogue is in progress\/under work, but is in a state where the user must do something - for example, correct an error, or other conditions that hinder further processing."
293
+ REQUIRES_ATTENTION
294
+ "The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar."
295
+ COMPLETED
296
+ }
297
+
298
+ enum GuiActionPriority {
299
+ PRIMARY
300
+ SECONDARY
301
+ TERTIARY
302
+ }
303
+
304
+ enum HttpVerb {
305
+ GET
306
+ POST
307
+ PUT
308
+ PATCH
309
+ DELETE
310
+ HEAD
311
+ OPTIONS
312
+ TRACE
313
+ CONNECT
314
+ }
315
+
316
+ enum TransmissionType {
317
+ "For general information, not related to any submissions"
318
+ INFORMATION
319
+ "Feedback\/receipt accepting a previous submission"
320
+ ACCEPTANCE
321
+ "Feedback\/error message rejecting a previous submission"
322
+ REJECTION
323
+ "Question\/request for more information"
324
+ REQUEST
325
+ "Critical information about the process"
326
+ ALERT
327
+ "Information about a formal decision ('resolution')"
328
+ DECISION
329
+ "A normal submission of some information\/form"
330
+ SUBMISSION
331
+ "A submission correcting\/overriding some previously submitted information"
332
+ CORRECTION
333
+ }
334
+
335
+ 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
336
+
337
+ "The 'DateTime' scalar represents an ISO-8601 compliant date time type."
338
+ scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
339
+
340
+ scalar URL @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc3986")
341
+
342
+ scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")`