@digdir/dialogporten-schema 1.8.1-c9b50e9 → 1.8.1-d549f19

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,22 @@
1
1
  {
2
2
  "name": "@digdir/dialogporten-schema",
3
- "version": "1.8.1-c9b50e9",
3
+ "version": "1.8.1-d549f19",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
5
  "author": "DigDir",
6
+ "main": "src/index.js",
6
7
  "repository": {
7
8
  "url": "git+https://github.com/digdir/dialogporten.git"
8
9
  },
9
- "license": "ISC"
10
+ "scripts": {
11
+ "build": "./gql-to-js.js",
12
+ "prepublishOnly": "npm run build",
13
+ "test": "npm run build && vitest run --test-timeout=10000"
14
+ },
15
+ "devDependencies": {
16
+ "vitest": "^1.2.2",
17
+ "glob": "^10.3.12",
18
+ "graphql-tag": "^2.12.6"
19
+ },
20
+ "license": "ISC",
21
+ "type": "module"
10
22
  }
@@ -16,17 +16,21 @@ type Activity {
16
16
  extendedType: URL
17
17
  type: ActivityType!
18
18
  relatedActivityId: UUID
19
- dialogElementId: UUID
20
- performedBy: String
19
+ performedBy: Actor!
21
20
  description: [Localization!]!
22
21
  }
23
22
 
23
+ type Actor {
24
+ actorType: ActorType
25
+ actorId: String
26
+ actorName: String
27
+ }
28
+
24
29
  type ApiAction {
25
30
  id: UUID!
26
31
  action: String!
27
32
  authorizationAttribute: String
28
33
  isAuthorized: Boolean!
29
- dialogElementId: UUID
30
34
  endpoints: [ApiActionEndpoint!]!
31
35
  }
32
36
 
@@ -42,6 +46,18 @@ type ApiActionEndpoint {
42
46
  sunsetAt: DateTime
43
47
  }
44
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
+
45
61
  type AuthorizedParty {
46
62
  party: String!
47
63
  name: String!
@@ -55,9 +71,17 @@ type AuthorizedParty {
55
71
  }
56
72
 
57
73
  type Content {
58
- 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 {
59
83
  value: [Localization!]!
60
- mediaType: String
84
+ mediaType: String!
61
85
  }
62
86
 
63
87
  type Dialog {
@@ -77,8 +101,8 @@ type Dialog {
77
101
  updatedAt: DateTime!
78
102
  dialogToken: String
79
103
  status: DialogStatus!
80
- content: [Content!]!
81
- elements: [Element!]!
104
+ content: Content!
105
+ attachments: [Attachment!]!
82
106
  guiActions: [GuiAction!]!
83
107
  apiActions: [ApiAction!]!
84
108
  activities: [Activity!]!
@@ -102,23 +126,6 @@ type DialogByIdPayload {
102
126
  errors: [DialogByIdError!]!
103
127
  }
104
128
 
105
- type Element {
106
- id: UUID!
107
- type: URL
108
- externalReference: String
109
- authorizationAttribute: String
110
- isAuthorized: Boolean!
111
- relatedDialogElementId: UUID
112
- displayName: [Localization!]!
113
- urls: [ElementUrl!]!
114
- }
115
-
116
- type ElementUrl {
117
- id: UUID!
118
- url: URL!
119
- consumerType: ElementUrlConsumer!
120
- }
121
-
122
129
  type GuiAction {
123
130
  id: UUID!
124
131
  action: String!
@@ -134,7 +141,7 @@ type GuiAction {
134
141
 
135
142
  type Localization {
136
143
  value: String!
137
- cultureCode: String!
144
+ languageCode: String!
138
145
  }
139
146
 
140
147
  type Queries @authorize(policy: "enduser") {
@@ -143,6 +150,13 @@ type Queries @authorize(policy: "enduser") {
143
150
  parties: [AuthorizedParty!]!
144
151
  }
145
152
 
153
+ type SearchContent {
154
+ title: ContentValue!
155
+ summary: ContentValue!
156
+ senderName: ContentValue
157
+ extendedStatus: ContentValue
158
+ }
159
+
146
160
  type SearchDialog {
147
161
  id: UUID!
148
162
  org: String!
@@ -157,7 +171,7 @@ type SearchDialog {
157
171
  dueAt: DateTime
158
172
  status: DialogStatus!
159
173
  latestActivity: Activity
160
- content: [Content!]!
174
+ content: SearchContent!
161
175
  seenSinceLastUpdate: [SeenLog!]!
162
176
  }
163
177
 
@@ -180,8 +194,7 @@ type SearchDialogsPayload {
180
194
  type SeenLog {
181
195
  id: UUID!
182
196
  seenAt: DateTime!
183
- endUserIdHash: String!
184
- endUserName: String
197
+ seenBy: Actor!
185
198
  isCurrentEndUser: Boolean!
186
199
  }
187
200
 
@@ -212,8 +225,8 @@ input SearchDialogInput {
212
225
  dueBefore: DateTime
213
226
  "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate"
214
227
  search: String
215
- "Limit free text search to texts with this culture code, e.g. \"nb-NO\". Default: search all culture codes"
216
- searchCultureCode: String
228
+ "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"
229
+ searchLanguageCode: String
217
230
  }
218
231
 
219
232
  enum ActivityType {
@@ -231,40 +244,37 @@ enum ActivityType {
231
244
  FORWARDED
232
245
  }
233
246
 
247
+ enum ActorType {
248
+ PARTY_REPRESENTATIVE
249
+ SERVICE_OWNER
250
+ }
251
+
234
252
  enum ApplyPolicy {
235
253
  BEFORE_RESOLVER
236
254
  AFTER_RESOLVER
237
255
  VALIDATION
238
256
  }
239
257
 
240
- enum ContentType {
241
- TITLE
242
- SENDER_NAME
243
- SUMMARY
244
- ADDITIONAL_INFO
245
- EXTENDED_STATUS
258
+ enum AttachmentUrlConsumer {
259
+ GUI
260
+ API
246
261
  }
247
262
 
248
263
  enum DialogStatus {
249
- "New"
264
+ "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."
250
265
  NEW
251
- "In progress. General status used for dialog services where further user input is expected."
266
+ "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
252
267
  IN_PROGRESS
253
- "Waiting for feedback from the service provider"
254
- WAITING
255
- "The dialog is in a state where it is waiting for signing. Typically the last step after all completion is carried out and validated."
268
+ "Equivalent to \"InProgress\", but will be used by the workspace\/frontend for display purposes."
256
269
  SIGNING
257
- "The dialog was cancelled. This typically removes the dialog from normal GUI views."
258
- CANCELLED
259
- "The dialog was completed. This typically moves the dialog to a GUI archive or similar."
270
+ "For processing by the service owner. In a serial process, this is used after a submission is made."
271
+ PROCESSING
272
+ "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."
273
+ REQUIRES_ATTENTION
274
+ "The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar."
260
275
  COMPLETED
261
276
  }
262
277
 
263
- enum ElementUrlConsumer {
264
- GUI
265
- API
266
- }
267
-
268
278
  enum GuiActionPriority {
269
279
  PRIMARY
270
280
  SECONDARY
package/src/index.js ADDED
@@ -0,0 +1,303 @@
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
+ }
111
+
112
+ type DialogByIdDeleted implements DialogByIdError {
113
+ message: String!
114
+ }
115
+
116
+ type DialogByIdForbidden implements DialogByIdError {
117
+ message: String!
118
+ }
119
+
120
+ type DialogByIdNotFound implements DialogByIdError {
121
+ message: String!
122
+ }
123
+
124
+ type DialogByIdPayload {
125
+ dialog: Dialog
126
+ errors: [DialogByIdError!]!
127
+ }
128
+
129
+ type GuiAction {
130
+ id: UUID!
131
+ action: String!
132
+ url: URL!
133
+ authorizationAttribute: String
134
+ isAuthorized: Boolean!
135
+ isDeleteDialogAction: Boolean!
136
+ priority: GuiActionPriority!
137
+ httpMethod: HttpVerb!
138
+ title: [Localization!]!
139
+ prompt: [Localization!]
140
+ }
141
+
142
+ type Localization {
143
+ value: String!
144
+ languageCode: String!
145
+ }
146
+
147
+ type Queries @authorize(policy: "enduser") {
148
+ dialogById(dialogId: UUID!): DialogByIdPayload!
149
+ searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
150
+ parties: [AuthorizedParty!]!
151
+ }
152
+
153
+ type SearchContent {
154
+ title: ContentValue!
155
+ summary: ContentValue!
156
+ senderName: ContentValue
157
+ extendedStatus: ContentValue
158
+ }
159
+
160
+ type SearchDialog {
161
+ id: UUID!
162
+ org: String!
163
+ serviceResource: String!
164
+ serviceResourceType: String!
165
+ party: String!
166
+ progress: Int
167
+ guiAttachmentCount: Int
168
+ extendedStatus: String
169
+ createdAt: DateTime!
170
+ updatedAt: DateTime!
171
+ dueAt: DateTime
172
+ status: DialogStatus!
173
+ latestActivity: Activity
174
+ content: SearchContent!
175
+ seenSinceLastUpdate: [SeenLog!]!
176
+ }
177
+
178
+ type SearchDialogForbidden implements SearchDialogError {
179
+ message: String!
180
+ }
181
+
182
+ type SearchDialogValidationError implements SearchDialogError {
183
+ message: String!
184
+ }
185
+
186
+ type SearchDialogsPayload {
187
+ items: [SearchDialog!]
188
+ hasNextPage: Boolean!
189
+ continuationToken: String
190
+ orderBy: String
191
+ errors: [SearchDialogError!]!
192
+ }
193
+
194
+ type SeenLog {
195
+ id: UUID!
196
+ seenAt: DateTime!
197
+ seenBy: Actor!
198
+ isCurrentEndUser: Boolean!
199
+ }
200
+
201
+ input SearchDialogInput {
202
+ "Filter by one or more service owner codes"
203
+ org: [String!]
204
+ "Filter by one or more service resources"
205
+ serviceResource: [String!]
206
+ "Filter by one or more owning parties"
207
+ party: [String!]
208
+ "Filter by one or more extended statuses"
209
+ extendedStatus: [String!]
210
+ "Filter by external reference"
211
+ externalReference: String
212
+ "Filter by status"
213
+ status: [DialogStatus!]
214
+ "Only return dialogs created after this date"
215
+ createdAfter: DateTime
216
+ "Only return dialogs created before this date"
217
+ createdBefore: DateTime
218
+ "Only return dialogs updated after this date"
219
+ updatedAfter: DateTime
220
+ "Only return dialogs updated before this date"
221
+ updatedBefore: DateTime
222
+ "Only return dialogs with due date after this date"
223
+ dueAfter: DateTime
224
+ "Only return dialogs with due date before this date"
225
+ dueBefore: DateTime
226
+ "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate"
227
+ search: String
228
+ "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"
229
+ searchLanguageCode: String
230
+ }
231
+
232
+ enum ActivityType {
233
+ "Refers to a submission made by a party that has been received by the service provider."
234
+ SUBMISSION
235
+ "Indicates feedback from the service provider on a submission. Contains a reference to the current submission."
236
+ FEEDBACK
237
+ "Information from the service provider, not (directly) related to any submission."
238
+ INFORMATION
239
+ "Used to indicate an error situation, typically on a submission. Contains a service-specific activityErrorCode."
240
+ ERROR
241
+ "Indicates that the dialog is closed for further changes. This typically happens when the dialog is completed or deleted."
242
+ CLOSED
243
+ "When the dialog is forwarded (delegated access) by someone with access to others."
244
+ FORWARDED
245
+ }
246
+
247
+ enum ActorType {
248
+ PARTY_REPRESENTATIVE
249
+ SERVICE_OWNER
250
+ }
251
+
252
+ enum ApplyPolicy {
253
+ BEFORE_RESOLVER
254
+ AFTER_RESOLVER
255
+ VALIDATION
256
+ }
257
+
258
+ enum AttachmentUrlConsumer {
259
+ GUI
260
+ API
261
+ }
262
+
263
+ enum DialogStatus {
264
+ "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."
265
+ NEW
266
+ "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
267
+ IN_PROGRESS
268
+ "Equivalent to 'InProgress', but will be used by the workspace\/frontend for display purposes."
269
+ SIGNING
270
+ "For processing by the service owner. In a serial process, this is used after a submission is made."
271
+ PROCESSING
272
+ "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."
273
+ REQUIRES_ATTENTION
274
+ "The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar."
275
+ COMPLETED
276
+ }
277
+
278
+ enum GuiActionPriority {
279
+ PRIMARY
280
+ SECONDARY
281
+ TERTIARY
282
+ }
283
+
284
+ enum HttpVerb {
285
+ GET
286
+ POST
287
+ PUT
288
+ PATCH
289
+ DELETE
290
+ HEAD
291
+ OPTIONS
292
+ TRACE
293
+ CONNECT
294
+ }
295
+
296
+ 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
297
+
298
+ "The 'DateTime' scalar represents an ISO-8601 compliant date time type."
299
+ scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
300
+
301
+ scalar URL @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc3986")
302
+
303
+ scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")`