@digdir/dialogporten-schema 1.8.1-cd03956 → 1.8.1-d608ade

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-cd03956",
3
+ "version": "1.8.1-d608ade",
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,16 @@ type Activity {
16
16
  extendedType: URL
17
17
  type: ActivityType!
18
18
  relatedActivityId: UUID
19
- performedBy: String
19
+ performedBy: Actor!
20
20
  description: [Localization!]!
21
21
  }
22
22
 
23
+ type Actor {
24
+ actorType: ActorType
25
+ actorId: String
26
+ actorName: String
27
+ }
28
+
23
29
  type ApiAction {
24
30
  id: UUID!
25
31
  action: String!
@@ -65,9 +71,17 @@ type AuthorizedParty {
65
71
  }
66
72
 
67
73
  type Content {
68
- 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 {
69
83
  value: [Localization!]!
70
- mediaType: String
84
+ mediaType: String!
71
85
  }
72
86
 
73
87
  type Dialog {
@@ -87,12 +101,13 @@ type Dialog {
87
101
  updatedAt: DateTime!
88
102
  dialogToken: String
89
103
  status: DialogStatus!
90
- content: [Content!]!
104
+ content: Content!
91
105
  attachments: [Attachment!]!
92
106
  guiActions: [GuiAction!]!
93
107
  apiActions: [ApiAction!]!
94
108
  activities: [Activity!]!
95
109
  seenSinceLastUpdate: [SeenLog!]!
110
+ transmissions: [Transmission!]!
96
111
  }
97
112
 
98
113
  type DialogByIdDeleted implements DialogByIdError {
@@ -136,6 +151,13 @@ type Queries @authorize(policy: "enduser") {
136
151
  parties: [AuthorizedParty!]!
137
152
  }
138
153
 
154
+ type SearchContent {
155
+ title: ContentValue!
156
+ summary: ContentValue!
157
+ senderName: ContentValue
158
+ extendedStatus: ContentValue
159
+ }
160
+
139
161
  type SearchDialog {
140
162
  id: UUID!
141
163
  org: String!
@@ -150,7 +172,7 @@ type SearchDialog {
150
172
  dueAt: DateTime
151
173
  status: DialogStatus!
152
174
  latestActivity: Activity
153
- content: [Content!]!
175
+ content: SearchContent!
154
176
  seenSinceLastUpdate: [SeenLog!]!
155
177
  }
156
178
 
@@ -173,11 +195,28 @@ type SearchDialogsPayload {
173
195
  type SeenLog {
174
196
  id: UUID!
175
197
  seenAt: DateTime!
176
- endUserIdHash: String!
177
- endUserName: String
198
+ seenBy: Actor!
178
199
  isCurrentEndUser: Boolean!
179
200
  }
180
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
+
181
220
  input SearchDialogInput {
182
221
  "Filter by one or more service owner codes"
183
222
  org: [String!]
@@ -210,18 +249,23 @@ input SearchDialogInput {
210
249
  }
211
250
 
212
251
  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."
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."
218
257
  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
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
264
+ }
265
+
266
+ enum ActorType {
267
+ PARTY_REPRESENTATIVE
268
+ SERVICE_OWNER
225
269
  }
226
270
 
227
271
  enum ApplyPolicy {
@@ -235,27 +279,18 @@ enum AttachmentUrlConsumer {
235
279
  API
236
280
  }
237
281
 
238
- enum ContentType {
239
- TITLE
240
- SENDER_NAME
241
- SUMMARY
242
- ADDITIONAL_INFO
243
- EXTENDED_STATUS
244
- MAIN_CONTENT_REFERENCE
245
- }
246
-
247
282
  enum DialogStatus {
248
- "New"
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."
249
284
  NEW
250
- "In progress. General status used for dialog services where further user input is expected."
285
+ "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
251
286
  IN_PROGRESS
252
- "Waiting for feedback from the service provider"
253
- WAITING
254
- "The dialog is in a state where it is waiting for signing. Typically the last step after all completion is carried out and validated."
287
+ "Equivalent to \"InProgress\", but will be used by the workspace\/frontend for display purposes."
255
288
  SIGNING
256
- "The dialog was cancelled. This typically removes the dialog from normal GUI views."
257
- CANCELLED
258
- "The dialog was completed. This typically moves the dialog to a GUI archive or similar."
289
+ "For processing by the service owner. In a serial process, this is used after a submission is made."
290
+ PROCESSING
291
+ "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."
292
+ REQUIRES_ATTENTION
293
+ "The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar."
259
294
  COMPLETED
260
295
  }
261
296
 
@@ -277,6 +312,25 @@ enum HttpVerb {
277
312
  CONNECT
278
313
  }
279
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
+
280
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
281
335
 
282
336
  "The `DateTime` scalar represents an ISO-8601 compliant date time type."
package/src/index.js ADDED
@@ -0,0 +1,341 @@
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
+ performedBy: Actor!
20
+ description: [Localization!]!
21
+ }
22
+
23
+ type Actor {
24
+ actorType: ActorType
25
+ actorId: String
26
+ actorName: String
27
+ }
28
+
29
+ type ApiAction {
30
+ id: UUID!
31
+ action: String!
32
+ authorizationAttribute: String
33
+ isAuthorized: Boolean!
34
+ endpoints: [ApiActionEndpoint!]!
35
+ }
36
+
37
+ type ApiActionEndpoint {
38
+ id: UUID!
39
+ version: String
40
+ url: URL!
41
+ httpMethod: HttpVerb!
42
+ documentationUrl: URL
43
+ requestSchema: URL
44
+ responseSchema: URL
45
+ deprecated: Boolean!
46
+ sunsetAt: DateTime
47
+ }
48
+
49
+ type Attachment {
50
+ id: UUID!
51
+ displayName: [Localization!]!
52
+ urls: [AttachmentUrl!]!
53
+ }
54
+
55
+ type AttachmentUrl {
56
+ id: UUID!
57
+ url: URL!
58
+ consumerType: AttachmentUrlConsumer!
59
+ }
60
+
61
+ type AuthorizedParty {
62
+ party: String!
63
+ name: String!
64
+ partyType: String!
65
+ isDeleted: Boolean!
66
+ hasKeyRole: Boolean!
67
+ isMainAdministrator: Boolean!
68
+ isAccessManager: Boolean!
69
+ hasOnlyAccessToSubParties: Boolean!
70
+ subParties: [AuthorizedParty!]
71
+ }
72
+
73
+ type Content {
74
+ title: ContentValue!
75
+ summary: ContentValue!
76
+ senderName: ContentValue
77
+ additionalInfo: ContentValue
78
+ extendedStatus: ContentValue
79
+ mainContentReference: ContentValue
80
+ }
81
+
82
+ type ContentValue {
83
+ value: [Localization!]!
84
+ mediaType: String!
85
+ }
86
+
87
+ type Dialog {
88
+ id: UUID!
89
+ revision: UUID!
90
+ org: String!
91
+ serviceResource: String!
92
+ serviceResourceType: String!
93
+ party: String!
94
+ progress: Int
95
+ extendedStatus: String
96
+ externalReference: String
97
+ visibleFrom: DateTime
98
+ dueAt: DateTime
99
+ expiresAt: DateTime
100
+ createdAt: DateTime!
101
+ updatedAt: DateTime!
102
+ dialogToken: String
103
+ status: DialogStatus!
104
+ content: Content!
105
+ attachments: [Attachment!]!
106
+ guiActions: [GuiAction!]!
107
+ apiActions: [ApiAction!]!
108
+ activities: [Activity!]!
109
+ seenSinceLastUpdate: [SeenLog!]!
110
+ transmissions: [Transmission!]!
111
+ }
112
+
113
+ type DialogByIdDeleted implements DialogByIdError {
114
+ message: String!
115
+ }
116
+
117
+ type DialogByIdForbidden implements DialogByIdError {
118
+ message: String!
119
+ }
120
+
121
+ type DialogByIdNotFound implements DialogByIdError {
122
+ message: String!
123
+ }
124
+
125
+ type DialogByIdPayload {
126
+ dialog: Dialog
127
+ errors: [DialogByIdError!]!
128
+ }
129
+
130
+ type GuiAction {
131
+ id: UUID!
132
+ action: String!
133
+ url: URL!
134
+ authorizationAttribute: String
135
+ isAuthorized: Boolean!
136
+ isDeleteDialogAction: Boolean!
137
+ priority: GuiActionPriority!
138
+ httpMethod: HttpVerb!
139
+ title: [Localization!]!
140
+ prompt: [Localization!]
141
+ }
142
+
143
+ type Localization {
144
+ value: String!
145
+ languageCode: String!
146
+ }
147
+
148
+ type Queries @authorize(policy: "enduser") {
149
+ dialogById(dialogId: UUID!): DialogByIdPayload!
150
+ searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
151
+ parties: [AuthorizedParty!]!
152
+ }
153
+
154
+ type SearchContent {
155
+ title: ContentValue!
156
+ summary: ContentValue!
157
+ senderName: ContentValue
158
+ extendedStatus: ContentValue
159
+ }
160
+
161
+ type SearchDialog {
162
+ id: UUID!
163
+ org: String!
164
+ serviceResource: String!
165
+ serviceResourceType: String!
166
+ party: String!
167
+ progress: Int
168
+ guiAttachmentCount: Int
169
+ extendedStatus: String
170
+ createdAt: DateTime!
171
+ updatedAt: DateTime!
172
+ dueAt: DateTime
173
+ status: DialogStatus!
174
+ latestActivity: Activity
175
+ content: SearchContent!
176
+ seenSinceLastUpdate: [SeenLog!]!
177
+ }
178
+
179
+ type SearchDialogForbidden implements SearchDialogError {
180
+ message: String!
181
+ }
182
+
183
+ type SearchDialogValidationError implements SearchDialogError {
184
+ message: String!
185
+ }
186
+
187
+ type SearchDialogsPayload {
188
+ items: [SearchDialog!]
189
+ hasNextPage: Boolean!
190
+ continuationToken: String
191
+ orderBy: String
192
+ errors: [SearchDialogError!]!
193
+ }
194
+
195
+ type SeenLog {
196
+ id: UUID!
197
+ seenAt: DateTime!
198
+ seenBy: Actor!
199
+ isCurrentEndUser: Boolean!
200
+ }
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
+
220
+ input SearchDialogInput {
221
+ "Filter by one or more service owner codes"
222
+ org: [String!]
223
+ "Filter by one or more service resources"
224
+ serviceResource: [String!]
225
+ "Filter by one or more owning parties"
226
+ party: [String!]
227
+ "Filter by one or more extended statuses"
228
+ extendedStatus: [String!]
229
+ "Filter by external reference"
230
+ externalReference: String
231
+ "Filter by status"
232
+ status: [DialogStatus!]
233
+ "Only return dialogs created after this date"
234
+ createdAfter: DateTime
235
+ "Only return dialogs created before this date"
236
+ createdBefore: DateTime
237
+ "Only return dialogs updated after this date"
238
+ updatedAfter: DateTime
239
+ "Only return dialogs updated before this date"
240
+ updatedBefore: DateTime
241
+ "Only return dialogs with due date after this date"
242
+ dueAfter: DateTime
243
+ "Only return dialogs with due date before this date"
244
+ dueBefore: DateTime
245
+ "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate"
246
+ search: String
247
+ "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"
248
+ searchLanguageCode: String
249
+ }
250
+
251
+ enum ActivityType {
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."
257
+ INFORMATION
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
264
+ }
265
+
266
+ enum ActorType {
267
+ PARTY_REPRESENTATIVE
268
+ SERVICE_OWNER
269
+ }
270
+
271
+ enum ApplyPolicy {
272
+ BEFORE_RESOLVER
273
+ AFTER_RESOLVER
274
+ VALIDATION
275
+ }
276
+
277
+ enum AttachmentUrlConsumer {
278
+ GUI
279
+ API
280
+ }
281
+
282
+ enum DialogStatus {
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."
284
+ NEW
285
+ "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
286
+ IN_PROGRESS
287
+ "Equivalent to 'InProgress', but will be used by the workspace\/frontend for display purposes."
288
+ SIGNING
289
+ "For processing by the service owner. In a serial process, this is used after a submission is made."
290
+ PROCESSING
291
+ "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."
292
+ REQUIRES_ATTENTION
293
+ "The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar."
294
+ COMPLETED
295
+ }
296
+
297
+ enum GuiActionPriority {
298
+ PRIMARY
299
+ SECONDARY
300
+ TERTIARY
301
+ }
302
+
303
+ enum HttpVerb {
304
+ GET
305
+ POST
306
+ PUT
307
+ PATCH
308
+ DELETE
309
+ HEAD
310
+ OPTIONS
311
+ TRACE
312
+ CONNECT
313
+ }
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
+
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
335
+
336
+ "The 'DateTime' scalar represents an ISO-8601 compliant date time type."
337
+ scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
338
+
339
+ scalar URL @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc3986")
340
+
341
+ scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")`