@digdir/dialogporten-schema 1.117.3 → 1.118.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.117.3",
3
+ "version": "1.118.0",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
5
  "engines": {
6
6
  "node": "24"
@@ -10,7 +10,7 @@ type Queries @authorize(policy: "enduser") {
10
10
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
11
11
  limits: Limits!
12
12
  parties: [AuthorizedParty!]!
13
- serviceResources: ServiceResourceMetadata!
13
+ serviceResources(parties: [String!], includeUnauthorized: Boolean! = false): ServiceResourceMetadata!
14
14
  }
15
15
 
16
16
  type Mutations @authorize(policy: "enduser") {
@@ -566,6 +566,8 @@ type ServiceResourceMetadataServiceOwner {
566
566
 
567
567
  type ServiceResourceMetadataServiceResource {
568
568
  id: String!
569
+ resourceType: String!
570
+ status: String!
569
571
  isDelegable: Boolean!
570
572
  minimumAuthenticationLevel: Int!
571
573
  name: [Localization!]!
package/src/index.js CHANGED
@@ -10,7 +10,7 @@ type Queries @authorize(policy: "enduser") {
10
10
  searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
11
11
  limits: Limits!
12
12
  parties: [AuthorizedParty!]!
13
- serviceResources: ServiceResourceMetadata!
13
+ serviceResources(parties: [String!], includeUnauthorized: Boolean! = false): ServiceResourceMetadata!
14
14
  }
15
15
 
16
16
  type Mutations @authorize(policy: "enduser") {
@@ -566,6 +566,8 @@ type ServiceResourceMetadataServiceOwner {
566
566
 
567
567
  type ServiceResourceMetadataServiceResource {
568
568
  id: String!
569
+ resourceType: String!
570
+ status: String!
569
571
  isDelegable: Boolean!
570
572
  minimumAuthenticationLevel: Int!
571
573
  name: [Localization!]!
@@ -312,59 +312,83 @@
312
312
  "type": "object"
313
313
  },
314
314
  "ProblemDetails": {
315
- "additionalProperties": false,
315
+ "additionalProperties": {
316
+ "nullable": true
317
+ },
316
318
  "properties": {
319
+ "code": {
320
+ "nullable": true,
321
+ "type": "string"
322
+ },
317
323
  "detail": {
318
324
  "nullable": true,
319
325
  "type": "string"
320
326
  },
321
327
  "errors": {
322
- "items": {
323
- "$ref": "#/components/schemas/ProblemDetails_Error"
328
+ "additionalProperties": {
329
+ "items": {
330
+ "type": "string"
331
+ },
332
+ "type": "array"
324
333
  },
325
- "nullable": true,
326
- "type": "array"
334
+ "type": "object"
327
335
  },
328
336
  "instance": {
329
- "default": "/api/route",
337
+ "nullable": true,
330
338
  "type": "string"
331
339
  },
332
340
  "status": {
333
- "default": 400,
334
341
  "format": "int32",
342
+ "nullable": true,
335
343
  "type": "integer"
336
344
  },
345
+ "statusDescription": {
346
+ "nullable": true,
347
+ "type": "string"
348
+ },
337
349
  "title": {
338
- "default": "One or more validation errors occurred.",
350
+ "nullable": true,
339
351
  "type": "string"
340
352
  },
341
353
  "traceId": {
342
- "default": "0HMPNHL0JHL76:00000001",
354
+ "nullable": true,
343
355
  "type": "string"
344
356
  },
345
357
  "type": {
346
- "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
358
+ "nullable": true,
347
359
  "type": "string"
360
+ },
361
+ "validationErrors": {
362
+ "items": {
363
+ "$ref": "#/components/schemas/ProblemDetails_Error"
364
+ },
365
+ "nullable": true,
366
+ "type": "array"
348
367
  }
349
368
  },
350
369
  "type": "object"
351
370
  },
352
371
  "ProblemDetails_Error": {
353
- "additionalProperties": false,
372
+ "additionalProperties": {
373
+ "nullable": true
374
+ },
354
375
  "properties": {
355
376
  "code": {
356
377
  "nullable": true,
357
378
  "type": "string"
358
379
  },
359
- "name": {
360
- "default": "Error or field name",
380
+ "detail": {
381
+ "nullable": true,
361
382
  "type": "string"
362
383
  },
363
- "reason": {
364
- "default": "Error reason",
365
- "type": "string"
384
+ "paths": {
385
+ "items": {
386
+ "type": "string"
387
+ },
388
+ "nullable": true,
389
+ "type": "array"
366
390
  },
367
- "severity": {
391
+ "title": {
368
392
  "nullable": true,
369
393
  "type": "string"
370
394
  }
@@ -688,6 +712,121 @@
688
712
  },
689
713
  "type": "object"
690
714
  },
715
+ "V1CommonServiceResourceMetadata_ServiceResourceMetadataAccessPackage": {
716
+ "additionalProperties": false,
717
+ "properties": {
718
+ "links": {
719
+ "$ref": "#/components/schemas/DigdirDomainDialogportenApplicationCommon_Link"
720
+ },
721
+ "name": {
722
+ "items": {
723
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
724
+ },
725
+ "nullable": true,
726
+ "type": "array"
727
+ },
728
+ "urn": {
729
+ "type": "string"
730
+ }
731
+ },
732
+ "type": "object"
733
+ },
734
+ "V1CommonServiceResourceMetadata_ServiceResourceMetadataItem": {
735
+ "additionalProperties": false,
736
+ "properties": {
737
+ "accessPackages": {
738
+ "items": {
739
+ "$ref": "#/components/schemas/V1CommonServiceResourceMetadata_ServiceResourceMetadataAccessPackage"
740
+ },
741
+ "nullable": true,
742
+ "type": "array"
743
+ },
744
+ "roles": {
745
+ "items": {
746
+ "$ref": "#/components/schemas/V1CommonServiceResourceMetadata_ServiceResourceMetadataRole"
747
+ },
748
+ "nullable": true,
749
+ "type": "array"
750
+ },
751
+ "serviceOwner": {
752
+ "$ref": "#/components/schemas/V1CommonServiceResourceMetadata_ServiceResourceMetadataServiceOwner"
753
+ },
754
+ "serviceResource": {
755
+ "$ref": "#/components/schemas/V1CommonServiceResourceMetadata_ServiceResourceMetadataServiceResource"
756
+ }
757
+ },
758
+ "type": "object"
759
+ },
760
+ "V1CommonServiceResourceMetadata_ServiceResourceMetadataRole": {
761
+ "additionalProperties": false,
762
+ "properties": {
763
+ "links": {
764
+ "$ref": "#/components/schemas/DigdirDomainDialogportenApplicationCommon_Link"
765
+ },
766
+ "name": {
767
+ "items": {
768
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
769
+ },
770
+ "nullable": true,
771
+ "type": "array"
772
+ },
773
+ "urn": {
774
+ "type": "string"
775
+ }
776
+ },
777
+ "type": "object"
778
+ },
779
+ "V1CommonServiceResourceMetadata_ServiceResourceMetadataServiceOwner": {
780
+ "additionalProperties": false,
781
+ "properties": {
782
+ "code": {
783
+ "type": "string"
784
+ },
785
+ "name": {
786
+ "items": {
787
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
788
+ },
789
+ "nullable": true,
790
+ "type": "array"
791
+ },
792
+ "orgNumber": {
793
+ "type": "string"
794
+ }
795
+ },
796
+ "type": "object"
797
+ },
798
+ "V1CommonServiceResourceMetadata_ServiceResourceMetadataServiceResource": {
799
+ "additionalProperties": false,
800
+ "properties": {
801
+ "id": {
802
+ "type": "string"
803
+ },
804
+ "isDelegable": {
805
+ "type": "boolean"
806
+ },
807
+ "links": {
808
+ "$ref": "#/components/schemas/DigdirDomainDialogportenApplicationCommon_Link"
809
+ },
810
+ "minimumAuthenticationLevel": {
811
+ "format": "int32",
812
+ "type": "integer"
813
+ },
814
+ "name": {
815
+ "items": {
816
+ "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
817
+ },
818
+ "nullable": true,
819
+ "type": "array"
820
+ },
821
+ "resourceType": {
822
+ "type": "string"
823
+ },
824
+ "status": {
825
+ "type": "string"
826
+ }
827
+ },
828
+ "type": "object"
829
+ },
691
830
  "V1EndUserCommon_AcceptedLanguage": {
692
831
  "additionalProperties": false,
693
832
  "properties": {
@@ -2649,6 +2788,33 @@
2649
2788
  },
2650
2789
  "type": "object"
2651
2790
  },
2791
+ "V1EndUserServiceResourcesQueriesSearch_AuthorizedServiceResources": {
2792
+ "additionalProperties": false,
2793
+ "properties": {
2794
+ "items": {
2795
+ "items": {
2796
+ "$ref": "#/components/schemas/V1CommonServiceResourceMetadata_ServiceResourceMetadataItem"
2797
+ },
2798
+ "nullable": true,
2799
+ "type": "array"
2800
+ }
2801
+ },
2802
+ "type": "object"
2803
+ },
2804
+ "V1EndUserServiceResourcesSearch_AuthorizedServiceResourcesRequest": {
2805
+ "additionalProperties": false,
2806
+ "properties": {
2807
+ "acceptedLanguages": {
2808
+ "nullable": true,
2809
+ "oneOf": [
2810
+ {
2811
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
2812
+ }
2813
+ ]
2814
+ }
2815
+ },
2816
+ "type": "object"
2817
+ },
2652
2818
  "V1MetadataLimitsQueriesGet_EndUserSearchLimits": {
2653
2819
  "additionalProperties": false,
2654
2820
  "properties": {
@@ -2720,116 +2886,7 @@
2720
2886
  "properties": {
2721
2887
  "items": {
2722
2888
  "items": {
2723
- "$ref": "#/components/schemas/V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataItem"
2724
- },
2725
- "nullable": true,
2726
- "type": "array"
2727
- }
2728
- },
2729
- "type": "object"
2730
- },
2731
- "V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataAccessPackage": {
2732
- "additionalProperties": false,
2733
- "properties": {
2734
- "links": {
2735
- "$ref": "#/components/schemas/DigdirDomainDialogportenApplicationCommon_Link"
2736
- },
2737
- "name": {
2738
- "items": {
2739
- "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
2740
- },
2741
- "nullable": true,
2742
- "type": "array"
2743
- },
2744
- "urn": {
2745
- "type": "string"
2746
- }
2747
- },
2748
- "type": "object"
2749
- },
2750
- "V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataItem": {
2751
- "additionalProperties": false,
2752
- "properties": {
2753
- "accessPackages": {
2754
- "items": {
2755
- "$ref": "#/components/schemas/V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataAccessPackage"
2756
- },
2757
- "nullable": true,
2758
- "type": "array"
2759
- },
2760
- "roles": {
2761
- "items": {
2762
- "$ref": "#/components/schemas/V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataRole"
2763
- },
2764
- "nullable": true,
2765
- "type": "array"
2766
- },
2767
- "serviceOwner": {
2768
- "$ref": "#/components/schemas/V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataServiceOwner"
2769
- },
2770
- "serviceResource": {
2771
- "$ref": "#/components/schemas/V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataServiceResource"
2772
- }
2773
- },
2774
- "type": "object"
2775
- },
2776
- "V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataRole": {
2777
- "additionalProperties": false,
2778
- "properties": {
2779
- "links": {
2780
- "$ref": "#/components/schemas/DigdirDomainDialogportenApplicationCommon_Link"
2781
- },
2782
- "name": {
2783
- "items": {
2784
- "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
2785
- },
2786
- "nullable": true,
2787
- "type": "array"
2788
- },
2789
- "urn": {
2790
- "type": "string"
2791
- }
2792
- },
2793
- "type": "object"
2794
- },
2795
- "V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataServiceOwner": {
2796
- "additionalProperties": false,
2797
- "properties": {
2798
- "code": {
2799
- "type": "string"
2800
- },
2801
- "name": {
2802
- "items": {
2803
- "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
2804
- },
2805
- "nullable": true,
2806
- "type": "array"
2807
- },
2808
- "orgNumber": {
2809
- "type": "string"
2810
- }
2811
- },
2812
- "type": "object"
2813
- },
2814
- "V1MetadataServiceResourcesQueriesGet_ServiceResourceMetadataServiceResource": {
2815
- "additionalProperties": false,
2816
- "properties": {
2817
- "id": {
2818
- "type": "string"
2819
- },
2820
- "isDelegable": {
2821
- "type": "boolean"
2822
- },
2823
- "links": {
2824
- "$ref": "#/components/schemas/DigdirDomainDialogportenApplicationCommon_Link"
2825
- },
2826
- "minimumAuthenticationLevel": {
2827
- "format": "int32",
2828
- "type": "integer"
2829
- },
2830
- "name": {
2831
- "items": {
2832
- "$ref": "#/components/schemas/V1CommonLocalizations_Localization"
2889
+ "$ref": "#/components/schemas/V1CommonServiceResourceMetadata_ServiceResourceMetadataItem"
2833
2890
  },
2834
2891
  "nullable": true,
2835
2892
  "type": "array"
@@ -8451,6 +8508,88 @@
8451
8508
  ]
8452
8509
  }
8453
8510
  },
8511
+ "/api/v1/enduser/serviceresources": {
8512
+ "get": {
8513
+ "description": "Returns the same service resource metadata as the public metadata endpoint, filtered to the resources the calling end user is authorized to use. Optionally narrowed by one or more party URNs.",
8514
+ "operationId": "V1EndUserServiceResourcesSearch_AuthorizedServiceResources",
8515
+ "parameters": [
8516
+ {
8517
+ "description": "Filter by one or more party URNs. Parties the caller is not authorized for are silently ignored.",
8518
+ "explode": true,
8519
+ "in": "query",
8520
+ "name": "party",
8521
+ "schema": {
8522
+ "items": {
8523
+ "type": "string"
8524
+ },
8525
+ "nullable": true,
8526
+ "type": "array"
8527
+ },
8528
+ "style": "form"
8529
+ },
8530
+ {
8531
+ "in": "header",
8532
+ "name": "accept-Language",
8533
+ "schema": {
8534
+ "nullable": true,
8535
+ "oneOf": [
8536
+ {
8537
+ "$ref": "#/components/schemas/V1EndUserCommon_AcceptedLanguages"
8538
+ }
8539
+ ]
8540
+ }
8541
+ }
8542
+ ],
8543
+ "responses": {
8544
+ "200": {
8545
+ "content": {
8546
+ "application/json": {
8547
+ "schema": {
8548
+ "$ref": "#/components/schemas/V1EndUserServiceResourcesQueriesSearch_AuthorizedServiceResources"
8549
+ }
8550
+ }
8551
+ },
8552
+ "description": "Authorized service resource metadata."
8553
+ },
8554
+ "401": {
8555
+ "description": "Unauthorized"
8556
+ },
8557
+ "403": {
8558
+ "description": "Forbidden"
8559
+ },
8560
+ "503": {
8561
+ "content": {
8562
+ "text/plain": {
8563
+ "schema": {
8564
+ "example": "Service Unavailable",
8565
+ "type": "string"
8566
+ }
8567
+ }
8568
+ },
8569
+ "description": "Service Unavailable, used when Dialogporten is in maintenance mode",
8570
+ "headers": {
8571
+ "Retry-After": {
8572
+ "description": "Delay before retrying the request. Datetime format RFC1123",
8573
+ "schema": {
8574
+ "type": "string"
8575
+ }
8576
+ }
8577
+ }
8578
+ }
8579
+ },
8580
+ "security": [
8581
+ {
8582
+ "JWTBearerAuth": [
8583
+ "digdir:dialogporten"
8584
+ ]
8585
+ }
8586
+ ],
8587
+ "summary": "Gets the service resources the authenticated end user is authorized to use.",
8588
+ "tags": [
8589
+ "Enduser"
8590
+ ]
8591
+ }
8592
+ },
8454
8593
  "/api/v1/metadata/limits": {
8455
8594
  "get": {
8456
8595
  "description": "Returns the active limits for EndUser and ServiceOwner search filters.",
@@ -11532,4 +11671,4 @@
11532
11671
  }
11533
11672
  }
11534
11673
  }
11535
- }
11674
+ }