File tree 12 files changed +254
-89
lines changed
12 files changed +254
-89
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 1.27.7] ( https://github.com/ocadotechnology/codeforlife-package-javascript/compare/v1.27.6...v1.27.7 ) (2024-06-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * api types ([ #41 ] ( https://github.com/ocadotechnology/codeforlife-package-javascript/issues/41 ) ) ([ 444a51f] ( https://github.com/ocadotechnology/codeforlife-package-javascript/commit/444a51f488863c0f23e0fb32a1b9d87c7bc76c34 ) )
7
+
1
8
## [ 1.27.6] ( https://github.com/ocadotechnology/codeforlife-package-javascript/compare/v1.27.5...v1.27.6 ) (2024-05-31)
2
9
3
10
Original file line number Diff line number Diff line change
1
+ import { COUNTRY_ISO_CODES , UK_COUNTIES } from '../helpers/general' ;
2
+ import type { Model } from '../helpers/rtkQuery' ;
3
+ export type User = Model < number , {
4
+ password : string ;
5
+ last_login ?: Date ;
6
+ first_name : string ;
7
+ last_name ?: string ;
8
+ email ?: string ;
9
+ is_staff : boolean ;
10
+ is_active : boolean ;
11
+ date_joined : Date ;
12
+ requesting_to_join_class ?: string ;
13
+ teacher ?: Teacher ;
14
+ student ?: Student ;
15
+ } > ;
16
+ export type Teacher = Model < number , {
17
+ user : number ;
18
+ school ?: number ;
19
+ is_admin : boolean ;
20
+ } > ;
21
+ export type Student = Model < number , {
22
+ user : number ;
23
+ school : number ;
24
+ klass : string ;
25
+ } > ;
26
+ export type School = Model < number , {
27
+ name : string ;
28
+ country ?: ( typeof COUNTRY_ISO_CODES ) [ number ] ;
29
+ uk_county ?: ( typeof UK_COUNTIES ) [ number ] ;
30
+ } > ;
31
+ export type Class = Model < string , {
32
+ name : string ;
33
+ teacher : number ;
34
+ school : number ;
35
+ read_classmates_data : boolean ;
36
+ receive_requests_until ?: Date ;
37
+ } > ;
38
+ export type AuthFactor = Model < number , {
39
+ user : number ;
40
+ type : 'otp' ;
41
+ } > ;
Original file line number Diff line number Diff line change
1
+ "use strict" ;
2
+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
Original file line number Diff line number Diff line change
1
+ declare const urls : Record < string , {
2
+ list : string ;
3
+ detail : string ;
4
+ } > ;
5
+ export default urls ;
Original file line number Diff line number Diff line change
1
+ "use strict" ;
2
+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3
+ var urls = {
4
+ user : {
5
+ list : 'users/' ,
6
+ detail : 'users/<id>/'
7
+ } ,
8
+ teacher : {
9
+ list : 'users/teachers/' ,
10
+ detail : 'users/teachers/<id>/'
11
+ } ,
12
+ student : {
13
+ list : 'users/students/' ,
14
+ detail : 'users/students/<id>/'
15
+ } ,
16
+ school : {
17
+ list : 'schools/' ,
18
+ detail : 'schools/<id>/'
19
+ } ,
20
+ class : {
21
+ list : 'classes/' ,
22
+ detail : 'classes/<id>/'
23
+ } ,
24
+ otpBypassToken : {
25
+ list : 'otp-bypass-tokens/' ,
26
+ detail : 'otp-bypass-tokens/<id>/'
27
+ } ,
28
+ authFactor : {
29
+ list : 'auth-factors/' ,
30
+ detail : 'auth-factors/<id>/'
31
+ }
32
+ } ;
33
+ exports . default = urls ;
Original file line number Diff line number Diff line change
1
+ import { COUNTRY_ISO_CODES , UK_COUNTIES } from '../helpers/general' ;
2
+ import type { Model } from '../helpers/rtkQuery' ;
3
+ export type User = Model < number , {
4
+ password : string ;
5
+ last_login ?: Date ;
6
+ first_name : string ;
7
+ last_name ?: string ;
8
+ email ?: string ;
9
+ is_staff : boolean ;
10
+ is_active : boolean ;
11
+ date_joined : Date ;
12
+ requesting_to_join_class ?: string ;
13
+ teacher ?: Teacher ;
14
+ student ?: Student ;
15
+ } > ;
16
+ export type Teacher = Model < number , {
17
+ user : number ;
18
+ school ?: number ;
19
+ is_admin : boolean ;
20
+ } > ;
21
+ export type Student = Model < number , {
22
+ user : number ;
23
+ school : number ;
24
+ klass : string ;
25
+ } > ;
26
+ export type School = Model < number , {
27
+ name : string ;
28
+ country ?: ( typeof COUNTRY_ISO_CODES ) [ number ] ;
29
+ uk_county ?: ( typeof UK_COUNTIES ) [ number ] ;
30
+ } > ;
31
+ export type Class = Model < string , {
32
+ name : string ;
33
+ teacher : number ;
34
+ school : number ;
35
+ read_classmates_data : boolean ;
36
+ receive_requests_until ?: Date ;
37
+ } > ;
38
+ export type AuthFactor = Model < number , {
39
+ user : number ;
40
+ type : 'otp' ;
41
+ } > ;
Original file line number Diff line number Diff line change
1
+ export { } ;
Original file line number Diff line number Diff line change
1
+ declare const urls : Record < string , {
2
+ list : string ;
3
+ detail : string ;
4
+ } > ;
5
+ export default urls ;
Original file line number Diff line number Diff line change
1
+ var urls = {
2
+ user : {
3
+ list : 'users/' ,
4
+ detail : 'users/<id>/'
5
+ } ,
6
+ teacher : {
7
+ list : 'users/teachers/' ,
8
+ detail : 'users/teachers/<id>/'
9
+ } ,
10
+ student : {
11
+ list : 'users/students/' ,
12
+ detail : 'users/students/<id>/'
13
+ } ,
14
+ school : {
15
+ list : 'schools/' ,
16
+ detail : 'schools/<id>/'
17
+ } ,
18
+ class : {
19
+ list : 'classes/' ,
20
+ detail : 'classes/<id>/'
21
+ } ,
22
+ otpBypassToken : {
23
+ list : 'otp-bypass-tokens/' ,
24
+ detail : 'otp-bypass-tokens/<id>/'
25
+ } ,
26
+ authFactor : {
27
+ list : 'auth-factors/' ,
28
+ detail : 'auth-factors/<id>/'
29
+ }
30
+ } ;
31
+ export default urls ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codeforlife" ,
3
- "version" : " 1.27.6 " ,
3
+ "version" : " 1.27.7 " ,
4
4
"private" : true ,
5
5
"description" : " Common frontend code" ,
6
6
"main" : " ./lib/cjs/index.js" ,
Original file line number Diff line number Diff line change 1
- import baseQuery from ' ./baseQuery'
2
- import endpoints from ' ./endpoints'
1
+ import baseQuery from " ./baseQuery"
2
+ import endpoints from " ./endpoints"
3
3
import type {
4
4
AuthFactor ,
5
5
Class ,
6
6
School ,
7
7
Student ,
8
8
Teacher ,
9
- User
10
- } from ' ./models'
11
- import tagTypes from ' ./tagTypes'
12
- import urls from ' ./urls'
9
+ User ,
10
+ } from " ./models"
11
+ import tagTypes from " ./tagTypes"
12
+ import urls from " ./urls"
13
13
14
14
export {
15
15
baseQuery ,
@@ -21,6 +21,5 @@ export {
21
21
type School ,
22
22
type Student ,
23
23
type Teacher ,
24
- type User
24
+ type User ,
25
25
}
26
-
You can’t perform that action at this time.
0 commit comments