@data-fair/lib-common-types 1.0.0 → 1.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.
@@ -0,0 +1,145 @@
1
+ declare const _default: {
2
+ $id: string;
3
+ 'x-exports': string[];
4
+ type: string;
5
+ title: string;
6
+ additionalProperties: boolean;
7
+ properties: {
8
+ user: {
9
+ $ref: string;
10
+ };
11
+ organization: {
12
+ $ref: string;
13
+ };
14
+ account: {
15
+ $ref: string;
16
+ };
17
+ accountRole: {
18
+ type: string;
19
+ };
20
+ lang: {
21
+ type: string;
22
+ };
23
+ dark: {
24
+ type: string;
25
+ };
26
+ };
27
+ $defs: {
28
+ organizationMembership: {
29
+ type: string;
30
+ additionalProperties: boolean;
31
+ required: string[];
32
+ properties: {
33
+ id: {
34
+ type: string;
35
+ };
36
+ name: {
37
+ type: string;
38
+ };
39
+ role: {
40
+ type: string;
41
+ };
42
+ department: {
43
+ type: string;
44
+ };
45
+ departmentName: {
46
+ type: string;
47
+ };
48
+ dflt: {
49
+ type: string;
50
+ enum: number[];
51
+ };
52
+ };
53
+ };
54
+ userRef: {
55
+ type: string;
56
+ additionalProperties: boolean;
57
+ required: string[];
58
+ properties: {
59
+ id: {
60
+ type: string;
61
+ };
62
+ name: {
63
+ type: string;
64
+ };
65
+ };
66
+ };
67
+ user: {
68
+ type: string;
69
+ additionalProperties: boolean;
70
+ required: string[];
71
+ properties: {
72
+ email: {
73
+ type: string;
74
+ format: string;
75
+ };
76
+ id: {
77
+ type: string;
78
+ };
79
+ name: {
80
+ type: string;
81
+ };
82
+ organizations: {
83
+ type: string;
84
+ items: {
85
+ $ref: string;
86
+ };
87
+ };
88
+ isAdmin: {
89
+ type: string;
90
+ enum: number[];
91
+ };
92
+ adminMode: {
93
+ type: string;
94
+ enum: number[];
95
+ };
96
+ asAdmin: {
97
+ $ref: string;
98
+ };
99
+ pd: {
100
+ type: string;
101
+ format: string;
102
+ };
103
+ ipa: {
104
+ type: string;
105
+ title: string;
106
+ enum: number[];
107
+ };
108
+ idp: {
109
+ type: string;
110
+ title: string;
111
+ enum: number[];
112
+ };
113
+ os: {
114
+ type: string;
115
+ title: string;
116
+ enum: number[];
117
+ };
118
+ };
119
+ };
120
+ account: {
121
+ type: string;
122
+ additionalProperties: boolean;
123
+ required: string[];
124
+ properties: {
125
+ type: {
126
+ type: string;
127
+ enum: string[];
128
+ };
129
+ id: {
130
+ type: string;
131
+ };
132
+ name: {
133
+ type: string;
134
+ };
135
+ department: {
136
+ type: string;
137
+ };
138
+ departmentName: {
139
+ type: string;
140
+ };
141
+ };
142
+ };
143
+ };
144
+ };
145
+ export default _default;
@@ -0,0 +1,160 @@
1
+ export default {
2
+ $id: 'https://github.com/data-fair/lib/session-state',
3
+ 'x-exports': ['types', 'validate'],
4
+ type: 'object',
5
+ title: 'session state',
6
+ additionalProperties: false,
7
+ properties: {
8
+ user: {
9
+ $ref: '#/$defs/user'
10
+ },
11
+ organization: {
12
+ $ref: '#/$defs/organizationMembership'
13
+ },
14
+ account: {
15
+ $ref: '#/$defs/account'
16
+ },
17
+ accountRole: {
18
+ type: 'string'
19
+ },
20
+ lang: {
21
+ type: 'string'
22
+ },
23
+ dark: {
24
+ type: 'boolean'
25
+ }
26
+ },
27
+ $defs: {
28
+ organizationMembership: {
29
+ type: 'object',
30
+ additionalProperties: false,
31
+ required: [
32
+ 'id',
33
+ 'name',
34
+ 'role'
35
+ ],
36
+ properties: {
37
+ id: {
38
+ type: 'string'
39
+ },
40
+ name: {
41
+ type: 'string'
42
+ },
43
+ role: {
44
+ type: 'string'
45
+ },
46
+ department: {
47
+ type: 'string'
48
+ },
49
+ departmentName: {
50
+ type: 'string'
51
+ },
52
+ dflt: {
53
+ type: 'integer',
54
+ enum: [1]
55
+ }
56
+ }
57
+ },
58
+ userRef: {
59
+ type: 'object',
60
+ additionalProperties: false,
61
+ required: [
62
+ 'id',
63
+ 'name'
64
+ ],
65
+ properties: {
66
+ id: {
67
+ type: 'string'
68
+ },
69
+ name: {
70
+ type: 'string'
71
+ }
72
+ }
73
+ },
74
+ user: {
75
+ type: 'object',
76
+ additionalProperties: false,
77
+ required: [
78
+ 'email',
79
+ 'id',
80
+ 'name',
81
+ 'organizations'
82
+ ],
83
+ properties: {
84
+ email: {
85
+ type: 'string',
86
+ format: 'email'
87
+ },
88
+ id: {
89
+ type: 'string'
90
+ },
91
+ name: {
92
+ type: 'string'
93
+ },
94
+ organizations: {
95
+ type: 'array',
96
+ items: {
97
+ $ref: '#/$defs/organizationMembership'
98
+ }
99
+ },
100
+ isAdmin: {
101
+ type: 'integer',
102
+ enum: [1]
103
+ },
104
+ adminMode: {
105
+ type: 'integer',
106
+ enum: [1]
107
+ },
108
+ asAdmin: {
109
+ $ref: '#/$defs/userRef'
110
+ },
111
+ pd: {
112
+ type: 'string',
113
+ format: 'date'
114
+ },
115
+ ipa: {
116
+ type: 'integer',
117
+ title: 'short for ignorePersonalAccount',
118
+ enum: [1]
119
+ },
120
+ idp: {
121
+ type: 'integer',
122
+ title: 'Is the user coming from a core ID provider ?',
123
+ enum: [1]
124
+ },
125
+ os: {
126
+ type: 'integer',
127
+ title: 'short for orgStorage',
128
+ enum: [1]
129
+ }
130
+ }
131
+ },
132
+ account: {
133
+ type: 'object',
134
+ additionalProperties: false,
135
+ required: [
136
+ 'type',
137
+ 'id',
138
+ 'name'
139
+ ],
140
+ properties: {
141
+ type: {
142
+ type: 'string',
143
+ enum: ['user', 'organization']
144
+ },
145
+ id: {
146
+ type: 'string'
147
+ },
148
+ name: {
149
+ type: 'string'
150
+ },
151
+ department: {
152
+ type: 'string'
153
+ },
154
+ departmentName: {
155
+ type: 'string'
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -1,45 +0,0 @@
1
- {
2
- "$id": "https://github.com/data-fair/lib/account",
3
- "x-exports": ["types", "validate", "schema"],
4
- "type":"object",
5
- "title": "account",
6
- "required": ["type", "id", "name"],
7
- "properties":{
8
- "type":{
9
- "type":"string",
10
- "enum": ["user", "organization"]
11
- },
12
- "id":{
13
- "type":"string"
14
- },
15
- "name":{
16
- "type":"string"
17
- },
18
- "department":{
19
- "type":"string"
20
- },
21
- "departmentName":{
22
- "type":"string"
23
- }
24
- },
25
- "$defs": {
26
- "accountKeys": {
27
- "type": "object",
28
- "title": "account keys",
29
- "required": ["type", "id"],
30
- "additionalProperties": false,
31
- "properties": {
32
- "type":{
33
- "type":"string",
34
- "enum": ["user", "organization"]
35
- },
36
- "id": {
37
- "type": "string"
38
- },
39
- "department": {
40
- "type": "string"
41
- }
42
- }
43
- }
44
- }
45
- }
@@ -1,141 +0,0 @@
1
- {
2
- "$id": "https://github.com/data-fair/lib/application",
3
- "title": "Application",
4
- "x-exports": [
5
- "types",
6
- "schema"
7
- ],
8
- "type": "object",
9
- "required": [
10
- "id",
11
- "title",
12
- "exposedUrl",
13
- "href",
14
- "wsUrl",
15
- "owner",
16
- "configuration"
17
- ],
18
- "properties": {
19
- "id": {
20
- "type": "string",
21
- "description": "Globally unique identifier of the application"
22
- },
23
- "title": {
24
- "type": "string",
25
- "description": "Short title of the application"
26
- },
27
- "exposedUrl": {
28
- "type": "string",
29
- "description": "The URL where this application is exposed"
30
- },
31
- "href": {
32
- "type": "string",
33
- "description": "The URL where this resource can be fetched"
34
- },
35
- "wsUrl": {
36
- "type": "string",
37
- "description": "The URL where this application can be accessed through a websocket"
38
- },
39
- "owner": {
40
- "$ref": "https://github.com/data-fair/lib/account#/$defs/accountKeys"
41
- },
42
- "configuration": {
43
- "type": "object",
44
- "description": "A free format configuration object used by applications. A minimal common structure is used to ensure proper linking between applications and datasets and remote services",
45
- "additionalProperties": true,
46
- "properties": {
47
- "datasets": {
48
- "type": "array",
49
- "items": {
50
- "$ref": "#/$defs/dataset"
51
- }
52
- }
53
- }
54
- }
55
- },
56
- "$defs": {
57
- "dataset": {
58
- "type": [
59
- "object",
60
- "null"
61
- ],
62
- "required": [
63
- "href",
64
- "id",
65
- "title",
66
- "finalizedAt"
67
- ],
68
- "properties": {
69
- "href": {
70
- "type": "string"
71
- },
72
- "id": {
73
- "type": "string"
74
- },
75
- "title": {
76
- "type": "string"
77
- },
78
- "key": {
79
- "type": "string",
80
- "description": "Not the id of the dataset, but a key inside this configuration object to define the role of the dataset in this context."
81
- },
82
- "schema": {
83
- "type": "array",
84
- "items": {
85
- "$ref": "#/$defs/field"
86
- }
87
- },
88
- "finalizedAt": {
89
- "type": "string",
90
- "format": "date-time"
91
- }
92
- }
93
- },
94
- "field": {
95
- "type": "object",
96
- "required": [
97
- "key",
98
- "type"
99
- ],
100
- "properties": {
101
- "key": {
102
- "type": "string"
103
- },
104
- "type": {
105
- "type": "string"
106
- },
107
- "format": {
108
- "type": "string"
109
- },
110
- "title": {
111
- "type": "string"
112
- },
113
- "x-originalName": {
114
- "type": "string"
115
- },
116
- "x-group": { "type": "string" },
117
- "x-refersTo": {
118
- "deprecated": true,
119
- "type": ["string", "null"]
120
- },
121
- "x-concept": {
122
- "type": "object",
123
- "properties": {
124
- "id": { "type": "string" },
125
- "title": { "type": "string" },
126
- "primary": { "type": "boolean" }
127
- }
128
- },
129
- "x-labels": {
130
- "type": "object",
131
- "additionalProperties": {
132
- "type": "string"
133
- }
134
- },
135
- "x-labelsRestricted": {
136
- "type": "boolean"
137
- }
138
- }
139
- }
140
- }
141
- }
@@ -1,157 +0,0 @@
1
- {
2
- "$id": "https://github.com/data-fair/lib/session-state",
3
- "x-exports": ["types", "validate", "schema"],
4
- "type":"object",
5
- "title": "session state",
6
- "additionalProperties":false,
7
- "properties":{
8
- "user":{
9
- "$ref":"#/$defs/user"
10
- },
11
- "organization":{
12
- "$ref":"#/$defs/organizationMembership"
13
- },
14
- "account":{
15
- "$ref":"#/$defs/account"
16
- },
17
- "accountRole":{
18
- "type":"string"
19
- },
20
- "lang":{
21
- "type":"string"
22
- },
23
- "dark":{
24
- "type":"boolean"
25
- }
26
- },
27
- "$defs":{
28
- "organizationMembership":{
29
- "type":"object",
30
- "additionalProperties":false,
31
- "required":[
32
- "id",
33
- "name",
34
- "role"
35
- ],
36
- "properties":{
37
- "id":{
38
- "type":"string"
39
- },
40
- "name":{
41
- "type":"string"
42
- },
43
- "role":{
44
- "type":"string"
45
- },
46
- "department":{
47
- "type":"string"
48
- },
49
- "departmentName":{
50
- "type":"string"
51
- },
52
- "dflt":{
53
- "type":"boolean"
54
- }
55
- }
56
- },
57
- "userRef":{
58
- "type":"object",
59
- "additionalProperties":false,
60
- "required":[
61
- "id",
62
- "name"
63
- ],
64
- "properties":{
65
- "id":{
66
- "type":"string"
67
- },
68
- "name":{
69
- "type":"string"
70
- }
71
- }
72
- },
73
- "user":{
74
- "type":"object",
75
- "additionalProperties":false,
76
- "required":[
77
- "email",
78
- "id",
79
- "name",
80
- "organizations"
81
- ],
82
- "properties":{
83
- "email":{
84
- "type":"string",
85
- "format":"email"
86
- },
87
- "id":{
88
- "type":"string"
89
- },
90
- "name":{
91
- "type":"string"
92
- },
93
- "organizations":{
94
- "type":"array",
95
- "items":{
96
- "$ref":"#/$defs/organizationMembership"
97
- }
98
- },
99
- "isAdmin":{
100
- "type":"integer",
101
- "enum":[
102
- 0,
103
- 1
104
- ]
105
- },
106
- "adminMode":{
107
- "type":"integer",
108
- "enum":[
109
- 0,
110
- 1
111
- ]
112
- },
113
- "asAdmin":{
114
- "$ref":"#/$defs/userRef"
115
- },
116
- "pd":{
117
- "type":"string",
118
- "format":"date"
119
- },
120
- "ipa":{
121
- "type":"integer",
122
- "enum":[
123
- 0,
124
- 1
125
- ]
126
- }
127
- }
128
- },
129
- "account":{
130
- "type":"object",
131
- "additionalProperties":false,
132
- "required":[
133
- "type",
134
- "id",
135
- "name"
136
- ],
137
- "properties":{
138
- "type":{
139
- "type":"string",
140
- "enum": ["user", "organization"]
141
- },
142
- "id":{
143
- "type":"string"
144
- },
145
- "name":{
146
- "type":"string"
147
- },
148
- "department":{
149
- "type":"string"
150
- },
151
- "departmentName":{
152
- "type":"string"
153
- }
154
- }
155
- }
156
- }
157
- }