@digdir/dialogporten-schema 1.106.2 → 1.107.0-1eab3ba

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.106.2",
3
+ "version": "1.107.0-1eab3ba",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
5
  "engines": {
6
6
  "node": "24"
@@ -12,6 +12,10 @@ interface DialogByIdError {
12
12
  message: String!
13
13
  }
14
14
 
15
+ interface DialogLookupError {
16
+ message: String!
17
+ }
18
+
15
19
  interface SearchDialogError {
16
20
  message: String!
17
21
  }
@@ -169,6 +173,7 @@ type Content {
169
173
  type ContentValue {
170
174
  value: [Localization!]!
171
175
  mediaType: String!
176
+ isAuthorized: Boolean
172
177
  }
173
178
 
174
179
  type Dialog {
@@ -267,6 +272,59 @@ type DialogEventPayload {
267
272
  type: DialogEventType!
268
273
  }
269
274
 
275
+ type DialogLookup {
276
+ dialogId: UUID!
277
+ instanceRef: String!
278
+ party: String!
279
+ serviceResource: DialogLookupServiceResource!
280
+ serviceOwner: DialogLookupServiceOwner!
281
+ authorizationEvidence: DialogLookupAuthorizationEvidence!
282
+ }
283
+
284
+ type DialogLookupAuthorizationEvidence {
285
+ minimumAuthenticationLevel: Int!
286
+ currentAuthenticationLevel: Int!
287
+ viaRole: Boolean!
288
+ viaAccessPackage: Boolean!
289
+ viaResourceDelegation: Boolean!
290
+ viaInstanceDelegation: Boolean!
291
+ evidence: [DialogLookupAuthorizationEvidenceItem!]!
292
+ }
293
+
294
+ type DialogLookupAuthorizationEvidenceItem {
295
+ grantType: DialogLookupGrantType!
296
+ subject: String!
297
+ }
298
+
299
+ type DialogLookupForbidden implements DialogLookupError {
300
+ message: String!
301
+ }
302
+
303
+ type DialogLookupNotFound implements DialogLookupError {
304
+ message: String!
305
+ }
306
+
307
+ type DialogLookupPayload {
308
+ lookup: DialogLookup
309
+ errors: [DialogLookupError!]!
310
+ }
311
+
312
+ type DialogLookupServiceOwner {
313
+ orgNumber: String!
314
+ code: String!
315
+ name: [Localization!]!
316
+ }
317
+
318
+ type DialogLookupServiceResource {
319
+ id: String!
320
+ isDelegable: Boolean!
321
+ name: [Localization!]!
322
+ }
323
+
324
+ type DialogLookupValidationError implements DialogLookupError {
325
+ message: String!
326
+ }
327
+
270
328
  type EndUserContext {
271
329
  revision: UUID!
272
330
  systemLabels: [SystemLabel!]!
@@ -318,6 +376,7 @@ type Mutations {
318
376
  }
319
377
 
320
378
  type Queries @authorize(policy: "enduser") {
379
+ dialogLookup(instanceRef: String!): DialogLookupPayload!
321
380
  dialogById(dialogId: UUID!): DialogByIdPayload!
322
381
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
323
382
  limits: Limits!
@@ -658,6 +717,13 @@ enum DialogEventType {
658
717
  DIALOG_DELETED
659
718
  }
660
719
 
720
+ enum DialogLookupGrantType {
721
+ ROLE
722
+ ACCESS_PACKAGE
723
+ RESOURCE_DELEGATION
724
+ INSTANCE_DELEGATION
725
+ }
726
+
661
727
  enum DialogStatus {
662
728
  "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
663
729
  IN_PROGRESS
package/src/index.js CHANGED
@@ -12,6 +12,10 @@ interface DialogByIdError {
12
12
  message: String!
13
13
  }
14
14
 
15
+ interface DialogLookupError {
16
+ message: String!
17
+ }
18
+
15
19
  interface SearchDialogError {
16
20
  message: String!
17
21
  }
@@ -169,6 +173,7 @@ type Content {
169
173
  type ContentValue {
170
174
  value: [Localization!]!
171
175
  mediaType: String!
176
+ isAuthorized: Boolean
172
177
  }
173
178
 
174
179
  type Dialog {
@@ -267,6 +272,59 @@ type DialogEventPayload {
267
272
  type: DialogEventType!
268
273
  }
269
274
 
275
+ type DialogLookup {
276
+ dialogId: UUID!
277
+ instanceRef: String!
278
+ party: String!
279
+ serviceResource: DialogLookupServiceResource!
280
+ serviceOwner: DialogLookupServiceOwner!
281
+ authorizationEvidence: DialogLookupAuthorizationEvidence!
282
+ }
283
+
284
+ type DialogLookupAuthorizationEvidence {
285
+ minimumAuthenticationLevel: Int!
286
+ currentAuthenticationLevel: Int!
287
+ viaRole: Boolean!
288
+ viaAccessPackage: Boolean!
289
+ viaResourceDelegation: Boolean!
290
+ viaInstanceDelegation: Boolean!
291
+ evidence: [DialogLookupAuthorizationEvidenceItem!]!
292
+ }
293
+
294
+ type DialogLookupAuthorizationEvidenceItem {
295
+ grantType: DialogLookupGrantType!
296
+ subject: String!
297
+ }
298
+
299
+ type DialogLookupForbidden implements DialogLookupError {
300
+ message: String!
301
+ }
302
+
303
+ type DialogLookupNotFound implements DialogLookupError {
304
+ message: String!
305
+ }
306
+
307
+ type DialogLookupPayload {
308
+ lookup: DialogLookup
309
+ errors: [DialogLookupError!]!
310
+ }
311
+
312
+ type DialogLookupServiceOwner {
313
+ orgNumber: String!
314
+ code: String!
315
+ name: [Localization!]!
316
+ }
317
+
318
+ type DialogLookupServiceResource {
319
+ id: String!
320
+ isDelegable: Boolean!
321
+ name: [Localization!]!
322
+ }
323
+
324
+ type DialogLookupValidationError implements DialogLookupError {
325
+ message: String!
326
+ }
327
+
270
328
  type EndUserContext {
271
329
  revision: UUID!
272
330
  systemLabels: [SystemLabel!]!
@@ -318,6 +376,7 @@ type Mutations {
318
376
  }
319
377
 
320
378
  type Queries @authorize(policy: "enduser") {
379
+ dialogLookup(instanceRef: String!): DialogLookupPayload!
321
380
  dialogById(dialogId: UUID!): DialogByIdPayload!
322
381
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
323
382
  limits: Limits!
@@ -658,6 +717,13 @@ enum DialogEventType {
658
717
  DIALOG_DELETED
659
718
  }
660
719
 
720
+ enum DialogLookupGrantType {
721
+ ROLE
722
+ ACCESS_PACKAGE
723
+ RESOURCE_DELEGATION
724
+ INSTANCE_DELEGATION
725
+ }
726
+
661
727
  enum DialogStatus {
662
728
  "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
663
729
  IN_PROGRESS
@@ -464,6 +464,11 @@
464
464
  "V1CommonContent_ContentValue": {
465
465
  "additionalProperties": false,
466
466
  "properties": {
467
+ "isAuthorized": {
468
+ "description": "True if the authenticated user is authorized for this content. If not, the endpoints will\nbe replaced with a fixed placeholder. Can be null if not applicable.\n ",
469
+ "nullable": true,
470
+ "type": "boolean"
471
+ },
467
472
  "mediaType": {
468
473
  "description": "Media type of the content, this can also indicate that the content is embeddable.",
469
474
  "type": "string"
@@ -479,6 +484,166 @@
479
484
  },
480
485
  "type": "object"
481
486
  },
487
+ "V1CommonIdentifierLookup_EndUserIdentifierLookup": {
488
+ "additionalProperties": false,
489
+ "properties": {
490
+ "authorizationEvidence": {
491
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidence"
492
+ },
493
+ "dialogId": {
494
+ "format": "guid",
495
+ "type": "string"
496
+ },
497
+ "instanceRef": {
498
+ "type": "string"
499
+ },
500
+ "party": {
501
+ "type": "string"
502
+ },
503
+ "serviceOwner": {
504
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceOwner"
505
+ },
506
+ "serviceResource": {
507
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceResource"
508
+ }
509
+ },
510
+ "type": "object"
511
+ },
512
+ "V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidence": {
513
+ "additionalProperties": false,
514
+ "properties": {
515
+ "currentAuthenticationLevel": {
516
+ "format": "int32",
517
+ "type": "integer"
518
+ },
519
+ "evidence": {
520
+ "items": {
521
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidenceItem"
522
+ },
523
+ "nullable": true,
524
+ "type": "array"
525
+ },
526
+ "minimumAuthenticationLevel": {
527
+ "format": "int32",
528
+ "type": "integer"
529
+ },
530
+ "viaAccessPackage": {
531
+ "type": "boolean"
532
+ },
533
+ "viaInstanceDelegation": {
534
+ "type": "boolean"
535
+ },
536
+ "viaResourceDelegation": {
537
+ "type": "boolean"
538
+ },
539
+ "viaRole": {
540
+ "type": "boolean"
541
+ }
542
+ },
543
+ "type": "object"
544
+ },
545
+ "V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidenceItem": {
546
+ "additionalProperties": false,
547
+ "properties": {
548
+ "grantType": {
549
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupGrantType"
550
+ },
551
+ "subject": {
552
+ "type": "string"
553
+ }
554
+ },
555
+ "type": "object"
556
+ },
557
+ "V1CommonIdentifierLookup_IdentifierLookupGrantType": {
558
+ "description": "",
559
+ "enum": [
560
+ "Role",
561
+ "AccessPackage",
562
+ "ResourceDelegation",
563
+ "InstanceDelegation"
564
+ ],
565
+ "type": "string",
566
+ "x-enumNames": [
567
+ "Role",
568
+ "AccessPackage",
569
+ "ResourceDelegation",
570
+ "InstanceDelegation"
571
+ ]
572
+ },
573
+ "V1CommonIdentifierLookup_IdentifierLookupServiceOwner": {
574
+ "additionalProperties": false,
575
+ "properties": {
576
+ "code": {
577
+ "type": "string"
578
+ },
579
+ "name": {
580
+ "items": {
581
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
582
+ },
583
+ "nullable": true,
584
+ "type": "array"
585
+ },
586
+ "orgNumber": {
587
+ "type": "string"
588
+ }
589
+ },
590
+ "type": "object"
591
+ },
592
+ "V1CommonIdentifierLookup_IdentifierLookupServiceResource": {
593
+ "additionalProperties": false,
594
+ "properties": {
595
+ "id": {
596
+ "type": "string"
597
+ },
598
+ "isDelegable": {
599
+ "type": "boolean"
600
+ },
601
+ "name": {
602
+ "items": {
603
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
604
+ },
605
+ "nullable": true,
606
+ "type": "array"
607
+ }
608
+ },
609
+ "type": "object"
610
+ },
611
+ "V1CommonIdentifierLookup_ServiceOwnerIdentifierLookup": {
612
+ "additionalProperties": false,
613
+ "properties": {
614
+ "dialogId": {
615
+ "format": "guid",
616
+ "type": "string"
617
+ },
618
+ "instanceRef": {
619
+ "type": "string"
620
+ },
621
+ "nonSensitiveTitle": {
622
+ "items": {
623
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
624
+ },
625
+ "nullable": true,
626
+ "type": "array"
627
+ },
628
+ "party": {
629
+ "type": "string"
630
+ },
631
+ "serviceOwner": {
632
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceOwner"
633
+ },
634
+ "serviceResource": {
635
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceResource"
636
+ },
637
+ "title": {
638
+ "items": {
639
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
640
+ },
641
+ "nullable": true,
642
+ "type": "array"
643
+ }
644
+ },
645
+ "type": "object"
646
+ },
482
647
  "V1CommonLocalizations_Localization": {
483
648
  "additionalProperties": false,
484
649
  "properties": {
@@ -546,6 +711,20 @@
546
711
  },
547
712
  "type": "object"
548
713
  },
714
+ "V1EndUserDialogLookupQueriesGet_DialogLookupRequest": {
715
+ "additionalProperties": false,
716
+ "properties": {
717
+ "acceptedLanguages": {
718
+ "nullable": true,
719
+ "oneOf": [
720
+ {
721
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
722
+ }
723
+ ]
724
+ }
725
+ },
726
+ "type": "object"
727
+ },
549
728
  "V1EndUserDialogsQueriesGet_Content": {
550
729
  "additionalProperties": false,
551
730
  "properties": {
@@ -568,7 +747,7 @@
568
747
  ]
569
748
  },
570
749
  "mainContentReference": {
571
- "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.",
750
+ "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL.\nContent value will be masked if the user is not authorized to read main content.",
572
751
  "nullable": true,
573
752
  "oneOf": [
574
753
  {
@@ -2531,6 +2710,20 @@
2531
2710
  "Awaiting"
2532
2711
  ]
2533
2712
  },
2713
+ "V1ServiceOwnerDialogLookupQueriesGet_DialogLookupRequest": {
2714
+ "additionalProperties": false,
2715
+ "properties": {
2716
+ "acceptedLanguages": {
2717
+ "nullable": true,
2718
+ "oneOf": [
2719
+ {
2720
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
2721
+ }
2722
+ ]
2723
+ }
2724
+ },
2725
+ "type": "object"
2726
+ },
2534
2727
  "V1ServiceOwnerDialogsCommandsCreate_Activity": {
2535
2728
  "additionalProperties": false,
2536
2729
  "properties": {
@@ -4320,7 +4513,7 @@
4320
4513
  ]
4321
4514
  },
4322
4515
  "mainContentReference": {
4323
- "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.",
4516
+ "description": "Front-channel embedded content. Used to dynamically embed content in the frontend from an external URL. Must be HTTPS.\nIsAuthorized is evaluated only when you use the EndUserId query-parameter, otherwise it is null.",
4324
4517
  "nullable": true,
4325
4518
  "oneOf": [
4326
4519
  {
@@ -6477,6 +6670,102 @@
6477
6670
  ]
6478
6671
  }
6479
6672
  },
6673
+ "/api/v1/enduser/dialoglookup": {
6674
+ "get": {
6675
+ "description": "Resolves dialog metadata and authorization evidence for a supported instance reference.",
6676
+ "operationId": "V1EndUserDialogLookupQueriesGet_DialogLookup",
6677
+ "parameters": [
6678
+ {
6679
+ "in": "query",
6680
+ "name": "instanceRef",
6681
+ "required": true,
6682
+ "schema": {
6683
+ "type": "string"
6684
+ }
6685
+ },
6686
+ {
6687
+ "in": "header",
6688
+ "name": "accept-Language",
6689
+ "schema": {
6690
+ "nullable": true,
6691
+ "oneOf": [
6692
+ {
6693
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
6694
+ }
6695
+ ]
6696
+ }
6697
+ }
6698
+ ],
6699
+ "responses": {
6700
+ "200": {
6701
+ "content": {
6702
+ "application/json": {
6703
+ "schema": {
6704
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_EndUserIdentifierLookup"
6705
+ }
6706
+ }
6707
+ },
6708
+ "description": "Successfully resolved dialog lookup metadata."
6709
+ },
6710
+ "400": {
6711
+ "content": {
6712
+ "application/problem\u002Bjson": {
6713
+ "schema": {
6714
+ "$ref": "#/components/schemas/ProblemDetails"
6715
+ }
6716
+ }
6717
+ },
6718
+ "description": "Validation error occurred. See problem details for a list of errors."
6719
+ },
6720
+ "401": {
6721
+ "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022."
6722
+ },
6723
+ "403": {
6724
+ "description": "Authenticated end user is not authorized for the supplied instance reference."
6725
+ },
6726
+ "404": {
6727
+ "content": {
6728
+ "application/problem\u002Bjson": {
6729
+ "schema": {
6730
+ "$ref": "#/components/schemas/ProblemDetails"
6731
+ }
6732
+ }
6733
+ },
6734
+ "description": "No dialog match was found for the supplied instance reference."
6735
+ },
6736
+ "503": {
6737
+ "content": {
6738
+ "text/plain": {
6739
+ "schema": {
6740
+ "example": "Service Unavailable",
6741
+ "type": "string"
6742
+ }
6743
+ }
6744
+ },
6745
+ "description": "Service Unavailable, used when Dialogporten is in maintenance mode",
6746
+ "headers": {
6747
+ "Retry-After": {
6748
+ "description": "Delay before retrying the request. Datetime format RFC1123",
6749
+ "schema": {
6750
+ "type": "string"
6751
+ }
6752
+ }
6753
+ }
6754
+ }
6755
+ },
6756
+ "security": [
6757
+ {
6758
+ "JWTBearerAuth": [
6759
+ "digdir:dialogporten"
6760
+ ]
6761
+ }
6762
+ ],
6763
+ "summary": "Looks up a dialog by instance reference",
6764
+ "tags": [
6765
+ "Enduser"
6766
+ ]
6767
+ }
6768
+ },
6480
6769
  "/api/v1/enduser/dialogs": {
6481
6770
  "get": {
6482
6771
  "description": "Performs a search for dialogs, returning a paginated list of dialogs. \n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00\u002B01:00\n* See \u0022continuationToken\u0022 in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.",
@@ -7815,6 +8104,102 @@
7815
8104
  ]
7816
8105
  }
7817
8106
  },
8107
+ "/api/v1/serviceowner/dialoglookup": {
8108
+ "get": {
8109
+ "description": "Resolves dialog metadata for a supported instance reference in service owner context.",
8110
+ "operationId": "V1ServiceOwnerDialogLookupQueriesGet_DialogLookup",
8111
+ "parameters": [
8112
+ {
8113
+ "in": "query",
8114
+ "name": "instanceRef",
8115
+ "required": true,
8116
+ "schema": {
8117
+ "type": "string"
8118
+ }
8119
+ },
8120
+ {
8121
+ "in": "header",
8122
+ "name": "accept-Language",
8123
+ "schema": {
8124
+ "nullable": true,
8125
+ "oneOf": [
8126
+ {
8127
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
8128
+ }
8129
+ ]
8130
+ }
8131
+ }
8132
+ ],
8133
+ "responses": {
8134
+ "200": {
8135
+ "content": {
8136
+ "application/json": {
8137
+ "schema": {
8138
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_ServiceOwnerIdentifierLookup"
8139
+ }
8140
+ }
8141
+ },
8142
+ "description": "Successfully resolved instance reference lookup metadata."
8143
+ },
8144
+ "400": {
8145
+ "content": {
8146
+ "application/problem\u002Bjson": {
8147
+ "schema": {
8148
+ "$ref": "#/components/schemas/ProblemDetails"
8149
+ }
8150
+ }
8151
+ },
8152
+ "description": "Validation error occurred. See problem details for a list of errors."
8153
+ },
8154
+ "401": {
8155
+ "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022."
8156
+ },
8157
+ "403": {
8158
+ "description": "Authenticated service owner does not own the resolved dialog."
8159
+ },
8160
+ "404": {
8161
+ "content": {
8162
+ "application/problem\u002Bjson": {
8163
+ "schema": {
8164
+ "$ref": "#/components/schemas/ProblemDetails"
8165
+ }
8166
+ }
8167
+ },
8168
+ "description": "No dialog match was found for the supplied instance reference."
8169
+ },
8170
+ "503": {
8171
+ "content": {
8172
+ "text/plain": {
8173
+ "schema": {
8174
+ "example": "Service Unavailable",
8175
+ "type": "string"
8176
+ }
8177
+ }
8178
+ },
8179
+ "description": "Service Unavailable, used when Dialogporten is in maintenance mode",
8180
+ "headers": {
8181
+ "Retry-After": {
8182
+ "description": "Delay before retrying the request. Datetime format RFC1123",
8183
+ "schema": {
8184
+ "type": "string"
8185
+ }
8186
+ }
8187
+ }
8188
+ }
8189
+ },
8190
+ "security": [
8191
+ {
8192
+ "JWTBearerAuth": [
8193
+ "digdir:dialogporten.serviceprovider"
8194
+ ]
8195
+ }
8196
+ ],
8197
+ "summary": "Looks up a dialog by instance reference",
8198
+ "tags": [
8199
+ "Serviceowner"
8200
+ ]
8201
+ }
8202
+ },
7818
8203
  "/api/v1/serviceowner/dialogs": {
7819
8204
  "get": {
7820
8205
  "description": "Performs a search for dialogs, returning a paginated list of dialogs.\n\n* All date parameters must contain explicit time zone. Example: 2023-10-27T10:00:00Z or 2023-10-27T10:00:00\u002B01:00\n* See \u0022continuationToken\u0022 in the response for how to get the next page of results.\n* hasNextPage will be set to true if there are more items to get.",