@scouterna/scoutnet 0.3.6 → 0.3.7
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 +14 -0
- package/README.md +1 -1
- package/package.json +8 -1
- package/src/generated/api-types.ts +428 -0
- package/dummy +0 -2
- package/tsconfig.json +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.7](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-v0.3.6...scoutnet-v0.3.7) (2025-03-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* include necessary files in packages ([3b71721](https://github.com/Scouterna/scoutnet-api/commit/3b7172133a6857c0fe2d78a2cee313a241aaa1c8))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* devDependencies
|
|
15
|
+
* @scouterna/scoutnet-openapi bumped to 0.1.6
|
|
16
|
+
|
|
3
17
|
## [0.3.6](https://github.com/Scouterna/scoutnet-api/compare/scoutnet-v0.3.5...scoutnet-v0.3.6) (2025-03-30)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This is an API client for the Scoutnet API developed and maintained by
|
|
4
4
|
[Scouternas e-tjänster](https://etjanster.scout.se/). It is automatically
|
|
5
5
|
generated from the
|
|
6
|
-
[Scoutnet OpenAPI
|
|
6
|
+
[Scoutnet OpenAPI document](https://github.com/Scouterna/scoutnet-api/blob/main/packages/scoutnet-openapi/scoutnet.yaml).
|
|
7
7
|
|
|
8
8
|
The client uses [openapi-typescript](https://openapi-ts.dev/introduction) and
|
|
9
9
|
[openapi-fetch](https://openapi-ts.dev/openapi-fetch/) under the hood. This NPM
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scouterna/scoutnet",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "API client for the Scoutnet API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"scouterna",
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
"url": "https://github.com/Scouterna/scoutnet-api.git",
|
|
14
14
|
"directory": "packages/scoutnet"
|
|
15
15
|
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src",
|
|
19
|
+
"README.md",
|
|
20
|
+
"CHANGELOG.md",
|
|
21
|
+
"package.json"
|
|
22
|
+
],
|
|
16
23
|
"type": "module",
|
|
17
24
|
"exports": {
|
|
18
25
|
".": "./dist/index.js"
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/body_key_list": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Restricted endpoint. Get a list of all bodies and their relations to each other
|
|
16
|
+
* @description For security reasons this endpoint is not publicly available and can only be used by internally developed systems.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["listBodyKeys"];
|
|
19
|
+
put?: never;
|
|
20
|
+
post?: never;
|
|
21
|
+
delete?: never;
|
|
22
|
+
options?: never;
|
|
23
|
+
head?: never;
|
|
24
|
+
patch?: never;
|
|
25
|
+
trace?: never;
|
|
26
|
+
};
|
|
27
|
+
"/project/get/groups": {
|
|
28
|
+
parameters: {
|
|
29
|
+
query?: never;
|
|
30
|
+
header?: never;
|
|
31
|
+
path?: never;
|
|
32
|
+
cookie?: never;
|
|
33
|
+
};
|
|
34
|
+
/** Get a list of groups with members attending a project */
|
|
35
|
+
get: operations["getProjectGroups"];
|
|
36
|
+
put?: never;
|
|
37
|
+
post?: never;
|
|
38
|
+
delete?: never;
|
|
39
|
+
options?: never;
|
|
40
|
+
head?: never;
|
|
41
|
+
patch?: never;
|
|
42
|
+
trace?: never;
|
|
43
|
+
};
|
|
44
|
+
"/project/get/participants": {
|
|
45
|
+
parameters: {
|
|
46
|
+
query?: never;
|
|
47
|
+
header?: never;
|
|
48
|
+
path?: never;
|
|
49
|
+
cookie?: never;
|
|
50
|
+
};
|
|
51
|
+
/** Get a list of members who are registered on the project */
|
|
52
|
+
get: operations["getProjectParticipants"];
|
|
53
|
+
put?: never;
|
|
54
|
+
post?: never;
|
|
55
|
+
delete?: never;
|
|
56
|
+
options?: never;
|
|
57
|
+
head?: never;
|
|
58
|
+
patch?: never;
|
|
59
|
+
trace?: never;
|
|
60
|
+
};
|
|
61
|
+
"/project/checkin": {
|
|
62
|
+
parameters: {
|
|
63
|
+
query?: never;
|
|
64
|
+
header?: never;
|
|
65
|
+
path?: never;
|
|
66
|
+
cookie?: never;
|
|
67
|
+
};
|
|
68
|
+
get?: never;
|
|
69
|
+
/** Update the check-in state of participant(s) on the project */
|
|
70
|
+
put: operations["updateCheckin"];
|
|
71
|
+
post?: never;
|
|
72
|
+
delete?: never;
|
|
73
|
+
options?: never;
|
|
74
|
+
head?: never;
|
|
75
|
+
patch?: never;
|
|
76
|
+
trace?: never;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export type webhooks = Record<string, never>;
|
|
80
|
+
export interface components {
|
|
81
|
+
schemas: {
|
|
82
|
+
body: {
|
|
83
|
+
/** @description Unique key for the body. Usually body type and body ID separated by an underscore. */
|
|
84
|
+
body_key?: string;
|
|
85
|
+
/** @description The name of the body. */
|
|
86
|
+
body_name?: string;
|
|
87
|
+
/** @enum {string} */
|
|
88
|
+
body_type?:
|
|
89
|
+
| "organisation"
|
|
90
|
+
| "region"
|
|
91
|
+
| "network"
|
|
92
|
+
| "district"
|
|
93
|
+
| "corps"
|
|
94
|
+
| "group"
|
|
95
|
+
| "troop"
|
|
96
|
+
| "patrol";
|
|
97
|
+
/** @description ID of the body. */
|
|
98
|
+
body_id?: number;
|
|
99
|
+
/** @description ID of the organisation this body belongs to. If this body is an organisation, this is the same as body_id. */
|
|
100
|
+
organisation_id?: number;
|
|
101
|
+
};
|
|
102
|
+
address: {
|
|
103
|
+
care_of?: string;
|
|
104
|
+
location_name?: string;
|
|
105
|
+
line_1?: string;
|
|
106
|
+
line_2?: string;
|
|
107
|
+
line_3?: string;
|
|
108
|
+
post_code?: string;
|
|
109
|
+
post_town?: string;
|
|
110
|
+
latitude?: string;
|
|
111
|
+
longitude?: string;
|
|
112
|
+
info?: string;
|
|
113
|
+
country_code?: string;
|
|
114
|
+
section_name?: string;
|
|
115
|
+
section_priority?: boolean;
|
|
116
|
+
};
|
|
117
|
+
project_stats: {
|
|
118
|
+
project_id?: number;
|
|
119
|
+
group_participants?: number;
|
|
120
|
+
project_name?: string;
|
|
121
|
+
/** @description NOT YET DOCUMENTED */
|
|
122
|
+
questions?: Record<string, never>;
|
|
123
|
+
};
|
|
124
|
+
group: {
|
|
125
|
+
/** @description The name of the group. */
|
|
126
|
+
name?: string;
|
|
127
|
+
/** @description A description of the group. */
|
|
128
|
+
description?: string;
|
|
129
|
+
/** @description Group ID number. */
|
|
130
|
+
group_no?: number;
|
|
131
|
+
/** @description Corps or "samverkansorganisation". `null` means Scouterna. */
|
|
132
|
+
corps_id?: number;
|
|
133
|
+
/** @description 1: Scoutkår
|
|
134
|
+
* 2: Sjöscoutkår
|
|
135
|
+
* 3: Hub-Kår
|
|
136
|
+
* */
|
|
137
|
+
group_types?: number[];
|
|
138
|
+
/** @description 1: Bäverscouter
|
|
139
|
+
* 2: Spårarscouter
|
|
140
|
+
* 3: Upptäckarscouter
|
|
141
|
+
* 4: Äventyrarscouter
|
|
142
|
+
* 5: Utmanarscouter
|
|
143
|
+
* 6: Roverscouter
|
|
144
|
+
* 7: Annat
|
|
145
|
+
* 8: Familjescouter
|
|
146
|
+
* */
|
|
147
|
+
troop_types?: number[];
|
|
148
|
+
/** @description Municipality ID. Name can be found in the region object. */
|
|
149
|
+
municipality_id?: number;
|
|
150
|
+
/** @description County ID. Name can be found in the region object. */
|
|
151
|
+
county_id?: number;
|
|
152
|
+
/** @description Whether the group is open for new members or not. */
|
|
153
|
+
public_registration_enabled?: boolean;
|
|
154
|
+
/** @description Destination list for public registration.
|
|
155
|
+
* 1: Medlemskap som väntar på godkännande (Membership waiting for approval)
|
|
156
|
+
* 2: Flytta till väntelista (Move to waiting list)
|
|
157
|
+
* */
|
|
158
|
+
destination_list?: number;
|
|
159
|
+
/** @description NOT YET DOCUMENTED */
|
|
160
|
+
badges?: Record<string, never>;
|
|
161
|
+
addresses?: {
|
|
162
|
+
[key: string]: components["schemas"]["address"];
|
|
163
|
+
};
|
|
164
|
+
email?: {
|
|
165
|
+
[key: string]: string;
|
|
166
|
+
};
|
|
167
|
+
email_membership?: {
|
|
168
|
+
[key: string]: string;
|
|
169
|
+
};
|
|
170
|
+
project_stats?: {
|
|
171
|
+
[key: string]: components["schemas"]["project_stats"];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
district: {
|
|
175
|
+
/** @description The name of the district. */
|
|
176
|
+
name?: string;
|
|
177
|
+
groups?: {
|
|
178
|
+
[key: string]: components["schemas"]["group"];
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
region: {
|
|
182
|
+
/** @description The name of the region. */
|
|
183
|
+
name?: string;
|
|
184
|
+
districts?: {
|
|
185
|
+
[key: string]: components["schemas"]["district"];
|
|
186
|
+
};
|
|
187
|
+
/** @description NOT YET DOCUMENTED */
|
|
188
|
+
corps?: Record<string, never>;
|
|
189
|
+
/** @description Key-value map of municipality IDs (used in the response) to their names. */
|
|
190
|
+
municipalities?: {
|
|
191
|
+
[key: string]: string;
|
|
192
|
+
};
|
|
193
|
+
/** @description Key-value map of country IDs (used in the response) to their names. */
|
|
194
|
+
conties?: {
|
|
195
|
+
[key: string]: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
organisation: {
|
|
199
|
+
/** @description The name of the organisation. */
|
|
200
|
+
name?: string;
|
|
201
|
+
regions?: {
|
|
202
|
+
[key: string]: components["schemas"]["region"];
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
project_member: {
|
|
206
|
+
checked_in?: boolean | null;
|
|
207
|
+
attended?: boolean | null;
|
|
208
|
+
cancelled?: boolean | null;
|
|
209
|
+
member_status?: number | null;
|
|
210
|
+
member_no?: number | null;
|
|
211
|
+
group_registration?: boolean | null;
|
|
212
|
+
first_name?: string | null;
|
|
213
|
+
last_name?: string | null;
|
|
214
|
+
ssno?: string | null;
|
|
215
|
+
registration_date?: string | null;
|
|
216
|
+
cancelled_date?: string | null;
|
|
217
|
+
primary_email?: string | null;
|
|
218
|
+
fee_id?: number | null;
|
|
219
|
+
primary_membership_info?:
|
|
220
|
+
| {
|
|
221
|
+
patrol_id?: number | null;
|
|
222
|
+
patrol_name?: string | null;
|
|
223
|
+
troop_id?: number | null;
|
|
224
|
+
troop_name?: string | null;
|
|
225
|
+
group_id?: number | null;
|
|
226
|
+
group_name?: string | null;
|
|
227
|
+
district_id?: number | null;
|
|
228
|
+
district_name?: string | null;
|
|
229
|
+
region_id?: number | null;
|
|
230
|
+
region_name?: string | null;
|
|
231
|
+
organisation_id?: number | null;
|
|
232
|
+
organisation_name?: string | null;
|
|
233
|
+
}
|
|
234
|
+
| unknown[]
|
|
235
|
+
| null;
|
|
236
|
+
group_registration_info?:
|
|
237
|
+
| {
|
|
238
|
+
group_id?: number | null;
|
|
239
|
+
patrol_id?: number | null;
|
|
240
|
+
group_name?: string | null;
|
|
241
|
+
org_id?: number | null;
|
|
242
|
+
org_name?: string | null;
|
|
243
|
+
district_id?: number | null;
|
|
244
|
+
district_name?: string | null;
|
|
245
|
+
patrol_name?: string | null;
|
|
246
|
+
}
|
|
247
|
+
| {
|
|
248
|
+
group_id?: number | null;
|
|
249
|
+
patrol_id?: number | null;
|
|
250
|
+
group_name?: string | null;
|
|
251
|
+
org_id?: number | null;
|
|
252
|
+
org_name?: string | null;
|
|
253
|
+
district_id?: number | null;
|
|
254
|
+
district_name?: string | null;
|
|
255
|
+
patrol_name?: string | null;
|
|
256
|
+
}
|
|
257
|
+
| null;
|
|
258
|
+
/** @description NOT YET DOCUMENTED */
|
|
259
|
+
questions?: Record<string, never>;
|
|
260
|
+
contact_info?: {
|
|
261
|
+
[key: string]: string;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
project_get_participants_labels: {
|
|
265
|
+
member_status?: {
|
|
266
|
+
[key: string]: string;
|
|
267
|
+
};
|
|
268
|
+
sex?: {
|
|
269
|
+
[key: string]: string;
|
|
270
|
+
};
|
|
271
|
+
project_fee?: {
|
|
272
|
+
[key: string]: string;
|
|
273
|
+
};
|
|
274
|
+
contact_type?: {
|
|
275
|
+
[key: string]: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
checkin: {
|
|
279
|
+
/**
|
|
280
|
+
* @description Set to 1 to mark the participant as checked in, 0 to mark as checked out.
|
|
281
|
+
* @enum {number}
|
|
282
|
+
*/
|
|
283
|
+
checked_in?: 0 | 1;
|
|
284
|
+
/** @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. */
|
|
285
|
+
comment?: string;
|
|
286
|
+
/**
|
|
287
|
+
* @description Only applicable when checking out. Set to 1 to mark the participant as attended, 0 to mark as not attended. Default is 1.
|
|
288
|
+
* @default 1
|
|
289
|
+
* @enum {number}
|
|
290
|
+
*/
|
|
291
|
+
attended: 0 | 1;
|
|
292
|
+
};
|
|
293
|
+
checkin_response: {
|
|
294
|
+
/** @description List of member IDs that were checked in. */
|
|
295
|
+
checked_in?: number[];
|
|
296
|
+
/** @description List of member IDs that were checked out and marked as attended. */
|
|
297
|
+
checked_out_attended?: number[];
|
|
298
|
+
/** @description List of member IDs that were checked out and marked as not attended. */
|
|
299
|
+
checked_out_not_attended?: number[];
|
|
300
|
+
/** @description List of member IDs that were not changed. If only a comment was added, the member is still in this list. */
|
|
301
|
+
unchanged?: number[];
|
|
302
|
+
/** @description List of member IDs that exist but are not participants on the project. */
|
|
303
|
+
not_found?: number[];
|
|
304
|
+
/** @description List of member IDs that do not exist in the system. */
|
|
305
|
+
no_member?: number[];
|
|
306
|
+
/** @description Total number of members that were processed. Unchanged members are counted as well. */
|
|
307
|
+
total?: number;
|
|
308
|
+
/** @description NOT YET DOCUMENTED */
|
|
309
|
+
updated_questions?: Record<string, never>;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
responses: {
|
|
313
|
+
/** @description When unauthorized there will be no response body. */
|
|
314
|
+
NotAuthorized: {
|
|
315
|
+
headers: {
|
|
316
|
+
[name: string]: unknown;
|
|
317
|
+
};
|
|
318
|
+
content?: never;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
parameters: never;
|
|
322
|
+
requestBodies: never;
|
|
323
|
+
headers: never;
|
|
324
|
+
pathItems: never;
|
|
325
|
+
}
|
|
326
|
+
export type $defs = Record<string, never>;
|
|
327
|
+
export interface operations {
|
|
328
|
+
listBodyKeys: {
|
|
329
|
+
parameters: {
|
|
330
|
+
query?: never;
|
|
331
|
+
header?: never;
|
|
332
|
+
path?: never;
|
|
333
|
+
cookie?: never;
|
|
334
|
+
};
|
|
335
|
+
requestBody?: never;
|
|
336
|
+
responses: {
|
|
337
|
+
200: {
|
|
338
|
+
headers: {
|
|
339
|
+
[name: string]: unknown;
|
|
340
|
+
};
|
|
341
|
+
content: {
|
|
342
|
+
"application/json": {
|
|
343
|
+
[key: string]: components["schemas"]["body"];
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
401: components["responses"]["NotAuthorized"];
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
getProjectGroups: {
|
|
351
|
+
parameters: {
|
|
352
|
+
query?: never;
|
|
353
|
+
header?: never;
|
|
354
|
+
path?: never;
|
|
355
|
+
cookie?: never;
|
|
356
|
+
};
|
|
357
|
+
requestBody?: never;
|
|
358
|
+
responses: {
|
|
359
|
+
/** @description Keys of the response object are group IDs and values are group objects. */
|
|
360
|
+
200: {
|
|
361
|
+
headers: {
|
|
362
|
+
[name: string]: unknown;
|
|
363
|
+
};
|
|
364
|
+
content: {
|
|
365
|
+
"application/json": {
|
|
366
|
+
[key: string]: components["schemas"]["organisation"];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
401: components["responses"]["NotAuthorized"];
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
getProjectParticipants: {
|
|
374
|
+
parameters: {
|
|
375
|
+
query?: never;
|
|
376
|
+
header?: never;
|
|
377
|
+
path?: never;
|
|
378
|
+
cookie?: never;
|
|
379
|
+
};
|
|
380
|
+
requestBody?: never;
|
|
381
|
+
responses: {
|
|
382
|
+
200: {
|
|
383
|
+
headers: {
|
|
384
|
+
[name: string]: unknown;
|
|
385
|
+
};
|
|
386
|
+
content: {
|
|
387
|
+
"application/json": {
|
|
388
|
+
participants?:
|
|
389
|
+
| {
|
|
390
|
+
[key: string]: components["schemas"]["project_member"];
|
|
391
|
+
}
|
|
392
|
+
| unknown[]
|
|
393
|
+
| null;
|
|
394
|
+
labels?: components["schemas"]["project_get_participants_labels"];
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
401: components["responses"]["NotAuthorized"];
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
updateCheckin: {
|
|
402
|
+
parameters: {
|
|
403
|
+
query?: never;
|
|
404
|
+
header?: never;
|
|
405
|
+
path?: never;
|
|
406
|
+
cookie?: never;
|
|
407
|
+
};
|
|
408
|
+
/** @description An object where the keys are member IDs and the values are objects with check-in details. */
|
|
409
|
+
requestBody: {
|
|
410
|
+
content: {
|
|
411
|
+
"application/json": {
|
|
412
|
+
[key: string]: components["schemas"]["checkin"];
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
responses: {
|
|
417
|
+
200: {
|
|
418
|
+
headers: {
|
|
419
|
+
[name: string]: unknown;
|
|
420
|
+
};
|
|
421
|
+
content: {
|
|
422
|
+
"application/json": components["schemas"]["checkin_response"];
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
401: components["responses"]["NotAuthorized"];
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
}
|
package/dummy
DELETED
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Base Options: */
|
|
4
|
-
"esModuleInterop": true,
|
|
5
|
-
"skipLibCheck": true,
|
|
6
|
-
"target": "es2022",
|
|
7
|
-
"allowJs": true,
|
|
8
|
-
"resolveJsonModule": true,
|
|
9
|
-
"moduleDetection": "force",
|
|
10
|
-
"isolatedModules": true,
|
|
11
|
-
"verbatimModuleSyntax": true,
|
|
12
|
-
|
|
13
|
-
/* Strictness */
|
|
14
|
-
"strict": true,
|
|
15
|
-
"noUncheckedIndexedAccess": true,
|
|
16
|
-
"noImplicitOverride": true,
|
|
17
|
-
|
|
18
|
-
/* Transpilation */
|
|
19
|
-
"module": "NodeNext",
|
|
20
|
-
"outDir": "dist",
|
|
21
|
-
"sourceMap": true,
|
|
22
|
-
"declaration": true,
|
|
23
|
-
"lib": ["es2022", "dom"]
|
|
24
|
-
}
|
|
25
|
-
}
|