@digdir/dialogporten-schema 1.0.7 → 1.0.9

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.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "GraphQl schema and OpenAPI spec for Dialogporten",
5
5
  "author": "DigDir",
6
6
  "repository": {
@@ -1,5 +1,13 @@
1
1
  schema {
2
- query: DialogQueries
2
+ query: Queries
3
+ }
4
+
5
+ interface DialogByIdError {
6
+ message: String!
7
+ }
8
+
9
+ interface SearchDialogError {
10
+ message: String!
3
11
  }
4
12
 
5
13
  type Activity {
@@ -34,6 +42,18 @@ type ApiActionEndpoint {
34
42
  sunsetAt: DateTime
35
43
  }
36
44
 
45
+ type AuthorizedParty {
46
+ party: String!
47
+ name: String!
48
+ partyType: String!
49
+ isDeleted: Boolean!
50
+ hasKeyRole: Boolean!
51
+ isMainAdministrator: Boolean!
52
+ isAccessManager: Boolean!
53
+ hasOnlyAccessToSubParties: Boolean!
54
+ subParties: [AuthorizedParty!]
55
+ }
56
+
37
57
  type Content {
38
58
  type: ContentType!
39
59
  value: [Localization!]!
@@ -63,9 +83,21 @@ type Dialog {
63
83
  seenSinceLastUpdate: [SeenLog!]!
64
84
  }
65
85
 
66
- type DialogQueries @authorize(policy: "enduser") {
67
- dialogById(dialogId: UUID!): Dialog!
68
- searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
86
+ type DialogByIdDeleted implements DialogByIdError {
87
+ message: String!
88
+ }
89
+
90
+ type DialogByIdForbidden implements DialogByIdError {
91
+ message: String!
92
+ }
93
+
94
+ type DialogByIdNotFound implements DialogByIdError {
95
+ message: String!
96
+ }
97
+
98
+ type DialogByIdPayload {
99
+ dialog: Dialog
100
+ errors: [DialogByIdError!]!
69
101
  }
70
102
 
71
103
  type Element {
@@ -103,6 +135,12 @@ type Localization {
103
135
  cultureCode: String!
104
136
  }
105
137
 
138
+ type Queries @authorize(policy: "enduser") {
139
+ dialogById(dialogId: UUID!): DialogByIdPayload!
140
+ searchDialogs(input: SearchDialogInput!): SearchDialogsPayload!
141
+ parties: [AuthorizedParty!]!
142
+ }
143
+
106
144
  type SearchDialog {
107
145
  id: UUID!
108
146
  org: String!
@@ -120,11 +158,20 @@ type SearchDialog {
120
158
  seenSinceLastUpdate: [SeenLog!]!
121
159
  }
122
160
 
161
+ type SearchDialogForbidden implements SearchDialogError {
162
+ message: String!
163
+ }
164
+
165
+ type SearchDialogValidationError implements SearchDialogError {
166
+ message: String!
167
+ }
168
+
123
169
  type SearchDialogsPayload {
124
- items: [SearchDialog!]!
170
+ items: [SearchDialog!]
125
171
  hasNextPage: Boolean!
126
172
  continuationToken: String
127
173
  orderBy: String!
174
+ errors: [SearchDialogError!]!
128
175
  }
129
176
 
130
177
  type SeenLog {
@@ -239,4 +286,4 @@ scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time"
239
286
 
240
287
  scalar URL @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc3986")
241
288
 
242
- scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")
289
+ scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")
@@ -1,4 +1,4 @@
1
- {
1
+ {
2
2
  "openapi": "3.0.0",
3
3
  "info": {
4
4
  "title": "Dialogporten",
@@ -1606,6 +1606,42 @@
1606
1606
  ]
1607
1607
  }
1608
1608
  },
1609
+ "/api/v1/enduser/parties": {
1610
+ "get": {
1611
+ "tags": [
1612
+ "Enduser"
1613
+ ],
1614
+ "summary": "Gets the list of authorized parties for the end user",
1615
+ "description": "Gets the list of authorized parties for the end user. For more information see the documentation (link TBD).",
1616
+ "operationId": "GetParties",
1617
+ "responses": {
1618
+ "200": {
1619
+ "description": "The list of authorized parties for the end user",
1620
+ "content": {
1621
+ "application/json": {
1622
+ "schema": {
1623
+ "type": "array",
1624
+ "items": {
1625
+ "$ref": "#/components/schemas/GetPartiesDto"
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ },
1631
+ "401": {
1632
+ "description": "Unauthorized"
1633
+ },
1634
+ "403": {
1635
+ "description": "Forbidden"
1636
+ }
1637
+ },
1638
+ "security": [
1639
+ {
1640
+ "JWTBearerAuth": []
1641
+ }
1642
+ ]
1643
+ }
1644
+ },
1609
1645
  "/api/v1/enduser/dialogs/{dialogId}/seenlog": {
1610
1646
  "get": {
1611
1647
  "tags": [
@@ -3732,6 +3768,55 @@
3732
3768
  }
3733
3769
  }
3734
3770
  },
3771
+ "GetPartiesDto": {
3772
+ "type": "object",
3773
+ "additionalProperties": false,
3774
+ "properties": {
3775
+ "authorizedParties": {
3776
+ "type": "array",
3777
+ "items": {
3778
+ "$ref": "#/components/schemas/AuthorizedPartyDto"
3779
+ }
3780
+ }
3781
+ }
3782
+ },
3783
+ "AuthorizedPartyDto": {
3784
+ "type": "object",
3785
+ "additionalProperties": false,
3786
+ "properties": {
3787
+ "party": {
3788
+ "type": "string"
3789
+ },
3790
+ "name": {
3791
+ "type": "string"
3792
+ },
3793
+ "partyType": {
3794
+ "type": "string"
3795
+ },
3796
+ "isDeleted": {
3797
+ "type": "boolean"
3798
+ },
3799
+ "hasKeyRole": {
3800
+ "type": "boolean"
3801
+ },
3802
+ "isMainAdministrator": {
3803
+ "type": "boolean"
3804
+ },
3805
+ "isAccessManager": {
3806
+ "type": "boolean"
3807
+ },
3808
+ "hasOnlyAccessToSubParties": {
3809
+ "type": "boolean"
3810
+ },
3811
+ "subParties": {
3812
+ "type": "array",
3813
+ "nullable": true,
3814
+ "items": {
3815
+ "$ref": "#/components/schemas/AuthorizedPartyDto"
3816
+ }
3817
+ }
3818
+ }
3819
+ },
3735
3820
  "SearchDialogSeenLogDto": {
3736
3821
  "type": "object",
3737
3822
  "additionalProperties": false,