@digdir/dialogporten-schema 1.106.2 → 1.107.0

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",
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
  }
@@ -267,6 +271,58 @@ type DialogEventPayload {
267
271
  type: DialogEventType!
268
272
  }
269
273
 
274
+ type DialogLookup {
275
+ dialogId: UUID!
276
+ instanceRef: String!
277
+ serviceResource: DialogLookupServiceResource!
278
+ serviceOwner: DialogLookupServiceOwner!
279
+ authorizationEvidence: DialogLookupAuthorizationEvidence!
280
+ }
281
+
282
+ type DialogLookupAuthorizationEvidence {
283
+ minimumAuthenticationLevel: Int!
284
+ currentAuthenticationLevel: Int!
285
+ viaRole: Boolean!
286
+ viaAccessPackage: Boolean!
287
+ viaResourceDelegation: Boolean!
288
+ viaInstanceDelegation: Boolean!
289
+ evidence: [DialogLookupAuthorizationEvidenceItem!]!
290
+ }
291
+
292
+ type DialogLookupAuthorizationEvidenceItem {
293
+ grantType: DialogLookupGrantType!
294
+ subject: String!
295
+ }
296
+
297
+ type DialogLookupForbidden implements DialogLookupError {
298
+ message: String!
299
+ }
300
+
301
+ type DialogLookupNotFound implements DialogLookupError {
302
+ message: String!
303
+ }
304
+
305
+ type DialogLookupPayload {
306
+ lookup: DialogLookup
307
+ errors: [DialogLookupError!]!
308
+ }
309
+
310
+ type DialogLookupServiceOwner {
311
+ orgNumber: String!
312
+ code: String!
313
+ name: [Localization!]!
314
+ }
315
+
316
+ type DialogLookupServiceResource {
317
+ id: String!
318
+ isDelegable: Boolean!
319
+ name: [Localization!]!
320
+ }
321
+
322
+ type DialogLookupValidationError implements DialogLookupError {
323
+ message: String!
324
+ }
325
+
270
326
  type EndUserContext {
271
327
  revision: UUID!
272
328
  systemLabels: [SystemLabel!]!
@@ -318,6 +374,7 @@ type Mutations {
318
374
  }
319
375
 
320
376
  type Queries @authorize(policy: "enduser") {
377
+ dialogLookup(instanceRef: String!): DialogLookupPayload!
321
378
  dialogById(dialogId: UUID!): DialogByIdPayload!
322
379
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
323
380
  limits: Limits!
@@ -658,6 +715,13 @@ enum DialogEventType {
658
715
  DIALOG_DELETED
659
716
  }
660
717
 
718
+ enum DialogLookupGrantType {
719
+ ROLE
720
+ ACCESS_PACKAGE
721
+ RESOURCE_DELEGATION
722
+ INSTANCE_DELEGATION
723
+ }
724
+
661
725
  enum DialogStatus {
662
726
  "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
663
727
  IN_PROGRESS
@@ -734,4 +798,4 @@ scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time"
734
798
 
735
799
  scalar URL @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc3986")
736
800
 
737
- scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")
801
+ scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")
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
  }
@@ -267,6 +271,58 @@ type DialogEventPayload {
267
271
  type: DialogEventType!
268
272
  }
269
273
 
274
+ type DialogLookup {
275
+ dialogId: UUID!
276
+ instanceRef: String!
277
+ serviceResource: DialogLookupServiceResource!
278
+ serviceOwner: DialogLookupServiceOwner!
279
+ authorizationEvidence: DialogLookupAuthorizationEvidence!
280
+ }
281
+
282
+ type DialogLookupAuthorizationEvidence {
283
+ minimumAuthenticationLevel: Int!
284
+ currentAuthenticationLevel: Int!
285
+ viaRole: Boolean!
286
+ viaAccessPackage: Boolean!
287
+ viaResourceDelegation: Boolean!
288
+ viaInstanceDelegation: Boolean!
289
+ evidence: [DialogLookupAuthorizationEvidenceItem!]!
290
+ }
291
+
292
+ type DialogLookupAuthorizationEvidenceItem {
293
+ grantType: DialogLookupGrantType!
294
+ subject: String!
295
+ }
296
+
297
+ type DialogLookupForbidden implements DialogLookupError {
298
+ message: String!
299
+ }
300
+
301
+ type DialogLookupNotFound implements DialogLookupError {
302
+ message: String!
303
+ }
304
+
305
+ type DialogLookupPayload {
306
+ lookup: DialogLookup
307
+ errors: [DialogLookupError!]!
308
+ }
309
+
310
+ type DialogLookupServiceOwner {
311
+ orgNumber: String!
312
+ code: String!
313
+ name: [Localization!]!
314
+ }
315
+
316
+ type DialogLookupServiceResource {
317
+ id: String!
318
+ isDelegable: Boolean!
319
+ name: [Localization!]!
320
+ }
321
+
322
+ type DialogLookupValidationError implements DialogLookupError {
323
+ message: String!
324
+ }
325
+
270
326
  type EndUserContext {
271
327
  revision: UUID!
272
328
  systemLabels: [SystemLabel!]!
@@ -318,6 +374,7 @@ type Mutations {
318
374
  }
319
375
 
320
376
  type Queries @authorize(policy: "enduser") {
377
+ dialogLookup(instanceRef: String!): DialogLookupPayload!
321
378
  dialogById(dialogId: UUID!): DialogByIdPayload!
322
379
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
323
380
  limits: Limits!
@@ -658,6 +715,13 @@ enum DialogEventType {
658
715
  DIALOG_DELETED
659
716
  }
660
717
 
718
+ enum DialogLookupGrantType {
719
+ ROLE
720
+ ACCESS_PACKAGE
721
+ RESOURCE_DELEGATION
722
+ INSTANCE_DELEGATION
723
+ }
724
+
661
725
  enum DialogStatus {
662
726
  "Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing."
663
727
  IN_PROGRESS
@@ -479,6 +479,160 @@
479
479
  },
480
480
  "type": "object"
481
481
  },
482
+ "V1CommonIdentifierLookup_EndUserIdentifierLookup": {
483
+ "additionalProperties": false,
484
+ "properties": {
485
+ "authorizationEvidence": {
486
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidence"
487
+ },
488
+ "dialogId": {
489
+ "format": "guid",
490
+ "type": "string"
491
+ },
492
+ "instanceRef": {
493
+ "type": "string"
494
+ },
495
+ "serviceOwner": {
496
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceOwner"
497
+ },
498
+ "serviceResource": {
499
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceResource"
500
+ }
501
+ },
502
+ "type": "object"
503
+ },
504
+ "V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidence": {
505
+ "additionalProperties": false,
506
+ "properties": {
507
+ "currentAuthenticationLevel": {
508
+ "format": "int32",
509
+ "type": "integer"
510
+ },
511
+ "evidence": {
512
+ "items": {
513
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidenceItem"
514
+ },
515
+ "nullable": true,
516
+ "type": "array"
517
+ },
518
+ "minimumAuthenticationLevel": {
519
+ "format": "int32",
520
+ "type": "integer"
521
+ },
522
+ "viaAccessPackage": {
523
+ "type": "boolean"
524
+ },
525
+ "viaInstanceDelegation": {
526
+ "type": "boolean"
527
+ },
528
+ "viaResourceDelegation": {
529
+ "type": "boolean"
530
+ },
531
+ "viaRole": {
532
+ "type": "boolean"
533
+ }
534
+ },
535
+ "type": "object"
536
+ },
537
+ "V1CommonIdentifierLookup_IdentifierLookupAuthorizationEvidenceItem": {
538
+ "additionalProperties": false,
539
+ "properties": {
540
+ "grantType": {
541
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupGrantType"
542
+ },
543
+ "subject": {
544
+ "type": "string"
545
+ }
546
+ },
547
+ "type": "object"
548
+ },
549
+ "V1CommonIdentifierLookup_IdentifierLookupGrantType": {
550
+ "description": "",
551
+ "enum": [
552
+ "Role",
553
+ "AccessPackage",
554
+ "ResourceDelegation",
555
+ "InstanceDelegation"
556
+ ],
557
+ "type": "string",
558
+ "x-enumNames": [
559
+ "Role",
560
+ "AccessPackage",
561
+ "ResourceDelegation",
562
+ "InstanceDelegation"
563
+ ]
564
+ },
565
+ "V1CommonIdentifierLookup_IdentifierLookupServiceOwner": {
566
+ "additionalProperties": false,
567
+ "properties": {
568
+ "code": {
569
+ "type": "string"
570
+ },
571
+ "name": {
572
+ "items": {
573
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
574
+ },
575
+ "nullable": true,
576
+ "type": "array"
577
+ },
578
+ "orgNumber": {
579
+ "type": "string"
580
+ }
581
+ },
582
+ "type": "object"
583
+ },
584
+ "V1CommonIdentifierLookup_IdentifierLookupServiceResource": {
585
+ "additionalProperties": false,
586
+ "properties": {
587
+ "id": {
588
+ "type": "string"
589
+ },
590
+ "isDelegable": {
591
+ "type": "boolean"
592
+ },
593
+ "name": {
594
+ "items": {
595
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
596
+ },
597
+ "nullable": true,
598
+ "type": "array"
599
+ }
600
+ },
601
+ "type": "object"
602
+ },
603
+ "V1CommonIdentifierLookup_ServiceOwnerIdentifierLookup": {
604
+ "additionalProperties": false,
605
+ "properties": {
606
+ "dialogId": {
607
+ "format": "guid",
608
+ "type": "string"
609
+ },
610
+ "instanceRef": {
611
+ "type": "string"
612
+ },
613
+ "nonSensitiveTitle": {
614
+ "items": {
615
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
616
+ },
617
+ "nullable": true,
618
+ "type": "array"
619
+ },
620
+ "serviceOwner": {
621
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceOwner"
622
+ },
623
+ "serviceResource": {
624
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_IdentifierLookupServiceResource"
625
+ },
626
+ "title": {
627
+ "items": {
628
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
629
+ },
630
+ "nullable": true,
631
+ "type": "array"
632
+ }
633
+ },
634
+ "type": "object"
635
+ },
482
636
  "V1CommonLocalizations_Localization": {
483
637
  "additionalProperties": false,
484
638
  "properties": {
@@ -546,6 +700,20 @@
546
700
  },
547
701
  "type": "object"
548
702
  },
703
+ "V1EndUserDialogLookupQueriesGet_DialogLookupRequest": {
704
+ "additionalProperties": false,
705
+ "properties": {
706
+ "acceptedLanguages": {
707
+ "nullable": true,
708
+ "oneOf": [
709
+ {
710
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
711
+ }
712
+ ]
713
+ }
714
+ },
715
+ "type": "object"
716
+ },
549
717
  "V1EndUserDialogsQueriesGet_Content": {
550
718
  "additionalProperties": false,
551
719
  "properties": {
@@ -2531,6 +2699,20 @@
2531
2699
  "Awaiting"
2532
2700
  ]
2533
2701
  },
2702
+ "V1ServiceOwnerDialogLookupQueriesGet_DialogLookupRequest": {
2703
+ "additionalProperties": false,
2704
+ "properties": {
2705
+ "acceptedLanguages": {
2706
+ "nullable": true,
2707
+ "oneOf": [
2708
+ {
2709
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
2710
+ }
2711
+ ]
2712
+ }
2713
+ },
2714
+ "type": "object"
2715
+ },
2534
2716
  "V1ServiceOwnerDialogsCommandsCreate_Activity": {
2535
2717
  "additionalProperties": false,
2536
2718
  "properties": {
@@ -6477,6 +6659,102 @@
6477
6659
  ]
6478
6660
  }
6479
6661
  },
6662
+ "/api/v1/enduser/dialoglookup": {
6663
+ "get": {
6664
+ "description": "Resolves dialog metadata and authorization evidence for a supported instance reference.",
6665
+ "operationId": "V1EndUserDialogLookupQueriesGet_DialogLookup",
6666
+ "parameters": [
6667
+ {
6668
+ "in": "query",
6669
+ "name": "instanceRef",
6670
+ "required": true,
6671
+ "schema": {
6672
+ "type": "string"
6673
+ }
6674
+ },
6675
+ {
6676
+ "in": "header",
6677
+ "name": "accept-Language",
6678
+ "schema": {
6679
+ "nullable": true,
6680
+ "oneOf": [
6681
+ {
6682
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
6683
+ }
6684
+ ]
6685
+ }
6686
+ }
6687
+ ],
6688
+ "responses": {
6689
+ "200": {
6690
+ "content": {
6691
+ "application/json": {
6692
+ "schema": {
6693
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_EndUserIdentifierLookup"
6694
+ }
6695
+ }
6696
+ },
6697
+ "description": "Successfully resolved dialog lookup metadata."
6698
+ },
6699
+ "400": {
6700
+ "content": {
6701
+ "application/problem\u002Bjson": {
6702
+ "schema": {
6703
+ "$ref": "#/components/schemas/ProblemDetails"
6704
+ }
6705
+ }
6706
+ },
6707
+ "description": "Validation error occurred. See problem details for a list of errors."
6708
+ },
6709
+ "401": {
6710
+ "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten\u0022."
6711
+ },
6712
+ "403": {
6713
+ "description": "Authenticated end user is not authorized for the supplied instance reference."
6714
+ },
6715
+ "404": {
6716
+ "content": {
6717
+ "application/problem\u002Bjson": {
6718
+ "schema": {
6719
+ "$ref": "#/components/schemas/ProblemDetails"
6720
+ }
6721
+ }
6722
+ },
6723
+ "description": "No dialog match was found for the supplied instance reference."
6724
+ },
6725
+ "503": {
6726
+ "content": {
6727
+ "text/plain": {
6728
+ "schema": {
6729
+ "example": "Service Unavailable",
6730
+ "type": "string"
6731
+ }
6732
+ }
6733
+ },
6734
+ "description": "Service Unavailable, used when Dialogporten is in maintenance mode",
6735
+ "headers": {
6736
+ "Retry-After": {
6737
+ "description": "Delay before retrying the request. Datetime format RFC1123",
6738
+ "schema": {
6739
+ "type": "string"
6740
+ }
6741
+ }
6742
+ }
6743
+ }
6744
+ },
6745
+ "security": [
6746
+ {
6747
+ "JWTBearerAuth": [
6748
+ "digdir:dialogporten"
6749
+ ]
6750
+ }
6751
+ ],
6752
+ "summary": "Looks up a dialog by instance reference",
6753
+ "tags": [
6754
+ "Enduser"
6755
+ ]
6756
+ }
6757
+ },
6480
6758
  "/api/v1/enduser/dialogs": {
6481
6759
  "get": {
6482
6760
  "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 +8093,102 @@
7815
8093
  ]
7816
8094
  }
7817
8095
  },
8096
+ "/api/v1/serviceowner/dialoglookup": {
8097
+ "get": {
8098
+ "description": "Resolves dialog metadata for a supported instance reference in service owner context.",
8099
+ "operationId": "V1ServiceOwnerDialogLookupQueriesGet_DialogLookup",
8100
+ "parameters": [
8101
+ {
8102
+ "in": "query",
8103
+ "name": "instanceRef",
8104
+ "required": true,
8105
+ "schema": {
8106
+ "type": "string"
8107
+ }
8108
+ },
8109
+ {
8110
+ "in": "header",
8111
+ "name": "accept-Language",
8112
+ "schema": {
8113
+ "nullable": true,
8114
+ "oneOf": [
8115
+ {
8116
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
8117
+ }
8118
+ ]
8119
+ }
8120
+ }
8121
+ ],
8122
+ "responses": {
8123
+ "200": {
8124
+ "content": {
8125
+ "application/json": {
8126
+ "schema": {
8127
+ "$ref": "#/components/schemas/V1CommonIdentifierLookup_ServiceOwnerIdentifierLookup"
8128
+ }
8129
+ }
8130
+ },
8131
+ "description": "Successfully resolved instance reference lookup metadata."
8132
+ },
8133
+ "400": {
8134
+ "content": {
8135
+ "application/problem\u002Bjson": {
8136
+ "schema": {
8137
+ "$ref": "#/components/schemas/ProblemDetails"
8138
+ }
8139
+ }
8140
+ },
8141
+ "description": "Validation error occurred. See problem details for a list of errors."
8142
+ },
8143
+ "401": {
8144
+ "description": "Missing or invalid authentication token. Requires a Maskinporten-token with the scope \u0022digdir:dialogporten.serviceprovider\u0022."
8145
+ },
8146
+ "403": {
8147
+ "description": "Authenticated service owner does not own the resolved dialog."
8148
+ },
8149
+ "404": {
8150
+ "content": {
8151
+ "application/problem\u002Bjson": {
8152
+ "schema": {
8153
+ "$ref": "#/components/schemas/ProblemDetails"
8154
+ }
8155
+ }
8156
+ },
8157
+ "description": "No dialog match was found for the supplied instance reference."
8158
+ },
8159
+ "503": {
8160
+ "content": {
8161
+ "text/plain": {
8162
+ "schema": {
8163
+ "example": "Service Unavailable",
8164
+ "type": "string"
8165
+ }
8166
+ }
8167
+ },
8168
+ "description": "Service Unavailable, used when Dialogporten is in maintenance mode",
8169
+ "headers": {
8170
+ "Retry-After": {
8171
+ "description": "Delay before retrying the request. Datetime format RFC1123",
8172
+ "schema": {
8173
+ "type": "string"
8174
+ }
8175
+ }
8176
+ }
8177
+ }
8178
+ },
8179
+ "security": [
8180
+ {
8181
+ "JWTBearerAuth": [
8182
+ "digdir:dialogporten.serviceprovider"
8183
+ ]
8184
+ }
8185
+ ],
8186
+ "summary": "Looks up a dialog by instance reference",
8187
+ "tags": [
8188
+ "Serviceowner"
8189
+ ]
8190
+ }
8191
+ },
7818
8192
  "/api/v1/serviceowner/dialogs": {
7819
8193
  "get": {
7820
8194
  "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.",
@@ -10564,4 +10938,4 @@
10564
10938
  }
10565
10939
  }
10566
10940
  }
10567
- }
10941
+ }