@scouterna/scoutnet-openapi 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,82 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.9...scoutnet-openapi-v0.2.0) (2025-07-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * add troop and section support to groups endpoint ([dddaac0](https://github.com/Scouterna/scoutnet-api/commit/dddaac0ae17632fa76dc13dafb34af06044be620))
9
+
10
+ ## [0.1.9](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.8...scoutnet-openapi-v0.1.9) (2025-07-23)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * fix linter issues ([#19](https://github.com/Scouterna/scoutnet-api/issues/19)) ([9e7bfa9](https://github.com/Scouterna/scoutnet-api/commit/9e7bfa9b5e76de90babd632c3e725226d2e75088))
16
+
17
+ ## [0.1.8](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.7...scoutnet-openapi-v0.1.8) (2025-06-20)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * move schema to make referencing simpler. ([a6b2708](https://github.com/Scouterna/scoutnet-api/commit/a6b27081c761261acc82df8a2978fc0a77607e8b))
23
+
24
+ ## [0.1.7](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.6...scoutnet-openapi-v0.1.7) (2025-06-20)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * break out endpoints into separate files ([9f1d1b0](https://github.com/Scouterna/scoutnet-api/commit/9f1d1b076bd5a6abbed5023b51da27abeb2096fe))
30
+ * symlink openapi document into public. ([4e11f21](https://github.com/Scouterna/scoutnet-api/commit/4e11f213eba206dd3787f03e694074b51c27cb22))
31
+
32
+ ## [0.1.6](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.5...scoutnet-openapi-v0.1.6) (2025-03-30)
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * include necessary files in packages ([3b71721](https://github.com/Scouterna/scoutnet-api/commit/3b7172133a6857c0fe2d78a2cee313a241aaa1c8))
38
+
39
+ ## [0.1.5](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.4...scoutnet-openapi-v0.1.5) (2025-03-30)
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * add metadata to packages ([e2a5728](https://github.com/Scouterna/scoutnet-api/commit/e2a5728ba5ec3604f46a4d70a9ac891b399073d9))
45
+
46
+ ## [0.1.4](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.3...scoutnet-openapi-v0.1.4) (2025-03-30)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * add author to public packages ([e963310](https://github.com/Scouterna/scoutnet-api/commit/e963310c54ece98eda03ea85a2bea8dd3fb98e08))
52
+
53
+ ## [0.1.3](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.2...scoutnet-openapi-v0.1.3) (2025-03-27)
54
+
55
+
56
+ ### Bug Fixes
57
+
58
+ * add translation to destination_list ([725952a](https://github.com/Scouterna/scoutnet-api/commit/725952a044a9c1b9769e76b36c9db192566dfce6))
59
+
60
+ ## [0.1.2](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-openapi-v0.1.1...scoutnet-openapi-v0.1.2) (2025-03-27)
61
+
62
+
63
+ ### Bug Fixes
64
+
65
+ * improve basicAuth description ([e9ecf52](https://github.com/Scouterna/scoutnet-api/commit/e9ecf526f0673a6a759a33893c066c2129b0d18b))
66
+ * improve map descriptions ([823fcd0](https://github.com/Scouterna/scoutnet-api/commit/823fcd0b5c38bd538773f4892169f4de1d48364c))
67
+ * rename body_key_list ([4a2607f](https://github.com/Scouterna/scoutnet-api/commit/4a2607f59faa4996d20762e79b8e6e419c69eadc))
68
+
69
+ ## [0.1.1](https://github.com/Scouterna/scoutnet-api/compare/@scoutnet/scoutnet-openapi-v0.1.0...@scoutnet/scoutnet-openapi-v0.1.1) (2025-03-27)
70
+
71
+
72
+ ### Bug Fixes
73
+
74
+ * improve basicAuth description ([e9ecf52](https://github.com/Scouterna/scoutnet-api/commit/e9ecf526f0673a6a759a33893c066c2129b0d18b))
75
+ * improve map descriptions ([823fcd0](https://github.com/Scouterna/scoutnet-api/commit/823fcd0b5c38bd538773f4892169f4de1d48364c))
76
+
77
+ ## 0.1.0 (2025-03-27)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * improve map descriptions ([823fcd0](https://github.com/Scouterna/scoutnet-api/commit/823fcd0b5c38bd538773f4892169f4de1d48364c))
package/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # Scoutnet OpenAPI document
2
+
3
+ This package contains the OpenAPI document for the Scoutnet API. The root
4
+ document is located at `/schema/scoutnet.yaml`.
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@scouterna/scoutnet-openapi",
3
+ "version": "0.2.0",
4
+ "description": "The OpenAPI document for the Scoutnet API, neatly packaged for NPM.",
5
+ "keywords": [
6
+ "scouterna",
7
+ "scoutnet"
8
+ ],
9
+ "author": "Malcolm Nihlén <malcolm.nihlen@scouterna.se>",
10
+ "license": "MIT",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/Scouterna/scoutnet-api.git",
14
+ "directory": "packages/scoutnet-openapi"
15
+ },
16
+ "files": [
17
+ "schema",
18
+ "README.md",
19
+ "CHANGELOG.md",
20
+ "package.json"
21
+ ]
22
+ }
@@ -0,0 +1,28 @@
1
+ type: object
2
+ properties:
3
+ care_of:
4
+ type: string
5
+ location_name:
6
+ type: string
7
+ line_1:
8
+ type: string
9
+ line_2:
10
+ type: string
11
+ line_3:
12
+ type: string
13
+ post_code:
14
+ type: string
15
+ post_town:
16
+ type: string
17
+ latitude:
18
+ type: string
19
+ longitude:
20
+ type: string
21
+ info:
22
+ type: string
23
+ country_code:
24
+ type: string
25
+ section_name:
26
+ type: string
27
+ section_priority:
28
+ type: boolean
@@ -0,0 +1,26 @@
1
+ type: object
2
+ properties:
3
+ body_key:
4
+ type: string
5
+ description: Unique key for the body. Usually body type and body ID separated by an underscore.
6
+ body_name:
7
+ type: string
8
+ description: The name of the body.
9
+ body_type:
10
+ type: string
11
+ enum:
12
+ - organisation
13
+ - region
14
+ - network
15
+ - district
16
+ - corps
17
+ - group
18
+ - troop
19
+ - patrol
20
+ body_id:
21
+ type: number
22
+ description: ID of the body.
23
+ organisation_id:
24
+ type: number
25
+ description: ID of the organisation this body belongs to. If this body is an organisation, this is the same as body_id.
26
+
@@ -0,0 +1,15 @@
1
+ type: object
2
+ properties:
3
+ checked_in:
4
+ type: number
5
+ enum: [0, 1]
6
+ description: Set to 1 to mark the participant as checked in, 0 to mark as checked out.
7
+ comment:
8
+ example: "Checked in by Scoutin checkin system"
9
+ type: string
10
+ description: A comment to be stored with the check-in. If checked_in is not provided a comment will be stored without changing the check-in state.
11
+ attended:
12
+ type: number
13
+ enum: [0, 1]
14
+ default: 1
15
+ description: Only applicable when checking out. Set to 1 to mark the participant as attended, 0 to mark as not attended. Default is 1.
@@ -0,0 +1,38 @@
1
+ type: object
2
+ properties:
3
+ checked_in:
4
+ type: array
5
+ items:
6
+ type: number
7
+ description: List of member IDs that were checked in.
8
+ checked_out_attended:
9
+ type: array
10
+ items:
11
+ type: number
12
+ description: List of member IDs that were checked out and marked as attended.
13
+ checked_out_not_attended:
14
+ type: array
15
+ items:
16
+ type: number
17
+ description: List of member IDs that were checked out and marked as not attended.
18
+ unchanged:
19
+ type: array
20
+ items:
21
+ type: number
22
+ description: List of member IDs that were not changed. If only a comment was added, the member is still in this list.
23
+ not_found:
24
+ type: array
25
+ items:
26
+ type: number
27
+ description: List of member IDs that exist but are not participants on the project.
28
+ no_member:
29
+ type: array
30
+ items:
31
+ type: number
32
+ description: List of member IDs that do not exist in the system.
33
+ total:
34
+ type: number
35
+ description: Total number of members that were processed. Unchanged members are counted as well.
36
+ updated_questions:
37
+ type: {}
38
+ description: NOT YET DOCUMENTED
@@ -0,0 +1,9 @@
1
+ type: object
2
+ properties:
3
+ name:
4
+ type: string
5
+ description: The name of the district.
6
+ groups:
7
+ type: object
8
+ additionalProperties:
9
+ $ref: './group.yaml'
@@ -0,0 +1,77 @@
1
+ type: object
2
+ properties:
3
+ name:
4
+ type: string
5
+ description: The name of the group.
6
+ description:
7
+ type: string
8
+ description: A description of the group.
9
+ group_no:
10
+ type: number
11
+ description: Group ID number.
12
+ corps_id:
13
+ type: number
14
+ description: Corps or "samverkansorganisation". `null` means Scouterna.
15
+ group_types:
16
+ type: array
17
+ items:
18
+ type: number
19
+ description: |
20
+ 1: Scoutkår
21
+ 2: Sjöscoutkår
22
+ 3: Hub-Kår
23
+ troop_types:
24
+ type: array
25
+ items:
26
+ type: number
27
+ description: |
28
+ 1: Bäverscouter
29
+ 2: Spårarscouter
30
+ 3: Upptäckarscouter
31
+ 4: Äventyrarscouter
32
+ 5: Utmanarscouter
33
+ 6: Roverscouter
34
+ 7: Annat
35
+ 8: Familjescouter
36
+ municipality_id:
37
+ type: number
38
+ description: Municipality ID. Name can be found in the region object.
39
+ county_id:
40
+ type: number
41
+ description: County ID. Name can be found in the region object.
42
+ public_registration_enabled:
43
+ type: boolean
44
+ description: Whether the group is open for new members or not.
45
+ destination_list:
46
+ type: number
47
+ description: |
48
+ Destination list for public registration.
49
+ 1: Medlemskap som väntar på godkännande (Membership waiting for approval)
50
+ 2: Flytta till väntelista (Move to waiting list)
51
+ badges:
52
+ type: {}
53
+ description: NOT YET DOCUMENTED
54
+ troops:
55
+ type: object
56
+ additionalProperties:
57
+ $ref: './group_troop.yaml'
58
+ sections:
59
+ type: object
60
+ additionalProperties:
61
+ $ref: './group_section.yaml'
62
+ addresses:
63
+ type: object
64
+ additionalProperties:
65
+ $ref: './address.yaml'
66
+ email:
67
+ type: object
68
+ additionalProperties:
69
+ type: string
70
+ email_membership:
71
+ type: object
72
+ additionalProperties:
73
+ type: string
74
+ project_stats:
75
+ type: object
76
+ additionalProperties:
77
+ $ref: './project_stats.yaml'
@@ -0,0 +1,14 @@
1
+ type: object
2
+ properties:
3
+ name:
4
+ type: string
5
+ description: The name of the troop.
6
+ description:
7
+ type: string
8
+ description: A description of the troop.
9
+ id:
10
+ type: number
11
+ description: Section ID number.
12
+ address_ids:
13
+ type: {}
14
+ description: NOT YET DOCUMENTED
@@ -0,0 +1,28 @@
1
+ type: object
2
+ properties:
3
+ name:
4
+ type: string
5
+ description: The name of the troop.
6
+ type:
7
+ type: number
8
+ description: |
9
+ 1: Bäverscouter
10
+ 2: Spårarscouter
11
+ 3: Upptäckarscouter
12
+ 4: Äventyrarscouter
13
+ 5: Utmanarscouter
14
+ 6: Roverscouter
15
+ 7: Annat
16
+ 8: Familjescouter
17
+ min_age:
18
+ type: number
19
+ description: Minimum age for the troop.
20
+ max_age:
21
+ type: number
22
+ description: Maximum age for the troop.
23
+ meeting_info:
24
+ type: {}
25
+ description: NOT YET DOCUMENTED
26
+ section_id:
27
+ type: number
28
+ description: ID of the section this troop belongs to.
@@ -0,0 +1,9 @@
1
+ type: object
2
+ properties:
3
+ name:
4
+ type: string
5
+ description: The name of the organisation.
6
+ regions:
7
+ type: object
8
+ additionalProperties:
9
+ $ref: './region.yaml'
@@ -0,0 +1,18 @@
1
+ type: object
2
+ properties:
3
+ member_status:
4
+ type: object
5
+ additionalProperties:
6
+ type: string
7
+ sex:
8
+ type: object
9
+ additionalProperties:
10
+ type: string
11
+ project_fee:
12
+ type: object
13
+ additionalProperties:
14
+ type: string
15
+ contact_type:
16
+ type: object
17
+ additionalProperties:
18
+ type: string
@@ -0,0 +1,81 @@
1
+ type: object
2
+ properties:
3
+ checked_in:
4
+ type: [boolean, 'null']
5
+ attended:
6
+ type: [boolean, 'null']
7
+ cancelled:
8
+ type: [boolean, 'null']
9
+ member_status:
10
+ type: [number, 'null']
11
+ member_no:
12
+ type: [number, 'null']
13
+ group_registration:
14
+ type: [boolean, 'null']
15
+ first_name:
16
+ type: [string, 'null']
17
+ last_name:
18
+ type: [string, 'null']
19
+ ssno:
20
+ type: [string, 'null']
21
+ registration_date:
22
+ type: [string, 'null']
23
+ cancelled_date:
24
+ type: [string, 'null']
25
+ primary_email:
26
+ type: [string, 'null']
27
+ fee_id:
28
+ type: [number, 'null']
29
+ primary_membership_info:
30
+ type: [object, array, 'null']
31
+ properties:
32
+ patrol_id:
33
+ type: [number, 'null']
34
+ patrol_name:
35
+ type: [string, 'null']
36
+ troop_id:
37
+ type: [number, 'null']
38
+ troop_name:
39
+ type: [string, 'null']
40
+ group_id:
41
+ type: [number, 'null']
42
+ group_name:
43
+ type: [string, 'null']
44
+ district_id:
45
+ type: [number, 'null']
46
+ district_name:
47
+ type: [string, 'null']
48
+ region_id:
49
+ type: [number, 'null']
50
+ region_name:
51
+ type: [string, 'null']
52
+ organisation_id:
53
+ type: [number, 'null']
54
+ organisation_name:
55
+ type: [string, 'null']
56
+ group_registration_info:
57
+ type: [object, array, 'null']
58
+ properties:
59
+ group_id:
60
+ type: [number, 'null']
61
+ patrol_id:
62
+ type: [number, 'null']
63
+ group_name:
64
+ type: [string, 'null']
65
+ org_id:
66
+ type: [number, 'null']
67
+ org_name:
68
+ type: [string, 'null']
69
+ district_id:
70
+ type: [number, 'null']
71
+ district_name:
72
+ type: [string, 'null']
73
+ patrol_name:
74
+ type: [string, 'null']
75
+ questions:
76
+ type: {}
77
+ description: NOT YET DOCUMENTED
78
+ contact_info:
79
+ type: object
80
+ additionalProperties:
81
+ type: string
@@ -0,0 +1,11 @@
1
+ type: object
2
+ properties:
3
+ project_id:
4
+ type: number
5
+ group_participants:
6
+ type: number
7
+ project_name:
8
+ type: string
9
+ questions:
10
+ type: {}
11
+ description: NOT YET DOCUMENTED
@@ -0,0 +1,22 @@
1
+ type: object
2
+ properties:
3
+ name:
4
+ type: string
5
+ description: The name of the region.
6
+ districts:
7
+ type: object
8
+ additionalProperties:
9
+ $ref: './district.yaml'
10
+ corps:
11
+ type: {}
12
+ description: NOT YET DOCUMENTED
13
+ municipalities:
14
+ type: object
15
+ description: Key-value map of municipality IDs (used in the response) to their names.
16
+ additionalProperties:
17
+ type: string
18
+ conties:
19
+ type: object
20
+ description: Key-value map of country IDs (used in the response) to their names.
21
+ additionalProperties:
22
+ type: string
@@ -0,0 +1,21 @@
1
+ get:
2
+ summary: |
3
+ Restricted endpoint. Get a list of all bodies and their relations to
4
+ each other
5
+ description: |
6
+ For security reasons this endpoint is not publicly available and can
7
+ only be used by internally developed systems.
8
+ operationId: listBodyKeys
9
+ tags:
10
+ - global
11
+ responses:
12
+ '200':
13
+ description: A list of all bodies and their relations to each other.
14
+ content:
15
+ application/json:
16
+ schema:
17
+ type: object
18
+ additionalProperties:
19
+ $ref: ../components/body.yaml
20
+ '401':
21
+ $ref: ../responses/not_authorized.yaml
@@ -0,0 +1,29 @@
1
+ put:
2
+ summary: Update the check-in state of participant(s) on the project
3
+ description: Update the check-in state of participant(s) on the project.
4
+ operationId: updateCheckin
5
+ tags:
6
+ - project
7
+ requestBody:
8
+ description: |
9
+ An object where the keys are member IDs and the values are objects
10
+ with check-in details.
11
+ required: true
12
+ content:
13
+ application/json:
14
+ schema:
15
+ type: object
16
+ propertyNames:
17
+ pattern: '^[0-9]+$'
18
+ description: A valid member ID
19
+ additionalProperties:
20
+ $ref: ../components/checkin.yaml
21
+ responses:
22
+ '200':
23
+ description: A summary of the check-in operation.
24
+ content:
25
+ application/json:
26
+ schema:
27
+ $ref: ../components/checkin_response.yaml
28
+ '401':
29
+ $ref: ../responses/not_authorized.yaml
@@ -0,0 +1,18 @@
1
+ get:
2
+ summary: Get a list of groups with members attending a project
3
+ description: Get a list of groups with members attending a project
4
+ operationId: getProjectGroups
5
+ tags:
6
+ - project
7
+ responses:
8
+ '200':
9
+ description: |
10
+ Keys of the response object are group IDs and values are group objects.
11
+ content:
12
+ application/json:
13
+ schema:
14
+ type: object
15
+ additionalProperties:
16
+ $ref: ../components/organisation.yaml
17
+ '401':
18
+ $ref: ../responses/not_authorized.yaml
@@ -0,0 +1,25 @@
1
+ get:
2
+ summary: Get a list of members who are registered on the project
3
+ description: Get a list of members who are registered on the project
4
+ operationId: getProjectParticipants
5
+ tags:
6
+ - project
7
+ responses:
8
+ '200':
9
+ description: A list of members registered on the project.
10
+ content:
11
+ application/json:
12
+ schema:
13
+ type: object
14
+ properties:
15
+ participants:
16
+ type:
17
+ - object
18
+ - array
19
+ - 'null'
20
+ additionalProperties:
21
+ $ref: ../components/project_member.yaml
22
+ labels:
23
+ $ref: ../components/project_get_participants_labels.yaml
24
+ '401':
25
+ $ref: ../responses/not_authorized.yaml
@@ -0,0 +1 @@
1
+ description: When unauthorized there will be no response body.
@@ -0,0 +1,46 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: Scoutnet API
4
+ summary: >-
5
+ Scoutnet is the member management system for the Guides and Scouts of
6
+ Sweden.
7
+ description: |
8
+ Scoutnet is the member management system for the Guides and Scouts of
9
+ Sweden. This API provides access to various resources related to projects,
10
+ groups, and participants.
11
+ version: 0.2.0
12
+ license:
13
+ name: MIT
14
+ identifier: MIT
15
+ contact:
16
+ name: Scoutnet
17
+ url: https://github.com/Scouterna/scoutnet-api
18
+ tags:
19
+ - name: project
20
+ description: Endpoints related to "arrangemang"
21
+ - name: global
22
+ description: Endpoints that do not belong to a specific type of resource
23
+ servers:
24
+ - url: https://s1.test.custard.no/api
25
+ description: Test server
26
+ - url: https://scoutnet.se/api
27
+ description: Production server
28
+ components:
29
+ securitySchemes:
30
+ basicAuth:
31
+ type: http
32
+ scheme: basic
33
+ description: |
34
+ Use the ID of the resource you're accessing as username and the
35
+ corresponding API key as password.
36
+ security:
37
+ - basicAuth: []
38
+ paths:
39
+ /body_key_list:
40
+ $ref: ./paths/body_key_list.yaml
41
+ /project/get/groups:
42
+ $ref: ./paths/project_get_groups.yaml
43
+ /project/get/participants:
44
+ $ref: ./paths/project_get_participants.yaml
45
+ /project/checkin:
46
+ $ref: ./paths/project_checkin.yaml