@digdir/dialogporten-schema 1.8.1-cd03956 → 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-cd03956",
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,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,7 +101,7 @@ 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!]!
@@ -136,6 +150,13 @@ type Queries @authorize(policy: "enduser") {
136
150
  parties: [AuthorizedParty!]!
137
151
  }
138
152
 
153
+ type SearchContent {
154
+ title: ContentValue!
155
+ summary: ContentValue!
156
+ senderName: ContentValue
157
+ extendedStatus: ContentValue
158
+ }
159
+
139
160
  type SearchDialog {
140
161
  id: UUID!
141
162
  org: String!
@@ -150,7 +171,7 @@ type SearchDialog {
150
171
  dueAt: DateTime
151
172
  status: DialogStatus!
152
173
  latestActivity: Activity
153
- content: [Content!]!
174
+ content: SearchContent!
154
175
  seenSinceLastUpdate: [SeenLog!]!
155
176
  }
156
177
 
@@ -173,8 +194,7 @@ type SearchDialogsPayload {
173
194
  type SeenLog {
174
195
  id: UUID!
175
196
  seenAt: DateTime!
176
- endUserIdHash: String!
177
- endUserName: String
197
+ seenBy: Actor!
178
198
  isCurrentEndUser: Boolean!
179
199
  }
180
200
 
@@ -224,6 +244,11 @@ enum ActivityType {
224
244
  FORWARDED
225
245
  }
226
246
 
247
+ enum ActorType {
248
+ PARTY_REPRESENTATIVE
249
+ SERVICE_OWNER
250
+ }
251
+
227
252
  enum ApplyPolicy {
228
253
  BEFORE_RESOLVER
229
254
  AFTER_RESOLVER
@@ -235,27 +260,18 @@ enum AttachmentUrlConsumer {
235
260
  API
236
261
  }
237
262
 
238
- enum ContentType {
239
- TITLE
240
- SENDER_NAME
241
- SUMMARY
242
- ADDITIONAL_INFO
243
- EXTENDED_STATUS
244
- MAIN_CONTENT_REFERENCE
245
- }
246
-
247
263
  enum DialogStatus {
248
- "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."
249
265
  NEW
250
- "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."
251
267
  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."
268
+ "Equivalent to \"InProgress\", but will be used by the workspace\/frontend for display purposes."
255
269
  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."
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."
259
275
  COMPLETED
260
276
  }
261
277
 
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")`