@digdir/dialogporten-schema 1.20.2 → 1.21.0-49c0d34

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@digdir/dialogporten-schema",
3
- "version": "1.20.2",
3
+ "version": "1.21.0-49c0d34",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
5
  "engines": {
6
6
  "node": "20"
@@ -1,5 +1,6 @@
1
1
  schema {
2
2
  query: Queries
3
+ mutation: Mutations
3
4
  subscription: Subscriptions
4
5
  }
5
6
 
@@ -11,6 +12,10 @@ interface SearchDialogError {
11
12
  message: String!
12
13
  }
13
14
 
15
+ interface SetSystemLabelError {
16
+ message: String!
17
+ }
18
+
14
19
  type Activity {
15
20
  id: UUID!
16
21
  createdAt: DateTime
@@ -105,6 +110,7 @@ type Dialog {
105
110
  createdAt: DateTime!
106
111
  updatedAt: DateTime!
107
112
  dialogToken: String
113
+ systemLabel: SystemLabel!
108
114
  status: DialogStatus!
109
115
  content: Content!
110
116
  attachments: [Attachment!]!
@@ -155,6 +161,10 @@ type Localization {
155
161
  languageCode: String!
156
162
  }
157
163
 
164
+ type Mutations {
165
+ setSystemLabel(input: SetSystemLabelInput!): SetSystemLabelPayload!
166
+ }
167
+
158
168
  type Queries @authorize(policy: "enduser") {
159
169
  dialogById(dialogId: UUID!): DialogByIdPayload!
160
170
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
@@ -211,6 +221,15 @@ type SeenLog {
211
221
  isCurrentEndUser: Boolean!
212
222
  }
213
223
 
224
+ type SetSystemLabelEntityNotFound implements SetSystemLabelError {
225
+ message: String!
226
+ }
227
+
228
+ type SetSystemLabelPayload {
229
+ success: Boolean!
230
+ errors: [SetSystemLabelError!]!
231
+ }
232
+
214
233
  type Subscriptions {
215
234
  "Requires a dialog token in the 'DigDir-Dialog-Token' header."
216
235
  dialogEvents(dialogId: UUID!): DialogEventPayload! @authorize(policy: "enduserSubscription", apply: VALIDATION)
@@ -265,6 +284,11 @@ input SearchDialogInput {
265
284
  searchLanguageCode: String
266
285
  }
267
286
 
287
+ input SetSystemLabelInput {
288
+ dialogId: UUID!
289
+ label: SystemLabel!
290
+ }
291
+
268
292
  enum ActivityType {
269
293
  "Refers to a dialog that has been created."
270
294
  DIALOG_CREATED
@@ -336,6 +360,12 @@ enum HttpVerb {
336
360
  CONNECT
337
361
  }
338
362
 
363
+ enum SystemLabel {
364
+ DEFAULT
365
+ BIN
366
+ ARCHIVE
367
+ }
368
+
339
369
  enum TransmissionType {
340
370
  "For general information, not related to any submissions"
341
371
  INFORMATION
@@ -362,4 +392,4 @@ scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time"
362
392
 
363
393
  scalar URL @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc3986")
364
394
 
365
- scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")
395
+ scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")
package/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export const schema_verified_graphql = `schema {
2
2
  query: Queries
3
+ mutation: Mutations
3
4
  subscription: Subscriptions
4
5
  }
5
6
 
@@ -11,6 +12,10 @@ interface SearchDialogError {
11
12
  message: String!
12
13
  }
13
14
 
15
+ interface SetSystemLabelError {
16
+ message: String!
17
+ }
18
+
14
19
  type Activity {
15
20
  id: UUID!
16
21
  createdAt: DateTime
@@ -105,6 +110,7 @@ type Dialog {
105
110
  createdAt: DateTime!
106
111
  updatedAt: DateTime!
107
112
  dialogToken: String
113
+ systemLabel: SystemLabel!
108
114
  status: DialogStatus!
109
115
  content: Content!
110
116
  attachments: [Attachment!]!
@@ -155,6 +161,10 @@ type Localization {
155
161
  languageCode: String!
156
162
  }
157
163
 
164
+ type Mutations {
165
+ setSystemLabel(input: SetSystemLabelInput!): SetSystemLabelPayload!
166
+ }
167
+
158
168
  type Queries @authorize(policy: "enduser") {
159
169
  dialogById(dialogId: UUID!): DialogByIdPayload!
160
170
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
@@ -211,6 +221,15 @@ type SeenLog {
211
221
  isCurrentEndUser: Boolean!
212
222
  }
213
223
 
224
+ type SetSystemLabelEntityNotFound implements SetSystemLabelError {
225
+ message: String!
226
+ }
227
+
228
+ type SetSystemLabelPayload {
229
+ success: Boolean!
230
+ errors: [SetSystemLabelError!]!
231
+ }
232
+
214
233
  type Subscriptions {
215
234
  "Requires a dialog token in the 'DigDir-Dialog-Token' header."
216
235
  dialogEvents(dialogId: UUID!): DialogEventPayload! @authorize(policy: "enduserSubscription", apply: VALIDATION)
@@ -265,6 +284,11 @@ input SearchDialogInput {
265
284
  searchLanguageCode: String
266
285
  }
267
286
 
287
+ input SetSystemLabelInput {
288
+ dialogId: UUID!
289
+ label: SystemLabel!
290
+ }
291
+
268
292
  enum ActivityType {
269
293
  "Refers to a dialog that has been created."
270
294
  DIALOG_CREATED
@@ -336,6 +360,12 @@ enum HttpVerb {
336
360
  CONNECT
337
361
  }
338
362
 
363
+ enum SystemLabel {
364
+ DEFAULT
365
+ BIN
366
+ ARCHIVE
367
+ }
368
+
339
369
  enum TransmissionType {
340
370
  "For general information, not related to any submissions"
341
371
  INFORMATION
@@ -261,6 +261,15 @@
261
261
  }
262
262
  ]
263
263
  },
264
+ "systemLabel": {
265
+ "description": "Set the system label of the dialog Migration purposes ",
266
+ "nullable": true,
267
+ "oneOf": [
268
+ {
269
+ "$ref": "#/components/schemas/SystemLabel_Values"
270
+ }
271
+ ]
272
+ },
264
273
  "transmissions": {
265
274
  "description": "The immutable list of transmissions associated with the dialog",
266
275
  "items": {
@@ -2093,6 +2102,14 @@
2093
2102
  }
2094
2103
  ]
2095
2104
  },
2105
+ "systemLabel": {
2106
+ "description": "Current display state.",
2107
+ "oneOf": [
2108
+ {
2109
+ "$ref": "#/components/schemas/SystemLabel_Values"
2110
+ }
2111
+ ]
2112
+ },
2096
2113
  "transmissions": {
2097
2114
  "description": "The immutable list of transmissions associated with the dialog",
2098
2115
  "items": {
@@ -2254,6 +2271,14 @@
2254
2271
  }
2255
2272
  ]
2256
2273
  },
2274
+ "systemLabel": {
2275
+ "description": "Current display state.",
2276
+ "oneOf": [
2277
+ {
2278
+ "$ref": "#/components/schemas/SystemLabel_Values"
2279
+ }
2280
+ ]
2281
+ },
2257
2282
  "transmissions": {
2258
2283
  "description": "The immutable list of transmissions associated with the dialog",
2259
2284
  "items": {
@@ -2551,6 +2576,18 @@
2551
2576
  },
2552
2577
  "type": "object"
2553
2578
  },
2579
+ "LabelAssignmentLogActorDto": {
2580
+ "additionalProperties": false,
2581
+ "properties": {
2582
+ "actorId": {
2583
+ "type": "string"
2584
+ },
2585
+ "actorName": {
2586
+ "type": "string"
2587
+ }
2588
+ },
2589
+ "type": "object"
2590
+ },
2554
2591
  "LocalizationDto": {
2555
2592
  "additionalProperties": false,
2556
2593
  "properties": {
@@ -3180,6 +3217,14 @@
3180
3217
  }
3181
3218
  ]
3182
3219
  },
3220
+ "systemLabel": {
3221
+ "description": "Current display state.",
3222
+ "oneOf": [
3223
+ {
3224
+ "$ref": "#/components/schemas/SystemLabel_Values"
3225
+ }
3226
+ ]
3227
+ },
3183
3228
  "updatedAt": {
3184
3229
  "description": "The date and time when the dialog was last updated.",
3185
3230
  "example": "2022-12-31T23:59:59Z",
@@ -3295,6 +3340,14 @@
3295
3340
  }
3296
3341
  ]
3297
3342
  },
3343
+ "systemLabel": {
3344
+ "description": "Current display state.",
3345
+ "oneOf": [
3346
+ {
3347
+ "$ref": "#/components/schemas/SystemLabel_Values"
3348
+ }
3349
+ ]
3350
+ },
3298
3351
  "updatedAt": {
3299
3352
  "description": "The date and time when the dialog was last updated.",
3300
3353
  "example": "2022-12-31T23:59:59Z",
@@ -3310,6 +3363,25 @@
3310
3363
  },
3311
3364
  "type": "object"
3312
3365
  },
3366
+ "SearchDialogLabelAssignmentLogDto": {
3367
+ "additionalProperties": false,
3368
+ "properties": {
3369
+ "action": {
3370
+ "type": "string"
3371
+ },
3372
+ "createdAt": {
3373
+ "format": "date-time",
3374
+ "type": "string"
3375
+ },
3376
+ "name": {
3377
+ "type": "string"
3378
+ },
3379
+ "performedBy": {
3380
+ "$ref": "#/components/schemas/LabelAssignmentLogActorDto"
3381
+ }
3382
+ },
3383
+ "type": "object"
3384
+ },
3313
3385
  "SearchDialogSeenLogDto": {
3314
3386
  "additionalProperties": false,
3315
3387
  "properties": {
@@ -3386,6 +3458,34 @@
3386
3458
  },
3387
3459
  "type": "object"
3388
3460
  },
3461
+ "SetDialogSystemLabelCommand": {
3462
+ "additionalProperties": false,
3463
+ "properties": {
3464
+ "ifMatchDialogRevision": {
3465
+ "format": "guid",
3466
+ "nullable": true,
3467
+ "type": "string"
3468
+ },
3469
+ "label": {
3470
+ "$ref": "#/components/schemas/SystemLabel_Values"
3471
+ }
3472
+ },
3473
+ "type": "object"
3474
+ },
3475
+ "SystemLabel_Values": {
3476
+ "description": "",
3477
+ "enum": [
3478
+ "Default",
3479
+ "Bin",
3480
+ "Archive"
3481
+ ],
3482
+ "type": "string",
3483
+ "x-enumNames": [
3484
+ "Default",
3485
+ "Bin",
3486
+ "Archive"
3487
+ ]
3488
+ },
3389
3489
  "UpdateDialogContentDto": {
3390
3490
  "additionalProperties": false,
3391
3491
  "properties": {
@@ -4237,6 +4337,20 @@
4237
4337
  "type": "string"
4238
4338
  }
4239
4339
  },
4340
+ {
4341
+ "description": "Filter by Display state ",
4342
+ "explode": true,
4343
+ "in": "query",
4344
+ "name": "systemLabel",
4345
+ "schema": {
4346
+ "items": {
4347
+ "$ref": "#/components/schemas/SystemLabel_Values"
4348
+ },
4349
+ "nullable": true,
4350
+ "type": "array"
4351
+ },
4352
+ "style": "form"
4353
+ },
4240
4354
  {
4241
4355
  "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate",
4242
4356
  "in": "query",
@@ -4472,6 +4586,64 @@
4472
4586
  ]
4473
4587
  }
4474
4588
  },
4589
+ "/api/v1/enduser/dialogs/{dialogId}/labellog": {
4590
+ "get": {
4591
+ "operationId": "SearchDialogLabelAssignmentLog",
4592
+ "parameters": [
4593
+ {
4594
+ "in": "path",
4595
+ "name": "dialogId",
4596
+ "required": true,
4597
+ "schema": {
4598
+ "format": "guid",
4599
+ "type": "string"
4600
+ }
4601
+ }
4602
+ ],
4603
+ "responses": {
4604
+ "200": {
4605
+ "content": {
4606
+ "application/json": {
4607
+ "schema": {
4608
+ "items": {
4609
+ "$ref": "#/components/schemas/SearchDialogLabelAssignmentLogDto"
4610
+ },
4611
+ "type": "array"
4612
+ }
4613
+ }
4614
+ },
4615
+ "description": "Success"
4616
+ },
4617
+ "401": {
4618
+ "description": "Unauthorized"
4619
+ },
4620
+ "403": {
4621
+ "description": "Forbidden"
4622
+ },
4623
+ "404": {
4624
+ "content": {
4625
+ "application/problem\u002Bjson": {
4626
+ "schema": {
4627
+ "$ref": "#/components/schemas/ProblemDetails"
4628
+ }
4629
+ }
4630
+ },
4631
+ "description": "Not Found"
4632
+ },
4633
+ "410": {
4634
+ "description": ""
4635
+ }
4636
+ },
4637
+ "security": [
4638
+ {
4639
+ "JWTBearerAuth": []
4640
+ }
4641
+ ],
4642
+ "tags": [
4643
+ "Enduser"
4644
+ ]
4645
+ }
4646
+ },
4475
4647
  "/api/v1/enduser/dialogs/{dialogId}/seenlog": {
4476
4648
  "get": {
4477
4649
  "description": "Gets all seen log records for a dialog. For more information see the documentation (link TBD).",
@@ -4592,6 +4764,97 @@
4592
4764
  ]
4593
4765
  }
4594
4766
  },
4767
+ "/api/v1/enduser/dialogs/{dialogId}/systemlabels": {
4768
+ "put": {
4769
+ "operationId": "SetDialogLabel",
4770
+ "parameters": [
4771
+ {
4772
+ "in": "path",
4773
+ "name": "dialogId",
4774
+ "required": true,
4775
+ "schema": {
4776
+ "format": "guid",
4777
+ "type": "string"
4778
+ }
4779
+ }
4780
+ ],
4781
+ "requestBody": {
4782
+ "content": {
4783
+ "application/json": {
4784
+ "schema": {
4785
+ "$ref": "#/components/schemas/SetDialogSystemLabelCommand"
4786
+ }
4787
+ }
4788
+ },
4789
+ "description": "",
4790
+ "required": true,
4791
+ "x-name": "SetDialogSystemLabelCommand",
4792
+ "x-position": 1
4793
+ },
4794
+ "responses": {
4795
+ "204": {
4796
+ "description": "No Content"
4797
+ },
4798
+ "400": {
4799
+ "content": {
4800
+ "application/problem\u002Bjson": {
4801
+ "schema": {
4802
+ "$ref": "#/components/schemas/ProblemDetails"
4803
+ }
4804
+ }
4805
+ },
4806
+ "description": "Bad Request"
4807
+ },
4808
+ "401": {
4809
+ "description": "Unauthorized"
4810
+ },
4811
+ "403": {
4812
+ "description": "Forbidden"
4813
+ },
4814
+ "404": {
4815
+ "content": {
4816
+ "application/problem\u002Bjson": {
4817
+ "schema": {
4818
+ "$ref": "#/components/schemas/ProblemDetails"
4819
+ }
4820
+ }
4821
+ },
4822
+ "description": "Not Found"
4823
+ },
4824
+ "410": {
4825
+ "description": ""
4826
+ },
4827
+ "412": {
4828
+ "content": {
4829
+ "application/problem\u002Bjson": {
4830
+ "schema": {
4831
+ "$ref": "#/components/schemas/ProblemDetails"
4832
+ }
4833
+ }
4834
+ },
4835
+ "description": ""
4836
+ },
4837
+ "422": {
4838
+ "content": {
4839
+ "application/problem\u002Bjson": {
4840
+ "schema": {
4841
+ "$ref": "#/components/schemas/ProblemDetails"
4842
+ }
4843
+ }
4844
+ },
4845
+ "description": ""
4846
+ }
4847
+ },
4848
+ "security": [
4849
+ {
4850
+ "JWTBearerAuth": []
4851
+ }
4852
+ ],
4853
+ "tags": [
4854
+ "Enduser"
4855
+ ]
4856
+ }
4857
+ },
4595
4858
  "/api/v1/enduser/dialogs/{dialogId}/transmissions": {
4596
4859
  "get": {
4597
4860
  "description": "Gets the list of transmissions belonging to a dialog",
@@ -4897,6 +5160,20 @@
4897
5160
  "type": "string"
4898
5161
  }
4899
5162
  },
5163
+ {
5164
+ "description": "Filter by Display state",
5165
+ "explode": true,
5166
+ "in": "query",
5167
+ "name": "systemLabel",
5168
+ "schema": {
5169
+ "items": {
5170
+ "$ref": "#/components/schemas/SystemLabel_Values"
5171
+ },
5172
+ "nullable": true,
5173
+ "type": "array"
5174
+ },
5175
+ "style": "form"
5176
+ },
4900
5177
  {
4901
5178
  "description": "Search string for free text search. Will attempt to fuzzily match in all free text fields in the aggregate",
4902
5179
  "in": "query",